JP2013125419A - Hardware-software collaborative design device and program - Google Patents

Hardware-software collaborative design device and program Download PDF

Info

Publication number
JP2013125419A
JP2013125419A JP2011273842A JP2011273842A JP2013125419A JP 2013125419 A JP2013125419 A JP 2013125419A JP 2011273842 A JP2011273842 A JP 2011273842A JP 2011273842 A JP2011273842 A JP 2011273842A JP 2013125419 A JP2013125419 A JP 2013125419A
Authority
JP
Japan
Prior art keywords
processing
target
program code
execution
execution unit
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.)
Granted
Application number
JP2011273842A
Other languages
Japanese (ja)
Other versions
JP5978613B2 (en
Inventor
Junichi Okuyama
潤一 奥山
Kazuo Yamada
和雄 山田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2011273842A priority Critical patent/JP5978613B2/en
Publication of JP2013125419A publication Critical patent/JP2013125419A/en
Application granted granted Critical
Publication of JP5978613B2 publication Critical patent/JP5978613B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

PROBLEM TO BE SOLVED: To perform a design for reducing the power consumption of a hardware-software collaborative system while satisfying the target performance of the system.SOLUTION: A code structure analysis part 101 detects an execution unit of a program code 302 by granularity. A code load analysis part 103 estimates the calculation volume of each of the execution units. A HW-converting target selection part 104 selects, as HW-converting targets, execution units whose calculation volumes each exceeds a predetermined threshold ratio to the entire calculation volume of the program code 302 in an ascending order of granularity. A HW block synthesis part 106 synthesizes the selected execution unit as a HW block on a reconfigurable circuit 204. In accordance with the synthesis result, a HW/SW collaborative operation part 108 configures a target system 200 as a HW/SW collaborative system, causes process-target data 304 to be processed and measures an actual system performance at the processing. A HW/SW design completion determination part 110 determines to be a design complete in the case of determining that the actually measured performance has realized the target performance.

Description

本発明は、ハードウエア/ソフトウエア協調設計装置及びプログラムに関する。   The present invention relates to a hardware / software co-design apparatus and program.

特許文献1に記載されているハードウエア/ソフトウエア協調設計システムでは、ユーザは、論理システムの動作を記述した動作記述を分割した複数の機能ブロックのそれぞれを、ソフトウエアで実行するか、ハードウエア化するかを指定する。その指定に従った場合のソフトウエア部分の処理時間とハードウエア部分のハードウエア量をハードウエア/ソフトウエア手段見積り手段が見積もる。その見積もりの結果が、あらかじめ定められた制約条件を満たさない場合、機能ブロック解析判定手段が、各機能ブロックそれぞれを解析し、ハードウエアで実現することに適しているか否かを機能ブロック解析判定手段が判定する。この判定の結果とユーザの指定との比較結果を指定・判定結果比較手段が表示し、ユーザはその比較結果を参照して、機能ブロックごとのハードウエア/ソフトウエアの指定を変更する。以上のサイクルを、制約条件が満たされるようになるまで繰り返す。   In the hardware / software co-design system described in Patent Document 1, the user executes each of a plurality of functional blocks obtained by dividing the operation description describing the operation of the logical system by software, or hardware. Specify whether to convert. The hardware / software means estimating means estimates the processing time of the software part and the hardware amount of the hardware part in accordance with the specification. If the result of the estimation does not satisfy a predetermined constraint, the function block analysis determination means determines whether the function block analysis determination means is suitable for analyzing each function block and realizing it in hardware. Judgment. The comparison result between the determination result and the user designation is displayed by the designation / determination result comparison means, and the user refers to the comparison result and changes the hardware / software designation for each functional block. The above cycle is repeated until the constraint condition is satisfied.

特開平9−81604号公報JP-A-9-81604

本発明は、ハードウエア/ソフトウエア協調システムの目標性能を満たしつつも、本発明を採用しない場合よりも、そのシステムの消費電力を低減することを目的とする。   An object of the present invention is to reduce the power consumption of the system as compared with the case where the present invention is not adopted while satisfying the target performance of the hardware / software cooperation system.

請求項1に係る発明は、プロセッサと再構成可能回路とを備える処理装置に実行させるプログラムコードを解析して、当プログラムコードに含まれる粒度ごとの実行単位を識別するコード解析手段と、処理対象データを前記プログラムコードにより処理する場合の、前記粒度ごとの前記各実行単位の処理負荷を計算する負荷計算手段と、計算された前記処理負荷が閾値を超える実行単位を、粒度の細かい実行単位から順に、前記再構成可能回路によるハードウエア化対象に選択する手段と、前記プログラムコードのうち、ハードウエア化対象に選択された各実行単位を前記再構成可能回路の回路構成として実装し、残りの実行単位を前記プロセッサでのソフトウエア処理対象に割り当てることにより、前記処理装置を、前記プログラムコードを実行するシステムとして構成し、構成したシステムに前記処理対象データを実行させ実行性能を計測する計測手段と、計測された実行性能が目標性能を満たすまで、前記選択手段による更なるハードウエア化対象の選択と、前記計測手段によるその選択結果に応じた前記システムの再構成及び前記実行性能の計測と、を繰り返す制御を行う制御手段と、を備えるハードウエア/ソフトウエア協調設計装置である。   The invention according to claim 1 is a code analyzing means for analyzing a program code to be executed by a processing device including a processor and a reconfigurable circuit, and identifying an execution unit for each granularity included in the program code; When processing data with the program code, load calculation means for calculating the processing load of each execution unit for each granularity, and the execution unit for which the calculated processing load exceeds a threshold value from the fine granularity execution unit In turn, means for selecting the hardware configuration target by the reconfigurable circuit, and each execution unit selected as the hardware configuration target among the program code is implemented as a circuit configuration of the reconfigurable circuit, and the rest By assigning an execution unit to a software processing target in the processor, the processing device Configure as a system to be executed, measure means for executing the processing target data in the configured system and measure execution performance, and until the measured execution performance meets the target performance, A hardware / software co-design apparatus comprising control means for performing selection and repetitive control of reconfiguration of the system according to the selection result by the measurement means and measurement of the execution performance.

請求項2に係る発明は、前記処理装置が備える前記プロセッサが実行するプログラムとして前記処理装置に実装されていることを特徴とする請求項1に記載のハードウエア/ソフトウエア協調設計装置である。   The invention according to claim 2 is the hardware / software co-design apparatus according to claim 1, wherein the hardware / software co-design apparatus is implemented as a program executed by the processor included in the processing device.

請求項3に係る発明は、コンピュータを、プロセッサと再構成可能回路とを備える処理装置に実行させるプログラムコードを解析して、当プログラムコードに含まれる粒度ごとの実行単位を識別するコード解析手段、処理対象データを前記プログラムコードにより処理する場合の、前記粒度ごとの前記各実行単位の処理負荷を計算する負荷計算手段、計算された前記処理負荷が閾値を超える実行単位を、粒度の細かい実行単位から順に、前記再構成可能回路によるハードウエア化対象に選択する手段、前記プログラムコードのうち、ハードウエア化対象に選択された各実行単位を前記再構成可能回路の回路構成として実装し、残りの実行単位を前記プロセッサでのソフトウエア処理対象に割り当てることにより、前記処理装置を、前記プログラムコードを実行するシステムとして構成し、構成したシステムに前記処理対象データを実行させ実行性能を計測する計測手段、計測された実行性能が目標性能を満たすまで、前記選択手段による更なるハードウエア化対象の選択と、前記計測手段によるその選択結果に応じた前記システムの再構成及び前記実行性能の計測と、を繰り返す制御を行う制御手段、として機能させるためのプログラムである。   The invention according to claim 3 is a code analyzing means for analyzing a program code for causing a computer to execute a processing device including a processor and a reconfigurable circuit, and identifying an execution unit for each granularity included in the program code, Load processing means for calculating the processing load of each execution unit for each granularity when processing target data is processed by the program code, execution units whose calculated processing load exceeds a threshold, In order from the above, means for selecting the hardware configuration target by the reconfigurable circuit, among the program code, each execution unit selected for the hardware configuration is mounted as a circuit configuration of the reconfigurable circuit, and the rest By assigning an execution unit to a software processing target in the processor, the processing device is A measuring unit configured to execute the processing target data in the configured system and measuring the execution performance, and further selecting a hardware target by the selecting unit until the measured execution performance satisfies the target performance And a control means for performing control for repeating the reconfiguration of the system and the measurement of the execution performance according to the selection result by the measurement means.

請求項1又は3に係る発明によれば、ハードウエア/ソフトウエア協調システムの目標性能を満たしつつも、本発明を採用しない場合よりも、そのシステムの消費電力を低減することができる。   According to the first or third aspect of the invention, while satisfying the target performance of the hardware / software cooperation system, the power consumption of the system can be reduced as compared with the case where the present invention is not adopted.

請求項2に係る発明によれば、処理装置単体で、当該処理装置自身を目標性能を満たし且つ消費電力を低減できるハードウエア/ソフトウエア協調システムとして構成することができる。   According to the second aspect of the present invention, it is possible to configure the processing apparatus itself as a hardware / software cooperation system that can satisfy the target performance and reduce power consumption by itself.

実施形態のハードウエア/ソフトウエア協調設計装置の構成例を示す図である。It is a figure which shows the structural example of the hardware / software co-design apparatus of embodiment. 実施形態の全体的な処理手順の一例を示す図である。It is a figure which shows an example of the whole process sequence of embodiment. 実施形態の全体的な処理手順のうちのHWブロック化処理の詳細な手順の例を示す図である。It is a figure which shows the example of the detailed procedure of the HW blocking process in the whole processing procedure of embodiment.

図1を参照して、この実施形態のハードウエア(HW)/ソフトウエア(SW)協調設計装置100の構成例を説明する。この装置100は、HW/SW協調システムであるターゲットシステム200のシステム構成を設計する。   A configuration example of the hardware (HW) / software (SW) co-design apparatus 100 of this embodiment will be described with reference to FIG. This apparatus 100 designs a system configuration of a target system 200 that is a HW / SW cooperative system.

ターゲットシステム200は、この実施形態の装置100による設計処理の対象となるシステムであり、プロセッサ202と再構成可能回路204とを備えている。プロセッサ202は、プログラムを実行するマイクロプロセッサ等の装置である。再構成可能回路204は、内部の論理回路構成を変更可能なハードウエア回路であり、DRP(Dynamic Reconfigurable Processor)のように処理実行中に動的に再構成可能なものであってもよいし、FPGA(Field Programmable Gate Array)のようにシステム起動時に再構成されるものであってもよい。例えば、ターゲットシステム200の一例としては、特開2009−3765号公報に紹介されるDAPDNAアーキテクチャのデバイスがある。このデバイスは、DAPと呼ばれるプロセッサと、DNAと呼ばれる再構成可能回路アレイとから構成されている。ターゲットシステム200は、プロセッサ202によるソフトウエア処理と、再構成可能回路204によるハードウエア処理との組合せにより、目的とする処理機能(言い換えればシステム構成)を実現する。   The target system 200 is a system targeted for design processing by the apparatus 100 of this embodiment, and includes a processor 202 and a reconfigurable circuit 204. The processor 202 is a device such as a microprocessor that executes a program. The reconfigurable circuit 204 is a hardware circuit that can change the internal logic circuit configuration, and may be dynamically reconfigurable during processing execution, such as DRP (Dynamic Reconfigurable Processor), It may be reconfigured when the system is started, such as an FPGA (Field Programmable Gate Array). For example, as an example of the target system 200, there is a DAPDNA architecture device introduced in Japanese Patent Laid-Open No. 2009-3765. This device consists of a processor called DAP and a reconfigurable circuit array called DNA. The target system 200 realizes a target processing function (in other words, a system configuration) by a combination of software processing by the processor 202 and hardware processing by the reconfigurable circuit 204.

HW/SW協調設計装置100は、目的とする処理機能/システム構成をプログラミング言語(例えばC言語)等で記述したプログラムコード302を入力として受け取る。そして、そのプログラムコード302を解析することで、その処理機能/システム構成をターゲットシステム200上のHWとSWの組合せで実現するためのシステム設計を行う。   The HW / SW co-design apparatus 100 receives as input a program code 302 in which a target processing function / system configuration is described in a programming language (for example, C language). Then, by analyzing the program code 302, a system design for realizing the processing function / system configuration by a combination of HW and SW on the target system 200 is performed.

ここで、HW/SW協調設計装置100は、その設計の際、プログラムコード302の処理の対象である処理対象データ304を考慮する。すなわち、HW/SW協調設計においては、プログラムコード302の中の演算量(すなわち処理負荷の量)の大きい部分はHW回路で実装するが、データ圧縮等、演算量が処理対象データに依存する処理の部分については、処理対象データを考慮する必要がある。例えば、ターゲットシステム200をデジタル印刷装置における画像処理(例えば拡大・縮小、回転、面付け、圧縮・伸張)を実行する装置としてシステム構成する場合、実際に印刷する文書自体は未定であっても、印刷対象の文書の分野(例えばダイレクトメール、帳票等)に応じてどのような文書画像がどのような分布で含まれているのかの傾向がある程度決まってくる。したがって、その傾向に従った文書画像群をテストデータとして用意しておき、そのテストデータを処理対象データ304としてHW/SW協調設計装置100に与えることで、実際の処理対象の文書画像群の傾向に適したシステム構成が設計される。   Here, the HW / SW co-design apparatus 100 considers the processing target data 304 that is the processing target of the program code 302 in the design. In other words, in the HW / SW co-design, the portion of the program code 302 with a large amount of computation (that is, the amount of processing load) is implemented by the HW circuit, but the processing amount depends on the processing target data, such as data compression. For this part, it is necessary to consider the data to be processed. For example, when the target system 200 is configured as a device that executes image processing (for example, enlargement / reduction, rotation, imposition, compression / expansion) in a digital printing apparatus, even if the document to be actually printed is undecided, Depending on the field of the document to be printed (for example, direct mail, form, etc.), the tendency of what kind of document image is contained in what distribution is determined to some extent. Therefore, a document image group according to the tendency is prepared as test data, and the test data is provided as processing target data 304 to the HW / SW co-design apparatus 100, whereby the tendency of the actual document image group to be processed is determined. A system configuration suitable for the system is designed.

このような設計処理のために、HW/SW協調設計装置100は、コード構造解析部101、コード負荷分析部103、HW化対象選択部104、HWブロック合成部106、HW/SW協調動作部(計測部)108、及びHW/SW設計完了判断部110を備えている。   For such design processing, the HW / SW cooperative design apparatus 100 includes a code structure analysis unit 101, a code load analysis unit 103, a HW conversion target selection unit 104, an HW block synthesis unit 106, an HW / SW cooperative operation unit ( Measuring unit) 108, and HW / SW design completion determination unit 110.

コード構造解析部101は、入力されたプログラムコード302を解析して、そのプログラムコード302の構造を求める。例えば、コード構造解析部101は、プログラムコード302を構文解析(パース)するパーサであり、プログラムコード302の構文解析結果として構文木を出力する。この構文木には、そのプログラムコード302に含まれる個々の命令(単一インストラクション)、複数の命令を含んだ処理ループ、命令や処理ループ等を含んだ関数、等といった、様々な粒度の実行単位の情報が含まれる。なお、ここでいう「粒度」とは、プログラムコード302に含まれる実行単位の大きさの段階のことである。上述した命令、ループ、関数という実行単位同士の間では、「命令」が最も細かい粒度であり、関数が最も粗い粒度であり、ループがそれら両者の中間である。なお、ループが入れ子になっている場合は、入れ子のレベルごとに別の粒度として取り扱ってもよい。例えば、第1のループを中に含んだ第2のループは、第1のループよりも粒度が1段階粗いものとして取り扱うなどである。一般に、粒度が細かい実行単位ほど、その実行単位をHW実装した場合の回路規模は小さい。   The code structure analysis unit 101 analyzes the input program code 302 and obtains the structure of the program code 302. For example, the code structure analysis unit 101 is a parser that parses (parses) the program code 302, and outputs a syntax tree as a syntax analysis result of the program code 302. This syntax tree includes execution units of various granularities such as individual instructions (single instruction) included in the program code 302, processing loops including a plurality of instructions, functions including instructions and processing loops, and the like. Information is included. The “granularity” here is a stage of the size of the execution unit included in the program code 302. Among execution units such as the above-described instruction, loop, and function, “instruction” has the finest granularity, the function has the coarsest granularity, and the loop is in between them. If the loop is nested, it may be handled as a different granularity for each level of nesting. For example, the second loop including the first loop is treated as one level coarser than the first loop. In general, the smaller the execution unit, the smaller the circuit scale when the execution unit is mounted in HW.

また、構文木からは、個々の実行単位の入力及び出力となる変数の情報が求められる。   In addition, from the syntax tree, information on variables serving as inputs and outputs of individual execution units is obtained.

コード構造解析部101は、プログラムコード302から検出した実行単位ごとに、当該実行単位の粒度と、当該実行単位の入力及び出力の変数と、を求め、それらの情報を構文木と共に出力してもよい。   For each execution unit detected from the program code 302, the code structure analysis unit 101 obtains the granularity of the execution unit and the input and output variables of the execution unit, and outputs the information together with the syntax tree. Good.

コード負荷分析部103は、プログラムコード302及び処理対象データ304と、コード構造解析部101の解析結果とに基づき、プログラムコード302に含まれる実行単位ごとに、当該実行単位の演算量(負荷量)を見積もる。この見積もりでは、処理対象データ304を用いることで、そのデータ304を当該プログラムコード302にて処理する場合に、個々の実行単位がそれぞれ何回実行されるのかを求め、その実行回数の情報も加味して演算量を求める。   Based on the program code 302, the processing target data 304, and the analysis result of the code structure analysis unit 101, the code load analysis unit 103 calculates the calculation amount (load amount) of the execution unit for each execution unit included in the program code 302. Estimate. In this estimation, by using the processing target data 304, when the data 304 is processed by the program code 302, the number of times each execution unit is executed is obtained, and information on the number of times of execution is also taken into consideration. To calculate the amount of computation.

例えば、命令レベルの実行単位の場合、個々の命令を表す予約語に対応づけて当該命令に対応する演算量が登録されたデータベースを用意しておく。すなわち、このデータベースに登録された演算量は、命令の実行1回あたりの演算量である。命令の演算量は、例えば、プロセッサ202が当該命令を実行するのに要する時間の長さ(例えば、秒等の時間単位、あるいはプロセッサ202のサイクル(クロック)数単位)で表される。所要時間が長いほど、演算量は大きい。コード負荷分析部103は、プログラムコード302中に含まれる命令の予約語ごとに、当該予約語に対応する1回当たりの演算量をデータベースから求める。そして、その1回当たりの演算量に対して、処理対象データ304を処理する場合の当該命令の実行回数を乗じることで、当該命令の合計の演算量を求める。なお、この計算の際、プログラムコード302中の異なる場所に同じ命令がある場合、それら各場所にある当該命令の実行回数の総和を、当該命令の実行回数として取り扱う。このような処理により、処理対象データ304を処理するに当たっての、各命令の演算量が求められる。   For example, in the case of an instruction level execution unit, a database is prepared in which the amount of computation corresponding to the instruction is registered in association with a reserved word representing each instruction. That is, the calculation amount registered in this database is the calculation amount per instruction execution. The amount of calculation of an instruction is represented by, for example, the length of time required for the processor 202 to execute the instruction (for example, a time unit such as seconds or a cycle (clock) number unit of the processor 202). The longer the time required, the greater the amount of computation. For each reserved word of an instruction included in the program code 302, the code load analysis unit 103 obtains a calculation amount per operation corresponding to the reserved word from the database. Then, the total calculation amount of the instruction is obtained by multiplying the calculation amount per time by the number of times the instruction is executed when the processing target data 304 is processed. In this calculation, when there are the same instructions at different places in the program code 302, the total number of execution times of the instructions at those places is treated as the number of execution times of the instructions. Through such processing, the amount of calculation of each instruction for processing the processing target data 304 is obtained.

同様に、コード負荷分析部103は、プログラムコード302中の個々のループごとに、そのループに含まれる各命令の1回当たりの演算量を求め、それら演算量の合計をそのループの1回当たりの演算量として求める。そして、このループの1回当たりの演算量に、処理対象データ304を処理する場合の当該ループの実行回数を乗じることで、当該ループの合計の演算量を求める。なお、ループ内にif-elseやswitch-case等の制御構造が含まれている場合は、処理対象データ304をその制御構造に従って処理した場合の当該ループ内の個々の命令の実行回数を考慮して、当該ループの合計の演算量を求める。   Similarly, for each loop in the program code 302, the code load analysis unit 103 obtains an operation amount per instruction of each instruction included in the loop, and calculates the total operation amount per operation of the loop. It is calculated as the amount of computation. Then, the total amount of calculation of the loop is obtained by multiplying the amount of calculation per loop by the number of times the loop is executed when the processing target data 304 is processed. When a control structure such as if-else or switch-case is included in the loop, the number of times each instruction in the loop is executed when the processing target data 304 is processed according to the control structure is taken into consideration. Thus, the total calculation amount of the loop is obtained.

また、コード負荷分析部103は、プログラムコード302中の個々の関数ごとに、その関数に含まれる各ループ、各命令の1回当たりの演算量を求め、それら演算量の合計をその関数の1回当たりの演算量として求める。関数内にif-elseやswitch-case等の制御構造が含まれている場合は、処理対象データ304をその制御構造に従って処理した場合の当該関数内の個々のループ及び命令の実行回数を考慮して、当該関数の合計の演算量を求める。   Further, the code load analysis unit 103 obtains the amount of calculation for each loop and each instruction included in the function for each function in the program code 302, and calculates the total amount of these operations as 1 of the function. Calculated as the amount of calculation per operation. When a control structure such as if-else or switch-case is included in the function, the number of executions of individual loops and instructions in the function when the processing target data 304 is processed according to the control structure is considered. Thus, the total calculation amount of the function is obtained.

このようなコード負荷分析部103としては、既存のプロファイラを用いればよい。プロファイラは、プログラムを実際に実行したときの各関数その他の実行単位の実行回数や実行時間等を計測するツールである。   As such a code load analysis unit 103, an existing profiler may be used. The profiler is a tool for measuring the number of executions and execution time of each function or other execution unit when the program is actually executed.

コード構造解析部101の解析結果(各実行単位の粒度及び入出力変数等の情報)、及びコード負荷分析部103の求めた各実行単位の演算量は、HW化対象選択部104に入力される。HW化対象選択部104は、それら入力情報に基づき、プログラムコード302中でHW化(すなわち再構成可能回路204上にHW論理回路として実装すること)の対象とする実行単位を選択する。ここで、HW化対象選択部104は、粒度の細かい実行単位から順に実行単位を選択していく。ただし、HW化の効果がある程度以上見込める実行単位しか、選択しない。HW化の効果は、コード負荷分析部103が求めた実行単位の演算量(実行一回当たりではなく、処理対象データ304全体に渡る合計の演算量)によって測る。例えば、演算量があらかじめ定めた閾値を超える実行単位を、HW化の効果が見込める実行単位と判定する等である。また、同じ粒度で演算量が閾値を超える実行単位が複数ある場合、演算量の高い実行単位ほど優先的にHW化対象に選択するようにしてもよい。HW化対象選択部104の選択結果は、HWブロック合成部106に渡される。   The analysis result of the code structure analysis unit 101 (information such as the granularity and input / output variables of each execution unit) and the calculation amount of each execution unit obtained by the code load analysis unit 103 are input to the HW conversion target selection unit 104. . Based on the input information, the HW conversion target selection unit 104 selects an execution unit to be subjected to HW conversion (that is, implemented as an HW logic circuit on the reconfigurable circuit 204) in the program code 302. Here, the HW conversion target selection unit 104 selects execution units in order from finer execution units. However, only the execution unit that can expect the effect of HW conversion to a certain degree or more is selected. The effect of converting to HW is measured by the amount of calculation of the execution unit obtained by the code load analysis unit 103 (not the amount of execution per execution but the total amount of calculation over the entire processing target data 304). For example, an execution unit in which the amount of computation exceeds a predetermined threshold is determined as an execution unit in which the effect of HW can be expected. Further, when there are a plurality of execution units having the same granularity and the calculation amount exceeds the threshold value, the execution unit having the higher calculation amount may be preferentially selected as the HW conversion target. The selection result of the HW conversion target selection unit 104 is passed to the HW block synthesis unit 106.

HWブロック合成部106は、受け取った選択結果が示すHW化対象の実行単位(命令、ループ、又は関数等)を、再構成可能回路204上のプロセッサエレメントの組合せからなる論理回路(HWブロックと呼ぶ)として合成する。この合成処理には、既存の高位合成技術を用いればよい。プログラムコード302のうちHW化しない部分は、プロセッサ202が実行する実行形式のコードに変換される。このようにして生成されたHWブロックと実行形式のコードの組合せが、ターゲットシステム200上に実現されるHW/SW協調システムを規定したものとなる。すなわち、HW化対象選択部104がHW化対象の実行単位を選択し、HWブロック合成部106がその選択結果に応じて合成処理を行うごとに、1つのHW/SW協調システムが設計されることになる。このHWブロック合成部106の合成の結果(すなわち設計結果)は、HW/SW協調動作部108に渡される。   The HW block synthesizing unit 106 sets the execution unit (instruction, loop, function, etc.) to be HW indicated by the received selection result as a logic circuit (HW block) formed by a combination of processor elements on the reconfigurable circuit 204. ). An existing high-level synthesis technique may be used for this synthesis process. A portion of the program code 302 that is not converted to HW is converted into an executable code executed by the processor 202. The combination of the HW block generated in this way and the code of the execution format defines the HW / SW cooperative system realized on the target system 200. That is, one HW / SW cooperative system is designed each time the HW target selection unit 104 selects an execution unit to be HW target and the HW block synthesis unit 106 performs synthesis processing according to the selection result. become. The result of synthesis of the HW block synthesis unit 106 (that is, the design result) is passed to the HW / SW cooperative operation unit 108.

HW/SW協調動作部108は、受け取った合成結果に従ってターゲットシステム200を制御することで、ターゲットシステム200上に、プログラムコード302が表すシステム構成を実装したHW/SW協調システムを構成し、構成したシステムに処理対象データ304を入力して実際に処理させる。そして、この処理の際のHW/SW協調システムの性能を計測する。ここで計測する性能は、当該システムの処理速度に関する性能であり、例えば、当該システムが処理対象データ304を処理するのに要した時間(クロック数単位あるいは時間単位等)で表される。   The HW / SW cooperative operation unit 108 controls and configures the target system 200 according to the received synthesis result, thereby configuring and configuring the HW / SW cooperative system in which the system configuration represented by the program code 302 is implemented on the target system 200. The processing target data 304 is input to the system and actually processed. And the performance of the HW / SW cooperation system in this process is measured. The performance measured here is performance related to the processing speed of the system, and is represented by, for example, the time (the number of clocks or the time unit) required for the system to process the processing target data 304.

HW/SW設計完了判断部110は、HW/SW協調動作部108が計測した性能情報に基づき、HW/SW協調設計を完了してよいかどうかを判断する。大略的には、あらかじめ指定された目標性能が達成されれば設計完了と判断し、そうでなければ、プログラムコード302中でのHW化対象とする実行単位を増やすよう、HW化対象選択部104に指示する。   The HW / SW design completion determination unit 110 determines whether the HW / SW cooperative design may be completed based on the performance information measured by the HW / SW cooperative operation unit 108. In general, if the target performance specified in advance is achieved, it is determined that the design is completed, and if not, the HW conversion target selection unit 104 increases the number of execution units to be set as the HW conversion target in the program code 302. To instruct.

HW/SW設計完了判断部110は、性能判定部112、HWリソース判定部114及び完了判定部116を含む。性能判定部112は、HW/SW協調動作部108が求めた性能を目標性能と比較することで、目標性能が達成されているかどうかを判定する。HWリソース判定部114は、HWブロック合成部106が合成したHWブロックのリソース量が再構成可能回路204内に実装可能な量に収まっているかどうかを判定する。HWブロックのリソース量は、例えば、そのHWブロック(論理回路)を構成するために用いられる再構成可能回路204の要素回路(DRPの場合、プロセッサエレメントと呼ばれる)の数で表される。このリソース量は、HWブロック合成部106がHWブロックを合成した際に判明し、HWリソース判定部114に渡される。HWブロックのリソース量が再構成可能回路204の備えるリソース量を超える場合、そのHWブロックは再構成可能回路204上に実装できない。この場合、今回の設計は不採用とし、HW/SW協調動作部108を動作させない。完了判定部116は、性能判定部112及びHWリソース判定部114の判定結果から、HW/SW協調設計の処理を完了してよいかどうかを判定する。今回の設計が再構成可能回路204上に実装可能とHWリソース判定部114が判定し、かつHW/SW協調動作部108がターゲットシステム200上に実装したその設計の実測性能が目標性能を満たしている場合に、完了判定部116は設計完了と判定する。そうでない場合は、完了判定部116は、HW化対象を増加させる旨の指示をHW化対象選択部104に送る。   The HW / SW design completion determination unit 110 includes a performance determination unit 112, an HW resource determination unit 114, and a completion determination unit 116. The performance determination unit 112 determines whether or not the target performance has been achieved by comparing the performance obtained by the HW / SW cooperative operation unit 108 with the target performance. The HW resource determination unit 114 determines whether the resource amount of the HW block combined by the HW block combining unit 106 is within an amount that can be mounted in the reconfigurable circuit 204. The resource amount of the HW block is represented by, for example, the number of element circuits (referred to as processor elements in the case of DRP) of the reconfigurable circuit 204 used to configure the HW block (logic circuit). This resource amount is determined when the HW block combining unit 106 combines the HW blocks, and is passed to the HW resource determining unit 114. When the resource amount of the HW block exceeds the resource amount included in the reconfigurable circuit 204, the HW block cannot be mounted on the reconfigurable circuit 204. In this case, the current design is not adopted and the HW / SW cooperative operation unit 108 is not operated. The completion determination unit 116 determines whether the HW / SW co-design process can be completed from the determination results of the performance determination unit 112 and the HW resource determination unit 114. The HW resource determination unit 114 determines that the current design can be mounted on the reconfigurable circuit 204, and the measured performance of the design mounted on the target system 200 by the HW / SW cooperative operation unit 108 satisfies the target performance. If it is, the completion determination unit 116 determines that the design is complete. Otherwise, the completion determination unit 116 sends an instruction to increase the HW target to the HW target selection unit 104.

HW化対象を増やす指示を受け取ったHW化対象選択部104は、細粒度の実行単位から順に、未だHW化していない実行単位の中から、新たな実行単位をHW化対象に選択することで、プログラムコード302を実現するシステムのうちのHW部分を増加させる。そして、今回新たに選択した実行単位をHWブロック合成部106がHWブロックへと合成する。これにより、プログラムコード302のうちHW化された部分が増加したシステム設計ができあがる。HW/SW協調動作部108はこの新たなシステム設計に従ってターゲットシステム200を再構成し、その再構成結果のシステムに処理対象データ304を処理させ、その処理の結果に基づき再度HW/SW設計完了判断部110に設計結果の可否判定を行わせる。完了判定部116が設計完了と判定するまで、このようなHW部分の増加、システム再構成、処理実行、及び設計結果の可否判定の処理ループを繰り返す。そして、設計完了と判定された際の設計情報(すなわち、プログラムコード302のうちのどの実行単位をHW化するかの情報)、又はその設計情報に従って構成されたHW/SW協調システムのシステム構成が、最終的な設計結果として採用される。   The HW conversion target selection unit 104 that has received the instruction to increase the HW conversion target selects a new execution unit as the HW conversion target from the execution units that have not yet been converted to HW in order from the fine-grained execution unit. The HW portion of the system that implements the program code 302 is increased. Then, the HW block combining unit 106 combines the execution unit newly selected this time into an HW block. As a result, a system design in which the HW portion of the program code 302 is increased is completed. The HW / SW cooperative operation unit 108 reconfigures the target system 200 in accordance with the new system design, causes the system as a result of the reconfiguration to process the processing target data 304, and again determines whether the HW / SW design is complete based on the processing result. The unit 110 determines whether the design result is acceptable. Until the completion determination unit 116 determines that the design is complete, the processing loop of increasing the HW part, system reconfiguration, process execution, and design result determination is repeated. The design information when it is determined that the design is completed (that is, information on which execution unit of the program code 302 is to be converted into HW), or the system configuration of the HW / SW cooperative system configured according to the design information is Adopted as the final design result.

次に、図2及び図3を参照して、HW/SW協調設計装置100を用いた設計処理の手順の一例を説明する。   Next, an example of a design processing procedure using the HW / SW co-design apparatus 100 will be described with reference to FIGS.

この手順では、図2に示すように、まずユーザが、プログラムコード302と処理対象データ304を用意すると共に、目標性能とターゲットシステム200のHW制約条件とをHW/SW協調設計装置100に設定する(S100)。目標性能は、例えば、設計するHW/SW協調システムが処理対象データ304を処理するのに要する所要時間の上限として規定される。また、HW制約条件は、再構成可能回路204が備えるリソースの総量(例えば論理回路を構成する要素回路の数)の情報を含んでいる。このリソース量を超えるHW回路は再構成可能回路204上に構成できない。ここで、再構成可能回路204がDRPの場合、処理実行中に回路構成を動的に再構成できるので、HW化対象選択部104で選択される実行単位ごとのHW化回路がそのリソース量以下であれば、いくつの実行単位が選択されたとしても、それら選択された各実行単位をHW化することができる。一方、再構成可能回路204がFPGAのように動的に内部構成を変更できない回路の場合、選択された各実行単位のHW化回路のリソース量の合計が、HW制約条件として指定された再構成可能回路204のリソース総量以下でないと、それら選択された実行単位をHW化することができない。目標性能は性能判定部112に、HW制約条件はHWリソース判定部114に、それぞれ設定される。なお、S100では、この他に、ターゲットシステム200内のプロセッサ202及び再構成可能回路204の動作クロック周波数等のシステム動作条件を設定してもよい。   In this procedure, as shown in FIG. 2, the user first prepares the program code 302 and the processing target data 304 and sets the target performance and the HW constraint condition of the target system 200 in the HW / SW co-design apparatus 100. (S100). The target performance is defined as the upper limit of the time required for the HW / SW cooperative system to be designed to process the processing target data 304, for example. Further, the HW constraint condition includes information on the total amount of resources (for example, the number of element circuits constituting the logic circuit) included in the reconfigurable circuit 204. An HW circuit exceeding this resource amount cannot be configured on the reconfigurable circuit 204. Here, when the reconfigurable circuit 204 is DRP, the circuit configuration can be dynamically reconfigured during processing execution. Therefore, the HW circuit for each execution unit selected by the HW target selection unit 104 is less than the resource amount. If so, no matter how many execution units are selected, each selected execution unit can be turned into a HW. On the other hand, when the reconfigurable circuit 204 is a circuit that cannot dynamically change the internal configuration, such as an FPGA, the total amount of resources of the HW circuit in each selected execution unit is designated as the HW constraint condition. Unless the total resource amount of the possible circuit 204 is less than or equal to the selected execution unit, the selected execution unit cannot be converted to HW. The target performance is set in the performance determination unit 112, and the HW constraint condition is set in the HW resource determination unit 114. In S100, other system operation conditions such as the operation clock frequency of the processor 202 and the reconfigurable circuit 204 in the target system 200 may be set.

このような初期設定が完了すると、HW/SW協調設計装置100は、HW/SW協調動作を実行する(S102)。初期設定直後の時点では、プログラムコード302中の1つの実行単位もHW化せず、HW/SW協調動作部108がプログラムコード302全体をプロセッサ202に実行させ、処理対象データ304を処理させる。そして、その処理の際のシステム性能(例えば、処理の所要時間)を実測し、そのシステム性能が目標性能を達成(例えば、実測した所要時間が目標性能として指定された上限時間以下となること)したか否かを判定し(S104)、達成していなければ、S106に進む。S106では、プログラムコード302の中に、未だHW化していない、HW可能な実行単位が残っているかどうかを判定し(S106)、残っていればS108のHWブロック化処理に進んで、新たな実行単位のHW化を行い、S102に戻る。残っていなければ、設計不能として設計処理を異常終了する。   When such initial setting is completed, the HW / SW cooperative design device 100 executes the HW / SW cooperative operation (S102). Immediately after the initial setting, one execution unit in the program code 302 is not converted to HW, and the HW / SW cooperative operation unit 108 causes the processor 202 to execute the entire program code 302 and process the processing target data 304. Then, the system performance (for example, the time required for processing) at the time of the processing is measured, and the system performance achieves the target performance (for example, the measured required time is equal to or less than the upper limit time specified as the target performance). It is determined whether or not (S104), and if not achieved, the process proceeds to S106. In S106, it is determined whether or not there is an execution unit that can be HW that has not yet been converted to HW in the program code 302 (S106), and if it remains, the process proceeds to HW blocking processing in S108 to execute a new execution. The unit is converted to HW and the process returns to S102. If not, the design process is terminated abnormally because the design is impossible.

図3は、HWブロック化処理(S108)の詳細な処理手順の例を示す。この手順では、HW化対象選択部104が、まず、プログラムコード302中の最も粒度が細かい「命令」レベルの実行単位の中に、その演算量が、プログラムコード302全体の演算量(「全演算量」)に対して、あらかじめ定めた閾値割合を超えるもの(これがHW化対象である)があるかどうかを判定する(S112)。ここでの実行単位の演算量及び全演算量は、それぞれ、処理対象データ304全体を処理したときの当該実行単位及びプログラムコード302全体の演算量である。なお、HWブロック化処理(S108)を始める際には、コード構造解析部101及びコード負荷分析部103の処理が終了し、各実行単位の粒度及び演算量は計算済みとなっているものとする。なお、S112でのHW化対象の探索では、既にHW化済みの実行単位、及びHW化不可のラベル(後述)が付された実行単位は、探索の対象から外される(この点は、後述するS114の探索でも同様)。   FIG. 3 shows an example of a detailed processing procedure of the HW blocking process (S108). In this procedure, the HW conversion target selection unit 104 first calculates the computation amount of the entire program code 302 (“all computations” in the execution unit of the “instruction” level with the finest granularity in the program code 302. It is determined whether or not there is an amount exceeding the predetermined threshold ratio (this is a HW conversion target) (S112). The calculation amount and the total calculation amount of the execution unit here are the calculation amounts of the execution unit and the entire program code 302 when the entire processing target data 304 is processed, respectively. When the HW blocking process (S108) is started, it is assumed that the processing of the code structure analysis unit 101 and the code load analysis unit 103 is finished, and the granularity and calculation amount of each execution unit have been calculated. . Note that in the search for the HW target in S112, the execution unit that has already been converted to HW and the execution unit that has been labeled as non-HW capable (described later) are excluded from the search target (this point will be described later). The same applies to the search in S114.

S112で、プログラムコード302中に、全演算量に対する演算量の割合が閾値を超えている命令があると判定された場合、HW化対象選択部104は、そのような命令の中の1つをHW化対象に選択する(S116)。ここで、閾値超えの命令が複数存在する場合には、そのような命令の中からランダムでHW化対象を選択する。また、この代わりに、HW化の効果が高いものから優先的にHW化するために、閾値超えの命令(未HW化のものに限る)のうち最も演算量が多いものをHW化対象に選択してもよい。その後、HWブロック合成部106が、当該選択された実行単位の入力及び出力の変数の情報(この情報はコード構造解析部101の解析結果に含まれる)に基づき、その実行単位をHW回路化した場合の入力及び出力のインタフェースを規定する(S122)。これらインタフェースは、HW/SW協調システムのうちのSW部分が、当該実行単位のHW回路を呼び出して入力データを与える際、及びその入力データに対するそのHW回路の処理結果を受け取る際に用いられる。また、HWブロック合成部106は、選択された実行単位の処理を実行するための回路構成(HWブロック)を合成する(S124)。続いて、HWリソース判定部114が、S124で合成されたHWブロックのリソース量が、HW制約条件である再構成可能回路204のリソース量以内かどうかを判定する(S126)。   When it is determined in S112 that there is an instruction in the program code 302 in which the ratio of the calculation amount to the total calculation amount exceeds the threshold, the HW conversion target selection unit 104 selects one of such instructions. It is selected as a HW target (S116). Here, when there are a plurality of instructions exceeding the threshold, the HW conversion target is selected at random from such instructions. Alternatively, in order to prioritize HW conversion from the one with the highest HW conversion effect, the instruction with the largest amount of computation is selected as the HW conversion target among instructions exceeding the threshold (limited to those not yet HW conversion). May be. After that, the HW block synthesis unit 106 converts the execution unit into an HW circuit based on the input and output variable information of the selected execution unit (this information is included in the analysis result of the code structure analysis unit 101). In this case, the input and output interfaces are defined (S122). These interfaces are used when the SW part of the HW / SW cooperative system calls the HW circuit of the execution unit to give input data and receives the processing result of the HW circuit for the input data. Further, the HW block synthesis unit 106 synthesizes a circuit configuration (HW block) for executing the processing of the selected execution unit (S124). Subsequently, the HW resource determination unit 114 determines whether the resource amount of the HW block synthesized in S124 is within the resource amount of the reconfigurable circuit 204 that is the HW constraint condition (S126).

S126の判定結果が肯定(Yes)の場合、S124で合成したHWブロックを採用する。すなわち、このHWブロックが、プログラムコード302のうちのHW実装部分として追加されることになる。そして、HWブロック合成部106は、プログラムコード302からその採用されたHWブロックに対応する実行単位のコード部分を削除すると共に、S122で規定した入力及び出力のインタフェースを用いて当該実行単位のHWブロックを呼び出す(及び返り値を受け取る)ためのコード部分を追加する。そして、図3の処理を終了する。これにより、S116で選択された実行単位をHW化した、新たなHW/SW協調システムが設計されたことになる。なお、S126の判定結果が肯定の場合、S116で選択された実行単位にHW化済みのラベルが付される。この後、図2の処理に戻り、S102にてその新たなシステム設計に従ってHW/SW協調動作部108がターゲットシステム200を再構成し、再構成したシステムに処理対象データ304を実行させる。   If the determination result in S126 is affirmative (Yes), the HW block synthesized in S124 is employed. That is, this HW block is added as an HW mounting part of the program code 302. Then, the HW block synthesis unit 106 deletes the code unit of the execution unit corresponding to the adopted HW block from the program code 302 and uses the input and output interfaces defined in S122 to execute the HW block of the execution unit. Add code to call (and receive the return value). Then, the process of FIG. 3 ends. As a result, a new HW / SW cooperative system is designed in which the execution unit selected in S116 is converted to HW. If the determination result in S126 is affirmative, a label that has been converted to HW is attached to the execution unit selected in S116. Thereafter, returning to the processing of FIG. 2, in S102, the HW / SW cooperative operation unit 108 reconfigures the target system 200 according to the new system design, and causes the reconfigured system to execute the processing target data 304.

一方、S126の判定結果が否定(No)の場合、HWブロック合成部106は、S116で選択した実行単位に、HW化不可を示すラベルを付与する(S128)。その後、処理はS112に戻り、命令レベルの実行単位の中から別のHW化対象を探索する。   On the other hand, if the determination result in S126 is negative (No), the HW block synthesis unit 106 gives a label indicating that HW conversion is impossible to the execution unit selected in S116 (S128). Thereafter, the process returns to S112, and another HW conversion target is searched from the instruction level execution unit.

また、図2及び図3の処理のループを何度か繰り返しているうちに、プログラムコード302中の、全演算量に対する演算量の割合が閾値を超える命令が、すべてHW化済み又はHW化不可ラベル付与済みとなった場合、S112の判定結果がNoとなる。この場合処理はS114に進む。S114では、プログラムコード302中の、「命令」レベルの次に粒度が細かい「ループ」レベルの実行単位の中から、その演算量がプログラムコード302の全演算量に対して、あらかじめ定めた閾値割合を超えるもの(HW化対象)を探索する。ここで用いる閾値割合は、S112で用いた閾値割合と同じであってもよいし、異なっていてもよい。S114で、プログラムコード302中に全演算量に対する演算量の割合が閾値を超えているループがあると判定された場合、HW化対象選択部104は、そのようなループの中の1つをHW化対象に選択する(S118)。この選択は、S116の選択と同様、ランダムであってもよいし、HW化の効果が高いものから優先的にHW化するために、閾値超えのループ(未HW化のものに限る)のうち最も演算量が多いものを選択するものであってもよい。この後、HWブロック合成部106等によりS122〜S128の処理が実行される。このS122〜S128の処理は、前述した命令レベルの実行単位のHW化におけるS122〜S128の処理と同様なので、詳細な説明は省略する。   In addition, while the processing loop of FIGS. 2 and 3 is repeated several times, all the instructions in the program code 302 in which the ratio of the calculation amount to the total calculation amount exceeds the threshold are already HW-enabled or cannot be converted to HW. When the label has been assigned, the determination result in S112 is No. In this case, the process proceeds to S114. In S <b> 114, the calculation amount is a predetermined threshold ratio with respect to the total calculation amount of the program code 302 from the “loop” level execution unit with the next finest granularity after the “instruction” level in the program code 302. Search for objects exceeding HW (HW conversion target). The threshold ratio used here may be the same as the threshold ratio used in S112 or may be different. When it is determined in S114 that there is a loop in the program code 302 in which the ratio of the calculation amount to the total calculation amount exceeds the threshold value, the HW conversion target selection unit 104 selects one of such loops as the HW. A selection is made as a target (S118). This selection may be random, similar to the selection in S116, or in a loop exceeding a threshold (limited to those not yet HW) in order to prioritize HW conversion from the one with the high HW conversion effect. You may select what has the largest calculation amount. Thereafter, the processing of S122 to S128 is executed by the HW block synthesis unit 106 and the like. Since the processing of S122 to S128 is the same as the processing of S122 to S128 in the above-described HW conversion of the instruction level execution unit, detailed description is omitted.

なお、S124でHW化し且つそのHW化結果のHWブロックがS126でHW制約条件を満たすと判定された「ループ」レベルの実行単位の中に、既により細粒度かつHW化済みの実行単位(この例では命令レベル)が含まれている場合がある。この場合、当該より細粒度の実行単位のHWブロックは、そのループのHWブロックに含まれることになるので、削除してもよい。   Of the execution units of the “loop” level that have been converted to HW in S124 and the HW block of the HW conversion result is determined to satisfy the HW constraint condition in S126, execution units that have already been finer and have been converted to HW (this In the example, instruction level) may be included. In this case, the HW block of the finer granularity execution unit is included in the HW block of the loop and may be deleted.

図2及び図3の処理のループを何度か繰り返しているうちに、プログラムコード302中の、全演算量に対する演算量の割合が閾値を超えるループが、すべてHW化済み又はHW化不可ラベル付与済みとなった場合、S114の判定結果がNoとなる。この場合処理はS120に進む。S120では、プログラムコード302中の、ループよりも粒度が1段階粗いレベル(この例では「関数」)の実行単位の中から、HW化対象とするものを1つ選択する。この選択は、S116及びS118の選択と同様、ランダムであってもよいし、演算量が多いものから優先的に選択するものであってもよい。この例では、関数については、演算量による絞り込み(命令の場合のS112、ループの場合のS114)を行っていないが、これは一例に過ぎない。関数についても、S120の前に、同様の絞り込みを行ってもよい。   While the processing loops of FIG. 2 and FIG. 3 are repeated several times, all the loops in the program code 302 in which the ratio of the calculation amount to the total calculation amount exceeds the threshold value are assigned HW or non-HW-capable labels. When it has been completed, the determination result of S114 is No. In this case, the process proceeds to S120. In S120, one of the execution units at the level (in this example, “function”) whose granularity is one step coarser than that of the loop in the program code 302 is selected. This selection may be random as in the selection of S116 and S118, or may be selected preferentially from those with a large amount of calculation. In this example, the function is not narrowed down by the amount of calculation (S112 in the case of an instruction, S114 in the case of a loop), but this is only an example. For the function, the same narrowing may be performed before S120.

S120の後、HW化対象に選択された関数について、HWブロック合成部106等によりS122〜S128の処理が実行される。このS122〜S128の処理は、前述した命令レベル及びループレベルの実行単位のHW化におけるS122〜S128の処理と同様なので、説明は省略する。   After S120, the processing of S122 to S128 is executed by the HW block synthesis unit 106 or the like for the function selected as the HW target. The processing of S122 to S128 is the same as the processing of S122 to S128 in the HW conversion of the execution unit at the instruction level and the loop level described above, and a description thereof will be omitted.

図3の処理手順により、新たにHWブロックの追加及びこの追加に応じたプログラムコード302の変更、というシステム構成変更が加えられると、図2におけるS108の処理が終了し、その変更後のシステム構成に対して、図2のS102以降の処理が繰り返される。このとき、S102では、HW/SW協調動作部108は、採用した各HWブロックの回路構成情報と変更後のプログラムコード302をターゲットシステム200にインストールし、その後そのターゲットシステム200に処理対象データ304を入力して処理を開始させる。これに応じ、プロセッサ202はその変更後のプログラムコード302を実行すると共に、その実行の中でHWブロックの呼び出しに行き当たると、再構成可能回路204上にそのHWブロックを再構成し(ただしそのHWブロックが再構成可能回路204上に既に構成されている場合は再構成不要)、再構成したHWブロックに処理を実行させる。そして、この実行の中で、当該システムの性能を実測し、その実測性能が目標を満たしているかをS104で判定する。以降の処理は、既に説明した通りである。このようなS102〜S108の処理の繰り返しの結果、S104で目標性能が達成されると、そのときのシステム構成が最終的な設計結果として採用されることになる。   When the system configuration change such as the addition of a new HW block and the change of the program code 302 corresponding to the addition is added by the processing procedure of FIG. 3, the processing of S108 in FIG. 2 is terminated, and the system configuration after the change In contrast, the processing from S102 onward in FIG. 2 is repeated. At this time, in S102, the HW / SW cooperative operation unit 108 installs the circuit configuration information of each adopted HW block and the changed program code 302 in the target system 200, and then stores the processing target data 304 in the target system 200. Input to start processing. In response to this, the processor 202 executes the changed program code 302, and when it reaches a call to the HW block in the execution, the processor 202 reconfigures the HW block on the reconfigurable circuit 204 (however, If the HW block is already configured on the reconfigurable circuit 204, no reconfiguration is required), and the reconfigured HW block is caused to execute processing. In this execution, the performance of the system is measured, and it is determined in S104 whether the measured performance satisfies the target. The subsequent processing is as described above. If the target performance is achieved in S104 as a result of the repetition of the processes in S102 to S108, the system configuration at that time is adopted as the final design result.

以上に説明した手順では、S126で、今回新たに選択された実行単位のHW化結果のHWブロックがHW制約条件を満たすかどうかを判定したが、これは、再構成可能回路204がDRPのように動的に再構成可能な回路である場合の処理である。動的に再構成可能な場合、個々のHWブロックが必要になる都度動的に再構成すればよいので、個々のHWブロックが再構成可能回路204に収まればよい。これに対し、再構成可能回路204がFPGA等のように動的に再構成できない種類のものである場合は、HW化対象に選択したすべての実行単位を再構成可能回路204上にまとめて構成しなければならない。したがって、この場合には、S126では、過去にHW化した各実行単位のHWリソース量の合計に、今回S124でHW化した実行単位のHWリソース量を足し合わせたものが、HW制約条件(再構成可能回路204の総リソース量)を満たすかどうかを判定すればよい。   In the procedure described above, in S126, it is determined whether or not the HW block of the HW conversion result newly selected this time satisfies the HW constraint condition. This is because the reconfigurable circuit 204 is DRP. This is processing when the circuit is dynamically reconfigurable. In the case where the dynamic reconfiguration is possible, it is only necessary to dynamically reconfigure each HW block every time it is needed, so that the individual HW blocks need only be accommodated in the reconfigurable circuit 204. On the other hand, when the reconfigurable circuit 204 is of a type that cannot be dynamically reconfigured, such as an FPGA, all the execution units selected as HW targets are grouped together on the reconfigurable circuit 204. Must. Therefore, in this case, in S126, the sum of the HW resource amount of each execution unit that has been converted to HW in the past and the HW resource amount of the execution unit that has been converted to HW in S124 this time is the HW constraint condition (re- It may be determined whether the total resource amount of the configurable circuit 204 is satisfied.

以上に説明したHW/SW協調設計装置100は、HW化した場合の回路規模が小さい細粒度の実行単位から優先的にHW化するので、採用される(すなわち目標性能が達成された時点の)システム構成は、このような細粒度優先の方針をとらない場合よりも、HW回路の規模が小さくなる。再構成可能回路204に実装されるHW回路が小さいほど、ターゲットシステム200の消費電力が小さくなる。   The HW / SW co-design apparatus 100 described above adopts HW preferentially from a fine-grained execution unit with a small circuit scale when HW is adopted, and thus is adopted (that is, when the target performance is achieved). In the system configuration, the scale of the HW circuit is smaller than in the case where such a fine grain priority policy is not taken. The smaller the HW circuit mounted on the reconfigurable circuit 204, the lower the power consumption of the target system 200.

また、以上に説明したHW/SW協調設計装置100は、HWブロックを増やすシステム設計変更を行うごとに、変更後のシステムに処理対象データ304を実際に処理させてそのシステムの性能を測定する。このように実際に処理対象データ304を処理させるので、構成したHWブロックの性能が処理対象データ304に依存する場合でも、その性能が正しく測定される。   The HW / SW co-design apparatus 100 described above causes the system after the change to actually process the processing target data 304 and measures the performance of the system every time a system design change that increases HW blocks is performed. Since the processing target data 304 is actually processed in this way, even when the performance of the configured HW block depends on the processing target data 304, the performance is correctly measured.

以上に説明したHW/SW協調設計装置100は、例えば、汎用のコンピュータにそれら機能モジュールの処理を表すプログラムを実行させることにより実現される。ここで、コンピュータは、例えば、ハードウエアとして、CPU等のマイクロプロセッサ、ランダムアクセスメモリ(RAM)およびリードオンリメモリ(ROM)等のメモリ(一次記憶)、HDD(ハードディスクドライブ)を制御するHDDコントローラ、各種I/O(入出力)インタフェース、ローカル・エリア・ネットワークなどのネットワークとの接続のための制御を行うネットワークインタフェース等が、たとえばバスを介して接続された回路構成を有する。また、そのバスに対し、例えばI/Oインタフェース経由で、CDやDVDなどの可搬型ディスク記録媒体に対する読み取り及び/又は書き込みのためのディスクドライブ、フラッシュメモリなどの各種規格の可搬型の不揮発性記録媒体に対する読み取り及び/又は書き込みのためのメモリリーダライタ、などが接続されてもよい。上に例示した各機能モジュールの処理内容が記述されたプログラムがCDやDVD等の記録媒体を経由して、又はネットワーク等の通信手段経由で、ハードディスクドライブ等の固定記憶装置に保存され、コンピュータにインストールされる。固定記憶装置に記憶されたプログラムがRAMに読み出されCPU等のマイクロプロセッサにより実行されることにより、上に例示した機能モジュール群が実現される。   The HW / SW co-design apparatus 100 described above is realized, for example, by causing a general-purpose computer to execute programs representing the processing of these functional modules. Here, the computer includes, as hardware, a microprocessor such as a CPU, a memory (primary storage) such as a random access memory (RAM) and a read only memory (ROM), an HDD controller that controls an HDD (hard disk drive), Various I / O (input / output) interfaces, network interfaces that perform control for connection to a network such as a local area network, and the like have a circuit configuration connected via a bus, for example. Also, portable non-volatile recording of various standards such as a disk drive and a flash memory for reading and / or writing to a portable disk recording medium such as a CD or a DVD via the I / O interface, for example. A memory reader / writer for reading from and / or writing to a medium may be connected. A program in which the processing contents of each functional module exemplified above are described is stored in a fixed storage device such as a hard disk drive via a recording medium such as a CD or DVD, or via a communication means such as a network, and stored in a computer. Installed. The program stored in the fixed storage device is read into the RAM and executed by a microprocessor such as a CPU, thereby realizing the functional module group exemplified above.

以上の例では、HW/SW協調設計装置100がターゲットシステム200とは別の装置であったが、この代わりに、HW/SW協調設計装置100の機能を記述したプログラムをターゲットシステム200にインストールし、プロセッサ202に実行させてもよい。   In the above example, the HW / SW co-design device 100 is a device different from the target system 200. Instead, a program describing the function of the HW / SW co-design device 100 is installed in the target system 200. The processor 202 may be executed.

100 HW/SW協調設計装置、101 コード構造解析部、103 コード負荷分析部、104 HW化対象選択部、106 HWブロック合成部、108 HW/SW協調動作部、110 HW/SW設計完了判断部、112 性能判定部、114 HWリソース判定部、116 完了判定部、200 ターゲットシステム、202 プロセッサ、204 再構成可能回路、302 プログラムコード、304 処理対象データ。   100 HW / SW co-design apparatus, 101 code structure analysis unit, 103 code load analysis unit, 104 HW conversion target selection unit, 106 HW block synthesis unit, 108 HW / SW co-operation unit, 110 HW / SW design completion determination unit, 112 performance determination unit, 114 HW resource determination unit, 116 completion determination unit, 200 target system, 202 processor, 204 reconfigurable circuit, 302 program code, 304 processing target data.

Claims (3)

プロセッサと再構成可能回路とを備える処理装置に実行させるプログラムコードを解析して、当プログラムコードに含まれる粒度ごとの実行単位を識別するコード解析手段と、
処理対象データを前記プログラムコードにより処理する場合の、前記粒度ごとの前記各実行単位の処理負荷を計算する負荷計算手段と、
計算された前記処理負荷が閾値を超える実行単位を、粒度の細かい実行単位から順に、前記再構成可能回路によるハードウエア化対象に選択する手段と、
前記プログラムコードのうち、ハードウエア化対象に選択された各実行単位を前記再構成可能回路の回路構成として実装し、残りの実行単位を前記プロセッサでのソフトウエア処理対象に割り当てることにより、前記処理装置を、前記プログラムコードを実行するシステムとして構成し、構成したシステムに前記処理対象データを実行させ実行性能を計測する計測手段と、
計測された実行性能が目標性能を満たすまで、前記選択手段による更なるハードウエア化対象の選択と、前記計測手段によるその選択結果に応じた前記システムの再構成及び前記実行性能の計測と、を繰り返す制御を行う制御手段と、
を備えるハードウエア/ソフトウエア協調設計装置。
Code analysis means for analyzing a program code to be executed by a processing device including a processor and a reconfigurable circuit, and identifying an execution unit for each granularity included in the program code;
Load processing means for calculating the processing load of each execution unit for each granularity when processing target data by the program code;
Means for selecting the execution unit whose calculated processing load exceeds a threshold in order from the execution unit of finer granularity as a hardware target by the reconfigurable circuit;
In the program code, each execution unit selected as a hardware target is mounted as a circuit configuration of the reconfigurable circuit, and the remaining execution units are assigned to a software processing target in the processor, thereby performing the processing. A device configured as a system for executing the program code, and measuring means for executing the processing target data in the configured system and measuring execution performance;
Until the measured execution performance meets the target performance, the selection means further selects a hardware target, and the measurement means reconfigures the system according to the selection result and measures the execution performance. Control means for performing repetitive control;
Hardware / software co-design device with
前記処理装置が備える前記プロセッサが実行するプログラムとして前記処理装置に実装されていることを特徴とする請求項1に記載のハードウエア/ソフトウエア協調設計装置。   The hardware / software co-design apparatus according to claim 1, wherein the hardware / software co-design apparatus is implemented in the processing apparatus as a program executed by the processor included in the processing apparatus. コンピュータを、
プロセッサと再構成可能回路とを備える処理装置に実行させるプログラムコードを解析して、当プログラムコードに含まれる粒度ごとの実行単位を識別するコード解析手段、
処理対象データを前記プログラムコードにより処理する場合の、前記粒度ごとの前記各実行単位の処理負荷を計算する負荷計算手段、
計算された前記処理負荷が閾値を超える実行単位を、粒度の細かい実行単位から順に、前記再構成可能回路によるハードウエア化対象に選択する手段、
前記プログラムコードのうち、ハードウエア化対象に選択された各実行単位を前記再構成可能回路の回路構成として実装し、残りの実行単位を前記プロセッサでのソフトウエア処理対象に割り当てることにより、前記処理装置を、前記プログラムコードを実行するシステムとして構成し、構成したシステムに前記処理対象データを実行させ実行性能を計測する計測手段、
計測された実行性能が目標性能を満たすまで、前記選択手段による更なるハードウエア化対象の選択と、前記計測手段によるその選択結果に応じた前記システムの再構成及び前記実行性能の計測と、を繰り返す制御を行う制御手段、
として機能させるためのプログラム。
Computer
Code analysis means for analyzing a program code to be executed by a processing device including a processor and a reconfigurable circuit, and identifying an execution unit for each granularity included in the program code;
A load calculating means for calculating a processing load of each execution unit for each granularity when processing target data is processed by the program code;
Means for selecting the execution unit whose calculated processing load exceeds a threshold as a hardware target by the reconfigurable circuit in order from a fine-grained execution unit;
In the program code, each execution unit selected as a hardware target is mounted as a circuit configuration of the reconfigurable circuit, and the remaining execution units are assigned to a software processing target in the processor, thereby performing the processing. A measuring unit configured as a system for executing the program code and measuring the execution performance by causing the configured system to execute the processing target data;
Until the measured execution performance meets the target performance, the selection means further selects a hardware target, and the measurement means reconfigures the system according to the selection result and measures the execution performance. Control means for performing repeated control,
Program to function as.
JP2011273842A 2011-12-14 2011-12-14 Hardware / software co-design apparatus and program Expired - Fee Related JP5978613B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011273842A JP5978613B2 (en) 2011-12-14 2011-12-14 Hardware / software co-design apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011273842A JP5978613B2 (en) 2011-12-14 2011-12-14 Hardware / software co-design apparatus and program

Publications (2)

Publication Number Publication Date
JP2013125419A true JP2013125419A (en) 2013-06-24
JP5978613B2 JP5978613B2 (en) 2016-08-24

Family

ID=48776614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011273842A Expired - Fee Related JP5978613B2 (en) 2011-12-14 2011-12-14 Hardware / software co-design apparatus and program

Country Status (1)

Country Link
JP (1) JP5978613B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015004788A1 (en) * 2013-07-11 2015-01-15 株式会社日立製作所 Information processing system and information processing method
JP2015076007A (en) * 2013-10-10 2015-04-20 株式会社日立情報通信エンジニアリング Board design assistance system and board design assistance method
WO2017046941A1 (en) * 2015-09-18 2017-03-23 三菱電機株式会社 Architecture generating device and architecture generating program
CN108399105A (en) * 2018-02-27 2018-08-14 天津大学 A kind of Method for HW/SW partitioning based on improvement brainstorming algorithm
JP7179237B1 (en) * 2022-03-10 2022-11-28 三菱電機株式会社 neural network device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09160949A (en) * 1995-12-07 1997-06-20 Hitachi Ltd Design supporting method in mixed system of hardware and software
JP2001142927A (en) * 1999-11-16 2001-05-25 Matsushita Electric Ind Co Ltd Design method for semiconductor integrated circuit device, power consumption analyzing method for circuit and power consumption analyzing device
JP2005534114A (en) * 2002-07-25 2005-11-10 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Inter-source split compilation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09160949A (en) * 1995-12-07 1997-06-20 Hitachi Ltd Design supporting method in mixed system of hardware and software
JP2001142927A (en) * 1999-11-16 2001-05-25 Matsushita Electric Ind Co Ltd Design method for semiconductor integrated circuit device, power consumption analyzing method for circuit and power consumption analyzing device
JP2005534114A (en) * 2002-07-25 2005-11-10 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Inter-source split compilation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6016000539; 岩間大介 外3名: '動作合成技術を用いたハードウエア/ソフトウエア自動分割技術' 電子情報通信学会技術研究報告 Vol.106,No.547, 20070228, pp.31-36, 社団法人電子情報通信学会 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015004788A1 (en) * 2013-07-11 2015-01-15 株式会社日立製作所 Information processing system and information processing method
JPWO2015004788A1 (en) * 2013-07-11 2017-02-23 株式会社日立製作所 Information processing system and information processing method
US9760403B2 (en) 2013-07-11 2017-09-12 Hitachi, Ltd. Information processing system and method for distributing load over hardware processing and software processing
JP2015076007A (en) * 2013-10-10 2015-04-20 株式会社日立情報通信エンジニアリング Board design assistance system and board design assistance method
WO2017046941A1 (en) * 2015-09-18 2017-03-23 三菱電機株式会社 Architecture generating device and architecture generating program
JPWO2017046941A1 (en) * 2015-09-18 2017-09-14 三菱電機株式会社 Architecture generation apparatus and architecture generation program
US10303832B2 (en) 2015-09-18 2019-05-28 Mitsubishi Electric Corporation Architecture generating device
CN108399105A (en) * 2018-02-27 2018-08-14 天津大学 A kind of Method for HW/SW partitioning based on improvement brainstorming algorithm
CN108399105B (en) * 2018-02-27 2021-05-04 天津大学 Software and hardware partitioning method based on improved brainstorming algorithm
JP7179237B1 (en) * 2022-03-10 2022-11-28 三菱電機株式会社 neural network device
WO2023170855A1 (en) * 2022-03-10 2023-09-14 三菱電機株式会社 Neural network device

Also Published As

Publication number Publication date
JP5978613B2 (en) 2016-08-24

Similar Documents

Publication Publication Date Title
JP5978613B2 (en) Hardware / software co-design apparatus and program
KR100856803B1 (en) Constraints-directed compilation for heterogeneous reconfigurable architectures
CN109901921B (en) Task queue execution time prediction method and device and implementation device
JP2010113482A (en) Method of allocating resource, program, and apparatus for allocating resource
CN106462431B (en) The extraction system framework in higher synthesis
US20070028197A1 (en) Method and apparatus for auto-generation of shift register file for high-level synthesis compiler
US20190205487A1 (en) Information processing apparatus, computer-readable recording medium, and information processing method
JP6382284B2 (en) Data flow programming of computing devices with graph partitioning based on vector estimation
KR20180011096A (en) System and method for determining concurrent execution arguments for dispatch sizes of parallel processor kernels
KR20100084898A (en) Apparatus and method for scheduling instruction for reconfiguarble processor
CN110750359B (en) Hardware resource configuration method and device, cloud side equipment and storage medium
US8566768B1 (en) Best clock frequency search for FPGA-based design
EP4040295A1 (en) Memory bandwidth allocation for multi-tenant fpga cloud infrastructures
Andriamisaina et al. High-level synthesis for designing multimode architectures
CN110069284A (en) A kind of Compilation Method and compiler based on OPU instruction set
EP2677423B1 (en) OpenCL compilation
Pothineni et al. Application specific datapath extension with distributed i/o functional units
CN115357257B (en) Installation file generation method, system, computing device and storage medium
JP6763411B2 (en) Design support equipment, design support methods, and design support programs
US10606972B2 (en) Method, design program, and design apparatus of a high level synthesis process of a circuit
JP2008299464A (en) Power consumption calculation method, power consumption calculation program, and power consumption calculation device
US20110061032A1 (en) High-level synthesis apparatus, high-level synthesis method, and computer readable medium comprising high-level synthesis program
US11514218B1 (en) System and method for performing static timing analysis of electronic circuit designs using a tag-based approach
JP6776069B2 (en) RTL optimization system and RTL optimization program
JP6752393B1 (en) Design support system and design support program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160112

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160308

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160628

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160711

R150 Certificate of patent or registration of utility model

Ref document number: 5978613

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees