【0001】
【発明の属する技術分野】
この発明は、DMAC(Direct Memory Access Controller)回路を論理検証する検証手法に関するものである。
【0002】
【従来の技術】
近年、半導体の集積度が飛躍的に向上し、1チップに搭載できる論理回路が膨大になっている。これに伴い、この論理回路の検証に要する期間が非常に長期化し、開発期間の短縮の観点から、検証期間の短縮に対する要求が高まっている。
【0003】
また、検証項目が膨大になる事によるヒューマンエラーが起こりやすくなっており、検証の自動化への要求が高まっている。
【0004】
図2に、共通のメモリーにアクセスする複数のDMAC回路を検証する手法について、従来の実施例を示す。この例ではDMAC回路が2つある場合について説明する。
【0005】
図2において、10、11は検証対象のDMAC回路である。40はDMAC回路10、11を含むChipのイメージであるが、DMAC回路10、11に関連するブロック以外は省略している。メモリーに書くべきデータはそれぞれLogic Block30、31から出力され、Bus50、51を介してDMAC回路10、11に入力される。DMAC回路10、11はそれぞれArbitor80に対してデータ転送要求を出す。Arbitor80はこれらの要求の調停を行い、どちらか一方に対してデータ転送許可信号を発行する。例えばDMAC回路10がこの許可信号を受けた場合、Bus70を通してアドレス、データ等をArbitor80に対して転送する。Arbitor80はBus60を介してMemory Model20にアクセスし、データの書き込みを行う。
【0006】
DMAC回路10、11がそれぞれBus70、71を介して、Arbitor80にデータを転送する間、Expect Data Extractor100、101は、それぞれBus50、51を監視し、Main Memoryに書き込むべき期待値データ(Expected Data)200、201を作成する。
【0007】
DMAC回路10、11が全てのデータを書き終わるとBack Door Memory Reader110、111が起動される。
【0008】
Back Door Memory Reader110、111はそれぞれMemory Model20より書かれたデータを読み出し、実際に書かれたデータ(Actual Data)210、211を作成する。
【0009】
Compareter Model210、211は、それぞれActual Data210とExpected Data110、Acutual Data211とExpected Data111を比較し、DMAC回路10、11がMemory Model20に書いたデータの値が正しい事を確認する。
【0010】
また、DMAC回路の競合の検証を行なうものも考案されている(例えば、特許文献1を参照)。
【0011】
【特許文献1】
特開平6−180658号公報
【0012】
【発明が解決しようとする課題】
しかしこのような方法では、期待するメモリーアドレスの範囲に正しい値が書かれている事は確認できるが、それ以外のところに誤って書かれていないかどうかを確認する事が出来ないという問題があった。
【0013】
これを確認する為には、予めメモリーの全ての領域に任意の値を書き込んでおき、書き込みが行われるべきでない所が、書き換わっていない事をあわせて確認しなければならない。
【0014】
ある一つのDMAC回路がメモリーへの書き込みを終了した時点で、誤ったアドレスに書き込んでいない事を確認するためには、他のDMAC回路がどこまで書き込みを行っているかを把握し、それ以外のところが書き換わっていない事を確認しなければならないという複雑な仕組みを必要とする。すなわち、ある一つのDMAC回路を検証するためのモデルやモニター(テストベンチ)は、他のDMAC回路を検証するためのテストベンチと同期をとりながら動作しなければならない。複雑な仕組みは、テストベンチを作成、デバックする時間をより多く必要とし、また、より大きなテストベンチを必要とするため、シミュレーションの実行時間が長くなり、検証期間を長期化させるという問題があった。
【0015】
この各テストベンチが同期をとる複雑な仕組みを回避しようとした場合には、複数のDMAC回路全てが転送を終了した後に、各DMAC回路が書き込んだデータが正しい事、及び書き込みがされるべきでないアドレスのデータが書き換わっていない事を確認すれば良い。しかし、このような方法では、ある1つのDMAC回路にバグがある場合でも、全てのDMAC回路のMemory転送終了を待たねばならず、バグを発見、修正するTAT(Turnaround Time)が長くなるという問題があった。また、あるDMAC回路はそのメモリー転送終了後、他のDMAC回路のメモリー転送終了を待たずに次のメモリー転送を開始するような回路仕様の場合、この方法では対応できないという問題があった。
【0016】
また、これら全てを解決する方法として波形ツールなどを用いて、目視によりメモリーに書かれた全てのデータ、アドレスを確認する方法も考えられるが、回路の規模から考えると非常に多くの時間がかかり、また、ヒューマンエラーが介在する可能性が多くなるという問題があった。
【0017】
【課題を解決するための手段】
上記問題点を解決するための本発明の検証手法は、従来の様にメモリーに書き込んだ値と期待値とを比較する方法とともに、検証対象となる複数のDMAC回路の出力Busを監視するBusモニターを設け、このBusモニターにメモリー書き込んだデータ数をカウントさせ、このデータ数と期待値とを比較する事を合わせて行う特徴とするものである。
【0018】
また、これら複数のBusモニターは独立に動作し、一方はもう一方の動作に影響されないことを特徴とする。
【0019】
(作用)
本発明の検証手法による作用は、同一のメモリーにアクセスする複数のDMAC回路の機能検証において、書き込んだデータの値が正しい事、及び余計な書き込みを行っていない事を、より小さなテストベンチで、より短時間に、ヒューマンエラーが介在することなく検証出来ることである。
【0020】
また、1つのDMAC回路の検証は他のDMAC回路の動作に影響を受ける事なく、独立して行えるため、より早くバグを見つける事ができ、TATを短縮する事ができる。
【0021】
【発明の実施の形態】
(実施例1)
図1は本発明に関わる検証手法の一実施形態を示すものである。図1において、図2(従来の実施例)を同一の構成要素には同一符号を付した。
【0022】
本実施例では1つのチップ40上に2つのDMAC回路10、11がある場合について、その検証手法を示す。チップ40上では、DMAC回路10,11に関連するブロック以外は省略してある。
【0023】
チップ40上にはDMAC回路10、11があり、それぞれにはLogic Block30、31よりBus50、51を介してデータが入力される。Bus50、51にはそれぞれExpected Data Extractor100、101が接続され、Logic Block30、31がデーを転送中、DMAC回路10、11がメモリーに書くべきデータの期待値(Expected Data)200、201を作成する。
【0024】
DMAC回路10、11はそれぞれArbitor80に対してデータ転送要求を出す。Arbitor80はこれらの要求の調停を行いどちらか一方に対してデータ転送許可信号を発行する。
【0025】
Bus70、71のデータ転送の様子を図3に示す。サイクルaにおいてDMAC回路10はtrq0=1とし、データ転送要求をしている。このバス転送プロトコルでは、trq0と共に書き込み読み出し判別信号wr_not_rd0、及びアドレス信号addr0を発行している。サイクルbではDMAC回路11がtrq1=1とし、データ転送要求をしているのが分かる。Arbitor80はこれら2つの転送要求を調停し、DMAC回路10に対し、サイクルcにおいてtack0=1とし、転送許可を与えている。サイクルdでは、DMAC回路10が転送を許可されたのを受け、trq0=0として転送要求を取り下げ、転送を開始している。このBus転送プロトコルではdata0[63:0]の2ビートアクセスをしている。ここでbyteen0[7:0]信号は、data0[63:0]の書き込み許可信号であり、byteen0[7:0]の1ビットがdata0[63:0]の1バイトを制御する。サイクルeではbyteen0[7:0]==h’FFであり、data0[63:0]の全てのバイト、8バイトが書き込み許可されている。サイクルfではbyteen0[7:0]=h’F8であり、data0[63:0]の上位5バイトが書き込み許可されている。よってこの1回の転送で、8+5=13バイトの転送が行われている事が分かる。このBus70にはBus Monitor130が接続されている。Bus Monitor130はBus70を監視し、転送データ数をカウントする。同様にBus71にはBus Monitor131が接続され、転送データ数をカウントする。
【0026】
Arbitor80はBus70から受け取ったデータをBus60を介してMemory Model20にデータを転送する。
【0027】
どちらかのDMAC回路、例えばDMAC回路10が全てのデータを書き終わるとBack Door Memory Reader110が起動される。
【0028】
Back Door Memory Reader110は、例えば通常のBus60からのアクセスではなく、ソフト的にMain Memory Model20から直接データを読み出せるようなものである。これはシミュレーション時間「0」で読み出す事ができ、シミュレーション時間を短縮する手法として知られている。
【0029】
Back Door Memory Reader110はMain Memory Model20から、DMAC回路10によって書かれたデータを読み出し、実際に書かれたデータ(Actual Data)210を作成する。
【0030】
Compareter Model120はこのActual Data210と前述のExpected Data200を比較し、DMAC回路10がMemory Model20に書いたデータの値が正しい事を確認する。
【0031】
同時に、Bus Monitor130によってカウントされたデータ数をExpected Data110のデータ数と比較し、これらが一致する事を確認する。Bus Monitor130によってカウントされたデータ数の方が多い場合は、必要以上の書き込みが起きており、書き込むべきでないところにアクセスしてメモリー上のデータを壊してしまっている、もしくは冗長な書き込みを行っている事が検出できる。少ない場合は上記Compareter Model120による期待値比較においてもエラーとなるため、従来の方法のみで検出できる。
【0032】
この様に、データの値が正しい事を確認する事、及びデータの数が正しい事を確認する事を合わせて行う事により、予めメモリー上に任意の値を書き込んでおくような動作を必要とせずに、DMAC回路の動作を保証する事が出きる。また、全てのモニター、モデルが独立に動作するため、片方のDMAC回路の検証は、他方のDMAC回路の転送終了を待たずに行う事ができ、Bugの早期発見、修正をを可能とし、TATを短縮する事ができる。
【0033】
ここで、Back Door Memory Reader110、及びCompareter Model120を1組のみ使用しているが、Back DoorMemory Reader110は前述の用にシミュレーション時間0で、直接Memory Model20から読み出す事ができるため、DMAC回路10、11が同時に転送を終了した場合にも、Chip40の動作を止める等の制御する事なく、検証を行う事が出きる。
【0034】
また、片方のDMAC回路がメモリー転送終了後、もう一方のDMAC回路のメモリー転送終了を待たずに次のメモリー転送を開始するような仕様の場合にも対応できる。
【0035】
本実施例においては1つのチップ上に2つのDMAC回路がある場合について示したが、2つ以上のDMAC回路がある場合でも問題ない。
【0036】
また検証対象の複数のDMAC回路が1つのチップ上にある場合について示したが、複数のチップに別れていても問題ない。
【0037】
【発明の効果】
以上のように本発明によれば、DMAC回路が、正しい値が正しい数だけMemoryに書き込めたかどうかを、人手を介することなく、自動的により短時間で検証する事が出来る。
【0038】
また、複数のDMAC回路が1つのメモリーにデータを書き込む場合においても、ある1つのDMAC回路の検証は、他のDMAC回路の検証に影響されることなく、独立に検証を行なう事が出来ため、バグの発見修正のTATをより短縮する事ができる。また、テストベンチを単純化できるため、テストベンチの作成、デバック期間の短縮、及びシミュレーション実行時間の短縮を実現でき、検証期間の短縮を図る事ができる。
【図面の簡単な説明】
【図1】本発明の検証手法の一実施例の構成図
【図2】従来の検証手法の構成図
【図3】本発明の検証対象であるDMAC回路とMemoryをつなぐBusのBusプロトコルを示す図である
【符号の説明】
10,11 DMAC回路
20 Memory Model
30,31 Logic Block
40 Chip
50,51,70,71 内部Bus
60 Memory Bus
80 Arbitor
100,101 Expect Data Extractor
110,111 Back Door Memory Reader
120,121 Comparetor Model
130,131 Bus Monitor
200,201 Expected Data
210,211 Actual Data[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a verification method for logically verifying a DMAC (Direct Memory Access Controller) circuit.
[0002]
[Prior art]
In recent years, the degree of integration of semiconductors has been dramatically improved, and the number of logic circuits that can be mounted on one chip has become enormous. Along with this, the period required for the verification of the logic circuit has become extremely long, and from the viewpoint of shortening the development period, there is an increasing demand for shortening the verification period.
[0003]
In addition, human errors due to an enormous number of verification items are likely to occur, and the demand for automatic verification is increasing.
[0004]
FIG. 2 shows a conventional example of a method for verifying a plurality of DMAC circuits accessing a common memory. In this example, a case where there are two DMAC circuits will be described.
[0005]
In FIG. 2, reference numerals 10 and 11 denote DMAC circuits to be verified. Reference numeral 40 denotes a Chip image including the DMAC circuits 10 and 11, but blocks other than blocks relating to the DMAC circuits 10 and 11 are omitted. Data to be written to the memory is output from Logic Blocks 30 and 31, respectively, and input to DMAC circuits 10 and 11 via Buses 50 and 51, respectively. The DMAC circuits 10 and 11 each issue a data transfer request to the Arbiter 80. The arbiter 80 arbitrates these requests and issues a data transfer permission signal to one of them. For example, when the DMAC circuit 10 receives the permission signal, the DMAC circuit 10 transfers the address, data, and the like to the Arbiter 80 through the Bus 70. The arbiter 80 accesses the memory model 20 via the bus 60 and writes data.
[0006]
While the DMAC circuits 10 and 11 transfer data to the Arbitor 80 via the Buses 70 and 71, respectively, the Expect Data Extractors 100 and 101 monitor the Buses 50 and 51, respectively, and expect data (Expected Data) 200 to be written in the Main Memory. , 201 are created.
[0007]
When the DMAC circuits 10 and 11 finish writing all data, the Back Door Memory Readers 110 and 111 are activated.
[0008]
The Back Door Memory Readers 110 and 111 read data written from the Memory Model 20, respectively, and create data (actual data) 210 and 211 actually written.
[0009]
The Comparator Models 210 and 211 compare the Actual Data 210 and the Expected Data 110, and the Actual Data 211 and the Expected Data 111, respectively, and confirm that the values of the data written in the Memory Model 20 by the DMAC circuits 10 and 11 are correct.
[0010]
Further, a device for verifying competition of the DMAC circuit has been devised (for example, see Patent Document 1).
[0011]
[Patent Document 1]
JP-A-6-180658
[Problems to be solved by the invention]
However, in such a method, it is possible to confirm that the correct value is written in the expected memory address range, but it is not possible to confirm whether the incorrect value is written elsewhere. there were.
[0013]
In order to confirm this, it is necessary to write an arbitrary value in advance in all areas of the memory, and also to confirm that a portion where writing should not be performed has not been rewritten.
[0014]
To confirm that one DMAC circuit has not written to the wrong address when one DMAC circuit has finished writing to memory, it is necessary to know how far the other DMAC circuit has been writing, and It requires a complicated mechanism to check that it has not been rewritten. That is, a model or monitor (test bench) for verifying one DMAC circuit must operate in synchronization with a test bench for verifying another DMAC circuit. The complicated mechanism required more time to create and debug the test bench, and also required a larger test bench, resulting in longer simulation execution times and longer verification periods. .
[0015]
In order to avoid a complicated mechanism in which each test bench synchronizes, after all the plurality of DMAC circuits have completed the transfer, the data written by each DMAC circuit is correct, and writing should not be performed. What is necessary is just to confirm that the data of the address has not been rewritten. However, in such a method, even if a certain DMAC circuit has a bug, it is necessary to wait for the end of the memory transfer of all DMAC circuits, and the TAT (Turnaround Time) for finding and correcting the bug becomes longer. was there. In addition, there is a problem that this method cannot cope with a circuit specification in which a certain DMAC circuit starts the next memory transfer without waiting for the end of the memory transfer of another DMAC circuit after the end of the memory transfer.
[0016]
In order to solve all of these problems, a method of visually confirming all data and addresses written in the memory by using a waveform tool or the like can be considered, but it takes a lot of time considering the circuit scale. In addition, there is a problem that the possibility of human error increases.
[0017]
[Means for Solving the Problems]
The verification method according to the present invention for solving the above-described problems includes a bus monitor for monitoring the output buses of a plurality of DMAC circuits to be verified, as well as a method for comparing a value written to a memory with an expected value as in the related art. The bus monitor monitors the number of data written to the memory, and compares the number of data with an expected value.
[0018]
Further, the plurality of bus monitors operate independently, and one of the bus monitors is not affected by the other operation.
[0019]
(Action)
The effect of the verification method of the present invention is to verify, in a function test of a plurality of DMAC circuits accessing the same memory, that the value of the written data is correct and that no extra writing is performed by using a smaller test bench. It can be verified in a shorter time without human error.
[0020]
Further, since the verification of one DMAC circuit can be performed independently without being affected by the operation of the other DMAC circuit, a bug can be found earlier and the TAT can be shortened.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
(Example 1)
FIG. 1 shows an embodiment of a verification method according to the present invention. In FIG. 1, the same components as those in FIG. 2 (conventional embodiment) are denoted by the same reference numerals.
[0022]
In this embodiment, a verification method for a case where two DMAC circuits 10 and 11 are provided on one chip 40 will be described. On the chip 40, blocks other than the blocks related to the DMAC circuits 10 and 11 are omitted.
[0023]
DMAC circuits 10 and 11 are provided on the chip 40, and data is input to the respective blocks via Buses 50 and 51 from Logic Blocks 30 and 31. The Exposed Data Extractors 100 and 101 are connected to the buses 50 and 51, respectively, and the DMAC circuits 10 and 11 create expected values (Expected Data) 200 and 201 of data to be written in the memory while the Logic Blocks 30 and 31 are transferring data.
[0024]
The DMAC circuits 10 and 11 each issue a data transfer request to the Arbiter 80. The arbiter 80 arbitrates these requests and issues a data transfer permission signal to either one.
[0025]
FIG. 3 shows how the buses 70 and 71 transfer data. In cycle a, the DMAC circuit 10 sets trq0 = 1 and makes a data transfer request. In this bus transfer protocol, a write / read determination signal wr_not_rd0 and an address signal addr0 are issued together with trq0. In cycle b, it can be seen that the DMAC circuit 11 sets trq1 = 1 and makes a data transfer request. The arbiter 80 arbitrates these two transfer requests and gives the DMAC circuit 10 a transfer permission of 0 in cycle c. In the cycle d, in response to the DMAC circuit 10 being permitted the transfer, the transfer request is canceled with trq0 = 0, and the transfer is started. In this Bus transfer protocol, 2-beat access of data0 [63: 0] is performed. Here, the byte0 [7: 0] signal is a write enable signal of data0 [63: 0], and one bit of byte0 [7: 0] controls one byte of data0 [63: 0]. In the cycle e, byte0 [7: 0] == h'FF, and all bytes and 8 bytes of data0 [63: 0] are write-enabled. In cycle f, byte0 [7: 0] = h'F8, and the upper 5 bytes of data0 [63: 0] are write-enabled. Therefore, it can be seen that the transfer of 8 + 5 = 13 bytes is performed in this one transfer. A Bus Monitor 130 is connected to the Bus 70. The Bus Monitor 130 monitors the Bus 70 and counts the number of transfer data. Similarly, a Bus Monitor 131 is connected to the Bus 71 and counts the number of transfer data.
[0026]
The Arbiter 80 transfers the data received from the Bus 70 to the Memory Model 20 via the Bus 60.
[0027]
When one of the DMAC circuits, for example, the DMAC circuit 10 finishes writing all data, the Back Door Memory Reader 110 is activated.
[0028]
The Back Door Memory Reader 110 can read data directly from the Main Memory Model 20 by software, for example, instead of accessing from the normal Bus 60. This can be read out with the simulation time “0” and is known as a technique for shortening the simulation time.
[0029]
The Back Door Memory Reader 110 reads data written by the DMAC circuit 10 from the Main Memory Model 20, and creates data (actual data) 210 actually written.
[0030]
The comparator model 120 compares the actual data 210 with the above-described expected data 200, and confirms that the value of the data written in the memory model 20 by the DMAC circuit 10 is correct.
[0031]
At the same time, the number of data counted by the Bus Monitor 130 is compared with the number of data in the Expected Data 110, and it is confirmed that they match. If the number of data counted by the Bus Monitor 130 is larger, unnecessary writing has occurred, and data that has not been written should be accessed to destroy data on the memory, or redundant writing must be performed. Can be detected. If the number is small, an error occurs even in the expected value comparison by the comparator model 120, so that it can be detected only by the conventional method.
[0032]
In this way, by confirming that the value of the data is correct and by confirming that the number of data is correct, it is necessary to perform an operation of writing an arbitrary value in the memory in advance. Instead, the operation of the DMAC circuit can be guaranteed. In addition, since all monitors and models operate independently, verification of one DMAC circuit can be performed without waiting for the end of transfer of the other DMAC circuit, enabling early detection and correction of Bug, and TAT. Can be shortened.
[0033]
Here, only one set of the Back Door Memory Reader 110 and the Comparator Model 120 is used. However, since the Back Door Memory Reader 110 can be read directly from the Memory Model 20 at the simulation time 0 as described above, the DMAC circuits 10 and 11 can be read directly from the Memory Model 20. At the same time, even when the transfer is completed, the verification can be performed without controlling the operation of the Chip 40 or the like.
[0034]
It is also possible to cope with a specification in which one DMAC circuit starts the next memory transfer without waiting for the other DMAC circuit to finish the memory transfer after the other DMAC circuit has completed the memory transfer.
[0035]
In this embodiment, the case where there are two DMAC circuits on one chip has been described, but there is no problem even when there are two or more DMAC circuits.
[0036]
Although the case where a plurality of DMAC circuits to be verified are on one chip has been described, there is no problem if the DMAC circuits are divided into a plurality of chips.
[0037]
【The invention's effect】
As described above, according to the present invention, the DMAC circuit can automatically verify in a short time whether or not a correct number of correct values can be written in the Memory without manual intervention.
[0038]
Even when a plurality of DMAC circuits write data to one memory, the verification of one DMAC circuit can be independently performed without being affected by the verification of another DMAC circuit. The TAT for finding and fixing bugs can be further reduced. Further, since the test bench can be simplified, the test bench can be created, the debug period can be shortened, and the simulation execution time can be shortened, so that the verification period can be shortened.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of an embodiment of a verification method according to the present invention; FIG. 2 is a configuration diagram of a conventional verification method; FIG. It is a figure.
10, 11 DMAC circuit 20 Memory Model
30,31 Logic Block
40 Chip
50, 51, 70, 71 Internal Bus
60 Memory Bus
80 Arbitor
100,101 Expect Data Data Extractor
110,111 Back Door Memory Reader
120,121 Comparator Model
130,131 Bus Monitor
200,201 Expected Data
210, 211 Actual Data