JP2019133591A - FPGA design support method and program - Google Patents
FPGA design support method and program Download PDFInfo
- Publication number
- JP2019133591A JP2019133591A JP2018017524A JP2018017524A JP2019133591A JP 2019133591 A JP2019133591 A JP 2019133591A JP 2018017524 A JP2018017524 A JP 2018017524A JP 2018017524 A JP2018017524 A JP 2018017524A JP 2019133591 A JP2019133591 A JP 2019133591A
- Authority
- JP
- Japan
- Prior art keywords
- description
- input
- fpga
- value
- input signals
- 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.)
- Pending
Links
Images
Abstract
Description
本開示は、FPGA(Field Programmable Gate Array)設計支援方法およびプログラムに関し、特にFPGA設計用のRTL(Register Transfer Level)記述の作成に利用できるものである。 The present disclosure relates to an FPGA (Field Programmable Gate Array) design support method and program, and in particular, can be used to create an RTL (Register Transfer Level) description for FPGA design.
FPGAは、再構成可能なハードウェアであり、複数のプログラム可能な論理セル、メモリ、およびDSP(Digital Signal Processor、たとえば、乗算器)などを内蔵する。そして、これらを変更可能な配線によって結合することによって所望のデジタル回路を実現することができる。 The FPGA is reconfigurable hardware and includes a plurality of programmable logic cells, a memory, a DSP (Digital Signal Processor, for example, a multiplier), and the like. Then, a desired digital circuit can be realized by combining these with a changeable wiring.
FPGAに内蔵される論理セルおよび乗算器の個数(より一般的には、論理ゲート数)ならびにメモリ容量は、製品ごとに決まっている。したがって、FPGA製品によっては論理ゲート数が不足するために所望の機能のデジタル回路をFPGAに搭載できないケースがしばしば発生する。 The number of logic cells and multipliers built in the FPGA (more generally, the number of logic gates) and the memory capacity are determined for each product. Therefore, depending on the FPGA product, the number of logic gates is insufficient, and there are often cases where a digital circuit having a desired function cannot be mounted on the FPGA.
この問題に対処するために、デジタル回路の機能を削減したり、搭載可能な論理ゲート数がより多い高価なFPGA製品に変更したり、リソースを共有することによって時分割処理を行うように設計変更したりすることが多い。たとえば、特許文献1は、設計対象システムの共通部分を共有化する回路変換を行うことにより、回路量を削減する設計支援プログラムを開示する。この場合、共通部分は複数のモジュールが時分割によって実行する。
To cope with this problem, the design has been changed to reduce the functions of the digital circuit, change to an expensive FPGA product with more logic gates that can be mounted, or perform time-sharing processing by sharing resources I often do. For example,
上述したFPGAの論理ゲート数の不足の問題に対処するために、論理ゲート数が多い製品に変更した場合には、コストの点で問題になる。また、特許文献1のように時分割動作によって共通部分を動作させる場合には、機能的な制約が加わることになるので、元の回路と全く同一の動作ができない場合があり得る。
If the product is changed to a product with a large number of logic gates in order to deal with the above-mentioned problem of the insufficient number of logic gates in the FPGA, there is a problem in terms of cost. Further, when the common part is operated by time-division operation as in
この開示は、上記の問題点を考慮したものであり、その目的は、論理ゲート数を削減するようにRTL記述を変更した場合でも変更前のデジタル回路と同等の機能を発揮するようにFPGAを設計することが可能なFPGA設計支援方法を提供することである。 This disclosure takes the above-mentioned problems into consideration, and the purpose of this disclosure is to enable the FPGA to perform the same function as the digital circuit before the change even when the RTL description is changed so as to reduce the number of logic gates. An FPGA design support method that can be designed is provided.
一実施形態によれば、コンピュータによって実行されるFPGA設計支援方法が提供される。FPGA設計支援方法は、FPGA設計で用いられるRTL記述を受け付けるステップと、RTL記述のうち変換対象となる部分である対象論理の1つ以上の入力信号と出力信号との情報を受け付けるステップと、対象論理の1つ以上の入力信号を網羅的に変化させたときの出力信号の値をシミュレーションによって求めるステップと、対象論理と置換するために、メモリ推定定型記述を生成するステップとを備える。ここで、メモリ推定定型記述は、上記の1つ以上の入力信号をメモリブロックのアドレスとして用い、シミュレーションによって求めた出力信号をメモリブロックの当該アドレスに格納されたデータとして用いるように記載される。 According to an embodiment, an FPGA design support method executed by a computer is provided. The FPGA design support method includes a step of receiving an RTL description used in FPGA design, a step of receiving information on one or more input signals and output signals of a target logic that is a part to be converted in the RTL description, and a target A step of obtaining by simulation a value of an output signal when one or more input signals of logic are exhaustively changed, and a step of generating a memory estimation fixed form description to replace the target logic. Here, the memory estimation fixed description is described so that one or more input signals described above are used as addresses of the memory block, and an output signal obtained by simulation is used as data stored at the address of the memory block.
なお、メモリ推定定型記述とは、論理合成ツールが、RTL記述を論理合成する際にメモリを選択するように定められた定型的な記述である。 The memory estimation fixed description is a fixed description determined so that the logic synthesis tool selects a memory when the RTL description is logically synthesized.
上記の実施形態によれば、RTL記述に含まれる対象論理が同じ入出力関係を有するメモリ推定定型記述に置換される。これによって、論理ゲート数を削減するようにRTL記述を変更した場合でも変更前のデジタル回路と同等の機能を発揮するようにFPGAを設計することが可能になる。 According to the above embodiment, the target logic included in the RTL description is replaced with the memory estimation fixed form description having the same input / output relationship. As a result, even when the RTL description is changed so as to reduce the number of logic gates, the FPGA can be designed so as to exhibit the same function as the digital circuit before the change.
以下、各実施の形態について図面を参照して詳しく説明する。なお、同一または相当する部分には同一の参照符号を付して、その説明を繰り返さない。 Hereinafter, each embodiment will be described in detail with reference to the drawings. The same or corresponding parts are denoted by the same reference numerals, and the description thereof will not be repeated.
実施の形態1.
[FPGAとその設計方法]
以下では、本開示の前提となるFPGAの構成例とその設計方法の概要について説明する。
[FPGA and its design method]
In the following, an exemplary configuration of an FPGA that is a premise of the present disclosure and an outline of a design method thereof will be described.
図1は、FPGAの構成の一例を示す模式的な平面図である。
図1を参照して、FPGA100は、一例として、複数の論理セル101と、複数のメモリブロック102と、複数のDSP(乗算器など)と、これらを接続する配線要素(不図示)と、チップ外周に配置された複数の入出力要素(不図示)とを備える。図1では、図解を容易にするために、6個の論理セル101と3個のメモリブロック102と3個のDSP103とが示されているが、実際にはより多くの個数の回路要素が設けられている。
FIG. 1 is a schematic plan view showing an example of the configuration of an FPGA.
Referring to FIG. 1, the
論理セル101は、ルックアップテーブル(LUT:Look Up Table)と、順序回路を実現するためのフリップフロップ(FF:Flip Flop)と、セレクタとを含む。複数の論理ゲートによる組合せ回路の機能をLUTによって実現することができる。
The
メモリブロック102は、メモリとして使用する専用領域であり、たとえば、SRAM(Static Random Access Memory)構造を有している。
The
図2は、FPGAの設計手順を示すフローチャートである。図3は、図2の変形例を示すフローチャートである。図3は、図2に動作記述110と高位合成S201が追加されたものである。したがって、図3のその他の部分は図2と同じである。なお、以下の各ステップは、たとえば、図7に示すコンピュータ140のCPU(Central Processing Unit)141がプログラムを実行することによって実現可能である。
FIG. 2 is a flowchart showing the FPGA design procedure. FIG. 3 is a flowchart showing a modification of FIG. FIG. 3 is obtained by adding the
図2を参照して、FPGA設計では、最初にハードウェア記述言語(HDL:Hardware Description Language)を用いてレジスタ転送レベル(RTL)でデジタル回路の動作を記述したRTL記述111が準備される。RTL記述111は、図3に示すように、高位合成(ステップS201)によって、C言語などによる動作記述110からCPU141が合成してもよい。
Referring to FIG. 2, in FPGA design, first, an RTL
次に、論理合成およびテクノロジーマッピング(ステップS202)によって、論理セル101、メモリブロック102、およびDSP103の接続関係を示すネットリスト112がRTL記述111から生成される。論理合成とは、RTL記述111から論理ゲートおよびフリップフロップなどの複数の論理素子とそれらの接続関係とを表すネットリストを生成することをいう。テクノロジーマッピングとは、ネットリストに含まれる論理素子をFPGAの各素子に割り当てることをいう。
Next, a
その次に、生成されたネットリストを配置・配線ツールに入力すること(ステップS203)によって、コンフィギュレーションデータ113が生成される。コンフィギュレーションデータ113は、FPGA内の論理素子および配線スイッチなどをプログラムするためのデータである。最終的に、コンフィギュレーションデータ113をFPGA内のコンフィギュレーションメモリにダウンロードすること(ステップS204)によってFPGAの設計が完了する。
Next,
なお、Verilog HDLおよびVHDLなどのハードウェア記述言語では、シミュレーションを行うための環境(ステップS205)がハードウェア記述言語に用意されている。このシミュレーション環境のことを、テストベンチ、テスト記述などと称する。 Note that, in hardware description languages such as Verilog HDL and VHDL, an environment (step S205) for performing simulation is prepared in the hardware description language. This simulation environment is called a test bench, test description, or the like.
[FPGA設計上の問題点]
FPGAに内蔵される論理セルの個数、メモリ容量、乗算器の個数は、製品ごとに決まっている。したがって、FPGA製品によっては論理セルおよび乗算器の個数(より一般的には、論理ゲート数)が不足するために所望の機能のデジタル回路をFPGAに搭載できないという問題がしばしば生じる。
[Problems in FPGA design]
The number of logic cells, memory capacity, and number of multipliers built in the FPGA are determined for each product. Therefore, depending on the FPGA product, the number of logic cells and multipliers (more generally, the number of logic gates) is insufficient, so that there is often a problem that a digital circuit having a desired function cannot be mounted on the FPGA.
この問題に対処するために、本開示では、RTL記述で記載されているFPGAの論理ゲート部分について、その一部をメモリに置換する方法を提示する。具体的には、置換対象となる論理の入力信号を網羅的に与えたときに取り得る出力信号を予めシミュレーションで求める。そして、入力信号をアドレスとし、対応する出力信号をそのアドレスに対応する値としてメモリに格納する。対象論理の記述は、入力信号に応じてメモリの値を読み出して出力するような記述(メモリ推定定型記述と称する)に置換する。以下、具体的に説明する。 In order to address this problem, the present disclosure presents a method for replacing a part of the logic gate part of the FPGA described in the RTL description with a memory. Specifically, output signals that can be taken when the input signals of the logic to be replaced are exhaustively given are obtained in advance by simulation. Then, the input signal is used as an address, and the corresponding output signal is stored in the memory as a value corresponding to the address. The description of the target logic is replaced with a description that reads and outputs the value of the memory according to the input signal (referred to as a memory estimation fixed description). This will be specifically described below.
[論理回路のメモリへの置換方法]
図4は、論理回路をメモリに置換する方法を説明するための機能ブロック図である。図5は、論理回路をメモリに置換する手順を示すフローチャートである。
[Replacement method of logic circuit to memory]
FIG. 4 is a functional block diagram for explaining a method of replacing a logic circuit with a memory. FIG. 5 is a flowchart showing a procedure for replacing a logic circuit with a memory.
図5の各ステップは、たとえば、図7に示すコンピュータ140のCPU(Central Processing Unit)141がプログラムまたはスクリプト122を実行することによって実現可能である。プログラムまたはスクリプト122は、表計算ソフト等のVBAであってもLinux(登録商標)等で用いられるShellであってもかまわず、その実現手段は問わない。
Each step in FIG. 5 can be realized, for example, by a CPU (Central Processing Unit) 141 of the
図5および図6を参照して、最初のステップS300において、CPU141は、ハードウェア記述言語で記載されたRTL記述120のうちメモリ化する対象論理121を決定するか、もしくは予め決定された対象論理121の情報を受け取る。図3の高位合成S201の際に、CPU141が対象論理121を自動的に決定してもよい。
Referring to FIGS. 5 and 6, in first step S300,
対象論理121は、1つ以上の入力信号を決めると出力信号が一意的に定めるものに限られる。したがって、対象論理121は、パイプライン化可能な論理または0サイクル処理に限られる。対象論理121の具体例については、図7を参照して後述する。
The
次のステップS310において、CPU141は、対象論理の入力信号名、出力信号名、クロック信号名、レイテンシ、リセット信号名、その優位の情報を取得する。レイテンシとは、対象論理121が処理を行うのに必要なクロックのサイクル数である。これらの情報は、与えられたRTL記述120および対象論理121の情報から、CPU141が自動的に抽出するようにしてもよい。
In the next step S310, the
その次のステップS320において、CPU141は、テストベンチ124を生成する。テストベンチ124は、対象論理121をシミュレーションするための環境であり、ハードウェア記述言語を用いて構成される。テストベンチ124は、対象論理121への入力データを記述する部分125と、RTL記述120をインスタンス化した部分120Aと、入力信号ごとにシミュレーションに得られた出力信号を出力変数に書込む部分とを含む。
In the next step S320, the
CPU141は、テストベンチ124を実行することによって、対象論理121に対して全入力パターンを網羅的に与え(すなわち、取り得る全ての入力(0,1)の情報を与える)(S321)、各入力に対する出力をシミュレーションによって求める(S322)。CPU141は、得られた出力をダンプデータとして図7のRAM142または外部記憶装置144などに記憶する(S323)。
The
その次のステップS330において、CPU141は、メモリ推定定型記述123を生成する。ステップS330は、ステップS320の前に、もしくはステップS320と並行して実行してもよい。
In the next step S330, the
ここで、メモリ推定定型記述123とは、図3の論理合成ツール(ステップS202)が、RTL記述120を論理合成する際にメモリを選択するように定められた定型的な記述である。
Here, the memory estimation fixed
一例として挙げた実施の形態1の場合、メモリ推定定型記述123において、メモリのアドレスは対象論理の1つ以上の入力信号をビット結合したものであり、リードデータは当該入力信号に対応する出力信号の値である。図3のステップS204において、コンフィギュレーションデータ113をFPGAにダウンロードする際に、ダンプデータ126は図1のFPGA100のメモリブロック102に転送される。
In the case of the first embodiment given as an example, in the memory estimation fixed
その次のステップS340において、CPU141は、RTL記述120内の対象論理121をメモリ推定定型記述123で置換する。この置換後のRTL記述120を図3のステップS202の論理合成ツールに読み込ませることによって、論理合成ツールは、メモリ推定定型記述123に従ってメモリを対応する素子として認識する。なお、ダンプデータ126は、メモリ推定定型記述123によって読み込まれるように記載しているので、論理合成時にメモリ推定定型記述123に従って論理合成ツールが読み込むディレクトリに格納しておく。
以上によって、対象論理をメモリに置換することが可能になる。
In the next step S340, the
As described above, the target logic can be replaced with a memory.
[対象論理として選択可能な処理の例]
図6は、対象論理として選択可能な処理について説明するための図である。図6(A)および(B)は対象論理として選択可能な処理を示し、図6(C)および(D)は対象論理として選択不可能な処理を示す。
[Examples of processing that can be selected as target logic]
FIG. 6 is a diagram for explaining processes that can be selected as the target logic. 6A and 6B show processes that can be selected as the target logic, and FIGS. 6C and 6D show processes that cannot be selected as the target logic.
図6(A)を参照して、入力信号に対して処理1(P1)が実行され、処理1(P1)の出力に対して処理2(P2)が実行される。この場合、入力が決まれば出力が一意的に決まるので、一連の処理は対象論理121として選択可能である。
Referring to FIG. 6A, process 1 (P1) is executed on the input signal, and process 2 (P2) is executed on the output of process 1 (P1). In this case, since the output is uniquely determined when the input is determined, a series of processes can be selected as the
図6(B)を参照して、クロック信号に従って入力信号がフリップフロップFF1に格納される。次のクロックで、フリップフロップFF1に格納された値に対して処理1(P1)が施され、この処理1(P1)の結果がフリップフロップFF2に格納される。次のクロックで、フリップフロップFF2に格納された値に対して処理2(P2)が施され、この処理1(P2)の結果がフリップフロップFF3に格納される。そして、フリップフロップFF3に格納された値が出力される。したがって、入力が決まれば出力が一意的に定まるので、一連の処理は対象論理121として選択可能である。
Referring to FIG. 6B, the input signal is stored in flip-flop FF1 in accordance with the clock signal. At the next clock, processing 1 (P1) is performed on the value stored in flip-flop FF1, and the result of processing 1 (P1) is stored in flip-flop FF2. At the next clock, processing 2 (P2) is performed on the value stored in flip-flop FF2, and the result of processing 1 (P2) is stored in flip-flop FF3. Then, the value stored in the flip-flop FF3 is output. Therefore, since the output is uniquely determined when the input is determined, a series of processes can be selected as the
図6(C)に示す一連の処理は、フリップフロップFF2の出力が処理1(P1)に入力される点と、フリップフロップFF1,FF2の両方の出力に基づいて処理1(P1)が処理を行う点とにおいて、図6(B)に示す処理と異なる。このように、フリップフロップFF1の内部情報とフリップフロップFF2の内部情報とが組み合わされる場合には、1サイクルで出力が一意に定まらないので、対象論理121として選択することができない。
In the series of processes shown in FIG. 6C, the process 1 (P1) performs the process based on the point that the output of the flip-flop FF2 is input to the process 1 (P1) and the outputs of both the flip-flops FF1 and FF2. This is different from the process shown in FIG. As described above, when the internal information of the flip-flop FF1 and the internal information of the flip-flop FF2 are combined, the output is not uniquely determined in one cycle, and therefore cannot be selected as the
図6(D)に示す一連の処理は、フリップフロップFF1の出力が処理2(P2)に入力される点と、フリップフロップFF1,FF2の両方の出力に基づいて処理2(P2)が処理を行う点とにおいて、図6(B)に示す処理と異なる。このように、フリップフロップFF1の内部情報とフリップフロップFF2の内部情報とが組み合わされる場合には、1サイクルで出力が一意に定まらないので、対象論理121として選択することができない。
In the series of processes shown in FIG. 6D, the process 2 (P2) performs the process based on the point that the output of the flip-flop FF1 is input to the process 2 (P2) and the outputs of both the flip-flops FF1 and FF2. This is different from the process shown in FIG. As described above, when the internal information of the flip-flop FF1 and the internal information of the flip-flop FF2 are combined, the output is not uniquely determined in one cycle, and therefore cannot be selected as the
なお、入力ビット数(入力信号が複数の場合は、これら複数の入力信号を連結した合計のビット数)が増えるとシミュレーション時間が増加する。さらに、使用するメモリブロック102の容量は、入力ビット数の2乗で増加する。そのため、CPUなどのハードウェアリソースの処理能力に応じて対象論理121の入力ビット数を決定する(たとえば、16ビット以下とする)とよい。
Note that the simulation time increases as the number of input bits (when there are a plurality of input signals, the total number of bits obtained by concatenating the plurality of input signals) increases. Furthermore, the capacity of the
[コンピュータの構成例]
図7は、図3および図5の各ステップを実行するためのコンピュータの構成の一例を示すブロック図である。
[Computer configuration example]
FIG. 7 is a block diagram showing an example of the configuration of a computer for executing the steps of FIGS. 3 and 5.
図7を参照して、コンピュータ140は、CPU141と、RAM142と、ROM(Read Only Memory)143と、不揮発性メモリなどの外部記憶装置144と、キーボード、マウス、およびタッチパネルなどの入力インターフェイス145と、液晶モニタなどのディスプレイ146と、有線LAN(Local Area Network)および無線LANなどのネットワークインターフェイス147とを備える。
Referring to FIG. 7, a
CPU141は、非一時的な記憶媒体としての外部記憶装置144に格納されたプログラムを実行することによって図3および図5に示す各ステップを実行することができる。さらに、コンピュータ140は、図4のスクリプト122および図5のフローチャートとして示されているFPGA設計支援プログラムを実行するためのFPGA設計支援装置を構成すると考えることもできる。
The
[RTL記述、メモリ推定定型記述、テストベンチ記述、ダンプデータの具体例]
以下、図4のRTL記述120、メモリ推定定型記述123、テストベンチ124、ダンプデータ126などの具体例について説明する。
[Specific examples of RTL description, fixed memory description, test bench description, dump data]
Hereinafter, specific examples of the
(対象論理を含むRTL記述の例)
図8は、図4の対象論理を含むRTL記述の一部の例を示す図である。RTL記述はverilog HDLの一例を示しているが、RTL記述であれば言語はVHDL,systemverilog等どのような言語でも構わない。
(Example of RTL description including target logic)
FIG. 8 is a diagram showing an example of a part of the RTL description including the target logic of FIG. The RTL description shows an example of the verilog HDL, but any language such as VHDL or systemverilog may be used as long as it is an RTL description.
第1行において、RTL記述120のモジュール名が「SAMPLE」であることが示されている。
The first line indicates that the module name of the
第21行から第32行において、対象論理121の処理内容が示されている。対象論理121は、クロック信号のポジティブエッジにおいて、入力信号SIGNALA[3:0]の2乗とSIGNALBの2乗との積を出力する。対象論理121はリセット信号のネガティブエッジにおいて0を出力する。
The processing contents of the
(情報入力画面の一例)
図9は、図5のステップS310の情報入力を行うための入力画面の一例を示す図である。
(Example of information input screen)
FIG. 9 is a diagram showing an example of an input screen for inputting information in step S310 of FIG.
第151欄において、図8のRTL記述120から抽出された対象論理121の入力信号名の情報がスクリプト122に入力されている。第152欄において、各入力信号のビット幅の情報が、RTL記述120から抽出されて入力されている。
In the 151st column, the input signal name information of the
第153欄において、対象論理121を含むRTL記述120のモジュール名が入力されている。第154欄において、RTL記述120の言語が入力されている。RTL記述120の言語を指定している理由は、テストベンチ記述124およびメモリ推定定型記述123を当該言語で作成するためである。
In the 153rd column, the module name of the
第155欄においてクロック信号名が入力され、第156欄においてレイテンシが入力されている。クロック信号名およびレイテンシが必要な理由は、テストベンチ記述124によってダンプデータ126を生成する際に何サイクル後にデータをキャプチャすればよいかをスクリプト122に指示するためである。
A clock signal name is input in the 155th column, and a latency is input in the 156th column. The reason why the clock signal name and the latency are required is to instruct the
第157欄においてリセット信号名が入力され、第158欄においてその優位が入力される。リセット信号名とその優位が必要な理由は、リセット信号をネゲートした状態でなければ、テストベンチ記述124によってダンプデータ126を正しく生成できないためである。
The reset signal name is input in the 157th column, and its superiority is input in the 158th column. The reason why the reset signal name and its superiority are necessary is that the
第159欄において、図8のRTL記述120の記述から、対象論理121の出力信号名の情報がスクリプト122に入力されている。第160欄において、出力信号のビット幅の情報が、RTL記述120から抽出されて入力されている。
In the 159th column, the information of the output signal name of the
第161欄において、メモリ推定定型記述123において使用されるメモリのモジュール名が指定されている。
In the 161st column, the module name of the memory used in the memory estimation fixed
なお、図9の例では、「ROM化実行」と記載されたボタン172をユーザが選択することによって、上記の入力に基づいてメモリ推定定型記述123およびテストベンチ記述124の自動生成が開始される。
In the example of FIG. 9, when the user selects the button 172 described as “ROM implementation”, automatic generation of the memory estimation fixed
(メモリ推定定型記述の例)
図10は、図4のメモリ推定定型記述の一例を示す図である。
(Example of fixed memory description)
FIG. 10 is a diagram illustrating an example of the memory estimation fixed form description of FIG.
図10(A)は、メモリ推定定型記述のインスタンスの記載例を示す。図8のRTL記述120の第21行から第32行に示す対象論理121に代えて、図10(A)の記述を貼り付けることによって、メモリ推定定型記述123を使用することができる。
FIG. 10A shows a description example of an instance of a memory estimation fixed form description. Instead of the
図10(A)の第23行においてメモリのアドレスが、入力信号SIGNALA[3,0]と入力信号SIGNALBとをビット結合した値に指定されている。第24行においてメモリの値が出力信号RESULTに指定されている。 In the 23rd row of FIG. 10A, the address of the memory is specified as a value obtained by bit-coupling the input signal SIGNALA [3,0] and the input signal SIGNALB. In the 24th row, the value of the memory is designated as the output signal RESULT.
図10(B)は、メモリ推定定型記述として出力されるモジュールである。第51行において、出力するRTLの名称、すなわちモジュール名「aun」が宣言されている。図10(A)で説明したように、図10(B)のモジュールがインスタンス化されて、図8のRTL記述120の対象論理121に代えて記載される。
FIG. 10B shows a module output as a memory estimation fixed description. In
第53行において、メモリのアドレスビット幅が指定されている。メモリのアドレスビット幅は、入力信号SIGNALAおよびSIGNALBのビット数の合計値に等しい。
In
第54行において、メモリのデータ幅が指定されている。メモリのデータ幅は、出力信号RESULTのビット幅に等しい。 In line 54, the data width of the memory is specified. The data width of the memory is equal to the bit width of the output signal RESULT.
第66行において、ダンプデータ126としてのデータ名"aundata.txt"の値がメモリromの初期値として読み込まれる。先頭アドレスは0、最終アドレスは2**PADDR_WIDTH−1である。
In
第69行から第71行において、レイテンシ設定の数だけ出力を待たせるようにしている。図10(B)では1サイクル分を示しているが、レイテンシが増加すれば本行に記載するシフトレジスタの数を増加させる。 From the 69th line to the 71st line, output is made to wait for the number of latency settings. FIG. 10B shows one cycle, but if the latency increases, the number of shift registers described in this row is increased.
(テストベンチ記述の例)
図11は、図4のテストベンチ記述の一例を示す図である。
(Example of test bench description)
FIG. 11 is a diagram illustrating an example of the test bench description of FIG.
図11のテストベンチ記述124を実行すると、変数iを1ずつ増加させることにより入力信号の最小値から最大値まで網羅的な入力パターンが対象論理121に入力信号として与えられる。対象論理121に与えられた入力信号に従って出力信号が一意に定まる。対象論理121の出力値は、指定したレイテンシ分のサイクルを経過した後に、毎サイクルごとに出力変数ROMに格納される。最後に、出力変数ROMに格納された情報がテキストデータに出力される。
When the
第103行において、入力信号のビット数の合計値が記載される。この合計値はメモリのアドレスビット幅として使用されるとともに、網羅的に入力する入力信号の最大値として使用される。
In
第104行において、出力信号のビット幅が記載される。このビット幅は、メモリのデータ幅に対応付けられる。 In line 104, the bit width of the output signal is described. This bit width is associated with the data width of the memory.
第109行から第114行において、テストベンチ上で与える擬似クロックが生成される。テストベンチ上でインスタンス化された図8のRTL記述120は、本クロックによって駆動される。
In
第116行から第120行において、リセット信号RSTの解除が正論理で記述されている。第135行において、RTL記述120(モジュール名:SAMPLE)のインスタンス化時に、リセット信号RSTを論理反転「〜」した値がRTL記述120に入力RTLに与えることによって、図9に記載したリセット優位情報が実現されている。なお、この記載に代えて、リセット信号RSTの解除を負論理で記述しても構わない。
In
第123行において、入力信号に対して変数iが強制入力される。なお、第123行において、「SAMPLE.SIGNALA」は、インスタンス化されたモジュールSAMPLE(すなわち、図8のRTL記述120)に含まれる信号名SIGNALAを意味する。
In
第122行に示されているように、上記の第123行の強制入力は変数iを0から1ずつ増やしながら、入力ビット幅だけ2をべき乗した回数まで繰り返される。これによって、入力信号の各ビットに対して0,1の値が網羅的に与えられる(すなわち、全入力パターンが対象論理121に入力される)。 As shown in the 122nd line, the forced input in the 123rd line is repeated up to the number of times that the input bit width is raised to the power of 2, while increasing the variable i by 1 from 0. As a result, values of 0 and 1 are comprehensively given to each bit of the input signal (that is, all input patterns are input to the target logic 121).
入力信号を変化させた後、第124行において、レイテンシ情報を利用してそのサイクル後にデータをキャプチャするようにしている。レイテンシが増加すればその分だけ本記述のウェイトが増加する。
After changing the input signal, in
第126行において、対象論理121の出力信号が出力変数ROMに格納される。上記の第122行から第126行が繰り返されることによって、入力信号の各ビットが全てトグルするまで繰り返され、これによって対象論理121の全ての入力パターンに対応する出力値が生成される。
In
第129行において、出力変数ROMに格納されたデータがテキストファイル"aundata.txt"に出力される。出力データは、メモリ推定定型記述123で使用される。
In
第135行において、図8のRTL記述120(モジュール名:SAMPLE)がインスタンス化される。このインスタンス化されたRTL記述120に対して、上記の第123行で示される入力が与えられる。
In
(ダンプデータ)
図12は、図4のダンプデータの一例を示す図である。図12の例では、アドレスの0番目から順に出力データが記載されている。
(Dump data)
FIG. 12 is a diagram illustrating an example of the dump data of FIG. In the example of FIG. 12, output data is described in order from the 0th address.
[効果]
以上のとおり実施の形態1によれば、FPGAに含まれる論理セルの利用率が100%となってしまったために、RTL記述に含まれる全ての論理回路の機能をFPGAに搭載できないという事態に対処することができる。具体的には、RTL記述に含まれる論理回路部分の一部を、同じ入出力関係を有するメモリ推定定型記述に置換することによって、論理ゲート数を削減するようにRTL記述を変更する。この結果、論理ゲート数の削減前のデジタル回路と同等の機能をFPGAに搭載することが可能になる。
[effect]
As described above, according to the first embodiment, since the usage rate of the logic cell included in the FPGA becomes 100%, it is possible to cope with a situation in which all the functions of the logic circuit included in the RTL description cannot be mounted in the FPGA. can do. Specifically, the RTL description is changed so as to reduce the number of logic gates by replacing a part of the logic circuit portion included in the RTL description with a memory estimation fixed description having the same input / output relationship. As a result, functions equivalent to those of the digital circuit before the reduction of the number of logic gates can be mounted on the FPGA.
実施の形態2.
実施の形態2では、対象論理を置換した結果として使用されるFPGAのメモリブロック102の容量を削減する方法を説明する。具体的には、入力信号のうち、対象論理121で使用されていないビットについては、メモリブロック102に格納しないようにするものである。以下、図面を参照して詳しく説明する。
In the second embodiment, a method for reducing the capacity of the
図13は、図5のステップS320のテストベンチの生成および実行を変更した手順を示すフローチャートである。以下の各手順は、図7のCPU141によってプログラムを実行することによって実現される。
FIG. 13 is a flowchart showing a procedure in which the generation and execution of the test bench in step S320 of FIG. 5 are changed. Each of the following procedures is realized by executing a program by the
まず、CPU141は、対象論理121の特定の入力ビットを0に固定し、その他の入力を網羅的に変化させた場合(ステップS400)において、各入力に対する対象論理の出力をシミュレーションで求める(ステップS401)。
First, when the specific input bit of the
次に、CPU141は、上記特定の入力ビットを1に固定し、その他の入力を網羅的に変化させた場合(ステップS402)において、各入力に対する対象論理の出力をシミュレーションで求める(ステップS403)。
Next, when the specific input bit is fixed to 1 and the other inputs are exhaustively changed (step S402), the
次のステップS404において、CPU141は、上記特定の入力ビットが0の場合と1の場合とで出力に変化がなければ、上記の上記特定の入力ビットを不要ビットと判断する。
In the next step S404, if there is no change in output between the case where the specific input bit is 0 and the case where the specific input bit is 1, the
その次のステップS405において、CPU141は、入力信号の全ビットを特定ビットに設定したか否かを判定する。入力信号の全ビットを特定ビットに設定していない場合には、CPU141は特定ビットを未設定のビットに変更して(ステップS406)上記のステップS400〜S405を繰り返す。上記のステップS400〜S406は、不要ビットを識別するステップに相当する。
In the next step S405, the
入力信号の全ビットを特定ビットに設定した場合には(ステップS405でYES)、CPU141は、対象論理121に対して全不要ビットを除いた入力ビットを網羅的に変化させた場合(ステップS407)において、各入力に対する出力をシミュレーションで求める(ステップS408)。その次のステップS409において、CPU141は、得られた出力をダンプデータとして、RAM142または外部記憶装置144に記憶する。
When all bits of the input signal are set to specific bits (YES in step S405), the
図14は、特定ビットの値を0に固定するためのテストベンチ記述の例を示す図である。 FIG. 14 is a diagram illustrating an example of a test bench description for fixing the value of a specific bit to 0.
図14の第152行に示すように入力信号に変数iを入力した後に、第153行に示すように、特定ビットである入力信号SIGNALAのビット2に“0”を上書きすることによって、入力信号SIGNALAのビット2の値を“0”に固定することができる。
After the variable i is input to the input signal as shown in
図15は、実施の形態2において、メモリ推定定型記述およびテストベンチ記述を生成するために、対象論理から抽出される情報の例を示す図である。図15の例は実施の形態1の図9に対応するものである。 FIG. 15 is a diagram illustrating an example of information extracted from the target logic in order to generate the memory estimation fixed form description and the test bench description in the second embodiment. The example of FIG. 15 corresponds to FIG. 9 of the first embodiment.
図15では、入力信号SIGNALAのビット2が不要ビットである場合が示されている。この場合、入力信号名としてSIGNALA[2]が抽出されず、その他の入力信号SIGNALA[1:0],SINGNLA[3],SIGNALBが抽出される。
FIG. 15 shows a case where
[効果]
以上のとおり実施の形態2によれば、上記のステップS400〜S405において、入力信号の各ビットが対象論理121で使用されているか否かが判定される。そして、上記のステップS407およびS408において、対象論理121で使用されていないビットである不要ビットを除いて、対象論理121の全ての入力信号パターンに対応する出力信号がシミュレーションで求められる。ステップS409において、シミュレーション結果がダンプデータとして記憶装置に格納される。このダンプデータは、最終的に図1のFPGA100のメモリブロック102に転送される。したがって、不要ビットに関係する部分は、メモリブロック102に格納されなくなるので、必要なメモリブロック102の容量を削減することができる。
[effect]
As described above, according to the second embodiment, whether or not each bit of the input signal is used in the
今回開示された実施の形態はすべての点で例示であって制限的なものでないと考えられるべきである。この発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time must be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
100 FPGA、101 論理セル、102 メモリブロック、103 DSP、111,120 RTL記述、121 対象論理、122 スクリプト、123 メモリ推定定型記述、124 テストベンチ記述、126 ダンプデータ、140 コンピュータ、141 CPU、142 RAM、144 外部記憶装置。
100 FPGA, 101 logic cell, 102 memory block, 103 DSP, 111, 120 RTL description, 121 target logic, 122 script, 123 memory estimation fixed form description, 124 test bench description, 126 dump data, 140 computer, 141 CPU, 142
Claims (7)
前記コンピュータが、前記RTL記述のうち変換対象となる部分である対象論理の1つ以上の入力信号と出力信号との情報を受け付けるステップと、
前記コンピュータが、前記対象論理の前記1つ以上の入力信号を網羅的に変化させたときの前記出力信号の値をシミュレーションによって求めるステップと、
前記コンピュータが、前記対象論理と置換するために、メモリ推定定型記述を生成するステップとを備え、
前記メモリ推定定型記述は、前記1つ以上の入力信号をメモリブロックのアドレスとして用い、シミュレーションによって求めた前記出力信号を前記メモリブロックの当該アドレスに格納されたデータとして用いるように記載される、FPGA設計支援方法。 A step in which a computer receives an RTL (Register Transfer Level) description used in FPGA (Field Programmable Gate Array) design;
Receiving the information of one or more input signals and output signals of the target logic that is a part to be converted in the RTL description;
Obtaining a value of the output signal by simulation when the computer comprehensively changes the one or more input signals of the target logic;
The computer generating a memory estimated boilerplate description to replace the target logic;
The FPGA is described in such a manner that the one or more input signals are used as addresses of memory blocks, and the output signals obtained by simulation are used as data stored at the addresses of the memory blocks. Design support method.
テストベンチ記述を生成するステップと、
前記テストベンチ記述を実行するステップとを含み、
前記テストベンチ記述は、
前記RTL記述をインスタンス化する部分と、
前記1つ以上の入力信号として網羅的に値を入力する部分と、
前記1つ以上の入力信号の値ごとに前記出力信号の値を出力変数に入力する部分とを含む、請求項1に記載のFPGA設計支援方法。 The step of obtaining by the simulation is as follows:
Generating a test bench description;
Executing the test bench description,
The test bench description is
A part for instantiating the RTL description;
A part for comprehensively inputting values as the one or more input signals;
The FPGA design support method according to claim 1, further comprising: a part that inputs the value of the output signal to an output variable for each value of the one or more input signals.
前記テストベンチ記述において、前記出力変数に入力する部分は、前記1つ以上の入力信号の値が前記対象論理に入力されてから、前記レイテンシに対応する時間が経過したときに前記出力信号の値を前記出力変数に入力するように記載される、請求項2に記載のFPGA設計支援方法。 The step of receiving the information further receives latency information,
In the test bench description, the part to be input to the output variable is the value of the output signal when a time corresponding to the latency has elapsed after the values of the one or more input signals are input to the target logic. The FPGA design support method according to claim 2, wherein: is input to the output variable.
前記テストベンチ記述は、前記リセット信号を解除する部分を含む、請求項2または3に記載のFPGA設計支援方法。 In the step of receiving the information, a reset signal and its superior information are further received,
The FPGA design support method according to claim 2, wherein the test bench description includes a portion for releasing the reset signal.
前記不要ビットを識別するステップは、
前記1つ以上の入力信号の特定ビットに0を入力し、その他のビットを網羅的に変化させた第1の場合における前記出力信号の値と、前記特定ビットに1を入力し、その他のビットを網羅的に変化させた第2の場合における前記出力信号の値とを求めるステップと、
前記第1の場合における前記出力信号の値と前記第2の場合における前記出力信号の値とが一致する場合に、前記特定ビットを不要ビットと判定するステップとを含み、
前記シミュレーションによって求めるステップでは、前記対象論理の前記1つ以上の入力信号のうち前記不要ビットを除くその他のビットを網羅的に変化させたときの前記出力信号の値がシミュレーションによって求められる、請求項1に記載のFPGA設計支援方法。 The computer further comprising identifying unwanted bits included in the one or more input signals;
The step of identifying the unnecessary bits includes:
The value of the output signal in the first case in which 0 is input to specific bits of the one or more input signals and the other bits are changed comprehensively, 1 is input to the specific bits, and the other bits Obtaining the value of the output signal in the second case in which
Determining the specific bit as an unnecessary bit when the value of the output signal in the first case matches the value of the output signal in the second case,
The step of obtaining by the simulation obtains the value of the output signal when the other bits excluding the unnecessary bits of the one or more input signals of the target logic are comprehensively changed by simulation. 2. The FPGA design support method according to 1.
The program for making a computer perform the FPGA design assistance method of any one of Claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018017524A JP2019133591A (en) | 2018-02-02 | 2018-02-02 | FPGA design support method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018017524A JP2019133591A (en) | 2018-02-02 | 2018-02-02 | FPGA design support method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019133591A true JP2019133591A (en) | 2019-08-08 |
Family
ID=67547484
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018017524A Pending JP2019133591A (en) | 2018-02-02 | 2018-02-02 | FPGA design support method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019133591A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220114312A1 (en) * | 2020-10-09 | 2022-04-14 | Xepic Corporation Limited | Method, emulator, and storage media for debugging logic system design |
-
2018
- 2018-02-02 JP JP2018017524A patent/JP2019133591A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220114312A1 (en) * | 2020-10-09 | 2022-04-14 | Xepic Corporation Limited | Method, emulator, and storage media for debugging logic system design |
US11625521B2 (en) * | 2020-10-09 | 2023-04-11 | Xepic Corporation Limited | Method, emulator, and storage media for debugging logic system design |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6035106A (en) | Method and system for maintaining hierarchy throughout the integrated circuit design process | |
Coelho | The VHDL handbook | |
US7962872B2 (en) | Timing analysis when integrating multiple circuit blocks while balancing resource requirements and accuracy | |
US9864828B1 (en) | Hardware acceleration device handoff for using programmable integrated circuits as hardware accelerators | |
JP2008537268A (en) | An array of data processing elements with variable precision interconnection | |
JP3896177B2 (en) | Emulation system | |
JP3173729B2 (en) | Logic simulation method and system | |
CN102054088B (en) | Virtual platform for prototyping system-on-chip designs | |
US9824173B1 (en) | Software development-based compilation flow for hardware implementation | |
JP2019133591A (en) | FPGA design support method and program | |
CN112818616B (en) | Pin naming method, register excitation source adding method and electronic device | |
US4815016A (en) | High speed logical circuit simulator | |
US20050154577A1 (en) | Method and apparatus for emulation of logic circuits | |
Hajduk | Simple method of asynchronous circuits implementation in commercial FPGAs | |
CN106650033B (en) | Process mapping method for input/output ports | |
JP2006268606A (en) | Simulation device | |
Skliarova et al. | Reconfigurable devices and design tools | |
Sklyarov et al. | Design of Digital Circuits on the Basis of Hardware Templates. | |
JP3403614B2 (en) | Data processing system with dynamic resource utilization function | |
JP7335535B2 (en) | hardware trojan detection device and hardware trojan detection program | |
US11106851B1 (en) | Serialization in electronic design automation flows | |
JPH0696151A (en) | Logic simulator | |
US11853668B1 (en) | FPGA implementation interleaved with FPGA overlay architectures for emulation | |
JP4573328B2 (en) | Semiconductor device, semiconductor design apparatus and semiconductor design method | |
Koch et al. | FPGA Applications in Education and Research |