US2006020574A1PendingUtilityA1

Area optimization of hardware for algorithms by optimizing sizes of variables of the algorithm

Assignee: MENTOR GRAPHICS CORPPriority: Jul 21, 2004Filed: Jul 21, 2004Published: Jan 26, 2006
Est. expiryJul 21, 2024(expired)· nominal 20-yr term from priority
G06F 30/327G06F 11/3447G06F 2201/865
40
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Described herein are methods and systems for optimizing area related to hardware implementation of algorithms. The algorithms may be related to functionality of an embedded system, for instance. System functionality may be initially implemented in software and converted to hardware implementation. Prior to implementing system functionality in actual hardware, algorithms for selected system functionality or desirable all system functionality may be evaluated to determine values attained by selected variables or desirably all the variables comprised therein. In one embodiment, a probe may applied to the original software code to determine a maximum value and a minimum value corresponding to each of the variables of the algorithm (or at least one such variable) may be tracked across one or more invocations of functions (or other code components) of the algorithm comprising such variables. Based on such tracked values, a minimum size (e.g., in bit-width), for each of the variables, needed to express the various values attained by the variables may be determined. The original software code implementing system functionality may then be modified to declare or otherwise specify an optimal (e.g., the minimum bit-width needed to express values attained) bit-width, which can result in reduced area for a hardware implementation.

Claims

exact text as granted — not AI-modified
1 . A method for determining optimal sizes of variables comprising a computer program, the method comprising: 
 applying probes to record values attained by at least one variable of the computer program;    based on the recorded values of the at least one variable, determining at least a minimum number of bits needed to express the recorded values of the at least one variable; and    based on the at least minimum number of bits needed to express the recorded values of the at least one variable determining an optimal size for the at least one variable.    
   
   
       2 . The method of  claim 1 , wherein applying probes to record values attained by the at least one variable comprises maintaining a record of a minimum value attained by the at least one variable and maintaining a record of a maximum value attained by the at least one variable.  
   
   
       3 . The method of  claim 2 , wherein determining the at least minimum number of bits needed to express the recorded values of the at least one variable of the computer program further comprises determining the minimum number of bits needed to express both the minimum and maximum values attained by the at least one variable.  
   
   
       4 . The method of  claim 1 , wherein applying the probes to record values attained by the at least one variable of the computer program comprises converting an original form of the computer program representation to a probe-applied representation of the computer program.  
   
   
       5 . The method of  claim 4 , wherein the probe-applied representation of the computer program comprises one or more functions calls adapted for maintaining a record of a minimum and a maximum value attained by the at least one variable of the computer program.  
   
   
       6 . The method of  claim 5 , wherein determining the at least minimum number of bits needed to express the recorded values of the at least one variable of the computer program comprises executing the probe-applied representation of the computer program.  
   
   
       7 . The method of  claim 6 , wherein the execution of the probe-applied representation of the computer program is driven by test bench data provided by a performance profile database comprising data collected from a previous execution of the computer program.  
   
   
       8 . The method of  claim 6 , wherein the one or more function calls refer to software code associated with a software function library comprising software code related to functions operable for maintaining a record of a minimum and a maximum value attained by the at least one variable of the computer program.  
   
   
       9 . The method of  claim 6 , wherein the one or more function calls refer to software code within the probe-applied representation of the computer program adapted for maintaining a record of a minimum and a maximum value attained by the at least one variable of the computer program.  
   
   
       10 . The method of  claim 1 , further comprising: generating a bit-width report comprising hints of at least one bit-width related to the optimal size for the at least one variable.  
   
   
       11 . An apparatus for optimizing area needed for hardware implementation of an algorithm, the apparatus comprising: 
 a register analyzer operable for initiating execution of at least some portion of a software implementation of the algorithm and maintaining a record of a minimum value and a maximum value attained by at least one variable of the at least some portion of the software implementation of the algorithm as a result of execution of the at least some portion of the software implementation of the algorithm;    a performance profile database comprising test bench data for driving the execution of the at least some portion of the software implementation of the algorithm; and    a probe function library comprising software code related to probe functions to be invoked by the register analyzer for maintaining the record of the minimum value and the maximum value attained by the at least one variable of the software implementation of the algorithm.    
   
   
       12 . The apparatus of  claim 11 , wherein the at least some portion of the software implementation of the algorithm is adapted to comprise probe function calls for maintaining a record of a minimum value and a maximum value attained by the at least one variable of the at least some portion of the software implementation of the algorithm.  
   
   
       13 . The apparatus of  claim 11 , wherein the performance profile database is generated by simulating the execution of the software implementation of the program.  
   
   
       14 . The apparatus of  claim 11 , wherein the register analyzer is further operable for generating a bit-width report comprising hints for optimal bit-width sizes sufficient to express values attained by the at least one variable of the at least some portion of the software implementation of the algorithm as a result of the execution of the at least some portion of the software implementation of the algorithm.  
   
   
       15 . The apparatus of  claim 14 , wherein the bit-width report comprises at least a maximum value, and a minimum value data field respectively related to the at least one variable of the at least some portion of the software implementation of the algorithm.  
   
   
       16 . A computer implemented method for generating an area optimized hardware implementation of selected functionalities of an electronic system, the method comprising: 
 selecting at least one portion of a software implementation of the selected functionalities of the electronic system;    maintaining a record of at least one minimum value and one maximum value attained by at least one corresponding variable related to the at least one portion of the software implementation as a result of the execution of the at least one portion of the software implementation; and    based at least on the at least one minimum value and the at least one maximum value attained by the at least one corresponding variable related to the at least one portion of the software implementation, determining at least one optimal bit-width for the at least one corresponding variable.    
   
   
       17 . The method of  claim 16 , wherein maintaining the record of at least one minimum value and one maximum value attained by the at least one corresponding variable related to the at least one portion of the software implementation as the result of the execution of the at least one portion of the software implementation comprises compiling the at least one portion of the software implementation of the selected functionalities of the electronic system to a register analyzer version of the software implementation of the selected functionalities and executing the register analyzer version of the software implementation of the selected functionalities.  
   
   
       18 . The method of  claim 17 , wherein the register analyzer version of the software implementation of the selected functionalities comprises function calls for updating data structures related to maintaining the record of the at least one minimum value and the at least one maximum value attained by the at least one corresponding variable related to the at least one portion of the software implementation as the result of the execution of the at least one portion of the software implementation.  
   
   
       19 . The method of  claim 17 , wherein the function calls for updating the data structures related to maintaining the record of the at least one minimum value and the at least one maximum value attained by the at least one corresponding variable refer to a library of probe functions.  
   
   
       20 . The method of  claim 17 , wherein the execution of the register analyzer version of the software implementation of the selected functionalities is driven at least partially by data from a performance profile database comprising data from a previous execution of the software implementation of the selected functionalities of the electronic system.  
   
   
       21 . The method of  claim 16 , further comprising modifying the at least one portion of the software implementation by specifying the optimal bit-width for the at least one corresponding variable.  
   
   
       22 . The method of  claim 21 , further comprising synthesizing the modified portion of the software implementation to generate an area optimized hardware implementation of the at least one portion of the software implementation of the system functionality.  
   
   
       23 . The method of  claim 16 , further comprising generating a bit-width report including hints indicative of the at least one optimal bit-width determined for the at least one corresponding variable.

Join the waitlist — get patent alerts

Track US2006020574A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.