[go: up one dir, main page]

JP2019191796A - High-level synthesis method, high-level synthesis program, and high-level synthesis apparatus - Google Patents

High-level synthesis method, high-level synthesis program, and high-level synthesis apparatus Download PDF

Info

Publication number
JP2019191796A
JP2019191796A JP2018082145A JP2018082145A JP2019191796A JP 2019191796 A JP2019191796 A JP 2019191796A JP 2018082145 A JP2018082145 A JP 2018082145A JP 2018082145 A JP2018082145 A JP 2018082145A JP 2019191796 A JP2019191796 A JP 2019191796A
Authority
JP
Japan
Prior art keywords
description
read
level synthesis
conditional branch
changed
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
JP2018082145A
Other languages
Japanese (ja)
Other versions
JP2019191796A5 (en
JP7026563B2 (en
Inventor
泰地 久恒
Taiji Hisatsune
泰地 久恒
泰輔 植田
Yasusuke Ueda
泰輔 植田
淳 栖川
Jun Sugawa
淳 栖川
奥野通貴
Michitaka Okuno
通貴 奥野
聡 堤
Satoshi Tsutsumi
聡 堤
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2018082145A priority Critical patent/JP7026563B2/en
Publication of JP2019191796A publication Critical patent/JP2019191796A/en
Publication of JP2019191796A5 publication Critical patent/JP2019191796A5/ja
Application granted granted Critical
Publication of JP7026563B2 publication Critical patent/JP7026563B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

【課題】配列読込の際に発生するメモリ読込の論理回路クロック上のタイミングを同じタイミングにまとめることで、論理回路の消費クロック数を削減し、高速化することができる高位合成装置、高位合成方法、及び高位合成プログラムを提供する。【解決手段】異なるメモリへの読込記述を複数含む動作記述が入力された場合、異なるメモリへの読込記述を条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように変更した動作記述を出力することで、論理回路の消費クロック数を削減し、高速化することができる。【選択図】図10A high-level synthesis apparatus and a high-level synthesis method capable of reducing the number of clocks consumed by a logic circuit and accelerating the operation by arranging the timings on the logic circuit clock of the memory read that occur during array reading at the same timing. , And a high-level synthesis program. SOLUTION: When an operation description including a plurality of read descriptions for different memories is input, the operation description is changed so that the read descriptions for different memories are read at the same timing on the logic circuit clock before the conditional branch. By doing so, the number of clocks consumed by the logic circuit can be reduced and the speed can be increased. [Selection diagram] Fig. 10

Description

本発明は、高位合成方法、高位合成プログラム及び高位合成装置に関するものである。   The present invention relates to a high-level synthesis method, a high-level synthesis program, and a high-level synthesis apparatus.

高位合成は、C言語等の高級言語による動作記述をRTL(Register Transfer Level)記述に自動変換する技術である。この技術によって設計者は、論理回路設計の工数を大幅に削減することができる。しかし、高性能なRTL記述に変換する為にはメモリアクセスと演算の最適化が必要となる。   High-level synthesis is a technology that automatically converts an operation description in a high-level language such as C language into an RTL (Register Transfer Level) description. With this technology, the designer can greatly reduce the man-hours for designing the logic circuit. However, in order to convert to high-performance RTL descriptions, memory access and computation optimization are required.

特許文献1には、「解析部は、記憶部に記憶された動作記述より、配列アクセス間の再利用関係を添え字及び条件文の条件に基づき解析し、配列アクセス間のデータの再利用距離、配列アクセス間の前記再利用距離の差、及び前記配列アクセスの再利用が発生する条件を算出する。第1の処理部は、再利用距離の差と規定値に基づき循環バッファの記述、又はシフトレジスタの記述を追加する。第2の処理部は、配列アクセスを、シフトレジスタ、又は循環バッファの入出力端を表す一時変数アクセスに置き換え、条件文を追加して、最適化された動作記述を生成する。」との記載がある。   Patent Document 1 states that “the analysis unit analyzes the reuse relationship between array accesses based on the conditions of the subscript and the conditional statement from the behavior description stored in the storage unit, and the data reuse distance between the array accesses. Calculating a difference in the reuse distance between array accesses and a condition in which the reuse of the array access occurs, wherein the first processing unit describes a circular buffer based on the difference in reuse distance and a specified value, or The description of the shift register is added, and the second processing unit replaces the array access with a temporary variable access that represents the input / output end of the shift register or the circular buffer, and adds a conditional statement to optimize the operation description. Is generated. "

特開2014−225200号公報JP, 2014-225200, A

上記の特許文献1においては、配列読込の再利用を最適化することを目的とし、再利用が発生する箇所に循環バッファ、又はシフトレジスタの記述を追加することが開示されている。
しかしながら、特許文献1の発明は、論理回路中における配列読込が再び発生した際に適用可能な手法であり、論理回路において配列読込が複数回発生する場合のクロック上のタイミングの最適化については考慮されていない。
In the above-mentioned patent document 1, it is disclosed that a description of a circular buffer or a shift register is added at a location where reuse occurs for the purpose of optimizing reuse of array reading.
However, the invention of Patent Document 1 is a technique that can be applied when an array read occurs again in the logic circuit, and considers optimization of timing on the clock when the array read occurs multiple times in the logic circuit. It has not been.

例えば、論理回路上で条件分岐前に論理回路クロックで配列読み込みを行った場合であっても、条件分岐が成立した後、または、条件分岐が非成立となった後に、配列読込が発生する場合には、条件分岐前に配列読み込みを行う論理クロックと別のタイミングの論理クロックで配列読み込みを行うこととなる。そのため、配列読込が別々のタイミングで行われることとなり、論理回路のクロックが無駄に消費されてしまい、論理回路の処理時間が長引く問題がある。   For example, even if array reading is performed with a logic circuit clock before a conditional branch on the logic circuit, array reading occurs after the conditional branch is satisfied or after the conditional branch is not satisfied In this case, the array is read with a logical clock having a different timing from the logical clock for reading the array before the conditional branch. For this reason, the array reading is performed at different timings, and the clock of the logic circuit is wasted, resulting in a problem that the processing time of the logic circuit is prolonged.

そこで、本発明は、配列読込の際に発生するメモリ読込の論理回路クロック上のタイミングを同じタイミングにまとめることで、論理回路の消費クロック数を削減し、高速化することを目的とする。   Accordingly, an object of the present invention is to reduce the number of clocks consumed by the logic circuit and increase the speed by combining the timings on the logic circuit clocks for memory reading generated at the time of array reading into the same timing.

上記課題を解決するために、代表的な本発明の高位合成方法の一つは、異なるメモリへの読込記述を複数含む動作記述が入力された場合、前記メモリへの読込記述を条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように変更した動作記述を出力する高位合成方法である。   In order to solve the above-described problem, one of the representative high-level synthesis methods of the present invention is that, when an operation description including a plurality of read descriptions to different memories is input, the read descriptions to the memory are changed before conditional branching. This is a high-level synthesis method for outputting a behavioral description that has been changed so as to be read at the same timing on the logic circuit clock.

本発明によれば、高位合成後の論理回路のクロック数が削減され、論理回路の処理時間の高速化が達成される。
上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。
According to the present invention, the number of clocks of the logic circuit after high-level synthesis is reduced, and the processing time of the logic circuit is increased.
Problems, configurations, and effects other than those described above will be clarified by the following description of embodiments.

本発明の実施例に係る高位合成装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the high level synthesis | combination apparatus which concerns on the Example of this invention. 本発明の実施例に係る高位合成の全体概要を示す図である。It is a figure which shows the whole high level synthesis | combination based on the Example of this invention. 本発明の実施例に係る動作記述の設計装置の一例を示す構成図である。It is a block diagram which shows an example of the design apparatus of the behavioral description based on the Example of this invention. 従来の技術における動作記述の一例を示す図である。It is a figure which shows an example of the operation description in a prior art. 本発明の実施例に係る高位合成の方法・プログラム・装置によって変更された変更後の動作記述の一例を示す図である。It is a figure which shows an example of the operation | movement description after the change changed by the method, program, and apparatus of the high-level synthesis which concerns on the Example of this invention. 図4の動作記述におけるメモリの読込箇所の一例を明示的に示した図である。FIG. 5 is a diagram explicitly showing an example of a memory read location in the behavioral description of FIG. 4. 図6の動作記述により生成された論理回路における各命令のタイミングの一例を示す図である。FIG. 7 is a diagram showing an example of the timing of each instruction in the logic circuit generated by the behavioral description of FIG. 6. 本発明の実施例に係る高位合成の方法を図5の動作記述に対して適用した動作記述の一例を示す図である。FIG. 6 is a diagram illustrating an example of behavioral description in which the high-level synthesis method according to the embodiment of the present invention is applied to the behavioral description of FIG. 5. 本発明の実施例に係る高位合成の方法を適用した図8の動作記述により生成された論理回路における各命令のタイミングの一例を示す図であるFIG. 9 is a diagram illustrating an example of the timing of each instruction in the logic circuit generated by the behavioral description of FIG. 8 to which the high-level synthesis method according to the embodiment of the invention is applied. 本発明の実施例1に係る高位合成の方法を示すフローチャートである。It is a flowchart which shows the method of the high level synthesis | combination which concerns on Example 1 of this invention. 本発明の実施例に係る動作記述におけるメモリ読込処理が内在する処理記述パターンの一例を示す図である。It is a figure which shows an example of the process description pattern in which the memory reading process in the action description which concerns on the Example of this invention is inherent. 本発明の実施例2に係る高位合成の方法を示すフローチャートである。It is a flowchart which shows the method of the high level synthesis | combination which concerns on Example 2 of this invention.

以下、図面を参照して、従来例及び本発明の実施形態について説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。   Hereinafter, a conventional example and an embodiment of the present invention will be described with reference to the drawings. In addition, this invention is not limited by this embodiment. Moreover, in description of drawing, the same code | symbol is attached | subjected and shown to the same part.

まず、図1を参照して、本発明の実施形態に係る高位合成装置の構成の一例について説明する。   First, an example of the configuration of a high-level synthesis apparatus according to an embodiment of the present invention will be described with reference to FIG.

図1は、本発明の実施形態に係る高位合成装置(以下、「半導体装置」ということもある)として動作するコンピュータ110のハードウェア構成を示す図である。コンピュータ110は、HDD(Hard Disk Drive)112と、CPU(Central Processing Unit)114と、RAM(Random Access Memory)115と、ROM(Read Only Memory)116とを含む。これらの各装置112〜116は、バス111によって接続されてもよい。   FIG. 1 is a diagram illustrating a hardware configuration of a computer 110 that operates as a high-level synthesis device (hereinafter, also referred to as “semiconductor device”) according to an embodiment of the present invention. The computer 110 includes an HDD (Hard Disk Drive) 112, a CPU (Central Processing Unit) 114, a RAM (Random Access Memory) 115, and a ROM (Read Only Memory) 116. Each of these devices 112 to 116 may be connected by a bus 111.

HDD112は、図2における前処理部14、高位合成21に対応した処理機能を持つプログラム113を記憶する装置である。なお、図1にはHDD112が記憶装置として例示されているが、本発明はこれに限定されず、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、光ディスク等の記憶装置によって実現されてもよい。コンピュータ110は、HDD112に記憶されたプログラム113をCPU114に読み出し、RAM115に展開後、解析実行させることで本発明で説明する高位合成の方法の各処理を行う。   The HDD 112 is a device that stores a program 113 having a processing function corresponding to the preprocessing unit 14 and the high-level synthesis 21 in FIG. 1 illustrates the HDD 112 as a storage device, the present invention is not limited to this, and may be realized by a semiconductor memory element such as a flash memory or a storage device such as an optical disk. The computer 110 reads out the program 113 stored in the HDD 112 to the CPU 114, develops it in the RAM 115, and executes analysis to execute each process of the high-level synthesis method described in the present invention.

なお、プログラム113は、必ずしもHDD112に記録されている必要はない。プログラム113は、HDD112の代替となる、コンピュータ110が読み出すことが可能な記憶媒体装置に記憶されていてもよい。コンピュータ110が読み出すことが可能な記憶媒体装置の具体例としては、ハードディスク等の磁気ディスク装置、DVD、CD等の光学ディスク装置、SSD、USBメモリ等のフラッシュメモリ装置等が挙げられる。上記記憶装置とコンピュータ110は、直接接続されている必要はなく、LANケーブルや無線等によってネットワーク接続され(つまり、間接的に接続され)ることによってコンピュータ110がプログラム113を読み出してもよい。このようなハードウェア構成を用いることで、任意のコンピュータ110を高位合成装置として動作させることができ、本発明の実施形態に係る高位合成の方法を実現することができる。   Note that the program 113 is not necessarily recorded in the HDD 112. The program 113 may be stored in a storage medium device that can be read by the computer 110, which is an alternative to the HDD 112. Specific examples of the storage medium device that can be read by the computer 110 include a magnetic disk device such as a hard disk, an optical disk device such as a DVD and a CD, and a flash memory device such as an SSD and a USB memory. The storage device and the computer 110 do not need to be directly connected, and the computer 110 may read the program 113 by being connected to a network (that is, indirectly connected) by a LAN cable, wireless, or the like. By using such a hardware configuration, an arbitrary computer 110 can be operated as a high-level synthesis apparatus, and the high-level synthesis method according to the embodiment of the present invention can be realized.

次に、図2を参照して、本発明の実施例1に係る高位合成の方法の全体概要について説明する。   Next, with reference to FIG. 2, an overall outline of the high-level synthesis method according to Example 1 of the present invention will be described.

図2は、本発明の実施例1に係る高位合成の全体概要を示す図である。具体的には、図2は、本発明の実施の形態に係る高位合成の方法を、動作記述に対する処理を時系列的に示した実施例である。図2に示すように、前処理部14は、動作記述11に対して高位合成21を行う前に当該動作記述の最適化を行い、メモリ読込最適化動作記述18を出力する。次に、高位合成21は、メモリ読込最適化動作記述18を受け取り、メモリ読込が最適化された論理回路記述22を出力する。この論理回路記述22は、FPGA等の半導体装置(例えば、図1で示す高位合成装置)の論理回路設計に用いられてもよい。そして、最適化(すなわち、変更)した動作記述を使用することで、論理回路のクロックを効率よく管理することができる。   FIG. 2 is a diagram showing an overall outline of high-level synthesis according to Example 1 of the present invention. Specifically, FIG. 2 is an example showing the processing for the behavioral description in time series in the high-level synthesis method according to the embodiment of the present invention. As shown in FIG. 2, the preprocessing unit 14 optimizes the behavior description before performing the high-level synthesis 21 on the behavior description 11 and outputs a memory read optimization behavior description 18. Next, the high-level synthesis 21 receives the memory read optimization operation description 18 and outputs a logic circuit description 22 in which the memory read is optimized. The logic circuit description 22 may be used for logic circuit design of a semiconductor device such as an FPGA (for example, a high-level synthesis device shown in FIG. 1). Then, by using the optimized (that is, changed) behavior description, the clock of the logic circuit can be managed efficiently.

次に、図3を参照して、本発明の実施例1に係る動作記述の設計装置の一例について説明する。   Next, an example of a behavioral description design apparatus according to the first embodiment of the present invention will be described with reference to FIG.

図3は、図2で示した前処理部14の内部構造を示した設計装置の詳細である。図3に示す前処理部14は、入力された動作記述11を、条件分岐文抽出部15、演算解析部16、記述変更部17を経由させることによって、メモリ読込最適化動作記述18を出力する機能部である。   FIG. 3 shows details of the design apparatus showing the internal structure of the pre-processing unit 14 shown in FIG. The preprocessing unit 14 shown in FIG. 3 outputs the memory read optimization operation description 18 by passing the input operation description 11 through the conditional branch sentence extraction unit 15, the operation analysis unit 16, and the description change unit 17. It is a functional part.

図3で示すように、動作記述11は演算処理命令12及びメモリ読み込み処理命令13の組み合わせによって構成されている。条件分岐文抽出部15は、動作記述11に含まれる演算処理命令12及びメモリ読込処理命令13から、条件分岐文を抽出する処理を行う機能部である。演算解析部16は、前記抽出された条件分岐文に対して、その内部に異なるメモリへの複数の読込記述が存在するか否かを判定した後に、読み込まれるメモリを抽出する機能部である。記述変更部17は、前記メモリに対して、論理回路として実現された場合に、条件分岐前にメモリ読込回路が生成される記述に変更し、メモリ読込最適化動作記述18を出力する機能部である。これらの機能部は、上述したプログラム113におけるモジュールであってもよく、あるいはコンピュータ110における独立したハードウェアとして実現されてもよい。
次に、図4〜図9を参照して、本発明に係る高位合成の方法の具体例について説明する。
As shown in FIG. 3, the behavioral description 11 is composed of a combination of an operation processing instruction 12 and a memory read processing instruction 13. The conditional branch sentence extraction unit 15 is a functional unit that performs a process of extracting a conditional branch sentence from the arithmetic processing instruction 12 and the memory read processing instruction 13 included in the behavior description 11. The arithmetic analysis unit 16 is a functional unit that extracts the memory to be read after determining whether or not a plurality of read descriptions to different memories exist in the extracted conditional branch sentence. The description changing unit 17 is a functional unit that, when implemented as a logic circuit for the memory, changes to a description that generates a memory reading circuit before conditional branching, and outputs a memory reading optimization operation description 18. is there. These functional units may be modules in the above-described program 113, or may be realized as independent hardware in the computer 110.
Next, specific examples of the high-level synthesis method according to the present invention will be described with reference to FIGS.

図4は、従来の高位合成における動作記述の一例を示す図である。動作記述とは、通常のソフトウェアのプログラムと同様に、処理命令における動作を記述したものである。上述したように、動作記述は条件分岐文を含んでもよい。条件分岐文とは、動作記述の内部に存在し、「もしXならば、Yせよ、さもなくばZせよ」等のような条件を定義する制御構造である。例えば、条件分岐文はif文、then節、else節等を含んでもよい。
一例として、図4に示す動作記述は「if(bramA[1]>100){sum+=bramB[1];})」の条件分岐文を含む。なお、図4に示す動作記述はC言語で記述された動作記述の一例であるが、本発明における動作記述はC言語に限定されず、他のコンピュータ言語で書かれているものであってもよい。
FIG. 4 is a diagram showing an example of behavioral description in conventional high-level synthesis. The operation description is a description of an operation in a processing instruction, like an ordinary software program. As described above, the behavioral description may include a conditional branch sentence. A conditional branch statement is a control structure that exists in the behavior description and defines a condition such as “If X, Y, Z otherwise”. For example, the conditional branch statement may include an if statement, then clause, else clause, and the like.
As an example, the behavioral description shown in FIG. 4 includes a conditional branching statement “if (bramA [1]> 100) {sum + = bramB [1];})”. The behavioral description shown in FIG. 4 is an example of a behavioral description written in C language. However, the behavioral description in the present invention is not limited to C language, and may be written in another computer language. Good.

図5は、本発明の実施例1に係る高位合成の方法・プログラム・装置によって変更された後の動作記述の一例を示す図である。
図4に示す動作記述を図5に示すように条件分岐文に変更することで、メモリの読込クロックタイミングを合わせることができる。具体的には、動作記述を変更する手法の一つとしては、条件分岐文の配列及び引数に対して、条件分岐前にそのポインタを取得する記述と、そのポインタに対して同一のポインタを代入する記述を挿入し、以降の配列や引数への参照記述をポインタによって行うように変更する手法が挙げられる。
FIG. 5 is a diagram illustrating an example of the behavioral description after being changed by the high-level synthesis method, program, and apparatus according to the first embodiment of the present invention.
By changing the behavioral description shown in FIG. 4 into a conditional branch statement as shown in FIG. 5, the read clock timing of the memory can be matched. Specifically, as one of the methods to change the behavioral description, for the conditional branch statement array and argument, assign the same pointer to the description that acquires the pointer before conditional branching There is a method in which a description to be inserted is inserted, and a reference description to the subsequent array or argument is changed to be performed by a pointer.

なお、ここでは、動作記述を変更する手法としてポインタ代入処理を説明したが、本発明はそれに限定されず、メモリの読込クロックタイミングを統一させる効果があれば、他の手法でもよい。   Here, the pointer substitution process has been described as a method for changing the behavioral description, but the present invention is not limited to this, and other methods may be used as long as they have the effect of unifying the memory read clock timing.

図6は、図4の動作記述におけるメモリの読込適用箇所を明示的に示した図である。図6に示す動作記述は、本発明の実施例に係る高位合成方法が適用されていないものである(つまり、従来の高位合成における動作記述)。図6に示すように、動作記述は処理項71、処理項72及び書き出し処理73から構成される。   FIG. 6 is a diagram explicitly showing memory reading application locations in the behavioral description of FIG. The behavioral description shown in FIG. 6 does not apply the high-level synthesis method according to the embodiment of the present invention (that is, the behavioral description in the conventional high-level synthesis). As shown in FIG. 6, the behavioral description is composed of processing items 71, processing items 72, and writing processing 73.

図7は、図6に示す従来の高位合成における動作記述のコードが高位合成によって論理回路として実現された場合の、各処理のタイミングを示す図である。図7に示されるように、論理回路クロックが、1から5へと順に刻まれていき、当該タイミングに配置された処理を順に実行していく。例えば、bramA[1]読込81の処理は、1と2のクロックで処理を行い、100と比較82の処理は、2のクロックで処理を行う。図6の処理項71で示す条件分岐処理項は、論理回路クロック上では図7の処理群83で示す処理タイミングで実行される。また、図6の処理項72で示す条件分岐処理項は、論理回路クロック上では図7の処理群84で示す処理タイミングで実行される。図6の書き出し処理73は、論理回路クロック上では図7の85に示す出力として処理される。   FIG. 7 is a diagram showing the timing of each process when the behavioral description code in the conventional high-level synthesis shown in FIG. 6 is realized as a logic circuit by high-level synthesis. As shown in FIG. 7, the logic circuit clock is engraved in order from 1 to 5, and the processing arranged at the timing is sequentially executed. For example, the bramA [1] read 81 process is performed with clocks 1 and 2, and the process 100 and comparison 82 is performed with 2 clocks. The conditional branch processing term indicated by the processing term 71 in FIG. 6 is executed at the processing timing indicated by the processing group 83 in FIG. 7 on the logic circuit clock. Also, the conditional branch processing term shown in the processing term 72 in FIG. 6 is executed at the processing timing shown in the processing group 84 in FIG. 7 on the logic circuit clock. 6 is processed as an output indicated by 85 in FIG. 7 on the logic circuit clock.

その結果、図6に示す動作記述は、論理回路上では図7に示すように、5クロック消費して実行される。処理群83と84のクロック上のタイミングがずれているのは、高位合成が条件分岐のコードを論理回路に変換する際に、条件分岐外の処理との依存性を厳密に無くす為に条件分岐コード71と条件分岐内コード72の処理タイミングを意図的にずらしていることに起因する。   As a result, the behavioral description shown in FIG. 6 is executed on the logic circuit while consuming 5 clocks as shown in FIG. The timing on the clocks of the processing groups 83 and 84 is shifted because the high-level synthesis converts the conditional branch code into a logic circuit so that the dependence on the processing outside the conditional branch is strictly eliminated. This is because the processing timing of the code 71 and the conditional branch code 72 is intentionally shifted.

しかしながら、例のような場合、処理群83はbramA[1]へのアクセスであり、処理群84ではbramB[1]へのアクセスであるため、メモリアクセス間における依存性は無い。その為、本来、bramA[1]読込81の処理と同時にbramB[1]読込87の処理は実行可能であり、処理群84のbramB[1]読込87は1のクロックから開始することができるはずである。   However, in the case of the example, since the processing group 83 is access to bramA [1] and the processing group 84 is access to bramB [1], there is no dependency between memory accesses. Therefore, the bramB [1] read 87 process can be executed simultaneously with the bramA [1] read 81 process, and the bramB [1] read 87 of the processing group 84 should be able to start from one clock. It is.

図8は、本発明の実施例に係る高位合成方法を図5の動作記述に対して適用した動作記述のコードの一例を示す図である。また、図9は、本発明の実施例に係る高位合成方法を適用した図8の動作記述により生成された論理回路における各命令のタイミングの一例を示す図である。図8に示す動作記述のコードは、高位合成を行うと、図9に示す論理回路クロックによって順に実行される。図8の91に示すコード群は、bramA[1]とbramB[1]が条件分岐文前に確実に読み込まれる(すなわち、先読みされる)ための記述である。図7の処理群83、84のように、高位合成において、メモリの読込は、宣言時ではなく、そのメモリを用いた演算の直前に発生するように構成される。   FIG. 8 is a diagram illustrating an example of a behavior description code obtained by applying the high-level synthesis method according to the embodiment of the present invention to the behavior description of FIG. FIG. 9 is a diagram showing an example of the timing of each instruction in the logic circuit generated by the behavioral description of FIG. 8 to which the high-level synthesis method according to the embodiment of the present invention is applied. The code of the behavioral description shown in FIG. 8 is sequentially executed by the logic circuit clock shown in FIG. 9 when high-level synthesis is performed. The code group indicated by 91 in FIG. 8 is a description for bramA [1] and bramB [1] to be reliably read (that is, prefetched) before the conditional branch sentence. As in the processing groups 83 and 84 of FIG. 7, in the high-level synthesis, the memory is read not just at the time of declaration but immediately before the operation using the memory.

よって、メモリを条件分岐前に先読みさせる為には、当該メモリを用いた演算を条件分岐前に挿入する必要がある。コード群91では、コードint* tmp1=&bramA[1];、int*tmp2=&bramB[1];によってメモリbramA[1]とbramB[1]に対し、まずそのポインタを取得する。ソフトウェアにおいて、ポインタは、メモリのアドレスを指し示すが、高位合成によって変換された論理回路において、ポインタはレジスタとして機能する。ここで、そのポインタの示す値に対し、同じ値を代入する処理、*tmp1 = *tmp1、*tmp2=*tmp2を加える。メモリへ同値を代入する処理は、ソフトウェア上の処理としては意味を成さないが、高位合成においては、代入がメモリへの演算として扱われる。この代入処理を配置することで、代入処理前にメモリ読込処理も配置することができる。   Therefore, in order to prefetch the memory before the conditional branch, it is necessary to insert an operation using the memory before the conditional branch. In the code group 91, the pointers are first acquired for the memories bramA [1] and bramB [1] by the codes int * tmp1 = & bramA [1]; and int * tmp2 = & bramB [1] ;. In software, a pointer indicates an address of a memory, but in a logic circuit converted by high-level synthesis, the pointer functions as a register. Here, a process of assigning the same value to the value indicated by the pointer, * tmp1 = * tmp1, * tmp2 = * tmp2 is added. The process of assigning the same value to the memory does not make sense as a process on software, but in high-level synthesis, the assignment is handled as an operation to the memory. By arranging this substitution process, a memory reading process can also be arranged before the substitution process.

この手法によって、意図的にメモリを先読みさせることで、後の条件分岐におけるメモリの読込クロックタイミングを合わせることができる。コード91によって、bramA[1]読込処理とbramB[1]読込処理は、論理回路クロック上で、図9の処理101に示すように1と2のクロックで同時に処理されるようになる。
図8の92で示すコードは、bramA[1]読込処理を除いた、図7の100と比較82を含んでおり、図9に示す通り、既にbramA[1]読込は終えている為、図9の処理群(102)に示すように、2のクロックで処理することができる。図8の93も同様に、図9に示す処理103の通り、2と3のクロックで処理することができる。その結果、クロックを削減することで全体の処理時間が短縮し、結果として高速化することができる。
By this method, the memory read clock timing in the subsequent conditional branch can be matched by intentionally prefetching the memory. With the code 91, the bramA [1] reading process and the bramB [1] reading process are processed simultaneously with the clocks 1 and 2 on the logic circuit clock as shown in the process 101 of FIG.
The code indicated by 92 in FIG. 8 includes 100 and the comparison 82 in FIG. 7 except for the bramA [1] reading process. As shown in FIG. 9, the bramA [1] reading has already been completed. As shown in nine processing groups (102), processing can be performed with two clocks. Similarly, the process 93 in FIG. 8 can be processed with the clocks 2 and 3 as shown in the process 103 in FIG. As a result, the overall processing time can be shortened by reducing the number of clocks, resulting in higher speed.

次に、図10を参照して、上述した高位合成の態様をフローチャートを用いて説明する。   Next, the above-described high-level synthesis mode will be described with reference to FIG. 10 using a flowchart.

図10は、本発明の実施例に係る高位合成方法を示すフローチャートである。まず、ステップ31では、本発明の実施例に係る高位合成方法を適用していない状態の動作記述11を前処理部14に入力する。この動作記述の入力は、例えば、ユーザ(例えば、論理回路設計者等)がキーボード等の入力装置に部分的に前処理部14に入力した情報を順次に前処理部14に転送することによって入力してもよいしし、完成した動作記述が保存されている記憶装置から、連続的に前処理部14に転送することによって入力してもよい。   FIG. 10 is a flowchart illustrating a high-level synthesis method according to an embodiment of the present invention. First, in step 31, the behavioral description 11 in a state where the high-level synthesis method according to the embodiment of the present invention is not applied is input to the preprocessing unit 14. This behavioral description is input by, for example, sequentially transferring information that the user (for example, a logic circuit designer or the like) partially inputs to the preprocessing unit 14 to an input device such as a keyboard. Alternatively, it may be inputted by continuously transferring it from the storage device storing the completed operation description to the preprocessing unit 14.

次に、ステップ32では、条件分岐文抽出部15は、前記動作記述の内部にある条件分岐文を抽出する。ここでは、抽出するという表現は、取り出したり、識別したり、リストアップしたり、選定したりすることを含む。具体的には、条件分岐文抽出部15は、図6に示される処理項71及び処理項72をまとめて、条件分岐文として抽出してもよい。図9上述のように、この条件分岐文とその内部は、演算処理命令12及びメモリ読込処理命令13から構成される。   Next, in step 32, the conditional branch sentence extraction unit 15 extracts a conditional branch sentence within the behavior description. Here, the expression extracting includes taking out, identifying, listing, and selecting. Specifically, the conditional branch sentence extraction unit 15 may extract the processing terms 71 and the processing terms 72 shown in FIG. 9 As described above, the conditional branch statement and its interior are composed of the operation processing instruction 12 and the memory read processing instruction 13.

次に、ステップ33では、上述した処理項(例えば図6に示される処理項71及び処理項72)に異なるメモリへの複数の読込処理命令13があるかどうかを演算解析部16を用いて判定する。ここでは、判定するという表現は、検出したり、決定したり、確定したり、判断したりすることを含む。また、ここでは、異なるメモリという表現は、同じメモリデバイス内にある、お互いに異なるメモリ番地を示すことを意味します(同じメモリ番地をアクセスする読込記は既に同時に処理されるため、異なるメモリへの読込記述が複数あれ場合には本発明の効果がより大きく発揮される)。   Next, in step 33, it is determined using the arithmetic analysis unit 16 whether or not there are a plurality of read processing instructions 13 for different memories in the above-described processing terms (for example, the processing terms 71 and 72 shown in FIG. 6). To do. Here, the expression “determining” includes detection, determination, determination, and determination. Also, here, the expression “different memory” means that different memory addresses in the same memory device are indicated (reading access to the same memory address is already processed at the same time. In the case where there are a plurality of read descriptions, the effect of the present invention is further exerted).

処理項の中に、異なるメモリへの複数の読込処理命令があると判定された場合には、本処理はステップ34へと移り、異なるメモリへの複数の読込処理命令が無いと判定された場合には、本処理はステップ38へと移る。動作記述において、メモリ読込処理命令13は、配列要素や引数の読込を行う命令である。このため、動作記述内で、当該命令が記述されている場合には、その命令が呼び出されるタイミングでそれぞれの配列要素や引数が読み込まれる処理が実行される。   When it is determined that there are a plurality of read processing instructions for different memories in the processing item, the process proceeds to step 34, and when it is determined that there are not a plurality of read processing instructions for different memories. Then, the process proceeds to step 38. In the behavioral description, the memory read processing instruction 13 is an instruction for reading an array element or an argument. For this reason, when the instruction is described in the operation description, a process of reading each array element and argument is executed at the timing when the instruction is called.

次に、図11を参照して、この判定処理の具体例について説明する。図11は、本発明の実施例に係る動作記述におけるメモリ読込処理が内在する処理記述パターンの一例を示す図である。図11に示されるように、bramA[1]>100という記述ではbramA[1]という配列要素の読込と、bramA[1]と100の比較処理の2つの処理が内在し、bramA[1]読込処理後にbramA[1]と100の比較処理が実行される。例えば、図6を参照すると、処理項71は、判定文のbramA[1]>100の記述で、配列要素であるbramA[1]を読み込んでおり、処理項72は+=bramB[1]で配列要素のbramB[1]を読み込んでいる。これら処理項は、条件分岐文に対するメモリ読込処理命令13を保有しているため、異なるメモリへの複数の読込処理命令があると判定される。従って、本処理がステップ34へと移る。   Next, a specific example of this determination process will be described with reference to FIG. FIG. 11 is a diagram illustrating an example of a process description pattern including a memory read process in the behavioral description according to the embodiment of the present invention. As shown in FIG. 11, in the description of bramA [1]> 100, there are two processes of reading an array element called bramA [1] and a comparison process of bramA [1] and 100, and reading bramA [1]. After processing, a comparison process between bramA [1] and 100 is executed. For example, referring to FIG. 6, the processing item 71 is a description of bramA [1]> 100 of the determination sentence, reads the array element bramA [1], and the processing item 72 is + = bramB [1]. The array element bramB [1] is being read. Since these processing terms hold the memory read processing instruction 13 for the conditional branch statement, it is determined that there are a plurality of read processing instructions for different memories. Therefore, the process proceeds to step 34.

次に、ステップ34では、演算解析部16は、当該メモリ読込処理命令13で読み込まれる配列要素及び引数を抽出し、取得する。具体的には、図6を参照して、演算解析部16は、bramA[1]及びbramB[1]をアクセスする配列として取得する。   Next, in step 34, the arithmetic analysis unit 16 extracts and acquires the array elements and arguments read by the memory read processing instruction 13. Specifically, with reference to FIG. 6, the operation analysis unit 16 acquires bramA [1] and bramB [1] as an array to access.

次に、ステップ35では、演算解析部16は、動作記述11を実装する半導体装置に、使用可能なリソースがあるかどうかの判定を行う。ここでは、動作記述11を実装する半導体装置とは、動作記述に対して高位合成処理を行うことで、FPGA等のような論理回路を生成することができる半導体装置である。例えば、一例として、この半導体装置は、図1で示す高位合成装置として機能するコンピュータ110であってもよい。この処理は、後述するステップ36において、当該半導体装置のレジスタのリソース(例えば、CPUリソース、メモリリソース等)が確保できるかを判定するものである。   Next, in step 35, the arithmetic analysis unit 16 determines whether there is a resource that can be used in the semiconductor device on which the behavioral description 11 is mounted. Here, the semiconductor device on which the behavioral description 11 is mounted is a semiconductor device that can generate a logic circuit such as an FPGA by performing high-level synthesis processing on the behavioral description. For example, as an example, this semiconductor device may be the computer 110 that functions as the high-level synthesis device shown in FIG. In this process, in step 36 described later, it is determined whether or not register resources (for example, CPU resources, memory resources, etc.) of the semiconductor device can be secured.

具体的には、演算解析部16は、動作記述に求められるリソース量に比較することで、必要なリソースの有無を判定してもよい。あるいは、所定のリソース使用率を予め設定し、半導体装置のリソース使用率が所定のリソース使用率以下の場合にのみ処理を続ける(すなわち、後述するように動作記述を変更する処理を行う)ことも可能である。リソースを確保することができると判定された場合には、本処理がステップ36へと移り、リソースを確保することができない場合には、本処理がステップ38へと移る。
このように、半導体装置のリソースを確保できる場合にのみ動作記述を変更することで、半導体装置のリソース使用率が高い時に余計な負担をかけることを避けることができ、半導体装置のリソースを効率よく使用することができる。
Specifically, the arithmetic analysis unit 16 may determine the presence / absence of a necessary resource by comparing with the resource amount required for the behavioral description. Alternatively, a predetermined resource usage rate is set in advance, and the processing is continued only when the resource usage rate of the semiconductor device is equal to or lower than the predetermined resource usage rate (that is, processing for changing the operation description as described later is performed). Is possible. If it is determined that the resource can be secured, the process proceeds to step 36, and if the resource cannot be secured, the process proceeds to step 38.
In this way, by changing the operation description only when the resources of the semiconductor device can be secured, it is possible to avoid overloading the semiconductor device when the resource usage rate of the semiconductor device is high. Can be used.

次に、ステップ36では、記述変更部17は、動作記述の内部にある配列要素及び引数が条件分岐前に同じタイミングで読み込まれるように記述を変更する。ここでは、変更するという表現は、修正したり、変換したり、訂正したり、調整したりすることを含む。
具体的には、当該処理は一例として、図5に示すように、配列要素及び引数に対して、条件分岐前にそのポインタを取得する記述と、そのポインタに対して同一のポインタを代入する記述を挿入し、以降の配列要素や引数への参照記述をポインタによって行うように変更する手法が挙げられる。
Next, in step 36, the description changing unit 17 changes the description so that the array elements and arguments inside the behavior description are read at the same timing before conditional branching. Here, the expression “change” includes correcting, converting, correcting, and adjusting.
Specifically, as an example of the processing, as shown in FIG. 5, for the array element and the argument, a description for acquiring the pointer before the conditional branch and a description for assigning the same pointer to the pointer Is inserted, and the reference description to the subsequent array elements and arguments is changed to be performed by the pointer.

なお、当該手法を用いると、半導体装置のレジスタから求められるリソースが増えるが、論理回路クロック上の同一のタイミングで、動作記述の配列要素及び引数の読込を行うことができる。その結果、論理回路クロック上の無駄なクロック消費を抑えることができ、処理時間を短縮する効果が得られる。   Note that when this method is used, resources required from the registers of the semiconductor device increase, but the array elements and arguments of the operation description can be read at the same timing on the logic circuit clock. As a result, useless clock consumption on the logic circuit clock can be suppressed, and an effect of shortening the processing time can be obtained.

次に、ステップ38では、前処理部14は、ステップ36で上述したように、記述変更部17によってメモリ読込タイミングが変更(すなわち、最適化)された動作記述を出力する。なお、本実施例では、ステップ36で記述変更部17によって変更されなかった動作記述(例えば、ステップ35で必要なリソースがないと判定された動作記述)は、未変更の状態で通常の動作記述として処理される。   Next, in step 38, the preprocessing unit 14 outputs the operation description in which the memory read timing is changed (ie, optimized) by the description changing unit 17 as described above in step 36. In this embodiment, the behavioral description that has not been changed by the description changing unit 17 in step 36 (for example, the behavioral description that has been determined that there is no necessary resource in step 35) is the normal behavioral description that has not been changed. Is processed as

ただし、後述する実施例2においては、半導体装置(すなわち、図1で示す高位合成装置のような、FPGA等の論理回路を生成することができる半導体装置)に使用可能なリソースがないと判定された場合にも、動作記述を変更し、変更後の動作記述を記憶装置(例えば図1のHDD112)に格納することで、後のタイミングで半導体装置のリソースが使用可能となった時に、変更後の動作記述を高位合成に用いることができる。   However, in Example 2 to be described later, it is determined that there is no resource available for the semiconductor device (that is, a semiconductor device that can generate a logic circuit such as an FPGA such as the high-level synthesis device shown in FIG. 1). In this case, the behavioral description is changed, and the changed behavioral description is stored in the storage device (for example, the HDD 112 in FIG. 1). Can be used for high-level synthesis.

上述したように、前処理部14が、条件分岐後における配列要素及び入力読込を条件分岐前に配置する記述を挿入することで、高位合成後の論理回路で強制的に読込処理を論理回路クロック上の同じタイミングで実行させて、以降の演算処理も無駄な論理回路クロック無しに実行することができるようになる。   As described above, the preprocessing unit 14 forcibly performs the read process in the logic circuit after the high-level synthesis by inserting the array element after the conditional branch and the description for arranging the input read before the conditional branch. By executing at the same timing, the subsequent arithmetic processing can be executed without useless logic circuit clocks.

次に、図12を参照して、本発明の実施例2に係る高位合成方法について説明する。なお、実施例2については、以下で記述しない点については、実施例1と共通であるので、記載を省略する。   Next, a high-level synthesis method according to Example 2 of the present invention will be described with reference to FIG. In addition, about Example 2, about the point which is not described below, since it is common with Example 1, description is abbreviate | omitted.

図12は、本発明の実施例2に係る高位合成方法を示すフローチャートである。上述した実施例1では、メモリ読込記述がないと判定された動作記述や、半導体装置に必要なリソースがないと判定された動作記述は、未変更の状態で通常の動作記述として処理されたが、本実施例では、半導体装置(すなわち、図1で示す高位合成装置のような、FPGA等の論理回路を生成することができる半導体装置)に使用可能なリソースがないと判定された場合にも、動作記述を変更し、変更後の動作記述を記憶装置(例えば図1のHDD112)に格納することで、後のタイミングで半導体装置のリソースが使用可能となった時に、変更後の動作記述を高位合成に用いることができる。これにより、半導体装置のリソース使用負荷を低減することができると共に、一回変更した動作記述を再利用することができる。   FIG. 12 is a flowchart showing a high-level synthesis method according to Embodiment 2 of the present invention. In the first embodiment described above, the operation description determined to have no memory read description and the operation description determined to have no necessary resources in the semiconductor device were processed as normal operation descriptions in an unmodified state. In this embodiment, even when it is determined that there is no available resource in the semiconductor device (that is, a semiconductor device capable of generating a logic circuit such as an FPGA such as the high-level synthesis device shown in FIG. 1). By changing the operation description and storing the changed operation description in the storage device (for example, the HDD 112 in FIG. 1), when the resource of the semiconductor device becomes available at a later timing, the changed operation description is displayed. It can be used for high level synthesis. Thereby, the resource usage load of the semiconductor device can be reduced, and the behavioral description that has been changed once can be reused.

なお、図12では、ステップ31、ステップ32、ステップ33、ステップ34、ステップ35、ステップ36、及びステップ38は図10のステップと実質的に同様であるため、ここでは、それらの工程の説明を省略する。   In FIG. 12, step 31, step 32, step 33, step 34, step 35, step 36, and step 38 are substantially the same as the steps in FIG. Omitted.

まず、ステップ37aでは、ステップ35で半導体装置(すなわち、図1で示す高位合成装置のような、FPGA等の論理回路を生成することができる半導体装置)に使用可能なリソースがないと判定された動作記述が記述変更部17によって変更される。上述したように、この変更処理では、動作記述に内在する配列要素及び引数が、条件分岐前に同じタイミングで読み込まれるように変更される。   First, in step 37a, it is determined in step 35 that there are no resources available for the semiconductor device (that is, a semiconductor device capable of generating a logic circuit such as an FPGA such as the high-level synthesis device shown in FIG. 1). The behavioral description is changed by the description changing unit 17. As described above, in this change process, the array element and the argument included in the behavioral description are changed so as to be read at the same timing before the conditional branch.

具体的には、当該処理の一例として、図5に示すように、配列要素及び引数に対して、条件分岐前にそのポインタを取得する記述と、そのポインタに対して同一のポインタを代入する記述を挿入し、以降の配列要素及び引数への参照記述をポインタによって行うように変更する手法があげられる。次に、この変更後の動作記述は記憶装置(例えば図1のHDD112やRAM115)に保存されてもよい。このように、変更時には半導体装置に使用可能なリソースがない場合にも、その後の処理に備えて、変更後の動作記述を予め用意することができる。   Specifically, as an example of the processing, as shown in FIG. 5, for an array element and an argument, a description for acquiring the pointer before conditional branching and a description for assigning the same pointer to the pointer And a method of changing the reference description to the subsequent array elements and arguments to be performed by the pointer. Next, the changed operation description may be stored in a storage device (for example, the HDD 112 or the RAM 115 in FIG. 1). As described above, even when there is no available resource in the semiconductor device at the time of the change, the changed operation description can be prepared in advance for the subsequent processing.

次に、ステップ37bでは、ステップ37aで変更した動作記述と同一の動作記述が発生して、かつ半導体装置に使用可能なリソースがあるかどうかが判定される。具体的には、演算解析部16は、新しく入力された動作記述と、ステップ37aで変更した動作記述の変更前の状態が同一なのか(条件分岐文、配列要素、引数等の、全ての内容項目が合致するか)を判定する。   Next, in step 37b, it is determined whether the same behavioral description as the behavioral description changed in step 37a is generated and there is a resource available in the semiconductor device. Specifically, the arithmetic analysis unit 16 confirms whether the newly entered behavior description is the same as the state before the behavior description changed in step 37a (all contents such as conditional branch statements, array elements, arguments, etc.). Whether the items match).

新しく入力された動作記述と、ステップ37aで変更した動作記述の変更前の状態が同一であると判定された場合には、次に、当該動作記述を実装する半導体装置(例えば、図1のような高位合成装置として機能するコンピュータ)に使用可能なリソース(CPUリソース、メモリリソース等)があるかどうかの判定を行う。新しく入力された動作記述と、ステップ37aで変更した動作記述の変更前の状態が同一であり、かつ半導体装置のリソースを確保することができると判定された場合には、本処理がステップ37cへと移る。   If it is determined that the newly entered behavior description is the same as the state before the behavior description changed in step 37a, the semiconductor device on which the behavior description is mounted (for example, as shown in FIG. 1). It is determined whether there are resources (CPU resources, memory resources, etc.) that can be used by a computer that functions as a high-level synthesis device. If it is determined that the newly entered behavioral description is the same as the state before the behavioral description changed in step 37a and the resources of the semiconductor device can be secured, the process proceeds to step 37c. Move on.

その一方、新しく入力された動作記述と、ステップ37aで変更した動作記述の変更前の状態が同一ではなく、及び/又は半導体のリソースを確保することができないと判定された場合には、本処理が終了する。   On the other hand, if it is determined that the newly entered behavior description and the behavior description changed in step 37a are not the same, and / or that it is not possible to secure semiconductor resources, this processing is performed. Ends.

次に、ステップ37cでは、ステップ37aで保存しておいた変更後の動作記述が記憶装置から読み出され、新しく入力された(未変更の)動作記述の代わりに出力される。   Next, in step 37c, the modified behavioral description saved in step 37a is read from the storage device and output instead of the newly entered (unmodified) behavioral description.

このように、半導体装置に必要なリソースがない場合にも、動作記述のメモリ読込を変更し、記憶装置に格納しておくことで、その後の処理において同一の動作記述が発生して、かつ半導体装置のリソースが使用可能となった場合に、保存しておいた変更後の動作記述を読み出すことによって、一回変更した動作記述を複数回再利用することができ、高位合成処理を効率よく行うことができる。   As described above, even when the semiconductor device does not have the necessary resources, by changing the memory reading of the operation description and storing it in the storage device, the same operation description is generated in the subsequent processing, and the semiconductor device When device resources become available, the modified behavioral descriptions can be reused multiple times by reading the modified behavioral descriptions that have been saved, and high-level synthesis processing can be performed efficiently. be able to.

11 動作記述
14 前処理部
15 条件分岐文抽出部
16 演算解析部
17 記述変更部
21 高位合成
110 コンピュータ
112 HDD
113 プログラム
11 Behavior description 14 Preprocessing unit 15 Conditional branch sentence extraction unit 16 Operation analysis unit 17 Description change unit 21 High-level synthesis 110 Computer 112 HDD
113 programs

Claims (15)

高位合成方法であって、
異なるメモリへの読込記述を複数含む動作記述が入力された場合、
前記メモリへの読込記述を条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように変更した動作記述を出力する、
高位合成方法。
A high-level synthesis method,
When an operation description including multiple read descriptions to different memories is input,
Outputting a description of the operation in which the read description to the memory is changed so as to be read at the same timing on the logic circuit clock before the conditional branch;
High level synthesis method.
請求項1の高位合成方法において、
入力された前記動作記述から前記条件分岐文を条件分岐文抽出部によって抽出する工程と、
抽出した前記条件分岐文における異なるメモリへの複数の読込記述の存否を演算解析部によって判定する工程と、
前記異なるメモリへの複数の読込記述が存在すると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように、変更部によって、前記動作記述を変更し、変更後の動作記述を生成する工程と、
を含む高位合成方法。
The high level synthesis method of claim 1,
Extracting the conditional branch sentence from the input behavior description by a conditional branch sentence extraction unit;
A step of determining the presence or absence of a plurality of read descriptions in different memories in the extracted conditional branch sentence by an arithmetic analysis unit;
When it is determined that there are a plurality of read descriptions to the different memories, the operation is performed by the changing unit so that the plurality of read descriptions to the different memories are read at the same timing on the logic circuit clock before the conditional branch. Changing the description and generating the modified behavior description;
High-level synthesis method comprising
前記動作記述を実装する半導体装置に使用可能なリソースの存否を判定する工程と、
前記半導体装置に使用可能なリソースがあると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程と、
前記変更後の動作記述に対して高位合成処理を行う工程と、
を含む請求項2に記載の高位合成方法。
Determining whether there is a resource that can be used in a semiconductor device that implements the behavior description;
When it is determined that the semiconductor device has available resources, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generating step;
Performing high-level synthesis processing on the modified behavioral description;
The high level synthesis method according to claim 2, comprising:
前記動作記述を実装する半導体装置における使用可能なリソースの存否を判定する工程と、
前記半導体装置に使用可能なリソースがないと判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程と、
前記変更後の動作記述を記憶装置に保存する工程と、
前記動作記述と同一の動作記述が入力され、かつ前記半導体装置に使用可能なリソースがあると判定されたときには、前記記憶装置に保存された前記変更後の動作記述を読み出し、前記変更後の動作記述に対して高位合成処理を行う工程と、
を含む請求項2に記載の高位合成方法。
Determining whether there is an available resource in the semiconductor device in which the behavior description is mounted;
If it is determined that there are no resources available in the semiconductor device, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generating step;
Storing the modified behavioral description in a storage device;
When the same operation description as the operation description is input and it is determined that there is a resource that can be used in the semiconductor device, the changed operation description stored in the storage device is read, and the changed operation Performing high-level synthesis processing on the description;
The high level synthesis method according to claim 2, comprising:
前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程において、
メモリアクセスを行う配列及び変数のポインタが取得され、条件分岐記述前に前記ポインタに同一のポインタ値が代入された前記変更後の動作記述が出力される、
請求項2に記載高位合成方法。
In the step of changing the behavior description so that a plurality of read descriptions to the different memories are read at the same timing before the conditional branch, and generating the modified behavior description,
Array pointers and variable pointers that perform memory access are acquired, and the modified behavioral description in which the same pointer value is assigned to the pointer before the conditional branch description is output.
The high level synthesis method according to claim 2.
高位合成プログラムであって、
条件分岐文を含む動作記述が入力された場合、
前記条件分岐文に含まれる異なるメモリへの複数の読込記述が条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように変更された変更後の動作記述を出力する、
高位合成プログラム。
A high-level synthesis program,
When an operation description including a conditional branch statement is input,
Outputting a modified behavioral description that is modified so that a plurality of read descriptions to different memories included in the conditional branch statement are read at the same timing on the logic circuit clock before the conditional branch;
High-level synthesis program.
請求項6の高位合成プログラムにおいて、
入力された前記動作記述から前記条件分岐文を条件分岐文抽出部によって抽出する工程と、
抽出した前記条件分岐文に異なるメモリへの複数の読込記述の存否を演算解析部によって判定する工程と、
前記異なるメモリへの複数の読込記述があると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように、変更部によって、前記動作記述を変更し、変更後の動作記述を生成する工程と、
を実行させる高位合成プログラム。
In the high-level synthesis program according to claim 6,
Extracting the conditional branch sentence from the input behavior description by a conditional branch sentence extraction unit;
A step of determining the presence or absence of a plurality of read descriptions in different memories in the extracted conditional branch sentence by an arithmetic analysis unit;
When it is determined that there are a plurality of read descriptions to the different memories, the operation is performed by the changing unit so that the plurality of read descriptions to the different memories are read at the same timing on the logic circuit clock before the conditional branch. Changing the description and generating the modified behavior description;
High-level synthesis program that executes
前記動作記述を実装する半導体装置に使用可能なリソースの存否を判定する工程と、
前記半導体装置に使用可能なリソースがあると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程と、
前記変更後の動作記述に対して高位合成処理を行う工程と、
を実行させる請求項7に記載の高位合成プログラム。
Determining whether there is a resource that can be used in a semiconductor device that implements the behavior description;
When it is determined that the semiconductor device has available resources, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generating step;
Performing high-level synthesis processing on the modified behavioral description;
The high-level synthesis program according to claim 7, wherein:
前記動作記述を実装する半導体装置に使用可能なリソースの存否を判定する工程と、
前記半導体装置に使用可能なリソースがないと判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程と、
前記変更後の動作記述を記憶装置に保存しておく工程と、
前記動作記述と同一の動作記述が入力され、かつ前記半導体装置に使用可能なリソースがあると判定されたときには、前記記憶装置に保存された前記変更後の動作記述を読み出し、前記変更後の動作記述に対して高位合成処理を行う工程と、
を実行させる請求項7に記載の高位合成プログラム。
Determining whether there is a resource that can be used in a semiconductor device that implements the behavior description;
If it is determined that there are no resources available in the semiconductor device, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generating step;
Storing the modified behavioral description in a storage device;
When the same operation description as the operation description is input and it is determined that there is a resource that can be used in the semiconductor device, the changed operation description stored in the storage device is read, and the changed operation Performing high-level synthesis processing on the description;
The high-level synthesis program according to claim 7, wherein:
前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程において、
メモリアクセスを行う配列及び変数のポインタが取得され、条件分岐記述前に前記ポインタに同一のポインタ値が代入された前記変更後の動作記述が出力される、
請求項7に記載の高位合成プログラム。
In the step of changing the behavior description so that a plurality of read descriptions to the different memories are read at the same timing before the conditional branch, and generating the modified behavior description,
Array pointers and variable pointers that perform memory access are acquired, and the modified behavioral description in which the same pointer value is assigned to the pointer before the conditional branch description is output.
The high-level synthesis program according to claim 7.
高位合成装置であって、
条件分岐文を含む動作記述が入力された場合、
前記条件分岐文に含まれる異なるメモリへの複数の読込記述が条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように変更された変更後の動作記述を出力する、
高位合成装置。
A high-level synthesis device,
When an operation description including a conditional branch statement is input,
Outputting a modified behavioral description that is modified so that a plurality of read descriptions to different memories included in the conditional branch statement are read at the same timing on the logic circuit clock before the conditional branch;
High-level synthesizer.
前記高位合成装置は、
入力された前記動作記述から前記条件分岐文を抽出する条件分岐文抽出部と、
抽出した前記条件分岐文に異なるメモリへの複数の読込記述の存否を判定する演算解析部と、
前記異なるメモリへの複数の読込記述があると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に論理回路クロック上の同じタイミングで読み込まれるように、前記動作記述を変更し、変更後の動作記述を生成する変更部と、
を有する請求項11に記載の高位合成装置。
The high-level synthesizer is
A conditional branch sentence extraction unit that extracts the conditional branch sentence from the input behavior description;
An operation analysis unit that determines whether or not a plurality of read descriptions exist in different memories in the extracted conditional branch statement;
If it is determined that there are a plurality of read descriptions to the different memory, the operation description is changed so that the plurality of read descriptions to the different memory are read at the same timing on the logic circuit clock before the conditional branch. , A change part that generates a behavior description after change, and
The high-level synthesis apparatus according to claim 11 having
前記高位合成装置は、
前記動作記述を実装する半導体装置に使用可能なリソースの存否を判定し、
前記半導体装置に使用可能なリソースがあると判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成し、
前記変更後の動作記述に対して高位合成処理を行う、
を請求項12に記載の高位合成装置。
The high-level synthesizer is
Determining whether there is a resource that can be used in the semiconductor device that implements the behavior description,
When it is determined that the semiconductor device has available resources, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generate and
A high-level synthesis process is performed on the behavior description after the change.
The high level synthesis apparatus according to claim 12.
前記高位合成装置は、
前記動作記述を実装する半導体装置に使用可能なリソースの存否を判定し、
前記半導体装置に使用可能なリソースがないと判定された場合、前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成し、
前記変更後の動作記述を記憶装置に保存しておき、
前記動作記述と同一の動作記述が入力され、かつ前記半導体装置に使用可能なリソースがあると判定されたときには、前記記憶装置に保存された前記変更後の動作記述を読み出し、前記変更後の動作記述に対して高位合成処理を行う、
を請求項12に記載の高位合成装置。
The high-level synthesizer is
Determining whether there is a resource that can be used in the semiconductor device that implements the behavior description,
If it is determined that there are no resources available in the semiconductor device, the behavioral description is changed so that a plurality of read descriptions to the different memories are read at the same timing before conditional branching, and the modified behavioral description is changed to Generate and
Save the modified behavioral description in a storage device,
When the same operation description as the operation description is input and it is determined that there is a resource that can be used in the semiconductor device, the changed operation description stored in the storage device is read, and the changed operation Perform high-level synthesis on the description,
The high level synthesis apparatus according to claim 12.
前記高位合成装置は、
前記異なるメモリへの複数の読込記述が条件分岐前に同じタイミングで読み込まれるように前記動作記述を変更し、変更後の動作記述を生成する工程において、メモリアクセスを行う配列及び変数のポインタが取得し、条件分岐記述前に前記ポインタに同一のポインタ値が代入された前記変更後の動作記述を出力する、
請求項12に記載の高位合成装置。
The high-level synthesizer is
In the step of changing the behavior description so that a plurality of read descriptions to the different memories are read at the same timing before the conditional branch, and generating the behavior description after the change, an array and a pointer of the variable to be accessed are obtained. And output the modified behavioral description in which the same pointer value is assigned to the pointer before the conditional branch description.
The high level synthesis apparatus according to claim 12.
JP2018082145A 2018-04-23 2018-04-23 High-level synthesis method, high-level synthesis program, high-level synthesis device Active JP7026563B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018082145A JP7026563B2 (en) 2018-04-23 2018-04-23 High-level synthesis method, high-level synthesis program, high-level synthesis device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018082145A JP7026563B2 (en) 2018-04-23 2018-04-23 High-level synthesis method, high-level synthesis program, high-level synthesis device

Publications (3)

Publication Number Publication Date
JP2019191796A true JP2019191796A (en) 2019-10-31
JP2019191796A5 JP2019191796A5 (en) 2021-01-21
JP7026563B2 JP7026563B2 (en) 2022-02-28

Family

ID=68390391

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018082145A Active JP7026563B2 (en) 2018-04-23 2018-04-23 High-level synthesis method, high-level synthesis program, high-level synthesis device

Country Status (1)

Country Link
JP (1) JP7026563B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007323206A (en) * 2006-05-30 2007-12-13 Toshiba Corp Behavioral synthesis apparatus, method, simulation apparatus, method and design apparatus
JP2010238054A (en) * 2009-03-31 2010-10-21 Mitsubishi Electric Corp Semiconductor design support apparatus, high-level synthesis method, and semiconductor design support program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007323206A (en) * 2006-05-30 2007-12-13 Toshiba Corp Behavioral synthesis apparatus, method, simulation apparatus, method and design apparatus
JP2010238054A (en) * 2009-03-31 2010-10-21 Mitsubishi Electric Corp Semiconductor design support apparatus, high-level synthesis method, and semiconductor design support program

Also Published As

Publication number Publication date
JP7026563B2 (en) 2022-02-28

Similar Documents

Publication Publication Date Title
US11106437B2 (en) Lookup table optimization for programming languages that target synchronous digital circuits
EP2668574B1 (en) Utilizing special purpose elements to implement a fsm
US9645802B2 (en) Technique for grouping instructions into independent strands
US9256437B2 (en) Code generation method, and information processing apparatus
US8266416B2 (en) Dynamic reconfiguration supporting method, dynamic reconfiguration supporting apparatus, and dynamic reconfiguration system
JP3909073B2 (en) Compiler and logic circuit design method
JP5233355B2 (en) Property generation system and property verification system
US8990741B2 (en) Circuit design support device, circuit design support method and program
JP2007034887A (en) Method and apparatus for automatically generating shift register file for high-level synthesis compiler
KR102631214B1 (en) Method and system for efficient data forwarding for accelerating large language model inference
US10311188B2 (en) Circuit design support apparatus, circuit design support method, and computer readable medium
JP2021093012A (en) Compilation program and information processing device
JP5979965B2 (en) Circuit design support apparatus, circuit design support method, and program
JP7026563B2 (en) High-level synthesis method, high-level synthesis program, high-level synthesis device
JP2009020695A (en) Information processing apparatus and system
JP2018124877A (en) Code generation apparatus, code generation method, and code generation program
JP5233354B2 (en) Property verification system, property verification method, and program
JP4788902B2 (en) Compilation optimization method and compiler
JP5262678B2 (en) Behavioral synthesis system, behavioral synthesis method, and behavioral synthesis program
Rohde et al. Improving HLS generated accelerators through relaxed memory access scheduling
JP5467512B2 (en) Behavioral synthesis apparatus, behavioral synthesis method, and behavioral synthesis program
US20050251795A1 (en) Method, system, and program for optimizing code
JP6545406B2 (en) High level synthesis apparatus, high level synthesis method and high level synthesis program
US8375376B2 (en) Description processing device, description processing method, and recording medium
JP4768214B2 (en) Compiling method and data processing apparatus.

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201201

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211224

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: 20220201

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220215

R150 Certificate of patent or registration of utility model

Ref document number: 7026563

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150