JP6776069B2 - RTL optimization system and RTL optimization program - Google Patents
RTL optimization system and RTL optimization program Download PDFInfo
- Publication number
- JP6776069B2 JP6776069B2 JP2016175394A JP2016175394A JP6776069B2 JP 6776069 B2 JP6776069 B2 JP 6776069B2 JP 2016175394 A JP2016175394 A JP 2016175394A JP 2016175394 A JP2016175394 A JP 2016175394A JP 6776069 B2 JP6776069 B2 JP 6776069B2
- Authority
- JP
- Japan
- Prior art keywords
- state
- rtl
- data flow
- control data
- information
- 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.)
- Active
Links
Images
Description
この発明は、既存のRTL記述を最適化することが可能なRTL最適化システム及びRTL最適化プログラムに関するものである。 The present invention relates to an RTL optimization system and an RTL optimization program capable of optimizing an existing RTL description.
従来、RTL最適化は手修正により行われている。しかしながら、手修正によるRTL最適化は、多くの時間を要する上に修正による人為ミスが起り易く、そのため手戻りが発生しやすいという問題がある。 Traditionally, RTL optimization has been done manually. However, RTL optimization by manual correction requires a lot of time, and there is a problem that human error due to correction is likely to occur, and therefore rework is likely to occur.
また、論理合成レベルでのRTL最適化も行われている。しかしながら、従来の論理合成レベルでのRTL最適化は、FF(Flip−Flop)間ロジックの最適化、FFを跨いだリタイミングによる最適化といった手法である。しかしながら、論理合成レベルでのRTL最適化は、処理レイテンシの変更を行う最適化までは踏み込むものではない。また、動作周波数が大きく未達の場合には、論理合成レベルでの最適化では不十分であり、場合によっては設計見直しの可能性が生じるという問題があった。 In addition, RTL optimization at the logic synthesis level is also performed. However, the conventional RTL optimization at the logic synthesis level is a method such as optimization of logic between FF (Flip-Flop) and optimization by retiming across FF. However, RTL optimization at the logic synthesis level does not go into optimization that changes the processing latency. Further, when the operating frequency is too large to reach, optimization at the logic synthesis level is insufficient, and there is a problem that the design may be reviewed in some cases.
他方、RTL記述から、例えばSystemCへの変換は従来から存在する。具体例として、特許文献1には、状態レジスタと組み合わせ回路とを備えた制御部と、この制御部からの信号により制御されるレジスタと組み合わせ回路とを備えたデータパス部とを用いて、ハードウェア動作記述を、構成要素解析手段、データフロー解析手段、制御構造再構築手段、データフロー再構築手段、制御構造とデータフローの併合手段及び目的コード生成手段として機能するコンピュータを使用して計算機上で実行可能なプログラム言語に変換する方法が開示されている。
On the other hand, conversion from RTL description to, for example, SystemC has existed conventionally. As a specific example,
この方法では、上記構成要素解析手段において、上記ハードウェア動作記述の構成要素解析をするステップと、上記データフロー解析手段において、上記状態レジスタからのデータフローと、前記データパス部のレジスタからのデータフローを生成するデータフロー解析ステップと、上記制御構造再構築手段において、生成された状態レジスタからのデータフローが再構築されることにより、制御構造を再構築するステップと、上記データフロー再構築手段において、データパス部のレジスタからのデータフローを、制御構造の各状態で動作する回路で構成されるように再構築するステップと、上記制御構造とデータフローの併合手段において制御構造の各状態に、それぞれの再構築されたデータフローをマッピングし、ビヘイビアレベルの中間語を出力するステップと、上記目的コード生成手段において、ビヘイビアレベルの中間語を、計算機上で実行可能なプログラム言語に変換するステップとを有している。 In this method, in the component analysis means, the step of analyzing the component of the hardware operation description, and in the data flow analysis means, the data flow from the state register and the data from the register of the data path section. A data flow analysis step for generating a flow, a step for reconstructing a control structure by reconstructing a data flow from a generated state register in the control structure reconstructing means, and a data flow reconstructing means. In the step of reconstructing the data flow from the register of the data path part so as to be composed of the circuits operating in each state of the control structure, and in each state of the control structure in the means for merging the control structure and the data flow. , A step of mapping each reconstructed data flow and outputting a behavioral level intermediate word, and a step of converting the behavioral level intermediate word into a program language that can be executed on a computer in the above-mentioned objective code generation means. And have.
即ち、この特許文献1の発明は、従来からあるRTL記述を計算機上で実行可能なプログラム言語に変換するものであり、この発明ではあくまでも計算機上で実行可能なように最適化するものである。この発明において開示されている変換は、高位合成を行う目的を持たないために、そのままでは高位合成によってRTL記述に変換することはできないばかりか高位合成に不向きである。また、この特許文献1には、データパス上の冗長なFFを削除する記載があるが、演算を含んだ複数サイクルに跨がったデータパスのステート除去を行って最適化するものではない。
That is, the invention of
上記のように、従来においては、既存のRTL記述に対し適当な変更を行った最適化したRTL記述を得るものはなく、既存のRTL記述を時代や世の中に合わせて変更したいという要求に応えることはできなかった。 As mentioned above, in the past, there was no way to obtain an optimized RTL description that was appropriately modified from the existing RTL description, and to meet the demand to change the existing RTL description according to the times and the world. I couldn't.
本発明は、上記のような回路設計の現状に鑑みなされたもので、その目的は、既存のRTL記述を時代や世の中に合わせて適宜変更し、最適なRTL記述を得ることが可能なRTL最適化システム及びRTL最適化プログラム得ることである。 The present invention has been made in view of the current state of circuit design as described above, and an object thereof is RTL optimization capable of obtaining an optimum RTL description by appropriately modifying an existing RTL description according to the times and the world. The system and RTL optimization program are to be obtained.
本発明に係るRTL最適化システムは、設計対象回路の原RTL記述を投入すると、このRTL記述に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成するコントロールデータフロー解析手段と、コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、前記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するステート解析・除去手段と、前記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するビヘイビア記述生成手段と、前記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る高位合成手段とを具備することを特徴とする。 In the RTL optimization system according to the present invention, when the original RTL description of the circuit to be designed is input, the control data flow analysis is performed based on the RTL description, and the control data flow analysis means for generating the control data flow information and the control data. The control data flow information generated by the flow analysis is subjected to a state analysis consisting of analyzing the operation type in each state, and the state in which the control data flow information can be removed is removed to obtain the revised control data flow information. A state analysis / removal means to be generated, a behavior description generation means to generate a behavior description capable of high-level synthesis based on the revised control data flow information, and a high-level synthesis based on the behavior description to obtain an optimized RTL description. It is characterized by having a high-level synthetic means.
本発明に係るRTL最適化システムでは、前記ステート解析・除去手段は、各ステートにおける動作種別を、リセットステート、入力ステート、出力ステート、演算ステートに分類することを特徴とする。 In the RTL optimization system according to the present invention, the state analysis / removal means classifies the operation type in each state into a reset state, an input state, an output state, and an arithmetic state.
本発明に係るRTL最適化システムでは、前記ステート解析・除去手段は、各ステートにおける動作種別に、メモリアクセスのメモリ入力と、メモリアクセスのメモリ出力を加えて解析を行うことを特徴とする。 The RTL optimization system according to the present invention is characterized in that the state analysis / removal means performs analysis by adding a memory input for memory access and a memory output for memory access to the operation type in each state.
本発明に係るRTL最適化システムでは、前記ステート解析・除去手段は、演算ステートの除去を行うことを特徴とする。 In the RTL optimization system according to the present invention, the state analysis / removal means is characterized in that the arithmetic state is removed.
本発明に係るRTL最適化システムでは、前記高位合成手段は、設計対象回路のレイテンシと回路規模の少なくとも1つに関する制約情報により構成される制約ファイルの前記制約情報に基づき高位合成を行うことを特徴とする。 In the RTL optimization system according to the present invention, the high-level synthesis means performs high-level synthesis based on the constraint information of a constraint file composed of constraint information regarding at least one of the latency of the circuit to be designed and the circuit scale. And.
本発明に係るRTL最適化システムでは、前記高位合成手段は、設計対象回路内に設けられるロジックセルの遅延量及び/または回路面積に関するテクノロジ情報を少なくとも含むテクノロジライブラリ記憶部の前記テクノロジ情報に基づき高位合成を行うことを特徴とする。 In the RTL optimization system according to the present invention, the high-level synthesis means is high-level based on the technology information of the technology library storage unit including at least the technology information regarding the delay amount and / or the circuit area of the logic cell provided in the design target circuit. It is characterized by performing synthesis.
本発明に係るRTL最適化システムでは、前記高位合成手段により合成されたRTL記述と原RTL記述とに関して、少なくとも資源使用量とレイテンシを比較した比較結果情報を生成出力する比較結果情報出力手段を具備したことを特徴とする。 The RTL optimization system according to the present invention includes a comparison result information output means for generating and outputting at least comparison result information comparing resource usage and latency with respect to the RTL description and the original RTL description synthesized by the high-level synthesis means. It is characterized by having done it.
本発明に係るRTL最適化プログラムは、コンピュータを、設計対象回路の原RTL記述を投入すると、このRTL記述に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成するコントロールデータフロー解析手段、コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、前記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するステート解析・除去手段、前記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するビヘイビア記述生成手段、前記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る高位合成手段として機能させることを特徴とする。 The RTL optimization program according to the present invention is a control data flow analysis means that generates control data flow information by performing control data flow analysis based on the original RTL description of the circuit to be designed when the computer is input. The control data flow information generated by the control data flow analysis is subjected to a state analysis consisting of analyzing the operation type in each state, and the state in which the control data flow information can be removed is removed to revise the control data flow. State analysis / removal means for generating information, behavior description generating means for generating behavioral descriptions that can be highly synthesized based on the revised control data flow information, and high-level synthesis based on the behavioral description to obtain an optimized RTL description. It is characterized by functioning as a high-level synthesis means.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記ステート解析・除去手段として、各ステートにおける動作種別を、リセットステート、入力ステート、出力ステート、演算ステートに分類するように機能させることを特徴とする。 The RTL optimization program according to the present invention is characterized in that the computer functions as the state analysis / removal means so as to classify the operation type in each state into a reset state, an input state, an output state, and an arithmetic state. To do.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記ステート解析・除去手段として、各ステートにおける動作種別に、メモリアクセスのメモリ入力と、メモリアクセスのメモリ出力を加えて解析を行うように機能させることを特徴とする。 In the RTL optimization program according to the present invention, the computer functions as the state analysis / removal means to perform analysis by adding a memory input for memory access and a memory output for memory access to the operation type in each state. It is characterized by that.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記ステート解析・除去手段として、演算ステートの除去を行わせることを特徴とする。 The RTL optimization program according to the present invention is characterized in that a computer is used as the state analysis / removal means to remove an arithmetic state.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記高位合成手段として、設計対象回路のレイテンシと回路規模の少なくとも1つに関する制約情報により構成される制約ファイルの前記制約情報に基づき高位合成を行わせることを特徴とする。 In the RTL optimization program according to the present invention, the computer is used as the high-level synthesis means to perform high-level synthesis based on the constraint information of the constraint file composed of the latency of the circuit to be designed and the constraint information regarding at least one of the circuit scales. It is characterized by letting it.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記高位合成手段として、設計対象回路内に設けられるロジックセルの遅延量及び/または回路面積に関するテクノロジ情報を少なくとも含むテクノロジライブラリ記憶部の前記テクノロジ情報に基づき高位合成を行わせることを特徴とする。 In the RTL optimization program according to the present invention, the technology information of the technology library storage unit including at least the technology information regarding the delay amount and / or the circuit area of the logic cell provided in the design target circuit using the computer as the high-level synthesis means. It is characterized in that high-level synthesis is performed based on.
本発明に係るRTL最適化プログラムでは、コンピュータを、前記高位合成手段により合成されたRTL記述と原RTL記述とに関して、少なくとも資源使用量とレイテンシを比較した比較結果情報を生成出力する比較結果情報出力手段として機能させることを特徴とする。 In the RTL optimization program according to the present invention, the computer generates and outputs comparison result information comparing at least the resource usage amount and the latency with respect to the RTL description and the original RTL description synthesized by the high-level synthesis means. It is characterized by functioning as a means.
本発明によれば、設計対象回路の原RTL記述を投入すると、このRTL記述に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成するコントロールデータフロー解析手段、コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、前記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するステート解析・除去手段、前記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するビヘイビア記述生成手段、前記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る高位合成手段を備えるので、ステート除去により、既存のRTL記述を時代や世の中に合わせて適宜変更し、最適なRTL記述を得ることが可能である。 According to the present invention, when the original RTL description of the circuit to be designed is input, the control data flow analysis is performed based on the RTL description, and the control data flow analysis means for generating the control data flow information is generated. State analysis that generates revised control data flow information by performing state analysis consisting of analyzing the operation type in each state for the control data flow information, and removing the states in which the control data flow information can be removed. Since it is provided with a removing means, a behavior description generating means for generating a behavior description capable of high-level synthesis based on the revised control data flow information, and a high-level synthesis means for obtaining an optimized RTL description by performing high-level synthesis based on the behavior description. By removing the state, it is possible to appropriately change the existing RTL description according to the times and the world and obtain the optimum RTL description.
以下本発明に係るRTL最適化システム及びRTL最適化プログラムの実施形態を説明する。本実施形態により得られるRTL記述では、FF数、処理レイテンシは固定であるが、高位合成可能なビヘイビア記述に変換する際に同等の機能を保持したまま(機能等価で)固定サイクル処理を制約設定可能なサイクル処理を必要としないフリーサイクル処理に変更する。これにより、高位合成で動作周波数の最適化、レイテンシ最適化、回路規模最適化を行うことが可能となる。 Hereinafter, embodiments of the RTL optimization system and the RTL optimization program according to the present invention will be described. In the RTL description obtained by this embodiment, the number of FFs and the processing latency are fixed, but when converting to the behavior description capable of high-level synthesis, the fixed cycle processing is constrained while maintaining the same function (equivalent to the function). Change to free cycle processing that does not require possible cycle processing. This makes it possible to optimize the operating frequency, latency, and circuit scale in high-level synthesis.
本発明の実施形態では、バスサイクルアキュレートでの動作が一致することを機能等価と定義する。例えば、本実施形態のシステムに入力するRTL記述に対して出力された(生成された)RTL記述の処理サイクルが変化したとしても、出力するデータの一致が確保されていれば、入力RTLと出力RTLが等価であるとする。 In the embodiment of the present invention, matching the operations in the bus cycle accurate is defined as functional equivalence. For example, even if the processing cycle of the output (generated) RTL description changes with respect to the RTL description input to the system of the present embodiment, if the output data match is ensured, the input RTL and the output It is assumed that RTL is equivalent.
以下添付図面を参照して実施形態を説明する。各図において、同一構成要素には同一の符号を付して重複する説明を省略する。図1に、本発明に係るRTL最適化システムの実施形態の構成図を示す。このRTL最適化システムは、コントロールデータフロー解析手段11、ステート解析・除去手段12、ビヘイビア記述生成手段13、高位合成手段14及び比較結果情報出力手段15を有する。 An embodiment will be described below with reference to the accompanying drawings. In each figure, the same components are designated by the same reference numerals, and duplicate description will be omitted. FIG. 1 shows a configuration diagram of an embodiment of the RTL optimization system according to the present invention. This RTL optimization system includes a control data flow analysis means 11, a state analysis / removal means 12, a behavior description generation means 13, a high-level synthesis means 14, and a comparison result information output means 15.
コントロールデータフロー解析手段11は、設計対象回路の原RTL記述を投入すると、このRTL記述に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成するものである。生成されたコントロールデータフロー情報は、ファイル記憶部21へ記憶される。 When the original RTL description of the design target circuit is input, the control data flow analysis means 11 performs control data flow analysis based on the RTL description and generates control data flow information. The generated control data flow information is stored in the file storage unit 21.
ステート解析・除去手段12は、コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、上記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するものである。改定コントロールデータフロー情報は、ファイル記憶部22へ記憶される。 The state analysis / removal means 12 performs a state analysis including analyzing the operation type in each state with respect to the control data flow information generated by the control data flow analysis, and the state in which the control data flow information can be removed It removes and generates revised control data flow information. The revised control data flow information is stored in the file storage unit 22.
ビヘイビア記述生成手段13は、上記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するものである。生成されたビヘイビア記述は、高位合成手段14は、上記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述(最適化RTL記述)を得るものである。この高位合成手段14は、設計対象回路の回路規模の少なくとも1つに関する制約情報(プログラムを含む)により構成される制約ファイル31の上記制約情報に基づき高位合成を行うものである。制約ファイル31は、ファイル記憶部に記憶されている。上記高位合成手段14により高位合成された結果である最適化RTL記述は、この実施形態ではファイル記憶部24へ出力される。勿論、出力の形態は、これに限定されず、ディスプレイに可視表示しても良く、また、プリンタ等で出力するようにしても良い。 The behavior description generation means 13 generates a behavior description capable of high-level synthesis based on the revised control data flow information. As for the generated behavior description, the high-level synthesis means 14 performs high-level synthesis based on the above-mentioned behavior description to obtain an optimized RTL description (optimized RTL description). The high-level synthesis means 14 performs high-level synthesis based on the above-mentioned constraint information of the constraint file 31 composed of constraint information (including a program) regarding at least one of the circuit scales of the circuit to be designed. The constraint file 31 is stored in the file storage unit. The optimized RTL description, which is the result of high-level synthesis by the high-level synthesis means 14, is output to the file storage unit 24 in this embodiment. Of course, the form of output is not limited to this, and may be visually displayed on a display, or may be output by a printer or the like.
制約ファイル31の制約情報は、高位合成をする際に必ず必要になる情報である。制約ファイル31の制約情報を変更することで、レイテンシ優先の最適化RTL記述を得るようにすることができ、また、回路規模最小を優先にした最適化RTL記述を得るようにすることもできる。この制約ファイル31の制約情報として、予めレイテンシ優先の制約情報と回路規模優先の制約情報のいずれかを制約ファイル31に用意しておくことで、それぞれに対応した最適化RTL記述を生成することが可能である。なお、レイテンシと回路規模は概ねトレードオフの関係にある。制約ファイル31の制約情報を調整することで、レイテンシ優先と回路規模優先の中間に位置するレイテンシと回路規模を有するように最適化RTL記述を生成するように制御を行うことも可能である。 The constraint information of the constraint file 31 is information that is indispensable for high-level synthesis. By changing the constraint information of the constraint file 31, it is possible to obtain an optimized RTL description that prioritizes latency, and it is also possible to obtain an optimized RTL description that prioritizes the minimum circuit scale. By preparing either the latency priority constraint information or the circuit scale priority constraint information in the constraint file 31 in advance as the constraint information of the constraint file 31, it is possible to generate an optimized RTL description corresponding to each. It is possible. The latency and the circuit scale are generally in a trade-off relationship. By adjusting the constraint information in the constraint file 31, it is possible to control to generate the optimized RTL description so as to have the latency and the circuit scale located between the latency priority and the circuit scale priority.
また、高位合成手段14は、設計対象回路内に設けられるロジックセルの遅延量及び/または回路面積に関するテクノロジ情報(プログラム部品)を少なくとも含むテクノロジライブラリ記憶部32の上記テクノロジ情報に基づき高位合成を行う。
Further, the high-level synthesis means 14 performs high-level synthesis based on the above-mentioned technology information of the technology
高位合成用のテクノロジライブラリ記憶部32には、ロジックセルの遅延量や回路面積などのテクノロジ情報(プログラム部品)が記載されている。高位合成用のテクノロジライブラリ記憶部32のテクノロジ情報は、論理合成用のテクノロジライブラリ(プログラム部品)の内容とほぼ同じであり、違いはファイルフォーマットが異なる程度である。このテクノロジライブラリ記憶部32のテクノロジ情報は、高位合成ツール(高位合成手段14)で必ず必要なものである。高位合成ツールは、ビヘイビア記述を最適化RTL記述に変換する際に、テクノロジライブラリ記憶部32に登録されているロジックセル(ANDやOR回路)の遅延量や回路面積などにより構成されるテクノロジ情報を参照して、ターゲットとするプロセスに合わせてスケジューリングを行って最適化RTL記述を生成し出力する。
The technology
本実施形態においては比較結果情報出力手段15が備えられており、この比較結果情報出力手段15は、上記高位合成手段により合成された最適化RTL記述と原RTL記述とに関して、少くとも資源使用量とレイテンシを比較した比較結果情報を生成出力するものである。比較結果情報はファイル記憶部25に出力され保持される。出力の形態は、これに限定されず、ディスプレイに可視表示しても良く、また、プリンタ等で出力するようにしても良い。 In the present embodiment, the comparison result information output means 15 is provided, and the comparison result information output means 15 uses at least resources with respect to the optimized RTL description and the original RTL description synthesized by the high-level synthesis means. It generates and outputs comparison result information that compares the latency with. The comparison result information is output to the file storage unit 25 and held. The form of output is not limited to this, and may be visually displayed on a display, or may be output by a printer or the like.
上記のシステムにおける各手段は、コンピュータのCPUが本実施形態のRTL最適化プログラムを実行することにより実現され、図2のフローチャートに示すように動作を行うので、このフローチャートに沿って動作を説明する。設計対象回路の原RTL記述10を投入する(S11)と、この原RTL記述10に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成する(S12)。
Each means in the above system is realized by executing the RTL optimization program of the present embodiment by the CPU of the computer, and operates as shown in the flowchart of FIG. 2. Therefore, the operation will be described according to the flowchart. .. When the
図3に、原RTL記述10の一具体例を示す。この図3の原RTL記述10のコントロールデータフロー解析であるコントロールデータフロー情報を図4に示す。このコントロールデータフロー情報は、元のRTL記述の機能を再現できるだけの情報を有するものである。具体的には、モジュール名、FSM(Finite State Machine(有限ステートマシン))の構成、入出力ポートの構成、FF(フリップフロップ)の構成、入力から出力までの演算およびFFの構成である。図4の例では、目で見て判り易く示しているが、実際の情報はXMLやバイナリ形式を用いる。この実施形態では、生成したコントロールデータフロー情報は、ファイル記憶部21へ記憶される。
FIG. 3 shows a specific example of the
次に、生成したコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、上記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成する(S13)。 Next, the generated control data flow information is subjected to a state analysis consisting of analyzing the operation type in each state, and the above-mentioned control data flow information removable states are removed to generate the revised control data flow information. (S13).
このステート解析・除去のステップでは、図5の表に示すようにステート毎に、リセット動作を行うリセットステート、入力動作を行う入力ステート、出力動作を行う出力ステート、演算動作を行う演算ステートであるか否かを確認する情報を得る。図5では、リセットステート、入力ステート、出力ステート、演算ステートについて、「実行」を○印で示している。本実施形態では、演算のみで構成された演算ステートをステート除去候補として選択し、この演算のみで構成された演算ステートを除去する。ステートを除去した改定コントロールデータフロー情報を図6に示す。この実施形態では、改定コントロールデータフロー情報は、ファイル記憶部22へ記憶される。 In this state analysis / removal step, as shown in the table of FIG. 5, for each state, there are a reset state for performing a reset operation, an input state for performing an input operation, an output state for performing an output operation, and an arithmetic state for performing an arithmetic operation. Get information to confirm whether or not. In FIG. 5, “execution” is indicated by a circle for the reset state, input state, output state, and operation state. In the present embodiment, an operation state composed only of operations is selected as a state removal candidate, and an operation state composed only of this operation is removed. The revised control data flow information with the state removed is shown in FIG. In this embodiment, the revised control data flow information is stored in the file storage unit 22.
なお、本実施形態では挙げていないが、設計対象回路の原RTL記述10によっては、メモリアクセスの“メモリ入力”やメモリアクセスの“メモリ出力”をステート解析による解析結果として出力する場合もある。また、ステート解析による解析結果として“演算+出力”というステートが得られるケースもあるが、この場合は、ステート除去の対象としないものとする。本実施形態において、ステート除去が可能なステートは演算のみを含むステートとする。
Although not mentioned in this embodiment, depending on the
次に、上記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成する(S14)。図6に示した改定コントロールデータフロー情報に基づき生成した高位合成可能なビヘイビア記述を、図7に示す。 Next, a behavior description capable of high-level synthesis is generated based on the revised control data flow information (S14). A high-level synthesizeable behavior description generated based on the revised control data flow information shown in FIG. 6 is shown in FIG.
本実施形態では、SystemC記述に変換しているが、C、C++などによるビヘイビア記述を用いても良い。SystemC記述のSC_MODULEがモジュール名を示し、sc_in<>,sc_outがモジュールの入出力信号を示す。コントロールデータフローは、1つのCTHREAD関数threadに変換される。このとき、図6に示すステートS0、S1、S4はSystemC記述上でwait()に変換される。各ステートのデータフローは各ステートを示すwait()を境界として配置される。 In the present embodiment, the description is converted to SystemC description, but the behavior description by C, C ++ or the like may be used. SC_MODELE described in SystemC indicates the module name, and sc_in <> and sc_out indicate the input / output signals of the module. The control data flow is transformed into one CTHREAD function thread. At this time, the states S0, S1 and S4 shown in FIG. 6 are converted to wait () on the SystemC description. The data flow of each state is arranged with wait () indicating each state as a boundary.
次に、上記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る(S15)。このとき、設計対象回路のレイテンシと回路規模の少なくとも1つに関する制約情報が記憶された制約ファイル31の上記制約情報に基づき高位合成を行う。また、設計対象回路内に設けられるロジックセルの遅延量及び/または回路面積に関するテクノロジ情報を少なくとも含むテクノロジライブラリ記憶部32の上記テクノロジ情報に基づき高位合成を行う。
Next, high-level synthesis is performed based on the above behavior description to obtain an optimized RTL description (S15). At this time, high-level synthesis is performed based on the constraint information of the constraint file 31 in which the latency of the circuit to be designed and the constraint information regarding at least one of the circuit scales are stored. Further, high-level synthesis is performed based on the above-mentioned technology information of the technology
制約ファイル31の上記制約情報により、レイテンシ優先の制約を与えた場合には図8に示す最適化RTL記述40が得られる。また、図9は、図8に示す最適化RTL記述40をコントロールデータフロー解析して得たコントロールデータフロー情報を示す。コントロールデータフロー情報は、コントロールデータフロー解析手段11を用いて生成するものとする。
According to the constraint information of the constraint file 31, the
制約ファイル31の上記制約情報により、回路シェアリング優先の制約を与えた場合には図10に示す最適化RTL記述50が得られる。また、図11は、図10に示す最適化RTL記述50をコントロールデータフロー解析して得たコントロールデータフロー情報を示す。コントロールデータフロー情報は、コントロールデータフロー解析手段11を用いて生成するものとする。
According to the constraint information in the constraint file 31, the
本実施例では、ステップS15に続いて、上記高位合成された最適化RTL記述40、50と原RTL記述10とに関して、資源使用量とレイテンシを比較した比較結果情報を生成出力する(S16)。ここでは、最適化RTL記述40、50と原RTL記述10とに関する比較結果情報を生成出力しているが、高位合成される最適化RTL記述のセット数(ここでは、最適化RTL記述40、50の2セット)に応じて出力される比較結果情報が変更される。つまり、少なくとも高位合成された1セットの最適化RTL記述と原RTL記述との比較結果情報が出力される。また、資源使用量とレイテンシとは、一例であり、その他の情報を出力するようにしても良い。即ち、比較結果情報の種類は、ユーザが適宜設定することができる。
In this embodiment, following step S15, comparison result information comparing the resource usage amount and the latency is generated and output with respect to the high-level synthesized optimized
図12に、最適化RTL記述40、50と原RTL記述10とに関する比較結果情報の出力例を示す。入力された原RTL記述10に対して出力された最適化RTL記述40は、処理レイテンシが2サイクル縮小し、FF数が48個削減されていることが判る。また、出力された最適化RTL記述50は、原RTL記述10と比較して処理が1サイクル多くかかるが1ステートあたりの乗算数が1個となり乗算器のリソースを削減した回路構成となっていることが判る。
FIG. 12 shows an output example of comparison result information regarding the optimized
以上のように、本発明の実施形態によれば、最適化RTL記述の自動生成が可能であり、動作周波数の最適化が可能であり、処理サイクル(レイテンシ)の最適化が可能であり、スループットの最適化が可能であり、回路規模の最適化が可能であり、設計対象回路がFPGA(Field Programmable Gate Array)の場合、DSP(ディジタルシグナルプロセッサ)リソース使用率の最適化が可能である。 As described above, according to the embodiment of the present invention, the optimization RTL description can be automatically generated, the operating frequency can be optimized, the processing cycle (latency) can be optimized, and the throughput can be optimized. It is possible to optimize the circuit scale, and when the circuit to be designed is an FPGA (Field Programmable Gate Array), it is possible to optimize the DSP (Digital Signal Processor) resource usage rate.
更に、上記のような最適化RTL記述の生成が可能となるため、例えば低速かつ小規模なデバイスに特化したRTL記述を高速かつ大規模なデバイスのRTL記述に調整することが可能である。また、逆の調整、即ち、高速かつ大規模なデバイスのRTL記述を低速かつ小規模なデバイスに特化したRTL記述へ変更することも可能である。また、本実施形態を利用することで、設計を行ったものの、これまで使われなかった設計資産(設計対象回路の原RTL記述)や古くなってしまった設計資産などを再利用することが可能となる。入力(投入)する原RTL記述は、既存のものに限定されず、新たに作成したものであっても良いことは勿論である。 Further, since the optimized RTL description as described above can be generated, for example, it is possible to adjust the RTL description specialized for a low-speed and small-scale device to the RTL description for a high-speed and large-scale device. It is also possible to make the reverse adjustment, that is, change the RTL description of a high-speed and large-scale device to an RTL description specialized for a low-speed and small-scale device. In addition, by using this embodiment, it is possible to reuse design assets (the original RTL description of the circuit to be designed) and old design assets that have been designed but have not been used so far. It becomes. Of course, the original RTL description to be input (input) is not limited to the existing one, and may be a newly created one.
上記の実施形態においては、ビヘイビア記述を高位合成してRTL記述を出力する際に与える必要がある制約ファイル31の制約情報として、主にレイテンシと回路規模について説明した。ビヘイビア記述を高位合成してRTL記述を出力する際に与える必要がある情報(プログラムを含む)としては、上記以外にターゲット周波数が知られている。このターゲット周波数の説明が不十分であるので、ここで説明する。ターゲット周波数とはいかなるものかと言えば、上記の通り、ビヘイビア記述を高位合成してRTL記述を出力する際に与える必要がある。ターゲット周波数は、高位合成のスケジューリングの段階で各演算器(組み合わせ回路)をFF間にどの程度詰め込むことができるかに影響する。例えば、ターゲット周波数が高いとFF間に詰め込める演算器は少なくなり、逆に周波数が低いとFF間に詰め込める演算器は多くなる。演算器の遅延情報はターゲットライブラリから取得する。 In the above embodiment, the latency and the circuit scale have been mainly described as the constraint information of the constraint file 31 that needs to be given when the behavior description is high-level synthesized and the RTL description is output. In addition to the above, the target frequency is known as the information (including the program) that needs to be given when the behavior description is high-level synthesized and the RTL description is output. Since the explanation of this target frequency is insufficient, it will be described here. As for what the target frequency is, as described above, it is necessary to give it when the behavior description is high-level synthesized and the RTL description is output. The target frequency affects how much each arithmetic unit (combination circuit) can be packed between FFs at the stage of scheduling high-level synthesis. For example, if the target frequency is high, the number of arithmetic units that can be packed between FFs is small, and conversely, if the frequency is low, the number of arithmetic units that can be packed between FFs is large. The delay information of the arithmetic unit is acquired from the target library.
具体的には、周波数が例えば100MHz(10ns)の設定で、遅延が4nsの加算を2回計算させる場合には、4ns+4nsは8nsで10ns以内に収まっているため、FFを挟まずに加算することができる。これに対し、周波数を200MHz(5ns)と設定した場合には、遅延4nsの加算を2回計算させるには加算と加算の間にFFを挟む必要がある。
Specifically, when the frequency is set to 100 MHz (10 ns) and the delay is calculated twice for 4 ns, 4 ns + 4 ns is 8 ns and is within 10 ns, so add without inserting FF. Can be done. On the other hand, when the frequency is set to 200 MHz (5 ns), it is necessary to insert FF between the additions in order to calculate the addition of the
また、ターゲット周波数によりどのような最適化が行われるのかと言えば、次の通りである。既存のRTLでは、ターゲットとなるプロセスや周波数ありきで設計されている場合が多く、例えば200MHzで設計されたRTLを400MHzのターゲットに持っていきたい場合は、セットアップタイム・ホールドタイム違反を起こしタイミング収束しない。逆に100MHzのターゲットとした場合には、200MHzに最適化されたRTLは、タイミング収束するが、FFが無駄に挿入されている状態になる。従って、既存RTLを一度フリースケジューリングであるビヘイビア記述にしてから、再度ターゲット周波数を与えることでタイミングと回路規模(FF数)の最適なRTLを得ることができる。 In addition, what kind of optimization is performed depending on the target frequency is as follows. Existing RTLs are often designed based on the target process and frequency. For example, if you want to bring an RTL designed at 200MHz to a target at 400MHz, a setup time / hold time violation occurs and the timing Does not converge. On the contrary, when the target is 100 MHz, the RTL optimized for 200 MHz converges in timing, but the FF is uselessly inserted. Therefore, the optimum RTL for timing and circuit scale (number of FFs) can be obtained by once making the existing RTL a behavioral description that is free scheduling and then giving the target frequency again.
更に、レイテンシや回路規模とどのような関係になるのかと言えば、次の通りである。ターゲット周波数の制約のもと、レイテンシや回路規模に関する制約を与えることで、その制約に収まるように回路の共有化(リソースシェアリング)を行うことができる。もしレイテンシを厳しくすれば、回路を並列化してできるだけ少ないレイテンシで済むような構成とすることができる。ただし回路を並列化することで回路規模は大きくなる。逆にレイテンシは気にせず回路共有を優先にすれば、レイテンシは長くなるが回路規模は小さくなるような合成が可能である。 Furthermore, the relationship with latency and circuit scale is as follows. By giving constraints on latency and circuit scale under the constraints of the target frequency, circuit sharing (resource sharing) can be performed so as to be within the constraints. If the latency is tightened, the circuits can be parallelized so that the latency is as low as possible. However, the circuit scale is increased by parallelizing the circuits. On the contrary, if circuit sharing is prioritized without worrying about latency, it is possible to synthesize such that the latency becomes long but the circuit scale becomes small.
以上のように、設計対象回路のターゲット周波数は、ビヘイビア記述を高位合成してRTL記述を出力する際に与える必要がある情報(プログラムを含む)ではあるが、設計対象回路のレイテンシと回路規模と異なり、設計者がこれを適宜変更設定することによって、例えば既存のRTL記述を最適化するために用いる情報として位置付けることはできない。 As described above, the target frequency of the design target circuit is the information (including the program) that needs to be given when the behavior description is high-level synthesized and the RTL description is output, but the latency and circuit scale of the design target circuit Unlike this, the designer cannot position it as information used for optimizing an existing RTL description, for example, by appropriately changing and setting it.
10 原RTL記述
11 コントロールデータフロー解析手段
12 ステート解析・除去手段
13 ビヘイビア記述生成手段
14 高位合成手段
15 比較結果情報出力手段
21 ファイル記憶部
22 ファイル記憶部
31 制約ファイル
32 テクノロジライブラリ記憶部
40 最適化RTL記述
50 最適化RTL記述
10 Original RTL description 11 Control data flow analysis means 12 State analysis / removal means 13 Behavioral description generation means 14 High-level synthesis means 15 Comparison result information output means 21 File storage 22 File storage 31
Claims (14)
コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、前記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するステート解析・除去手段と、
前記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するビヘイビア記述生成手段と、
前記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る高位合成手段と
を具備することを特徴とするRTL最適化システム。 When the original RTL description of the circuit to be designed is input, the control data flow analysis means that performs control data flow analysis based on this RTL description and generates control data flow information, and the control data flow analysis means.
The control data flow information generated by the control data flow analysis is subjected to a state analysis consisting of analyzing the operation type in each state, and the state in which the control data flow information can be removed is removed to revise the control data flow. State analysis / removal means to generate information,
A behavior description generation means for generating a high-level synthetic behavior description based on the revised control data flow information,
An RTL optimization system comprising a high-level synthesis means for obtaining an optimized RTL description by performing high-level synthesis based on the behavior description.
設計対象回路の原RTL記述を投入すると、このRTL記述に基づいてコントロールデータフロー解析を行い、コントロールデータフロー情報を生成するコントロールデータフロー解析手段、
コントロールデータフロー解析によって生成されたコントロールデータフロー情報に対して各ステートにおける動作種別の解析を行うことからなるステート解析を行い、前記コントロールデータフロー情報除去可能なステートの除去を行って改定コントロールデータフロー情報を生成するステート解析・除去手段、
前記改定コントロールデータフロー情報に基づき高位合成可能なビヘイビア記述を生成するビヘイビア記述生成手段、
前記ビヘイビア記述に基づき高位合成を行って最適化されたRTL記述を得る高位合成手段
として機能させることを特徴とするRTL最適化プログラム。 Computer,
When the original RTL description of the circuit to be designed is input, the control data flow analysis means that performs control data flow analysis based on this RTL description and generates control data flow information.
The control data flow information generated by the control data flow analysis is subjected to a state analysis consisting of analyzing the operation type in each state, and the state in which the control data flow information can be removed is removed to revise the control data flow. State analysis / removal means to generate information,
A behavior description generation means for generating a high-level synthetic behavior description based on the revised control data flow information.
An RTL optimization program characterized in that it functions as a high-level synthesis means for obtaining an optimized RTL description by performing high-level synthesis based on the behavior description.
A claim characterized in that the computer functions as a comparison result information output means for generating and outputting comparison result information comparing at least the resource usage amount and the latency with respect to the RTL description and the original RTL description synthesized by the high-level synthesis means. Item 4. The RTL optimization program according to any one of Items 8 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016175394A JP6776069B2 (en) | 2016-09-08 | 2016-09-08 | RTL optimization system and RTL optimization program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016175394A JP6776069B2 (en) | 2016-09-08 | 2016-09-08 | RTL optimization system and RTL optimization program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2018041301A JP2018041301A (en) | 2018-03-15 |
JP6776069B2 true JP6776069B2 (en) | 2020-10-28 |
Family
ID=61626071
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016175394A Active JP6776069B2 (en) | 2016-09-08 | 2016-09-08 | RTL optimization system and RTL optimization program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6776069B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6996431B2 (en) * | 2018-06-13 | 2022-01-17 | 日本電信電話株式会社 | Parameter optimizer, method, and program |
CN112199913B (en) * | 2020-10-15 | 2023-12-12 | 湖南泛联新安信息科技有限公司 | Coq-based very large scale integrated circuit RTL vulnerability formalized analysis method |
-
2016
- 2016-09-08 JP JP2016175394A patent/JP6776069B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2018041301A (en) | 2018-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10089426B2 (en) | Logic circuit generation device and method | |
US9658835B1 (en) | Systems and methods for hardware resource sharing | |
JP4492803B2 (en) | Behavioral synthesis apparatus and program | |
Wang et al. | A methodology for reusable physical design | |
Huff et al. | Clockwork: Resource-efficient static scheduling for multi-rate image processing applications on FPGAs | |
JP6776069B2 (en) | RTL optimization system and RTL optimization program | |
Riazati et al. | Deephls: A complete toolchain for automatic synthesis of deep neural networks to fpga | |
Tatsuoka et al. | Physically aware high level synthesis design flow | |
JP2013214278A (en) | Upper hierarchy description generating apparatus, method for generating upper hierarchy description, and program | |
US10606972B2 (en) | Method, design program, and design apparatus of a high level synthesis process of a circuit | |
JP2006268165A (en) | Timing analyzing device for integrated circuit, timing optimizing device for integrated circuit, timing analyzing method for integrated circuit, timing optimizing method for integrated circuit, method for manufacturing integrated circuit board, control program and readable recording medium | |
US10430540B1 (en) | Processing a block diagram circuit design into an efficient high-level language representation | |
JP2008204341A (en) | Interface composite device | |
JP2007287088A (en) | High-level synthesis method and high-level synthesis system | |
JP2006155533A (en) | Circuit information generation device and circuit information generation method | |
US20120226890A1 (en) | Accelerator and data processing method | |
WO2019113603A1 (en) | State machine block for high-level synthesis | |
Stefanov et al. | DAEDALUS framework for high-level synthesis: Past, present and future | |
US10878150B1 (en) | Loop optimization in a circuit design netlist | |
Corre et al. | HLS-based Fast Design Space Exploration of ad hoc hardware accelerators: a key tool for MPSoC Synthesis on FPGA | |
Ostroumov et al. | Generation of structural vhdl code with library components from formal event-b models | |
Simatic et al. | High-level synthesis for event-based systems | |
JP2006201825A (en) | Delay analysis method and delay analysis program of integrated circuit | |
JP2014095955A (en) | Design device and design method for semiconductor integrated circuit | |
JP2008217071A (en) | High-level synthesis apparatus and high-level synthesis method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190805 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20190805 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200929 |
|
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: 20201006 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201007 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6776069 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |