This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2008-165845 filed on Jun. 25, 2008 and No. 2009-116494 filed on May 13, 2009, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to an apparatus and method for estimating a change amount in a register transfer level structure and to a computer-readable recording medium.
2. Related Art
In a design flow using high-level synthesis, in place of a register transfer level (hereinbelow, abbreviated as RTL) description which is conventionally manually created, an RTL description which is obtained by performing high-level synthesis on a behavioral description created using the C language or SystemC language. Essentially, after sufficiently verifying the behavioral description, a program has to advance to the next step in the design flow. However, there is a case that, after a program advances to a lower process with insufficient verification, a bug is found in behavioral description. In this case, when a high-level synthesis is performed again after the bug in the behavioral description is corrected, even a small change in the behavioral description, a large change may occur in a portion other than the changed portion in the RTL description which is output. Due to this, large backslide occurs in the lower process.
In the conventional RTL design, when correction of an RTL description becomes necessary in a stage of the lower process, the backslide is reduced by correcting only a change portion by ECO (Engineering Change Order) of performing correction equivalent to the correction on the RTL description onto a gate net list. Consequently, a method of shortening the backslide time is considered in which, in a manner similar to the above, the ECO in the RTL description, that is, a correction equivalent to the correction on the behavioral description is performed also in a design flow using the high-level synthesis.
However, since a functional unit is shared and a bit width is optimized in the high-level synthesized RTL description, the behavioral description and the RTL description are not easily associated with each other, and it is difficult to perform analysis by a person. A method of easily making behavioral description and RTL description associated with each other is known (refer to Japanese Patent Application Laid-Open No. 2006-285865). However, even if a correspondence is known by using the method, the scale of an RTL description change cannot be known due to the influence of optimization of the bit width and the like until a correction is actually made. Consequently, it is determined that the change is not a change of a scale at which the ECO can be performed in a lower process only after the RTL description is corrected.
There is also known a method of automatically correcting an RTL description by merging an RTL description obtained by performing the high-level synthesis only in a change part in a behavioral description with an RTL description before the change (refer to Japanese Patent Application Laid-Open No. 2007-34584). In the method, however, only addition of a functional unit is considered as the correction method, and a change in the bit width and the like is not also considered, so that a large amount of a change in an RTL description to be corrected, inaccuracy, and the like become an issue. As a result of redundant increase in the change amount in the RTL description corrected, there is the possibility that the change becomes a change of a scale at which the ECO cannot be performed.
In accordance with one embodiment of the present invention, there is provided an apparatus for estimating a change amount in a register transfer level structure, comprising: a correspondence relationship creating unit which describes a correspondence relationship among a behavioral description, a control data flow graph, and a register transfer level structure of a register transfer level description created by performing high-level synthesis on the behavioral description, based on the behavioral description which is input, the control data flow graph which is input and created by performing high-level synthesis on the behavioral description, and binding information which is input and created by performing high-level synthesis on the behavioral description; and a register transfer level change amount estimating unit which estimates and outputs a change amount in the register transfer level structure, the change amount in the register transfer level structure being necessary to change the register transfer level description to a description equivalent to a partially changed behavioral description, based on information of the partially changed behavioral description obtained by partially changing the behavioral description and the created correspondence relationship.
Moreover, in accordance with another embodiment of the present invention, there is provided a method for estimating a change amount in a register transfer level structure, comprising: describing a correspondence relationship among a behavioral description, a control data flow graph, and a register transfer level structure of a register transfer level description created by performing high-level synthesis on the behavioral description, based on the behavioral description which is input, the control data flow graph which is input and created by performing high-level synthesis on the behavioral description, and binding information which is input and created by performing high-level synthesis on the behavioral description by a correspondence relationship creating unit; and estimating and outputting a change amount in the register transfer level structure, the change amount in the register transfer level structure being necessary to change the register transfer level description to a description equivalent to a partially changed behavioral description, based on information of the partially changed behavioral description obtained by partially changing the behavioral description and the created correspondence relationship by a register transfer level change amount estimating unit.
In addition, in accordance with a further embodiment of the present invention, there is provided a computer-readable recording medium storing a computer program for making a computer execute an estimation of a change amount in a register transfer level structure, wherein the computer program makes the computer describe a correspondence relationship among a behavioral description, a control data flow graph, and a register transfer level structure of a register transfer level description created by performing high-level synthesis on the behavioral description, based on the behavioral description which is input, the control data flow graph which is input and created by performing high-level synthesis on the behavioral description, and binding information which is input and created by performing high-level synthesis on the behavioral description and estimate and output a change amount in the register transfer level structure, the change amount in the register transfer level structure being necessary to change the register transfer level description to a description equivalent to a partially changed behavioral description, based on information of the partially changed behavioral description obtained by partially changing the behavioral description and the created correspondence relationship.
Embodiments of the present invention will be described below with reference to the drawings. The present invention is not limited by the embodiments.
A first embodiment of the present invention will be described with reference to
From a behavioral description 40, a control data flow graph 41 (hereinbelow, abbreviated as CDFG), and functional unit binding information 42 which are input, the correspondence relationship creating unit 2 creates a correspondence relationship between a line number of the behavioral description 40, expression of the behavioral description 40, expression of the CDFG 41 and allocation of an RTL structure. The CDFG 41 and the functional unit binding information 42 are obtained by performing high-level synthesis on the behavioral description 40. The RTL structure expresses a logic circuit described in the RTL description. The functional unit binding information 42 expresses allocation of an operation, a register, or an operand in the CDFG 41 to a functional unit or a register in the RTL structure.
The RTL change amount estimating unit 3 estimates and outputs an RTL structure change amount 50 necessary for a change equivalent to a change in the behavioral description 40 based on the above-described correspondence relationship and, as information in high-level synthesis of the behavioral description 40, register lifetime 43, bit-width information 44, functional unit/register sharing information 45, an operation result sharing information 46, behavioral description change information (information of a partially-changed behavioral description) 47, bit width change information 48, and a library 49. The details of the information will be described later. The RTL structure change amount 50 includes: component change information 51-1 to 51-n indicative of the number of addition pieces, area, delay, bit width, instance name, and the like of a functional unit, a register, and a multiplexer (MUX); MUX condition change information 52-1 to 52-n expressing a condition of selecting a multiplexer to be added or changed; and wire change information 53-1 to 53-n indicative of the number of wires to be connected or disconnected between components such as a functional unit and a register.
In the library 49, information of areas of various functional units and registers having different bit widths and delays in the components are stored. The library 49 is used by a high-level synthesis tool at the time of performing the high-level synthesis. In the embodiment, the information of areas and delays is also output to the component change information 51-1 to 51-n.
The process flow of the sub blocks of the RTL change amount estimating unit 3 in
The RTL change amount estimating unit 3 receives correspondence relationships of a line number and expression of a behavioral description, expression of CDFG, and assignment of RTL structure as shown in
First, the movable range searching unit 31 specifies an operation on the CDFG to which an operation to be changed corresponds based on the correspondence relationships shown in
After that, based on register lifetime (not shown) as one of high-level synthesis results, the movable range searching unit 31 obtains a range in which the changed operation (OR operation: the operation to be added) can move in a cycle (clock cycle) in the CDFG. The register lifetime is information indicative of variables stored in the registers cycle by cycle. The movable range of the changed operation is from “a first cycle in which an operand of the changed operation is determined” until “a cycle of executing an operation whose operand is a result of the changed operation”. The movable range searching unit 31 searches a cycle in which a variable as the operand exists with reference to the register lifetime. In the example, the operand of the OR operation to be added is the result of AND operation 2, so that the first cycle in which the OR operation can be set is Cycle 5 in which the AND operation 2 is executed. Although a cycle of executing an operation using the result of the OR operation as an operand is the latest cycle in which the OR operation can be set, the description will not be given for easier understanding. Next, the movable range searching unit 31 outputs the obtained movable range and, in the following sub blocks, estimates a change amount of the RTL structure in the case where the changed operation is set in each cycle in the movable range. Processes performed in the case of adding the OR operation in Cycle 5 will be described below.
Next, the operand searching unit 32 checks whether an operand of a changed operation (operation to be added) exists in the cycle of executing the operation or not. In the example, the result of AND operation 2 in the operands of the OR operation to be added exists in Cycle 5 but a variable “c” in the operands of the OR operation to be added does not exist. Consequently, the operand searching unit 32 searches for a register that stores the variable “c” from cycles before Cycle 5 with reference to the register lifetime. In the example, the variable “c” is used as the operand of the AND operation 1 (the operation corresponding to the tenth line in the behavioral description shown in
Next, the bit width change amount estimating unit 33 estimates whether there is a component whose bit width is changed due to the change in the operation or not and a change amount in the component with reference to bit width information (not shown) indicative of names and bit widths of registers, functional units, and multiplexers. In the example, even when the OR operation is added, no change occurs in the bit width. Consequently, the process advances to the next block.
The functional unit sharability checking unit 34 checks whether the changed operation (the operation to be added) and another operation can share the same functional unit (existing component) in the RTL structure or not based on the functional unit/register sharing information shown in
Next, the operation result share state checking unit 35 checks whether an operation result (an operation result of the AND operation 2) whose output destination is changed is shared by another operation or not. When the same operation of the same operand is performed a plurality of times on a behavioral description, there is a case that the operation is not performed in a plurality of times on the RTL description, and high-level synthesis is performed so that one operation result is shared. In the case of changing only an operation in one part on a behavioral description, the influence of the change should not be exerted on all of output destinations of the result of the changed operation. Since the example relates to a change of adding an operation, a check is made to see whether a result of the AND operation 2 as an operation immediately before the operation to be added is shared or not. At this time, operation result sharing information as shown in
Next, the operation share state checking unit 36 checks whether the operation to be deleted and another operation share a functional unit or not. Since the example relates to a change of adding an operation, it is unnecessary to consider this point.
As a result, the CDFG after the change is as shown in
The RTL change amount estimating unit 3 outputs an estimation of change amounts in the RTL structure from the sub blocks, that is, information of “addition components: two 1-bit MUXs and one register (1 bit)”, “MUX condition change: addition of MUX (selection condition: Cycle 4 and Cycle 5)”, and “wire change: four wires connected and one wire disconnected”. Further, in a manner similar to the above, the RTL change amount estimating unit 3 obtains and outputs an estimation of a change amount in the RTL structure in the case where the OR operation is set in each of cycles obtained by the movable range searching unit 31. That is, from the RTL change amount estimating unit 3, as shown in
As the result of estimation of the change amount in the RTL structure, the instance name and the wire name are also output. By the names, the designer knows a part to be changed in the RTL structure and the RTL description.
As described above, in the embodiment, the change amount in the RTL structure accompanying a change in the behavioral description can be estimated before the RTL description is actually changed. Consequently, from the information, the designer can examine whether ECO is actually performed or not in advance. It can eliminate a wasteful backslide process of re-performing the operation from the high-level synthesis since it is found that, after a change in an RTL description is made manually, the change is not of a scale at which the ECO can be performed. By considering sharing of functional units, the change amount in the RTL structure is reduced as much as possible, and an estimation result, on the basis of which it is determined that the possibility of performing the ECO is high, can be output. As a result, the design period can be shortened. Further, by outputting an estimation result in each case where a cycle in which an operation to be changed is set is changed, the possibility of outputting a solution adapted to the circumstances of the designer becomes high.
A second embodiment of the present invention will now be described with reference to
The correspondence relationship creating unit 2 outputs a correspondence relationship as shown in
Next, the RTL change amount estimating unit 3 estimates a change amount in the RTL structure accompanying a change in a behavioral description. However, the example relates to the change of deleting operation. It is therefore unnecessary to search the movable range of operation, and the movable range searching unit 31 does not perform any operation.
The operand searching unit 32 and the bit width change amount estimating unit 33 perform processes similar to those of the first embodiment.
Since the example relates to the change of deleting the operation, the functional unit sharability checking unit 34 does not perform any operation.
Next, the operation result share state checking unit 35 checks whether a result of the operation to be deleted (the addition 2 shown in
The operation share state checking unit 36 checks whether an operation to be deleted (addition 2) and another operation share a functional unit in the RTL structure or not with reference to the functional unit/register sharing information shown in
As a result, the changed CDFG becomes as shown in
As described above, in the embodiment, changes of not only addition of an operation but also deletion of an operation can be handled. Therefore, by combining deletion and addition of an operation, a certain operation can be changed to another operation. It can widen the range of a design case to which the apparatus for estimating a change amount in an RTL structure as the embodiment can be applied. That is, the possibility of reducing the backslide process in various design cases becomes higher.
Next, a third embodiment of the present invention will be described with reference to
First, the correspondence relationship creating unit 2 performs processes in a manner similar to the first and second embodiments and outputs a correspondence relationship as shown in
Subsequently, processes in the RTL change amount estimating unit 3 will be described. First, the movable range searching unit 31 searches a movable range on a CDFG of an operation to be changed. Since the example relates to a change in an operand, the movable range searching unit 31 searches a movable range of an operation using the operand to be changed (the addition 1 shown in
Next, the operand searching unit 32 searches whether or not a changed operand exists in Cycle 4 in which the addition 1 as the operation using the operand to be changed is executed. That is, the operand searching unit 32 searches an operand “a” which is not changed and an operand “c” changed from an operand “b”. In the example, the cycle in which the addition 1 is set is the same as that before the change, so that the operand “a” naturally exists in Cycle 4, but the operand “c” to be changed does not exist. Due to this, the operand searching unit 32 goes back through the cycles and searches the operand “c” with reference to register lifetime (not shown). In the example, as understood from the CDFG shown in
Next, the bit width change amount estimating unit 33 estimates whether the bit width of the component is changed due to the change in the operand or not and an amount of the change. At the time of estimation, bit width information indicative of a bit width assigned on the RTL description of each component and a bit width declared in the behavioral description as shown in
Next, the functional unit sharability checking unit 34 refers to the information of a component whose bit width has to be changed shown in
Next, the operation result share state checking unit 35 checks whether a result of the addition 1 (a result of an operation whose output destination is to be changed) as an operation using an operand to be changed is shared or not. In the example, the result is not shared. Consequently, the output wire of the addition 1 may be disconnected. Therefore, from the operation result share state checking unit 35, as an estimation of a change amount in the RTL structure, information (third information) of “wire change: one wire disconnected” is output.
The operation share state checking unit 36 checks whether an adder Add5_1 to which the addition 1 (operation to be deleted) is assigned before a change in the behavioral description is shared with another operation or not. In this example, it is understood from the functional unit/register share information shown in
From the above, the changed CDFG becomes as shown in
As described above, in the embodiment, the influence of a change in a bit width in an RTL description accompanying a change in a behavioral description can be also estimated, so that an estimation result of higher precision can be output. Consequently, a backslide process which occurs due to a determination error caused by an error in an estimation of a bit width can be reduced.
Next, a fourth embodiment of the present invention will be described with reference to
When high-level synthesis is used, due to automatic scheduling of a high-level synthesis tool, sharing of functional units, and the like, the operation order between the behavioral description and the RTL description may be changed. When a change part in the behavioral description corresponds to a part where the operation order is changed, there is a case that the change amount cannot be estimated in the first to third embodiments. In this case, a correct change amount cannot be estimate without changing the scheduling result in the RTL.
The configurations and processes different from those of the first to third embodiments will be mainly described, and the detailed description of similar configurations and processes will not be repeated.
In a manner similar to the first to third embodiments, using an existing technique, the correspondence relationship creating unit 2 creates a correspondence relationship between a line number of the behavioral description 40, expression of the behavioral description 40, expression of the CDFG 41, and allocation of an RTL structure from the behavioral description 40 which is input, the CDFG 41 which is input, and the functional unit binding information 42 at the time of high-level synthesis which is input.
In a manner similar to the first to third embodiments, the RTL change amount estimating unit 30 performs the following process by the movable range searching unit 31, the operand searching unit 32, the bit width change amount estimating unit 33, the functional unit sharability checking unit 34, the operation result share state checking unit 35, and the operation share state checking unit 36. Specifically, the RTL structure change amount 50 necessary for a change equivalent to a change in the behavioral description 40 is estimated and output based on the above-described correspondence relationship and, as information in high-level synthesis of the behavioral description 40, the register lifetime 43, the bit-width information 44, the functional unit/register sharing information 45, the operation result sharing information 46, the behavioral description change information 47, the bit width change information 48, and the library 49. The RTL structure change amount 50 includes: the component change information 51-1 to 51-n indicative of the number of addition pieces, area, delay, bit width, instance name, and the like of a functional unit, a register, and a multiplexer (MUX); the MUX condition change information 52-1 to 52-n expressing a condition of selecting a multiplexer to be added or changed; and wire change information 53-1 to 53-n indicative of the number of wires to be connected or disconnected between components such as a functional unit and a register.
The scheduling change unit 4 is called by the movable range searching unit 31 when the operation order between a behavioral description (SystemC description) and the RTL description is changed in a change part in the behavioral description which cannot be handled by components from the movable range searching unit 31 to the operation share state checking unit 36 in the RTL change amount estimating unit 30. The scheduling change unit 4 attempts to change the operation scheduling in the RTL. There is the possibility that a change in the operation order becomes a problem in the case of changing an operand itself and in the case of adding an operand due to addition of an operation. The case of adding an operand due to addition of an operation refers to, for example, as described in the first embodiment, the case of adding an operand “c” (operand to be added) by adding an OR operation (operation to be added).
In the example of
Next, the operation of the RTL structure change amount estimating apparatus 10 in the case where the operation order changes as described above will be described.
First, in a manner similar to the first and third embodiments, the movable range searching unit 31 obtains, with reference to the register lifetime, “the first cycle in which an operand (the variables x2 and “e” in the example of
In the case where the latter cycle is behind the former cycle, the movable range searching unit 31 does not call the scheduling change unit 4, and processes similar to those in the first and third embodiments are performed.
The scheduling change unit 4 changes scheduling in accordance with the flowchart of
In step S1, a check is made to see whether an operation (operation A1 in the example of
To move an operation to a preceding cycle, a space for setting the operation, in a cycle preceding the operation, has to be found. As a simple method, a cycle for only transferring data between registers or retaining data without executing an operation is found before the operation desired to be moved. For example, a CDFG in
In step S2, scheduling change information of an operation and variable whose scheduling has to be changed as a result of moving the operation for obtaining an operand after a change to a preceding cycle are listed up. In the scheduling change information, “operation/variable in a behavioral description (SystemC description)”, “functional unit/register in the RTL structure”, “an execution cycle before a change in the scheduling”, and “an execution cycle after a change in the scheduling” are described so as to be associated. In the example of
In step S3, the scheduling change information of the operations and variables listed up in step S2 are passed to the operand searching unit 32.
Based on the scheduling change information, the operand searching unit 32, the bit width change amount estimating unit 33, the functional unit sharability checking unit 34, the operation result share state checking unit 35, and the operation share state checking unit 36 estimate and output a change amount in the RTL structure in a manner similar to the first to third embodiments. That is, in the sub blocks, a check is made to see whether the operations and variables listed up can share an existing functional unit and an existing register in a cycle after the scheduling is changed with reference to the correspondence relationship between the expression of the CDFG and the assignment of the RTL structure and the functional unit/register sharing information. In the case where the exiting functional unit and the existing register can be shared, a change in the RTL structure is only a control signal of the MUX. In the case where they cannot be shared, a functional unit and a register have to be newly added.
Concretely, the operand searching unit 32, the bit width change amount estimating unit 33, the functional unit sharability checking unit 34, the operation result share state checking unit 35, and the operation share state checking unit 36 perform processes in order on the operations in the scheduling change information from the operation in the early cycle. In the example of
Finally, a change in the operation order is stopped and, with respect to an operation whose operand is to be changed, a change amount in the RTL structure is estimated in a manner similar to the third embodiment. The RTL change amount estimating unit 30 outputs a result of estimation of the change amount in the RTL structure in a manner similar to the first to third embodiments.
On the other hand, in the case where the operation cannot be moved to a preceding cycle by the number of necessary cycles in step S1, the process advances to step S4. In step S4, the maximum number of cycles which can be moved to preceding cycles obtained in step S1 is subtracted from the number of necessary cycles, and the process advances to step S5. In the example of
In step S5, a check is made to see whether the operation (the operation A3 in the example of
In the case where a space of the number of necessary cycles cannot be found in any one of the paths in step S5, the maximum number of cycles of moving the operation is obtained in a manner similar to the step S1, and the process advances to step S6. In the case of moving the operation to a backward cycle, different from the case of moving the operation to a preceding cycle, the operation can be moved by any cycles by extending latency. However, when the latency is extended, there is the possibility that a change amount in the RTL structure becomes too large, and the specifications may be influenced. In this case, therefore, not an estimation of a change amount in the RTL structure but a latency increase amount indicating that the latency has to be increased by the number of cycles is output. The latency increase amount is a value obtained by subtracting the maximum number of cycles obtained in step S5 from the number of necessary cycles.
That is, in the case where a change of the operation order cannot be prevented, the scheduling change unit 4 outputs the latency increase amount, and the RTL change amount estimating unit 30 outputs the latency increase amount in place of the change amount in the RTL structure.
As described above, in the embodiment, the cycle in which the operation for obtaining an operand after a change is executed is moved on the CDFG at the time of ECO in the RTL description subjected to high-level synthesis. Consequently, a change in the operation order between the behavioral level and the RTL which cannot be prevented in the first to third embodiments is prevented, and a change amount in the RTL structure can be estimated. Therefore, the number of cases which can be handled increases. As a result, in many cases, the designer can promptly make a decision to perform the ECO on the RTL description or perform the high-level synthesis again. The backslide process of re-performing operations from the high-level synthesis to the lower process in spite of a scale which can be corrected by the ECO can be reduced.
In the case of also adding an operand by addition of an operation, in the above-described process, it is sufficient to use the “operation to be added” in place of the “operation whose operand is to be changed”, and use the “operand to be added” in place of the “operand after the change”.
The above-described method of estimating a change amount in the RTL structure can be executed by controlling the RTL structure change amount estimating apparatus shown in
Although the embodiments of the present invention have been described in detail above, the concrete configurations are not limited to the foregoing embodiments but can be variously modified without departing from the gist of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
2008-165845 | Jun 2008 | JP | national |
2009-116494 | May 2009 | JP | national |