Other objects of the present invention will become clear from the following description of the preferred embodiments and the appended claims. Those skilled in the art will appreciate that there are many other advantages of the present invention by embodying the present invention.
Hereinafter, embodiments of the high-level synthesis method and high-level synthesis system according to the present embodiment will be described in detail referring to the accompanying drawings.
The behavior description file F1 is a file wherein the circuit to be a target of high-level synthesis is described by a behavior, that is written with a procedural language such as C language or the like. The behavior description file input device 1 reads the behavior description file F1 and generates the behavior data D1. The behavior data D1 has the data structure with which increment points of the function written in the behavior description file F1 can be identified. Further, it is the data that expresses the relation between a plurality of statements based on tree structure with respect to the statements within the function. The behavior data D1 has a one-to-one relation with the description contents of the behavior description file F1.
The behavior divider 2 divides the behavior data D1 into sections designated by the user or divides it into automatically extracted sections in accordance with the data path template to be used, in order to generate the behavioral unit data D2. The behavioral unit data D2 is the data expressing the behavioral unit as a function. Therefore, when the designated section is a function, the behavioral unit data is generated as the same data as the function that corresponds to the behavior data D1. In the meantime, when the designated section is a statement, extracted is a tree structure having the designated statement within the behavior data D1 as the root at the time of dividing the data, and the data is generated as a function including only the extracted tree structure. The behavioral unit data D2 is the data expressing a section in the inputted behavior description file F1, so that it can be considered as a partial behavior description of the behavior description file F1.
The corresponding device 5 generates the corresponding table TB of the functions within the behavioral unit data D2 and the functional units within the data path template TP. The functional units and the functions are in a one-to-many relationship and, this relationship indicates that the processing shown by the function is carried out in that functional unit. In the case where a plurality of functions is responded to a single functional unit, it indicates that the processing shown by those functions is not carried out simultaneously. The corresponding relationship between the functional units and the functions is either designated by the user or generated automatically.
When two or more functions are corresponded to a single functional unit in the corresponding table TB, the behavioral unit data binding device 6 generates the bound behavior data D3 by converting the processing contents shown by those functions into a single function for performing a binding processing of the processing contents through branch processing. When there is one function that corresponds to a single functional unit, the bound behavior data D3 is generated as the same data as the function of the behavioral unit data D2. When there are two or more functions, it is generated as the data of a function that is generated newly by the binding processing. The bound behavior data D3 is the data in which the behavioral unit is expressed as a function, and the function has a one-to-one relationship with the functional unit. As described above, the function and the functional units are converted from one-to-many relationship to one-to-one relationship.
The RTL generator 7 generates the RTL data D4 from the bound behavior data D3 according to the synthesis rule written in the functional unit of the data path template TP. The RTL description file output device 8 outputs the RTL data D4 as an RTL description file F3 that is written with hardware description language such as Verilog language or the like. The data path template register 3 registers the data path template file F2 to the data path template library L1. The data path template selector 4 selects a single data path template TP that is used for synthesizing the RTL data 4 from the behavior description file F1 in the data path template library L1. In the data path template file F2, there are written a connection of the signals between a functional unit and another functional unit and the performance parameters. The performance parameter is written as parameters for calculating the processing cycle number, the area, and the power consumption of the circuit that is generated using the data path template.
In the functional unit, the resources and a single control mode are written that are necessary for generating the RTL data D4 from the function within the behavioral unit data D2 that corresponds to the functional unit. As the resources, there are three types such as a storage resource that is defined in advance, an operation resource and an external I/F resource. There are four types of storage resources, such as a register file resource, a memory resource and a FIFO resource, and the number of necessary resources is written in the functional unit. The operation resource is written in a combination of basic operation devices that correspond to the operators in the behavior data D3 such as an adder, a multiplier, etc. For example, when the behavior description as the input is written with C language, an operation device that is in a one-to-one relationship with the operator defined by C language is defined as the basic operation device in advance. Further, a plurality of exclusive operations can be written in the operation resource. In that case, the operation contents of a control signal and a control signal value are written respectively.
The external I/F resource is a resource that generates a protocol signal of the behavior description as the target of synthesis between the outside. It is written by being selected from “no handshake”, “one-directional handshake”, and bidirectional handshake”, which are defined in advance. The control mode is written based on a single mode selected from a sequential processing mode, pipeline processing mode, and no-control mode, which are defined in advance.
Next, an example of description in the data path template file F2 will be described referring to the drawing.
Next, with respect to the high-level synthesis method using the data path template as the first embodiment of the present invention, specifically, the case of having the behavior description shown in
The behavior of the circuit that uses C language is written in
Before starting the processing of the flowchart shown in
First, in the behavior data generating step S2, the behavior description file input device 1 generates the behavior description files F11 and F12 to which the behavior data D1 is inputted. Three functional units U1, U2, and U3 are written in the data path template file F2′. Further, it is written in the functional unit U1 that the operation resource R1 can be used, and it is written in the functional unit U2 that the memory resource R2 can be used. Further, it is written in the control signal mode that the operation resource R1 is capable of executing three exclusive operations.
Next, in the data path template selecting step S2, the data path template selector 4 selects a single data path template TP to be used for synthesis from the data path template library L1. Hereinafter, the processing will be described assuming that, as described earlier, the data path template file F2′ is selected by the user.
Next, in the dividing step S3, the behavioral unit data D2 is generated through the behavior divider 2 from the behavior data D1 by each section designated by the user. This is the pre-processing for corresponding the behavior data D1 to the functional units that are written in the data path template TP. Except that the user designates the section generating the behavioral unit data D2, it is also possible to generate the behavioral unit data D2 automatically after extracting the resource within the data path template TP from the behavior data D1 by using a technique such as pattern matching or the like. In that case, the operation of the resource R1 within the functional unit U1 is searched from within the behavior data in the data path template file F2′.
Next, in the corresponding step S4, the corresponding device 5 correlates the functional units within the data path template TP with the functions within the behavioral unit data D2, and generates a corresponding table TB.
Furthermore, when the behavioral unit data D2 is automatically generated in the dividing step S3, the corresponding processing is also carried out automatically. Because the behavioral unit data D2 is generated based on the resource within the data path template TP, the behavioral unit data is already corresponded to the function unit. In the case where the behavior data D1 has a plurality of behavior descriptions that cannot be executed simultaneously, the processing until the corresponding step S4 is carried out by each of the behavior descriptions that are not executed simultaneously.
Next, in the binding step S5, the behavioral unit data binding device 6 binds the functions correlated with the functional units respectively so as to generate the bound behavior data D3.
Further, when the operation device resource can execute a plurality of exclusive operations, the bound behavior data D3 is stored as the data in a form of using the resource. For example, since the function U1 that corresponds to the functional unit U1 is a functional unit having the resource R1 that is capable of executing a plurality of exclusive operations of the bound behavior data D3, it is stored as the data in a form of using the resource R1 as shown by the bound behavior data D32.
In the case where the dividing step S3 and the binding step S5 are performed based on designation by the user, the target bound behavior data 32 is generated through generating a data flow graph from the function U1 of the bound behavior data D31, extracting a section that matches the operation contents written in the resource R1 from the data flow graph by the use of a technique such as pattern matching or the like, and converting it to a data flow graph using the resource R1.
Next, in the RTL generating step S6, the RTL generator 7 synthesizes the RTL data D4 from the bound behavior data D3 based on a designation of the control mode in the functional unit within the data path template TP so as to generate the RTL description file F3 that is written with the RTL data 4 and a hardware description language.
As described above, since it is possible to generate the RTL description file F3 having the circuit structure designated in the data path template TP from the behavior description file F1, the user can obtain the RTL description file within a short term, that has an arbitrary circuit structure that cannot be generated by a conventional high-level synthesis method, while having an easily comprehendible circuit structure. Even when the desired performance is not achieved in one-time synthesis, because the RTL description file F3, that is easily comprehended by the user, is generated, it is easy to analyze the problems, and it is possible to generate the RTL description file F3 with desired performances in a short term through changing the data path template file F2 to be used or through carrying out partial correction, etc. Furthermore, in a plurality of behavior description files F1 that are not carried out simultaneously, it is also possible to generate the RTL description file F3 having the circuit structure that is designated in the data path template TP. Therefore, the same effects can be obtained even in the case where the behavior description file F1 to be inputted becomes complicated.
Furthermore, although the embodiment has been described referring to the case of registering a data path template newly and use this data path template, it is also possible to reuse the data path template through using the data path template registered in the past as it is or by editing a part thereof.
In addition, although the embodiment has been described referring to the case of using a plurality of behavior description files that are not executed simultaneously, it is needles to say that the same effect can be achieved in the case of using a single behavior description file.
The data path template selecting step S2 according to this embodiment comprises steps S11-S14. The step S11 is a performance restriction designating step (referred to as a designating step hereinafter) for designating restriction values for the performances of the register transfer level circuit that the user desires to synthesize, the number of processing cycles, the area and the priority order of the indexes for the power consumption. The step S12 is a behavior data analyzing step (referred to as an analyzing step hereinafter) for calculating the number of operators and the bit width through analyzing the behavior data D1 for the inputted behavior description file F1. The step S13 is a performance calculating step (referred to as a calculating step hereinafter) for calculating the number of processing cycles, the area, and the power consumption in all the data path templates TP that are registered to the data path template library L1 based on the number of operators and the bit width obtained in the analyzing step S12 and the performance parameters written in the data path templates TP. The step S14 is a data path template selecting step (referred to as a selecting step hereinafter) for selecting a single data path templates TP with the minimum index in the priority order designated in the designating step S11 from the data path templates TP that satisfy the restriction values, through comparing the number of processing cycles, the area, the power consumption calculated in the calculating step S13 and the restriction values designated in the designating step S11. In the data path template selecting step S2, the data path template TP to be used for synthesis is selected through these steps S11-S14.
Assuming in the designating step S11 that the user
In the calculating step S13, a list table T11 shown in
In the selecting step S14, the list table S12 and the restriction values are compared. Among the data path templates T1 and T3, selected is the data path template T3 where the power consumption with the higher priority order of the indexes, is the minimum restriction value.
As described above, it is possible to automatically select the data path template TP from the data path template library L1, considering the target performances. Therefore, the data path template TP for generating a desired register transfer level circuit can be easily found, when there are many past design resources registered in the data path template library L1. It is needless to say that the user can generate a register transfer level circuit, by editing the selected data path template TP to the one that is more suitable for the purpose.
Further, even in the case of generating a register transfer level circuit by using the automatically selected data path template, it is possible for the user to comprehend the generated RTL description by referring to the selected data path template itself.
The behavior data displaying device 9 displays the behavior data D1 as the text in the same language as that of the inputted behavior description file F1. For example, when the inputted behavior description file F1 is written by use of C language, the behavior data D1 is displayed as the description based on the C language also in the behavior data displaying device 9.
The behavior data displaying device 9 is capable of selecting the displayed behavior data D1 by a unit of statement, and a section corresponding to the tree structure having the selected statement of the behavior data D1 as the root is displayed emphatically (highlight display). For example, in the case where the “if statement” on the fourth line of the display screen P1 in
When the user executes the dividing operation to the selected statement, the behavior data D1 is divided, considering the statement selected in the behavior divider 2 as the designated section. The data path template displaying device 11 displays the signal connection between a functional unit and another functional unit of the selected data path template TP as a diagram.
When the user executes a drag-and-drop operation of the statement selected by the behavior data displaying device 9 to the functional units that are displayed on the data path template displaying device 11, the corresponding device 5 correlates the functional units and the functions, and the corresponding relationships are added to the corresponding table TB.
The RTL data displaying device 10 displays the generated RTL data D4 as the text in the same language as that of the RTL description file F3 to be outputted. For example, when the RTL description file F3 to be outputted is written with Verilog language, the RTL data D4 is also written and displayed with the Verilog language in the RTL data displaying device 10.
The RTL data displaying device 10 is capable of selecting the display RTL data by a unit of functional unit or resource, and a section corresponding to the selected functional unit or the resource is displayed emphatically on the RTL data displaying device 10. In addition, the section corresponding to the selected functional unit or the resource is also displayed emphatically on the data path template displaying device 11.
A simulation result S is inputted to the simulation result input device 12. The simulation result input device 12 generates a signal value transition database DB that is a transition information of the signal value based on the input values (transition information of the signal values) in all the signals written in the data path template TP, based on the inputted simulation result.
The data path template displaying device 11 searches the signal values of the signals written in the data path template TP at the designated time designated by the user, from the signal transition database DB. When the resource is the operation resource, the operation contents executed with the signal value is displayed within the figure of the resource.
For example, as shown in
As described above, the third embodiment allows reduction of the work load of the operation designated by the user, through displaying the behavior data D1, designating the section to be divided on the displayed behavior data D1 and designating the corresponding relationship between the functional units.
Further, by displaying the RTL data D4 and displaying the corresponding relationship to the data path template TP, it becomes possible to analyze the circuit of the outputted RTL description more easily.
Furthermore, by analyzing the signal values from the simulation result S and showing the behavior of the resource at the designated time, it is possible to analyze the circuit much more easily.
The present invention has been described in detail referring to the most preferred embodiments. However, various combinations and modifications of the components are possible without departing from the spirit and the broad scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
2006-116708 | Apr 2006 | JP | national |