JP2009176077A - Setup time generation method, device, and program - Google Patents

Setup time generation method, device, and program Download PDF

Info

Publication number
JP2009176077A
JP2009176077A JP2008014377A JP2008014377A JP2009176077A JP 2009176077 A JP2009176077 A JP 2009176077A JP 2008014377 A JP2008014377 A JP 2008014377A JP 2008014377 A JP2008014377 A JP 2008014377A JP 2009176077 A JP2009176077 A JP 2009176077A
Authority
JP
Japan
Prior art keywords
variable
setup time
hardware
software
machine language
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2008014377A
Other languages
Japanese (ja)
Inventor
Takashi Aoki
孝 青木
Takuya Otsuka
卓哉 大塚
Akitsugu Yamazaki
晃嗣 山崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2008014377A priority Critical patent/JP2009176077A/en
Publication of JP2009176077A publication Critical patent/JP2009176077A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To effectively utilize a hardware synthesis system even concerning an object with a large number of variables when allowing a part of processing embodied by software to be hardware by using the hardware synthesis system. <P>SOLUTION: When the setup time of a variable to be exchanged between processing for leaving in the software and processing for making into the hardware, a description part to be made into the hardware in the software is designated, and a variable list where the variables to be referred to in the description part are listed is generated. When an address by tracking a machine language instruction string with the software compiled therein coincides with the address of the variable list, the setup time of the tracking is recorded and updated in the variable of address. Then, the variable list with the setup times of each variable recorded and updated therein is output. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、システムの動作をC言語などのソフトウエア記述によって具体化したものについて、その処理の一部をハードウエア化する際のセットアップタイム生成方法、装置、およびプログラムに関するものである。   The present invention relates to a setup time generation method, apparatus, and program for realizing a part of the processing of a system that is realized by software description such as C language.

ソフトウエア記述によって具体化したものについて、その処理の一部をハードウエア化する場合、従来では、次の手順で行われている(例えば、非特許文献1参照)。
(1)ソフトウエア言語での記述:システムの動作をまねるソフトウエア記述(ソフトウエソースコード、以下「プログラム」と呼ぶこともある)を作成する。
(2)ハードウエア化する箇所の選定:上記プログラムの中で、既存のプロセッサではなく、専用のハードウエアに処理させるところを考慮しつつ、その専用のハードウエアの概略設計(アーキテクチャの作成)を行う。
(3)ソフトウエア言語での記述の分割変更:プロセッサに行わせるソフトウエア処理と専用のハードウエアに行わせる処理との間で情報を受け渡すための手順を決め、プログラムの記述を書き改める。
(4)ソフトウエアコンパイラの使用:プログラムを機械語にコンパイルし、プロセッサを模擬するシステム、もしくは実際のプロセッサの命令メモリに記憶させておく。
(5)ハードウエア合成(動作合成):アーキテクチャを使って処理の手順を実行する機構と、ソフトウエアに行わせている処理との間で情報を受け渡しするための手順を実行する機構を作り出す。
(6)結合検証:プログラムをコンパイルして生成した機械語命令列を、プロセッサを模擬するシステム、もしくは、実際のプロセッサの命令メモリに記憶させておき、ハードウエア合成系から得たハードウエアとの接続を模擬、もしくは、実際に接続して、所望の動作と性能を確認する。
Conventionally, when a part of the processing is implemented as hardware with respect to what is specified by the software description, the following procedure is used (for example, see Non-Patent Document 1).
(1) Software language description: A software description that mimics the operation of the system (software code, sometimes referred to as “program”) is created.
(2) Selection of locations for hardware: In the above program, the general hardware design (architecture creation) should be designed with consideration given to processing by dedicated hardware instead of existing processors. Do.
(3) Description change in software language: Decide the procedure for transferring information between the software processing to be performed by the processor and the processing to be performed by the dedicated hardware, and rewrite the program description.
(4) Use of a software compiler: A program is compiled into a machine language and stored in a system that simulates a processor or an instruction memory of an actual processor.
(5) Hardware synthesis (behavioral synthesis): Creates a mechanism for executing a processing procedure using an architecture and a mechanism for executing a procedure for transferring information between processing performed by software.
(6) Combined verification: Machine language instruction sequences generated by compiling a program are stored in a system that simulates a processor, or in an instruction memory of an actual processor, and the hardware obtained from a hardware synthesis system. Simulate the connection or actually connect to confirm the desired operation and performance.

以上の手順によって、ソフトウエア処理の一部を処理する専用ハードウエアを設計し、ソフトウエアと組み合わせて、機能の確認や性能の評価をすることができる。
黒坂 他、「システムレベル設計フローと設計言語」、情報処理、45巻5号、456−463頁、2004年、5月(特に462頁の図8)
With the above procedure, it is possible to design dedicated hardware for processing a part of the software processing, and to check the function and evaluate the performance in combination with the software.
Kurosaka et al., “System Level Design Flow and Design Language”, Information Processing, Vol. 45, No. 5, 456-463, May 2004 (especially FIG. 8 on page 462)

しかし、上記手順では、その過程で次のような問題が生じていた。すなわち、ハードウエア化しようとする処理が大規模のとき、ハードウエアに処理させる変数(ハードウエア合成系として取り扱うレジスタの数)が非常に大きくなると、スケジューリング(ハードウエアがレジスタの値を取り出したり書き換えたりする時刻を計画すること)を検討する組み合わせが非常に大きくなり、ハードウエア合成系の処理において、ムダな合成候補のための時間が多くなる。   However, in the above procedure, the following problems occurred in the process. In other words, when the processing to be implemented in hardware is large, scheduling (hardware fetches or rewrites register values) when the variables to be processed by hardware (the number of registers handled as hardware synthesis systems) become very large. In other words, the time required for wasteful synthesis candidates increases in the processing of the hardware synthesis system.

したがって、ハードウエア化しようとする処理をハードウエア合成系にて行うことをあきらめ、設計者が分析、設計しているが、間違いが入る危険や、検証すべき箇所を指定するための手間が増大していた。特に、ハードウエア合成系の処理対象における、ソフトウエアとの情報の受け渡しの仕組みについては、ほとんど手作業や設計者の創意によるものとなっており、上記のリスクと手間が大きかった。   Therefore, the designer has given up on the hardware synthesis system to perform the process to be implemented in hardware, and the designer analyzes and designs it. However, there is an increased risk of making mistakes and specifying the location to be verified. Was. In particular, the mechanism for passing information to and from the software in the processing object of the hardware synthesis system is mostly due to manual work and the ingenuity of the designer, and the risks and labor described above are large.

このように、ハードウエア合成系の処理対象における、ソフトウエアとの情報の受け渡しの仕組みにおいて、変数・レジスタの独立個数が非常に多い状況においては、ハードウエアが変数を利用できるようになる(参照の準備ができる、もしくは、変更してよい)時間的な情報についての分析結果をハードウエア合成系に提供できなかった。   In this way, in a situation where the number of independent variables and registers is very large in the mechanism of information exchange with the software in the processing target of the hardware synthesis system, the hardware can use the variable (see The analysis result of the time information could not be provided to the hardware synthesis system.

本発明の目的は、ソフトウエアで具体化された処理の一部をハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成できるようにして、変数の数が大規模な対象に対しても、ハードウエア合成系を有効に利用できようにしたセットアップタイム生成方法、装置、およびプログラムを提供することである。   An object of the present invention is to generate a setup time for variables passed between a process to be left in software and a process to be converted into hardware when a part of the process embodied in software is converted into hardware. Thus, it is to provide a setup time generation method, apparatus, and program that can effectively use a hardware synthesis system even for an object having a large number of variables.

上記目的を達成するために、請求項1にかかる発明のセットアップタイム生成方法は、ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するセットアップタイム生成方法であって、前記ソフトウエアの中の前記ハードウエア化する記述部分を指定し、該記述部分において参照している変数を列挙した変数リストを生成し、前記ソフトウエアをコンパイルした機械語命令列の追跡によるアドレスが前記変数リストのアドレスと一致するとき、当該アドレスの変数に前記追跡のセットアップタイムを記録更新し、各変数のセットアップタイムを記録更新した変数リストを出力することを特徴とする。
請求項2にかかる発明は、請求項1に記載のセットアップタイム生成方法において、前記各変数のセットアップタイムは、前記ハードウエア化に適した様式で出力されることを特徴とする。
請求項3にかかる発明は、請求項1又は2に記載のセットアップタイム生成方法において、前記ソフトウエアに条件分岐があるとき、当該条件成立時のセットアップタイムと不成立時のセットアップタイムを記録更新した変数リストを生成することを特徴とする。
請求項4にかかる発明のセットアップタイム生成装置は、ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するセットアップタイム生成装置であって、前記ソフトウエアを機械語に変換して機械語命令列を生成するコンパイラと、前記ソフトウエアの中の前記ハードウエア化する処理の記述部分において参照している変数を列挙した変数リストを生成する変数リスト生成部と、前記機械語命令列の中の命令語を追跡する機械語命令追跡部と、該機械語命令追跡部が命令語の追跡を1ステップ進める毎に時刻を更新する時刻変数管理部と、前記変数リスト生成部で生成された変数リストを格納し、前記時刻変数管理部からの現在の時刻情報と前記機械語命令追跡部からの変数のアドレス値を伴う通知とを受け取り、前記変数リストの中に当該アドレス値を持つエントリーがあるとき、前記時刻情報を前記変数のセットアップタイムとして、前記変数リストのセットアップタイムを記録更新する変数リスト管理部と、を備えることを特徴とする。
請求項5にかかる発明は、請求項4に記載のセットアップタイム生成装置において、前記変数リスト管理部の各変数のセットアップタイムを最も早く値の決まる変数のセットアップタイムとの相対的な時間で定めた様式に変換して出力する出力管理部を備えることを特徴とする。
請求項6にかかる発明は、請求項4又は5に記載のセットアップタイム生成装置において、前記機械語命令追跡部が命令語の追跡中に条件分岐を検出したとき、該条件分岐が成立した場合の変数のセットアップタイムを戻り値として前記機械語命令追跡部に戻す再帰処理管理部を備え、前記機械語命令追跡部は、前記再帰処理管理部からの前記戻り値を受け取り、前記条件分岐の成立条件の識別子を含む変数のアドレス値を伴う通知を前記変数リスト管理部に送るとともに、前記条件分岐が不成立の場合の変数のアドレス値を伴う通知を前記変数リスト管理部に送り、前記変数リスト管理部は、変数について、条件が成立した場合と成立しなかった場合の両方のセットアップタイムを変数リストに記録更新する、ことを特徴とする。
請求項7にかかる発明のプログラムは、ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するプログラムであって、前記ソフトウエアの中の前記ハードウエア化する記述部分を指定するステップと、該記述部分において参照している変数を列挙した変数リストを生成するステップと、前記ソフトウエアをコンパイルした機械語命令列の命令語を追跡するステップと、該追跡によるアドレスが前記変数リストのアドレスと一致するとき、当該アドレスの変数に前記追跡の時刻をセットアップタイムとして記録更新するステップと、各変数のセットアップタイムを記録した変数リストを出力するステップと、を備えることを特徴とする。
In order to achieve the above object, a setup time generation method according to the first aspect of the present invention provides a method for implementing a part of processing embodied in software by using a hardware synthesis system. A setup time generation method for generating a setup time of a variable passed between a process to be stored in a hardware and a process to be hardwareized, wherein the description part to be hardwareized is specified in the software, and the description Generating a variable list that enumerates the variables referenced in the part, and when the address of the trace of the machine language instruction sequence that compiled the software matches the address of the variable list, set up the trace to the variable at the address It is a feature that records and updates the time and outputs a variable list that records and updates the setup time of each variable. To.
According to a second aspect of the present invention, in the setup time generation method according to the first aspect, the setup time of each variable is output in a format suitable for the hardware implementation.
According to a third aspect of the present invention, in the setup time generation method according to the first or second aspect, when there is a conditional branch in the software, the setup time when the condition is satisfied and the setup time when the condition is not satisfied are recorded and updated. It is characterized by generating a list.
According to a fourth aspect of the present invention, when a part of the processing embodied in software is hardwareized by using a hardware synthesis system, the setup time generating device is hardwareized. A setup time generation device for generating a setup time of a variable passed between processes, a compiler for converting the software into a machine language to generate a machine language instruction sequence, and the software in the software A variable list generation unit that generates a variable list that enumerates variables referred to in a description part of processing to be implemented in hardware; a machine language instruction tracking unit that tracks instruction words in the machine language instruction sequence; and the machine A time variable management unit that updates the time each time the word instruction tracking unit advances the tracking of the instruction word by one step, and the variable list generated by the variable list generation unit Storing and receiving current time information from the time variable management unit and a notification with the address value of the variable from the machine language instruction tracking unit, and when there is an entry having the address value in the variable list, And a variable list management unit that records and updates the setup time of the variable list using the time information as the setup time of the variable.
According to a fifth aspect of the present invention, in the setup time generating device according to the fourth aspect, the setup time of each variable of the variable list management unit is determined relative to the setup time of the variable whose value is determined earliest. An output management unit that converts the data into a format and outputs the data is provided.
The invention according to claim 6 is the setup time generation device according to claim 4 or 5, wherein when the machine language instruction tracking unit detects a conditional branch during tracking of the instruction word, the conditional branch is established. A recursive processing management unit that returns a variable setup time to the machine language instruction tracking unit as a return value, the machine language instruction tracking unit receives the return value from the recursive processing management unit, and the condition branch is satisfied A notification with the address value of the variable including the identifier is sent to the variable list management unit, and a notification with the address value of the variable when the conditional branch is not established is sent to the variable list management unit. Is characterized in that the variable is recorded and updated in the variable list with respect to variables when both the conditions are met and when the conditions are not met.
According to the seventh aspect of the present invention, when a part of the processing embodied in software is made into hardware by using a hardware synthesis system, processing to be left in software and processing to be made into hardware are A program for generating a setup time of variables passed between, a step of designating a description part to be implemented in hardware in the software, and a variable list listing variables referred to in the description part Generating an instruction word of a machine language instruction sequence in which the software is compiled, and when the address by the tracking coincides with an address of the variable list, the tracking time is set in a variable of the address. A step to record and update the setup time and a variable list that records the setup time of each variable are displayed. Characterized in that it comprises the steps of, a.

本発明によれば、ソフトウエアで具体化された処理の一部をハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成できるので、そのセットアップタイムを、ハードウエア合成において、レジスタを使用する順序を計画する処理で既知の条件として使うことができるようになるため、変数の数が1000以上という大規模な対象に対しても、ハードウエア合成系を有効に利用できる利点がある。   ADVANTAGE OF THE INVENTION According to this invention, when making a part of process embodied by software into hardware, the setup time of the variable passed between the process left in software and the process made into hardware can be generated. Therefore, since the setup time can be used as a known condition in the process of planning the order in which registers are used in hardware synthesis, even for a large target with 1000 or more variables. There is an advantage that the hardware synthesis system can be used effectively.

本発明では、ソフトウエアによって逐次的に行う処理順序を分析して、ハードウエア合成系に提供する。具体的には、ソフトウエア記述(ハードウエアが利用する変数)とコンパイラが最適化/合成した機械語命令実行順序とから、変数のそれぞれが持つセットアップタイムを導き出し、それを、ハードウエア合成系に提供する。用語の都合上、まず、この方法が、ハードウエア合成系にもたらす効果を説明する。   In the present invention, the processing order sequentially performed by software is analyzed and provided to the hardware synthesis system. Specifically, the setup time of each variable is derived from the software description (variables used by the hardware) and the execution order of machine language instructions optimized / synthesized by the compiler, and this is used as the hardware synthesis system. provide. For the convenience of terminology, the effect of this method on the hardware synthesis system will be described first.

以下は、一般的にハードウエア合成系が行う処理である。まず、変数に対する記憶要素(レジスタ)の割り当てを行う。次に、演算器とレジスタの使用順序の計画を行う。その際、演算器の種類と個数、レジスタの個数などの制約条件を満たすようにする。次に、所定の記述言語によるハードウエア記述の出力を行う。   The following is a process generally performed by a hardware synthesis system. First, storage elements (registers) are assigned to variables. Next, the usage order of the arithmetic units and registers is planned. At that time, the constraint conditions such as the type and number of arithmetic units and the number of registers are satisfied. Next, a hardware description is output in a predetermined description language.

ここで、例として、変数x,y,zについて、「x+y+z」の演算をハードウエアで処理させる場合について、図1を参照して説明する。セットアップタイムが不明のままである場合は、変数を格納するレジスタとしては、変数x、y、zの格納用と演算結果格納用にそれぞれ1個使用するので、計4個のレジスタR1〜R4が必要であるとして合成し、演算手順についても、
(x+y)+z
(x+z)+y
(y+z)+x
の3通りの演算に対して、ハードウエアを合成候補する。図1(a)にこの3通りの候補を示した。0000,0001,0002,0003等はレジスタR1〜R4のアドレスである。これらの候補に対する比較評価を、設計工程で行うことになる。
Here, as an example, the case where the calculation of “x + y + z” is processed by hardware for variables x, y, and z will be described with reference to FIG. If the setup time remains unknown, one register is used for storing variables, one each for storing variables x, y, and z, and one for storing operation results. Therefore, a total of four registers R1 to R4 are used. Synthesize it as necessary, and the calculation procedure also
(X + y) + z
(X + z) + y
(Y + z) + x
The hardware is a synthesis candidate for the following three operations. FIG. 1 (a) shows these three candidates. 0000, 0001, 0002, 0003, etc. are the addresses of the registers R1 to R4. The comparative evaluation for these candidates is performed in the design process.

この例では、3候補とも特に得失はなく、どれを選択してもよいことは自明である。しかし、一般的な合成対象はもっと大きく、実行順序の制御も関係するため、一般的に、変数の数が大きくなればなるほど、候補の数が爆発的に多くなり、ハードウエア合成系が処理できなくなる。また、仮にある程度処理できたとしても、その後の性能評価の手間が現実に耐えないほど多くなる。   In this example, there is no particular advantage in all three candidates, and it is obvious that any one may be selected. However, since general synthesis targets are larger and control of execution order is involved, in general, the larger the number of variables, the larger the number of candidates, and the hardware synthesis system can process. Disappear. Moreover, even if the processing can be performed to some extent, the time and effort for the subsequent performance evaluation are increased to an extent that cannot be actually realized.

これを避けるためには、検討に値しないムダなハードウエア候補を発生させないようにすればよく、そのためには、既存のハードウエア合成系が、各種の拘束条件や既知の外界の条件を考慮に入れることができるようになっていることを利用すればよい。   In order to avoid this, it is only necessary to avoid generating unnecessary hardware candidates that are not worth considering. To that end, existing hardware synthesis systems take into account various constraints and known external conditions. You can use that you can enter.

しかし、この条件を与えるためには、あらかじめハードウエアをかなり詳細に決めておかねばならないとされており(非特許文献1のアーキテクチャ設計:図8)、これを設計者が行っていたが、ソフトウエアとハードウエアとがやり取りをする変数を決定し、ソフトウエア側からのAPI(Application Program Interface)を決定した後、ハードウエア側の設計を検討していた。この際、どのようにレジスタを用意し、用意したレジスタをどのような順序で使って処理を進めるかについても、設計者の経験に基づいて決定してきていた。   However, in order to give this condition, it is said that the hardware must be determined in detail in advance (architecture design of Non-Patent Document 1: Fig. 8). After determining the variables that the hardware and hardware exchange, and after determining the API (Application Program Interface) from the software side, the design on the hardware side was studied. At this time, how to prepare the registers and in what order the prepared registers are used for processing has been determined based on the experience of the designer.

一方、変数x,y,zについて、それぞれのセットアップタイムが、1,2,3であるといったことが、この発明により提供できるわけだが、ハードウエア合成系は、これを計画の拘束条件として使って、図1(b)に示すように、変数x,y用、演算結果用にそれぞれ1個で、合計3個のレジスタR4〜R6を使用する。このとき、変数zは変数x又はy用のレジスタと兼用する。演算手順は「x+y」の演算を行ってその結果を一時的に演算結果用のレジスタR6に格納し、つぎに演算結果に変数zを加算する。このようにすると、ただ一通りのみのハードウエアを生成することができる。このようにして、図1(b)の手法によれば、図1(a)の手法にくらべて数分の1の手間でハードウエアを生成することができる。   On the other hand, the present invention can provide that the setup times of the variables x, y, and z are 1, 2, and 3, respectively. However, the hardware synthesis system uses this as a constraint for the plan. As shown in FIG. 1 (b), a total of three registers R4 to R6 are used, one each for variables x and y and one for calculation results. At this time, the variable z is also used as a register for the variable x or y. The calculation procedure is to calculate “x + y” and temporarily store the result in the calculation result register R6, and then add the variable z to the calculation result. In this way, only one type of hardware can be generated. In this way, according to the method of FIG. 1B, hardware can be generated with a fraction of the labor compared to the method of FIG.

上記の例でみられる組合せの数は、一般に変数の種類が多くなると急激に増えることから、現実的な課題では非常に大きな差となる。例えば、上記の類推として、変数を4つにした場合は6:1になり、5つにした場合は60:1になり、図1(b)による手法の方が図1(a)による数より、はるかに少なくなることが分かる。なお、図2では、(a)に変数のセットアップタイムを考慮せずに合成する手法を、(b)に変数のセットアップタイムを考慮して合成する手法を、いずれも時刻0,1,2,3で行う場合について示した。   The number of combinations found in the above example generally increases drastically as the number of types of variables increases. For example, as an analogy to the above, if the number of variables is four, it becomes 6: 1, and if it is five, it becomes 60: 1. The method according to FIG. 1 (b) is the number according to FIG. 1 (a). You can see that it is much less. In FIG. 2, (a) shows a synthesis method without considering the variable setup time, and (b) shows a synthesis method with the variable setup time taken into account. The case of 3 is shown.

<変数のセットアップタイム>
ハードウエアでの処理に利用する変数の値を作り出すのはソフトウエア処理であるが、ある時点以降はその変数の値を変更しなくなる時刻が存在する。変数は、あらかじめ備え付けられた変数レジスタへの転送の機構と手順にしたがって、ハードウエアであるレジスタにビット値として格納されるが、この格納時刻を、変数のセットアップタイムということにする。セットアップタイムを一般化すると、いくつかの論理条件のついた変数になるが、一般化した場合も含めて、ここではセットアップタイムと表現する。
<Variable setup time>
It is software processing that creates the value of a variable used for processing by hardware, but there is a time when the value of the variable is not changed after a certain point. A variable is stored as a bit value in a register, which is hardware, in accordance with a mechanism and procedure for transfer to a variable register provided in advance. This storage time is referred to as a variable setup time. When the setup time is generalized, it becomes a variable with some logical conditions, but it is expressed here as the setup time, including the generalized case.

<変数のレジスタへの転送>
変数のレジスタへの転送は、一般に次のような方法で行う。ゲストハードウエアのレジスタを、ホストプロセッサのバスに接続しておき、ホストプロセッサが、あるアドレスへの変数の書き込みを実施することにより、ゲストハードウエアのレジスタに、その変数の書き込みが行える機構を構成しておく。プログラムの処理により変数を書き込むときは、ゲストハードウエアのレジスタのアドレス領域に明示的に書き込む。
<Transfer variable to register>
Transfer of variables to registers is generally performed by the following method. The guest hardware register is connected to the host processor bus, and when the host processor writes a variable to a certain address, it configures a mechanism that can write the variable to the guest hardware register. Keep it. When writing variables by program processing, write them explicitly in the address area of the guest hardware register.

<ソフトウエアの一部をハードウエア合成するための処理の概略>
図3に処理の全体のフローチャートを示す。まず、前処理ブロック100で示すように、元となるプログラムの中で、ハードウエア化するプログラムの部分を決め、ハードウエアで参照や更新を行う変数を識別できるように前処理をしておく。その方法としては、(1)事前にプログラムに明示記述する、(2)プログラムを解析してハードウエア化する部分で参照および更新する変数に対して識別用の情報を付与する、などがある。例えば、(2)の例では、C言語等で記述されたソフトウエアに、ハードウエア化する処理の記述部分を指定しておく。この指定は、実行には影響しない説明文であるコメントの文法構造(例えばC言語では、/*と*/でコメント部分を囲む)を利用すると、従来のコンパイラを本技術の準備(前処理100)に用いるコンパイラとして、そのまま使用できる。これを、ソフトウエアのコンパイラに処理させるが、コンパイラに上記の識別をつけた変数をリストアップする機能を付加しておく。そして、得られたリストと機械語命令列をもとに、次に、本処理ブロック200で示すように、セットアップタイム分析処理を行って、各変数のセットアップタイムを求め、変数リストを生成する。その後に、後処理ブロック300で示すように、そのセットアップタイムを制約として、ハードウエア合成を行う。
<Outline of processing to synthesize part of software by hardware>
FIG. 3 shows a flowchart of the entire process. First, as indicated by the preprocessing block 100, a part of a program to be hardware is determined in the original program, and preprocessing is performed so that a variable to be referred to or updated can be identified by hardware. The methods include (1) explicitly describing in the program in advance, and (2) adding identification information to variables to be referenced and updated in the part where the program is analyzed and converted into hardware. For example, in the example of (2), the description part of the process to be converted into hardware is specified in the software described in C language or the like. This specification uses the grammatical structure of a comment, which is an explanatory text that does not affect execution (for example, in C language, the comment part is enclosed by / * and * /), and the conventional compiler prepares the present technology (preprocessing 100). ) Can be used as it is. This is processed by a software compiler, and a function for listing the variables with the above identification is added to the compiler. Then, based on the obtained list and machine language instruction sequence, next, as shown in this processing block 200, a setup time analysis process is performed to obtain a setup time for each variable, and a variable list is generated. Thereafter, as shown by the post-processing block 300, hardware synthesis is performed with the setup time as a constraint.

<セットアップタイム分析処理(実施例1)>
図4に、本発明のセットアップタイムの分析処理200を行う装置構成を示す。コンパイラ211は、C言語等で記述され且つ前記した前処理100を施された「ソフトウエア」を取り込んで械語命令に変換し、これをメモリの「機械語命令列」に格納する。
<Setup time analysis process (Example 1)>
FIG. 4 shows an apparatus configuration for performing the setup time analysis process 200 of the present invention. The compiler 211 takes in “software” written in the C language or the like and subjected to the above-described preprocessing 100, converts it into machine language instructions, and stores them in a “machine language instruction sequence” in the memory.

変数リスト生成部212は、「ソフトウエア」が供給されると、ハードウエア化する部分の記述部分を検出し、その記述において参照している変数を列挙した「変数リスト」を生成する。「変数リスト」の構造は、図6のブロック221に示すように、その変数の値を格納するメモリのアドレス(例えば、0xc0000000)と変数名(例えば、buff[0])とを組として持ち、その変数に対するセットアップタイムを格納するフィールドを有するレコードをもつデータベースである。変数リスト生成部212が「変数リスト」の生成を完了すると、「初期生成完了」の指令を時刻変数管理部213に送り、時刻変数管理部213が時刻変数tの値をt=0にする。   When “software” is supplied, the variable list generation unit 212 detects the description portion of the portion to be hardwareized and generates a “variable list” listing the variables referred to in the description. The structure of the “variable list” has a memory address (for example, 0xc0000000) and a variable name (for example, buff [0]) for storing the value of the variable as a pair, as shown in a block 221 in FIG. A database with a record having a field that stores the setup time for the variable. When the variable list generation unit 212 completes the generation of the “variable list”, an instruction of “initial generation completion” is sent to the time variable management unit 213, and the time variable management unit 213 sets the value of the time variable t to t = 0.

変数リスト管理部214は、生成された「変数リスト」を格納し、時刻変数管理部213からの現在の「時刻情報」と、機械語命令追跡部215からの「変数書込み検出通知」を受けとって、「変数リスト」のセットアップタイムを記録更新していく機能と、出力管理部216からの「問合せ」に対する「応答」として、セットアップタイムを記録した「変数リスト」を出力管理部216に送出する機能を有する。この変数リスト管理部214では、機械語命令追跡部215から、変数のアドレスの値を伴った「変数書込み検出通知」を受けとると、「変数リスト」の中に該当アドレス値をもつエントリーがある否かを確認し、ある場合には、時刻変数管理部3からの「時刻情報」を、「変数リスト」の当該アドレス値の変数のセットアップタイムのフィールドの値として記録更新する。   The variable list management unit 214 stores the generated “variable list” and receives the current “time information” from the time variable management unit 213 and the “variable write detection notification” from the machine language instruction tracking unit 215. A function of recording and updating the setup time of the “variable list”, and a function of sending a “variable list” recording the setup time to the output management unit 216 as a “response” to the “inquiry” from the output management unit 216 Have When the variable list management unit 214 receives a “variable write detection notification” with a variable address value from the machine language instruction tracking unit 215, the variable list management unit 214 determines whether there is an entry having the corresponding address value in the “variable list”. If there is, the “time information” from the time variable management unit 3 is recorded and updated as the value of the setup time field of the variable of the address value in the “variable list”.

機械語命令追跡部215は、「機械語命令列」の中の命令語を追跡して、メモリ領域への書込みを行っている命令を検出し、そのアドレス値をもって、「変数書込み検出通知」を変数リスト管理部214に送り出す。この機械語命令追跡部215では、命令を擬似的に実行することにより、命令の追跡を1ステップ進める毎に、時刻変数を増加させるために、時刻変数管理部213に対して、「時刻更新」の指令を送る。また、「機械語命令列」と「ソフトウエア」の記述から、ハードウエア合成する処理の呼び出しを行う命令の格納されたアドレスを予め用意しており、命令の追跡が進み、そのアドレスに到達したか否かを検知して、到達した場合には、処理の「完了通知」を出力管理部216に送る。   The machine language instruction tracking unit 215 traces the instruction word in the “machine language instruction sequence”, detects the instruction that is writing to the memory area, and generates a “variable write detection notification” with the address value. The data is sent to the variable list management unit 214. In the machine language instruction tracking unit 215, by executing the instruction in a pseudo manner, each time the instruction tracking is advanced by one step, the time variable is increased by “time update” to the time variable management unit 213. Send the command. Also, from the description of “machine language instruction sequence” and “software”, the address where the instruction to call the process of hardware synthesis is stored is prepared in advance, the instruction tracking has progressed and the address has been reached In the case where it is reached, a “completion notice” of the process is sent to the output management unit 216.

なお、変形例として、予め、「変数リスト」を機械語命令追跡部215からも参照可能としておき、アドレス値から変数名への翻訳は、この機械語命令追跡部215で行っても良い。この場合は、機械語命令追跡部215で「変数リスト」に登録されている変数に当たるメモリ領域への書込みを行っている命令を検出する。検出した場合に、機械語命令追跡部215が変数名を伴った「変数書込み検出通知」を行い、変数リスト管理部214がセットアップタイムのフィールドの更新を行う。   As a modification, the “variable list” may be previously referred to from the machine language instruction tracking unit 215, and the translation from the address value to the variable name may be performed by the machine language instruction tracking unit 215. In this case, the machine language instruction tracking unit 215 detects an instruction that writes to a memory area corresponding to a variable registered in the “variable list”. If detected, the machine language instruction tracking unit 215 performs a “variable write detection notification” with a variable name, and the variable list management unit 214 updates the setup time field.

また、機械語命令追跡部215は、「機械語命令列」の全部ではなく、一部を処理対象とすることによって、処理の時間を短くすることもできる。その処理方法は、ハードウエア化する処理の呼び出しを行う命令の格納されたアドレスを予め用意してあるので、そのアドレスから命令の実行を逆さにのぼり、「変数リスト」のすべての変数に対しての書込みを見つけたら処理を終えるか、あるいは、予め外部から指定された限界アドレスに到達したところで処理を終えるというものである。また、後ほど述べるが、セットアップタイムのフィールドについては、成立する条件に応じて複数を持つ実現例もあり得る。   Further, the machine language instruction tracking unit 215 can shorten the processing time by setting a part of the “machine language instruction string” as a processing target instead of the entire “machine language instruction string”. The processing method is prepared in advance with the address where the instruction for calling the process to be implemented in hardware is stored, so the execution of the instruction is reversed from that address, and all the variables in the “variable list” are The process ends when it finds the writing of, or ends when it reaches the limit address designated in advance from the outside. As will be described later, there may be an implementation example in which a plurality of setup time fields are provided depending on the conditions that are satisfied.

出力管理部216は、機械語命令追跡部215からの「完了通知」を受けると、変数リスト管理部214に「変数リスト」に登録されている変数に対して、セットアップタイムと組にしたレコードをすべて引き出し、ハードウエア合成系の仕様に合わせた様式、例えば、「最も速く値の決まる変数との相対的な時間で他の変数の定まる時間制約を与える」といった制約の様式に、セットアップタイムに基づいて所定の数値を埋め込んで出力する。また、その際、上記の一連の処理の中で、セットアップタイムが一度も与えられなかった変数については、ハードウエア合成系に対して、セットアップ制約がない、すなわち最もセットアップタイムが早い変数と同時に値が定まっているとして、制約の様式への埋め込みを行う。上記の様式であれば、「セットアップ制約がない」とはセットアップタイムとして0を与えることになる。   When the output management unit 216 receives the “completion notification” from the machine language instruction tracking unit 215, the output management unit 216 records a record paired with the setup time for the variables registered in the “variable list” in the variable list management unit 214. Based on the setup time based on the set-up time in a style that matches all the specifications of the hardware synthesis system, such as “giving time constraints that other variables are determined relative to the fastest variable”. Embed a predetermined numerical value and output. At that time, in the above-described series of processing, the variables for which the setup time has never been given are not the same as those for the hardware synthesis system, that is, the variables having the fastest setup time. Is fixed, it is embedded in the constraint style. In the above-described manner, “no setup restrictions” means that 0 is given as the setup time.

図5に図4の装置構成をコンピュータとプログラムで実現する際の処理のフローチャートを示した。このプログラムは記録媒体に記録することも、ネットワークを通じて提供することもできる。前処理100の後のソフトウエアを取り込んで(S1)、コンパイラ211でコンパイルして「機械語命令列」に変換しておき(S2)、また変数リスト生成部212によって「変数リスト」を生成する(S3)。この「変数リスト」は、例えば、図6のブロック221に示す内容である。この「変数リスト」の生成完了により、時刻変数管理部213で基点となる時刻がt=0に初期化される(S4)。以後、機械語命令追跡部215によって機械語命令列の実行追跡が開始し(S5)、「変数リスト」のセットアップタイムを記録更新する。ここでは、時刻変数管理部213からの現在の「時刻情報」と、機械語命令追跡部215からの「変数書込み検出通知」とにしたがって、「変数リスト」のセットアップタイムを記録更新していく(S6,S7,S8)。図6のブロック222に「変数リスト」の書込み開始を、ブロック223に「変数リスト」の全てにセットアップタイムの書き込みが完了した内容を示す。例えば、ブロック223において、「0xc0000000:buff[0]:c1」は、変数名「buff[0]」の変数が、その値をメモリの「0xc0000000」のアドレスに格納しており、その値はマシンサイクル「c1」において確定するので、変数のセットアップタイムは「c1」となることを示している。そして、機械語命令追跡部215による追跡がハードウエア合成の呼び出しを行う命令の格納されたアドレスに到達すると(S9)、「完了通知」が出力管理部216に通知されるので、出力管理部216が変数リスト管理部214の「変数リスト」に登録されている変数に対して、ハードウエア合成系に合わせた様式の数値を埋め込んで、出力管理部216から出力する。図6のブロック224に一例の様式に沿ったハードウエア合成で与える制約を示す。   FIG. 5 shows a flowchart of processing when the apparatus configuration of FIG. 4 is realized by a computer and a program. This program can be recorded on a recording medium or provided through a network. Software after the preprocessing 100 is taken in (S1), compiled by the compiler 211 and converted into a “machine language instruction sequence” (S2), and a “variable list” is generated by the variable list generation unit 212. (S3). This “variable list” is, for example, the contents shown in block 221 of FIG. When the generation of the “variable list” is completed, the time as the base point is initialized to t = 0 in the time variable management unit 213 (S4). Thereafter, execution tracking of the machine language instruction sequence is started by the machine language instruction tracking unit 215 (S5), and the setup time of the “variable list” is recorded and updated. Here, the setup time of the “variable list” is recorded and updated in accordance with the current “time information” from the time variable management unit 213 and “variable write detection notification” from the machine language instruction tracking unit 215 ( S6, S7, S8). Block 222 in FIG. 6 shows the start of writing of the “variable list”, and block 223 shows the contents of completion of writing of the setup time in all of the “variable list”. For example, in block 223, “0xc0000000: buff [0]: c1” is a variable with a variable name “buff [0]” whose value is stored at the address “0xc0000000” in the memory, and the value is the machine Since it is determined in the cycle “c1”, the variable setup time is “c1”. Then, when the tracking by the machine language instruction tracking unit 215 reaches the address at which the instruction for calling the hardware synthesis is stored (S9), a “completion notification” is notified to the output management unit 216. Therefore, the output management unit 216 Are embedded in the variables registered in the “variable list” of the variable list management unit 214 in a format suitable for the hardware synthesis system, and output from the output management unit 216. Block 224 in FIG. 6 illustrates the constraints imposed by hardware synthesis in accordance with an example format.

この図6のブロック224は、マシンサイクル単位の整数値で制約を与える場合の様式の例であり、最も早く値が確定する変数のセットアップタイム(値が最も小さいセットアップタイム)がc1であるとして、その値からの相対値として、他のセットアップタイムを与えている。つまり、c1→0(なぜなら、c1−c1=0)、c2→c2−c1、c3→c3−c1、・・・のように、マシンサイクル単位の整数値で制約を与えている。このように、ハードウエア合成に制約を与える方法として、最も早く値の決まる変数との相対的な時間で、他の変数の定まる時間制約を与えている。   The block 224 in FIG. 6 is an example of a mode in the case where a constraint is given by an integer value in machine cycle units, and the setup time (the setup time with the smallest value) of the variable whose value is determined earliest is c1. Other setup time is given as a relative value from that value. That is, constraints are given by integer values in machine cycle units such as c1 → 0 (because c1−c1 = 0), c2 → c2−c1, c3 → c3−c1,. As described above, as a method for constraining hardware synthesis, a time constraint in which other variables are determined is given by a time relative to a variable whose value is determined earliest.

以上のように、ここで説明したセットアップタイム分析処理(その1)では、ハードウエア合成の処理で参照する「変数リスト」を用意して、ある時刻(例えば、ある変数への値の設定の時刻)を基点にして、なんらかの変数に値を設定する時刻を、一定の単位、たとえば何マシンサイクルかかるか、によって記録していき、ソフトウエアがハードウエア合成の処理の実行開始(図3に示すソフトウエアの例では、func_Bの呼出)に到来するまでこれを繰り返し、その結果得られたそれぞれの変数のセットアップタイムに基づく制約を、ハードウエア合成系に渡すものである。   As described above, in the setup time analysis process (part 1) described here, a “variable list” referred to in the hardware synthesis process is prepared, and a certain time (for example, a time for setting a value to a certain variable) is prepared. ) Is used as a base point to record the time to set a value for some variable in a certain unit, for example, how many machine cycles it takes, and the software starts executing the hardware synthesis process (the software shown in FIG. 3). In the example of wear, this is repeated until the call to func_B) is reached, and the constraints based on the setup times of the respective variables obtained as a result are passed to the hardware synthesis system.

<セットアップタイム分析処理(実施例2)>
セットアップタイムを分析する場合において、変数への値の書込みのマシンサイクル数につき、何らかの条件による変動がある場合でも、前記したセットアップ分析処理(実施例1)の手法をそのまま用いることができる。この場合、変動する条件の中で、最も遅く変数の値が確定するマシンサイクル数がセットアップタイムとして得られる。
<Setup time analysis process (Example 2)>
When analyzing the setup time, even if there is a change due to some condition with respect to the number of machine cycles for writing a value to a variable, the method of the setup analysis process (Example 1) can be used as it is. In this case, the machine cycle number at which the value of the variable is determined most slowly among the changing conditions is obtained as the setup time.

これに対し、セットアップタイム分析の処理(実施例2)では、条件に応じてセットアップタイムが変わることなく、特に、成立する条件によっては、一部のセットアップタイムが早く(小さく)なることを分析し、ハードウエア合成系に渡すことも可能である。   On the other hand, in the setup time analysis process (Example 2), it is analyzed that the setup time does not change depending on the conditions, and in particular, depending on the conditions that are satisfied, some setup times become early (smaller). It is also possible to pass it to the hardware synthesis system.

条件分岐が含まれる場合、分岐先の処理も、その処理の後にセットアップされる変数のセットアップタイムに影響する。分岐先にある処理に対しても、図4,図5の処理を行って、途中結果とし、条件付きで加算する。また分岐しなかった場合の処理でセットアップタイムを決める変数もあり得るので、分岐先のステップ数に影響されないステップ数を保存するために、処理は再帰的となる。   When a conditional branch is included, the branch destination process also affects the setup time of variables set up after the process. The processing shown in FIGS. 4 and 5 is also performed on the processing at the branch destination, and an intermediate result is obtained and is added conditionally. In addition, since there may be a variable that determines the setup time in the process when the branch is not performed, the process is recursive in order to save the number of steps that is not affected by the number of steps at the branch destination.

図7に、セットアップタイム分析の処理(実施例2)を行う装置構成を示す。これは図4で説明した装置構成に対して、条件分岐に対する取り扱いを加えた場合の例である。追跡の途中でマシンサイクル数の変動をもたらすような分岐を経由しなければ、リストの記載はすべて定数となっているが、追跡の途中でマシンサイクル数が変動するような分岐を通るかもしれないので、マシンサイクル数が変動する分岐を経由している場合には、経由のたびに、分岐の条件を駆動変数としてマシンサイクル数の積算を順次数式化していく。   FIG. 7 shows an apparatus configuration for performing the setup time analysis process (Example 2). This is an example in which handling for conditional branching is added to the apparatus configuration described in FIG. If you do not go through a branch that causes fluctuations in the number of machine cycles in the middle of tracking, all the descriptions in the list are constant, but may go through a branch that changes in the number of machine cycles in the middle of tracking. Therefore, when the branch passes through the machine cycle number fluctuating, the integration of the machine cycle number is sequentially formulated each time the branch is made using the branch condition as a driving variable.

図7の装置構成が図4の装置構成と異なるところは、機械語命令追跡部215で「条件分岐」の命令を検出することと、「条件分岐」が検出された場合に、分岐の条件が成立した場合のセットアップタイムの算出を、分岐の条件が不成立の場合のセットアップタイムの算出と並行して再帰的に処理実施する点である。   The apparatus configuration of FIG. 7 differs from the apparatus configuration of FIG. 4 in that the machine language instruction tracking unit 215 detects a “conditional branch” instruction, and if a “conditional branch” is detected, the branch condition is The calculation of the setup time when established is recursively executed in parallel with the calculation of the setup time when the branch condition is not established.

再帰処理管理部217は、機械語命令追跡部215が「条件分岐」を検出した場合に、「変数リスト」の複製を作成し、また機械語命令追跡部215の追跡中の命令アドレス等の追跡状態を複製して残し、再帰的に処理する。この再帰処理は、条件成立の場合の分岐先の処理の終点に到達したときに終え、この時点での「変数リスト」にセットアップタイムの更新されたものを、「戻り値」(出力)として得る。   When the machine language instruction tracking unit 215 detects a “conditional branch”, the recursive processing management unit 217 creates a copy of the “variable list” and tracks the instruction address being tracked by the machine language instruction tracking unit 215. Duplicate the state and process it recursively. This recursive process ends when the end point of the branch destination process is reached when the condition is met, and the “variable list” at this point with the updated setup time is obtained as the “return value” (output). .

機械語命令追跡部215は、「戻り値」を得ると、追跡中のアドレス等の追跡状態を元に復元し、「戻り値」については、成立条件の識別子とともに「変数書込み検出通知」として変数リスト管理部214に渡す。   When the machine language instruction tracking unit 215 obtains the “return value”, the machine language instruction tracking unit 215 restores it based on the tracking state such as the address being tracked, and the “return value” is a variable as “variable write detection notification” together with the identifier of the establishment condition. The data is passed to the list management unit 214.

変数リスト管理部214は、条件成立の識別子によるフィールドを、各レコードに生成し、現在のセットアップフィールドの値を複写する。そして、この条件識別子付きフィールドの値に、「戻り値」の内容を加算する。   The variable list management unit 214 generates a field based on the condition satisfaction identifier in each record, and copies the value of the current setup field. Then, the content of the “return value” is added to the value of the field with the condition identifier.

以上により、条件が成立した場合のセットアップタイムを得るので、さらに、機械語命令追跡部215は、このあと条件が不成立だった場合に相当する命令の追跡を実行することで、条件が成立した場合と成立しなかった場合の両方のセットアップタイムを、「変数リスト」のフィールドに格納することになる。図8に図7の装置構成をコンピュータとプログラムで実現する際の処理のフローチャートを示した。図5のフローチャートに対して、ステップS10〜13が追加されている。このプログラムは記録媒体に記録することも、ネットワークを通じて提供することもできる。   As described above, since the setup time is obtained when the condition is satisfied, the machine language instruction tracking unit 215 further executes the tracking of the instruction corresponding to the case where the condition is not satisfied, so that the condition is satisfied. Both of the setup times when not established are stored in the “variable list” field. FIG. 8 shows a flowchart of processing when the apparatus configuration of FIG. 7 is realized by a computer and a program. Steps S10 to S13 are added to the flowchart of FIG. This program can be recorded on a recording medium or provided through a network.

分岐条件のある場合のセットアップタイムの一例を図9に示す。変数名として、Buff[k]、Buff[i]、Buff[s]、Buff[t]の4つを掲げ、ある「条件1」の成立した場合と、成立していない場合とでの各変数のセットアップタイムがどのようになるかを示した。例えば、Buff[k]については、「条件1」が成立していない場合はセットアップが「2」(マシンサイクル2の値が与えられる)、成立している場合は「8」となる。Buff[i]については、「条件1」が成立している場合はセットアップが「17」であるが、成立していない場合でもその変数へのデフォルト値の代入が「113」において与えられる。また、Buff[s]については、「条件1」が成立する場合には値の代入がなく(値が変わることがない)、不成立の場合に「150」が与えられる。Buff[t]については、逆に成立しない場合には値の代入がなく(値が変わることがない)、成立の場合に「37」が与えられる。以上により、特定の「条件1」によってセットアップタイムが変わる(小さくなり得る)場合は、成立する「条件1」に応じて、各変数のセットアップタイムを得ることができる。   An example of the setup time when there is a branch condition is shown in FIG. There are four variable names, Buff [k], Buff [i], Buff [s], and Buff [t], and each variable when “Condition 1” is met and when it is not met. Shown what the setup time of will be. For example, for Buff [k], the setup is “2” (given the value of machine cycle 2) when “condition 1” is not satisfied, and “8” when it is satisfied. As for Buff [i], when “condition 1” is satisfied, the setup is “17”, but even when the condition is not satisfied, substitution of the default value to the variable is given at “113”. For Buff [s], no value is assigned (the value does not change) when “condition 1” is satisfied, and “150” is given when it is not satisfied. For Buff [t], if not established, no value is assigned (the value does not change). If established, “37” is given. As described above, when the setup time changes (can be reduced) depending on the specific “condition 1”, the setup time of each variable can be obtained according to the “condition 1” that is satisfied.

以上によって、セットアップタイム分析200の処理が完了する。ここまでで、合成対象となる部分の変数(レジスタ)について、どれが、何時、セットアップされるか、がわかった。すなわち、ハードウエア合成系に渡す変数名で、どれが何時セットアップされるかをリストアップできた。   Thus, the setup time analysis process 200 is completed. Up to this point, we know which and when are set up for the variables (registers) of the part to be synthesized. In other words, it was possible to list which variable was passed to the hardware synthesis system and which was set up when.

<ハードウエア合成>
ハードウエア合成系は、一定数の記憶要素部品(レジスタ)、演算要素部品(演算器)を前提として、計算処理を達成するための手順について、完全に逐次的に記述したもの(プログラム)に基づいて、処理の構成する部分手順の依存関係を見つけ出し、結果が同じになるように部分手順を並び替えることによって、遂次の実行の一部を同時に行えるようにすることである(例えば、塚本他、「動作合成技術の動向」、情報処理、45巻5号、471−476頁、2004年、5月)。
<Hardware synthesis>
The hardware synthesis system is based on a completely sequential description (program) of the procedure for achieving the calculation process on the premise of a certain number of memory element parts (registers) and arithmetic element parts (calculators). In this way, it is possible to perform part of the subsequent execution simultaneously by finding the dependency relationship of the partial procedures that constitute the process and rearranging the partial procedures so that the results are the same (for example, Tsukamoto et al. "Trends in behavioral synthesis technology," Information Processing, Vol. 45, No. 5, 471-476, May 2004).

ハードウエア合成系は、プログラムを解析することでハードウエアの構造の候補を推定し、その構造で何時どの処理を行うかという手順(何時どのレジスタと演算器をつなぐよにするか=スケジューリング)の候補を生成し、それらの候補が与えられた制約を満たすか否を判別して、満たす場合に構造と手順を出力する。   The hardware synthesis system estimates the hardware structure candidates by analyzing the program, and the procedure of when and what processing is to be performed in that structure (when to register which register and computing unit = scheduling) Candidates are generated, it is determined whether or not these candidates satisfy given constraints, and if they are satisfied, the structure and procedure are output.

ハードウエア合成系が入力として扱うのは、合成の対象とする処理を遂次処理で書き表した記述(プログラム)のほかに、いくつかの制約、例えば、レジスタや演算器の種類、数量、処理の開始から終了までの時間等の制約などである。   In addition to the description (program) in which the processing to be synthesized is written in sequential processing, the hardware synthesis system handles as input some constraints such as the type and quantity of registers and arithmetic units For example, there are restrictions on the time from start to end.

ハードウエア合成系にはいくつかの製品や研究成果の具体例があるが、共通的に、それらの内部では、どれもデータフローグラフもしくはデータフローコントロールグラフという分析結果をもっており、どの処理を何時行うかのスケジューリングを行う際に、ある処理が終わってから始めることができる別の処理はなにかという依存関係を守ることによって、処理の結果が元の遂次処理(プログラム)と同じになるようにしている。   There are some examples of products and research results in the hardware synthesis system, but in common, all of them have analysis results called data flow graphs or data flow control graphs, and what processing is performed when. When performing scheduling, the result of processing is the same as the original sequential processing (program) by protecting the dependency of what other processing can be started after the processing is completed. Yes.

ハードウエア合成対象の入力部分は、一般に複数のレジスタで構成されることになる。そのレジスタが保持する値が処理のために準備完了する(セットアップされる)のは、どれが先でどれが後となるかは、知りえないものとして、これまではハードウエア合成系を使用してきた。   The input part to be synthesized with hardware is generally composed of a plurality of registers. The hardware synthesis system has been used so far, assuming that the value held by the register is ready (set up) for processing, and it is impossible to know which is first and after. It was.

しかしながら、元々ハードウエア合成系がプログラムの解析結果として持っているデータフローグラフに基づけば、仮に、多数あるレジスタのなかの一部の値のみが他に先立って確定したときに、どの処理から行うことができるか選択判定することは、ほとんど従来のまま実現できる機能である。   However, based on the data flow graph that the hardware synthesis system originally has as the analysis result of the program, if only some values in a large number of registers are determined in advance, which processing is performed from It is a function that can be realized almost as it is in the past.

このような改造が行われたハードウエア合成系に対して、本発明は、前記したように、レジスタの値の設定完了時刻(セットアップタイム)を個別(レジスタごと)に提供するものである。   As described above, the present invention provides the setting completion time (setup time) of the register value individually (for each register) to the hardware synthesis system in which such a modification is performed.

<まとめ>
以上から、本発明によれば、ハードウエア合成系の処理対象における、ソフトウエアとの情報の受け渡しの仕組みにおいて、変数・レジスタの独立個数が非常に多い状況においても、ハードウエアが変数を利用できるようになる時間的な情報についての分析結果(セットアップタイム)をハードウエア合成系に提供できる利点がある。
<Summary>
As described above, according to the present invention, the hardware can use the variable even in the situation where the number of independent variables and registers is very large in the mechanism of information exchange with the software in the processing target of the hardware synthesis system. There is an advantage that the analysis result (setup time) about the temporal information to be provided can be provided to the hardware synthesis system.

これによって、ハードウエア合成系がレジスタの使用計画を行う際に、変数のセットアップタイムを利用することができるようになって、無駄な組み合せが減り、いままでハードウエア合成系の使用を断念していた、ソフトウエア処理と1000程度以上の多くの変数を逐次的に交換するような大規模な処理対象も、ハードウエア合成系で実施できるようになる。   This makes it possible to use the setup time of variables when the hardware synthesis system plans to use registers, reducing the number of useless combinations, and abandoning the use of the hardware synthesis system until now. In addition, a large-scale processing target in which software processing and many variables of about 1000 or more are sequentially exchanged can be implemented by the hardware synthesis system.

従来では、ハードウエア合成系の使用を断念していたため、設計者の創意と発案により個別に行っていた、ソフトウエアとの情報のやり取りの機構の生成を、手順として標準化できるようになり、間違いが入るリスクを減らし、検証箇所を明確に決定できるようになる。   In the past, since the use of hardware synthesis systems was abandoned, the creation of the mechanism for exchanging information with software, which had been done individually by the designer's ingenuity and idea, can now be standardized as a procedure. The risk of entering is reduced, and the verification location can be clearly determined.

さらに、従来の設計方法では、ソフトウエアとハードウエアの情報の受け渡しの機構を、ハードウエアを記述する言語で作り直すことや、ソフトウエアの処理を合わせた性能の見積りを繰り返すことに大きな手間がかかっていたが、本発明の手法をとれば、ハードウエア合成系は、ソフトウエアが変数を確定させる時刻(セットアップタイム)を反映して生成されるものとなるため、そのまま性能を算出することができ、手間の削減ができる。   Furthermore, in the conventional design method, it takes a lot of time and effort to recreate the mechanism for transferring information between software and hardware in a language that describes the hardware, and to repeatedly estimate the performance combined with the software processing. However, if the method of the present invention is used, the hardware synthesis system is generated by reflecting the time (setup time) at which the software determines the variable, so the performance can be calculated as it is. , Can save time.

ハードウエア合成の説明図である。It is explanatory drawing of a hardware synthesis | combination. ハードウエア合成の説明図である。It is explanatory drawing of a hardware synthesis | combination. ソフトウエアの一部をハードウエア合成するための処理の一例のブロック図である。It is a block diagram of an example of the process for carrying out the hardware synthesis | combination of a part of software. セットアップタイム分析処理(実施例1)の装置構成のブロック図である。It is a block diagram of the apparatus structure of a setup time analysis process (Example 1). セットアップタイム分析処理(実施例1)のフローチャートである。It is a flowchart of a setup time analysis process (Example 1). セットアップタイム分析処理(実施例1)での変数リストの変遷の説明図である。It is explanatory drawing of the transition of the variable list | wrist in a setup time analysis process (Example 1). セットアップタイム分析処理(実施例2)の装置構成のブロック図である。It is a block diagram of the apparatus structure of a setup time analysis process (Example 2). セットアップタイム分析処理(実施例2)のフローチャートである。It is a flowchart of a setup time analysis process (Example 2). セットアップタイム分析処理(実施例2)によるセットアップタイムの説明図である。It is explanatory drawing of the setup time by a setup time analysis process (Example 2).

Claims (7)

ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するセットアップタイム生成方法であって、
前記ソフトウエアの中の前記ハードウエア化する記述部分を指定し、該記述部分において参照している変数を列挙した変数リストを生成し、前記ソフトウエアをコンパイルした機械語命令列の追跡によるアドレスが前記変数リストのアドレスと一致するとき、当該アドレスの変数に前記追跡のセットアップタイムを記録更新し、各変数のセットアップタイムを記録更新した変数リストを出力することを特徴とするセットアップタイム生成方法。
When a part of the processing embodied in software is made into hardware using a hardware synthesis system, the setup time of variables passed between the processing left in the software and the processing made into hardware is reduced. A setup time generation method for generating,
A description part to be hardwareized is specified in the software, a variable list enumerating variables referred to in the description part is generated, and an address obtained by tracking a machine language instruction sequence in which the software is compiled is A setup time generation method characterized in that when it matches an address of the variable list, the tracking setup time is recorded and updated in the variable of the address, and a variable list in which the setup time of each variable is recorded and updated is output.
請求項1に記載のセットアップタイム生成方法において、
前記各変数のセットアップタイムは、前記ハードウエア化に適した様式で出力されることを特徴とするセットアップタイム生成方法。
In the setup time generation method according to claim 1,
A setup time generation method, wherein the setup time of each variable is output in a format suitable for the hardware implementation.
請求項1又は2に記載のセットアップタイム生成方法において、
前記ソフトウエアに条件分岐があるとき、当該条件成立時のセットアップタイムと不成立時のセットアップタイムを記録更新した変数リストを生成することを特徴とするセットアップタイム生成方法。
In the setup time generation method according to claim 1 or 2,
When there is a conditional branch in the software, a setup time generating method is characterized in that a variable list is generated by recording and updating a setup time when the condition is satisfied and a setup time when the condition is not satisfied.
ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するセットアップタイム生成装置であって、
前記ソフトウエアを機械語に変換して機械語命令列を生成するコンパイラと、
前記ソフトウエアの中の前記ハードウエア化する処理の記述部分において参照している変数を列挙した変数リストを生成する変数リスト生成部と、
前記機械語命令列の中の命令語を追跡する機械語命令追跡部と、
該機械語命令追跡部が命令語の追跡を1ステップ進める毎に時刻を更新する時刻変数管理部と、
前記変数リスト生成部で生成された変数リストを格納し、前記時刻変数管理部からの現在の時刻情報と前記機械語命令追跡部からの変数のアドレス値を伴う通知とを受け取り、前記変数リストの中に当該アドレス値を持つエントリーがあるとき、前記時刻情報を前記変数のセットアップタイムとして、前記変数リストのセットアップタイムを記録更新する変数リスト管理部と、
を備えることを特徴とするセットアップタイム生成装置。
When a part of the processing embodied in software is made into hardware using a hardware synthesis system, the setup time of variables passed between the processing left in the software and the processing made into hardware is reduced. A setup time generation device for generating,
A compiler that converts the software into machine language to generate a machine language instruction sequence;
A variable list generation unit that generates a variable list that enumerates variables referred to in the description part of the process to be hardwareized in the software;
A machine language instruction tracking unit that tracks instruction words in the machine language instruction sequence;
A time variable management unit that updates the time each time the machine language instruction tracking unit advances the tracking of the instruction word by one step;
Storing the variable list generated by the variable list generation unit, receiving current time information from the time variable management unit and a notification with the address value of the variable from the machine language instruction tracking unit; When there is an entry having the address value in the variable list management unit for recording and updating the setup time of the variable list, using the time information as the setup time of the variable,
A setup time generation device comprising:
請求項4に記載のセットアップタイム生成装置において、
前記変数リスト管理部の各変数のセットアップタイムを最も早く値の決まる変数のセットアップタイムとの相対的な時間で定めた様式に変換して出力する出力管理部を備えることを特徴とするセットアップタイム生成装置。
In the setup time generation device according to claim 4,
A setup time generation comprising: an output management unit that converts a setup time of each variable of the variable list management unit into a format determined by a relative time with a setup time of a variable whose value is determined earliest. apparatus.
請求項4又は5に記載のセットアップタイム生成装置において、
前記機械語命令追跡部が命令語の追跡中に条件分岐を検出したとき、該条件分岐が成立した場合の変数のセットアップタイムを戻り値として前記機械語命令追跡部に戻す再帰処理管理部を備え、
前記機械語命令追跡部は、前記再帰処理管理部からの前記戻り値を受け取り、前記条件分岐の成立条件の識別子を含む変数のアドレス値を伴う通知を前記変数リスト管理部に送るとともに、前記条件分岐が不成立の場合の変数のアドレス値を伴う通知を前記変数リスト管理部に送り、
前記変数リスト管理部は、変数について、条件が成立した場合と成立しなかった場合の両方のセットアップタイムを変数リストに記録更新する、
ことを特徴とするセットアップタイム生成装置。
In the setup time generation device according to claim 4 or 5,
When the machine language instruction tracking unit detects a conditional branch while tracking the instruction word, the machine language instruction tracking unit includes a recursive processing management unit that returns a variable setup time when the conditional branch is established to the machine language instruction tracking unit as a return value ,
The machine language instruction tracking unit receives the return value from the recursive processing management unit, sends a notification with an address value of a variable including an identifier of the condition for establishing the conditional branch to the variable list management unit, and Send a notification with the address value of the variable when the branch is not established to the variable list management unit,
The variable list management unit records and updates the setup time of both the case where the condition is satisfied and the case where the condition is not satisfied about the variable in the variable list,
A setup time generation device characterized by the above.
ソフトウエアで具体化した処理の一部を、ハードウエア合成系を使用してハードウエア化する際に、ソフトウエアに残す処理とハードウエア化する処理との間で受け渡される変数のセットアップタイムを生成するプログラムであって、
前記ソフトウエアの中の前記ハードウエア化する記述部分を指定するステップと、
該記述部分において参照している変数を列挙した変数リストを生成するステップと、
前記ソフトウエアをコンパイルした機械語命令列の命令語を追跡するステップと、
該追跡によるアドレスが前記変数リストのアドレスと一致するとき、当該アドレスの変数に前記追跡の時刻をセットアップタイムとして記録更新するステップと、
各変数のセットアップタイムを記録した変数リストを出力するステップと、
を備えることを特徴とするプログラム。
When a part of the processing embodied in software is made into hardware using a hardware synthesis system, the setup time of variables passed between the processing left in the software and the processing made into hardware is reduced. A program to generate,
Designating the hardware description part of the software;
Generating a variable list enumerating variables referred to in the description part;
Tracing an instruction word of a machine language instruction sequence in which the software is compiled;
When the tracking address matches the address of the variable list, the tracking time is recorded and updated as a setup time in the variable of the address; and
Outputting a variable list that records the setup time of each variable;
A program comprising:
JP2008014377A 2008-01-25 2008-01-25 Setup time generation method, device, and program Withdrawn JP2009176077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008014377A JP2009176077A (en) 2008-01-25 2008-01-25 Setup time generation method, device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008014377A JP2009176077A (en) 2008-01-25 2008-01-25 Setup time generation method, device, and program

Publications (1)

Publication Number Publication Date
JP2009176077A true JP2009176077A (en) 2009-08-06

Family

ID=41031086

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008014377A Withdrawn JP2009176077A (en) 2008-01-25 2008-01-25 Setup time generation method, device, and program

Country Status (1)

Country Link
JP (1) JP2009176077A (en)

Similar Documents

Publication Publication Date Title
JP4042604B2 (en) Program parallelization apparatus, program parallelization method, and program parallelization program
US6877150B1 (en) Method of transforming software language constructs to functional hardware equivalents
JP2007528059A (en) Systems and methods for software modeling, abstraction, and analysis
US20130318504A1 (en) Execution Breakpoints in an Integrated Development Environment for Debugging Dataflow Progrrams
US20020152061A1 (en) Data processing system and design system
SNOW III AUTOMATION OF MODULE SET INDEPENDENT REGISTER-TRANSFER LEVEL DESIGN.
JP2008176453A (en) Simulation device
Aranega et al. Using feature model to build model transformation chains
US7110934B2 (en) Analysis of the performance of a portion of a data processing system
JP3274036B2 (en) Method and apparatus for automatically generating an operation model of a processor and a test instruction sequence for logic verification
Bhagwati et al. Automatic verification of pipelined microprocessors
CN110210046B (en) Application program and special instruction set processor integrated agility design method
JP2009176077A (en) Setup time generation method, device, and program
US10223077B2 (en) Determination of signals for readback from FPGA
JP2001256048A (en) Simulation of data processor
US20170090882A1 (en) Program development support system and program development support software
Mussa et al. Towards a model based approach for integration testing
JP2007018313A (en) Circuit design program, circuit design device and circuit design method
JP5067705B2 (en) Abnormal test support device, abnormal test support method, and program
Happe et al. Completion and extension techniques for enterprise software performance engineering
US20090326901A1 (en) Apparatus and method for estimating change amount in register transfer level structure and computer-readable recording medium
Kunzelmann et al. A universal specification methodology for quality ensured, highly automated generation of design models
Xu et al. Data Access Time Estimation in Automotive LET Scheduling with Multi-core CPU
Bartsch et al. Efficient SAT/simulation-based model generation for low-level embedded software.
US20230394300A1 (en) Method and system for program sampling using neural network

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110405