JP5928128B2 - Simulation method for digital circuit - Google Patents
Simulation method for digital circuit Download PDFInfo
- Publication number
- JP5928128B2 JP5928128B2 JP2012099590A JP2012099590A JP5928128B2 JP 5928128 B2 JP5928128 B2 JP 5928128B2 JP 2012099590 A JP2012099590 A JP 2012099590A JP 2012099590 A JP2012099590 A JP 2012099590A JP 5928128 B2 JP5928128 B2 JP 5928128B2
- Authority
- JP
- Japan
- Prior art keywords
- cpu
- instruction
- digital circuit
- virtual hardware
- model
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Executing Machine-Instructions (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Description
本発明は、デジタル回路用シミュレーション方法に係わり、特にシミュレーション用CPUの命令拡張に関するものである。 The present invention relates to a digital circuit simulation method, and more particularly to instruction expansion of a simulation CPU.
デジタル回路の開発に当たっては、試作品を作る前に、予測できる問題点を検証し、解決することを目的としてハードウェア/ソフトウェアの協調検証が行われる。協調検証方法としては、非特許文献のような方法が公知となっている。 In developing digital circuits, hardware / software co-verification is performed for the purpose of verifying and solving problems that can be predicted before making a prototype. As a collaborative verification method, a method such as a non-patent document is known.
図6は協調検証を行うためのシミュレーション装置の概略を示したもので、1〜5の機能を有する仮想ハードウェア(仮想HW)と実行オブジェクト6からなっている。1はユーザが作成するカスタムLSIなどの被試験論理回路(ASIC)、ROMモデル2とRAMモデル3はソフトウェア動作用のメモリモデル、4はソフトウェア実行部分である実機と等価なCPUモデルで、図7で示すような機能を有している。このCPUモデル4は、図5で示すシミュレータ上で動作するようハードウェア言語で構築される。そして、これら1〜4はバスモデル5によって接続されている。
FIG. 6 shows an outline of a simulation apparatus for performing cooperative verification, and includes virtual hardware (virtual HW) having
実行オブジェクト6は、実機のプリント板で動作するオブジェクトである。
実行オブジェクト6から仮想ハードウェアに対して、コンピュータ(以下CPUという)命令によって生成された指令を出力して初期化し、命令セットが記述されている組込みソフトウェアを読み込んで動作を実行する。実機と等価なCPUモデル4は、実行オブジェクトを読み込むことで実機の時間軸を考慮したソフトウェア動作をシミュレーションできる。
The execution object 6 is an object that operates on the actual printed board.
A command generated by a computer (hereinafter referred to as CPU) instruction is output from the execution object 6 to the virtual hardware and initialized, and the embedded software in which the instruction set is described is read and the operation is executed. The CPU model 4 equivalent to the actual machine can simulate a software operation in consideration of the time axis of the actual machine by reading the execution object.
公技番号2011−502130 Official number 2011-502130
図6で示したような装置を用いてシミュレーションを行う場合、実機のCPUと等価なCPUモデル4は、実機のソフトウェアを正確にシミュレーションすることができる。このため、等価なCPUモデル4を使用した仮想ハードウェア環境を用いた場合、ハードウェア全体の試験を実機ソフトウェアによってシミュレーションすることが可能となっている。 When the simulation is performed using the apparatus as shown in FIG. 6, the CPU model 4 equivalent to the actual CPU can accurately simulate the actual software. For this reason, when a virtual hardware environment using an equivalent CPU model 4 is used, it is possible to simulate a test of the entire hardware using actual machine software.
しかし、実機のCPUと同一の命令セットからなる実機ソフトウェアでは、被試験論理回路の試験には必ずしも効果的でない。例えばイミディエイトデータを扱う命令は命令語のビット長に制限され、制限を越えるビット幅のイミディエイトデータの場合、複数行の命令が必要になり可読性が悪い。また、被試験論理回路の試験にはCPUからROMモデル,RAMモデルに対するアクセス開始時間の調整が必要になる場合があるが、実機のCPUの命令セットだけでは実現が困難である。また、試験において画面表示が必要な場合があるが、画面表示は表示用の表示コントローラが必要になり、さらに表示コントローラ自体を制御するソフトウェアも必要になる。 However, actual software having the same instruction set as the actual CPU is not always effective for testing the logic circuit under test. For example, an instruction that handles immediate data is limited to the bit length of the instruction word, and in the case of immediate data having a bit width exceeding the limit, a plurality of lines of instructions are required, and readability is poor. In addition, the test of the logic circuit under test may require adjustment of the access start time from the CPU to the ROM model and the RAM model, but it is difficult to achieve with only the instruction set of the actual CPU. In some cases, a screen display is required in the test, but a display controller for display is required for the screen display, and software for controlling the display controller itself is also required.
本発明が目的とするとこは、本来の試験を行うために効率的な試験用の実行オブジェクトを提供することにある。 An object of the present invention is to provide an efficient test execution object for performing an original test.
CPUモデルとデジタル回路用の被試験論理回路を有する仮想ハードウェアを、CPU命令から構成されたプログラムによりCPUモデルを介して被試験論理回路の試験をコンピュータで実行する方法において、
実機CPUより広いビット幅のイミディエイトデータを扱う仮想命令群を処理できる機能を前記仮想ハードウェアに備え、
前記プログラムに、仮想ハードウェアに対する実行命令を拡張命令として加えて前記CPUモデルに入力し、
前記仮想ハードウェアは、2ポートメモリと、それぞれに被試験論理回路を有して2ポートメモリに接続された2組のCPUを備え、
前記プログラムによる拡張命令は、実行待ち時間を生成するWAIT拡張命令であり、WAIT拡張命令時に前記2ポートメモリに対する競合タイミングを調整することを特徴としたものである。
In a method for executing a test of a logic circuit under test on a virtual hardware having a CPU model and a logic circuit under test for a digital circuit through a CPU model by a program constituted by CPU instructions,
The virtual hardware has a function capable of processing a virtual instruction group that handles immediate data having a wider bit width than the actual CPU ,
An execution instruction for virtual hardware is added to the program as an extension instruction and input to the CPU model,
The virtual hardware includes a 2-port memory and two sets of CPUs each having a logic circuit under test and connected to the 2-port memory,
The extension instruction by the program is a WAIT extension instruction for generating an execution waiting time, and the contention timing for the 2-port memory is adjusted at the time of the WAIT extension instruction .
更に、本発明は、プログラムによる拡張命令に画面表示を行う拡張命令を持たせ、デジタル回路用シミュレータのコンソールウインドに画面表示することを特徴としたものである。 Furthermore, the present invention is characterized in that an extended instruction for displaying a screen is added to an extended instruction by a program, and the screen is displayed on a console window of a simulator for a digital circuit.
以上のとおり、本発明によれば、仮想ハードウェアに対する実行命令を拡張命令とし、前記実行オブジェクトによる仮想ハードウェアに対する実行命令に拡張命令を追加したことにより、従来のようなCPUの初期設定内容を含んだ実行オブジェクトを必要とせずに、少ない工数でハードウェアに対するデバッグを可能とするものである。また、命令語のビット長に制限を受けないイミディエイトデータ拡張命令としたことで、可読性のよいプログラムミングが可能となるものである。
また、拡張命令は実行待ち時間を生成するものとしたことで、2ポートメモリの競合動作の試験では実機での試験よりも高いカバー率の試験が可能となるものである。
さらに、コンソールウインドで画面表示しながら試験を行う場合においても、画面表示を行うための拡張命令によって、従来のような表示コントローラを制御するソフトウェアを必要とすることなく、画面表示が可能となるものである
As described above, according to the present invention, the execution instruction for the virtual hardware is an extension instruction, and the extension instruction is added to the execution instruction for the virtual hardware by the execution object. Hardware debugging can be performed with a small number of man-hours without requiring an execution object. In addition, since the immediate data extension instruction is not limited by the bit length of the instruction word, programming with good readability is possible.
In addition, since the extended instruction generates an execution waiting time, the test of the competitive operation of the two-port memory enables a test with a higher coverage than the test with the actual machine.
Furthermore, even when a test is performed while displaying the screen on the console window, the screen can be displayed without the need for software for controlling the display controller as in the past by using an extended instruction for displaying the screen. Is
図1は、本発明の実施例を示す仮想ハードウェアの構成図を示したものである。本発明における実行オブジェクト10は、図6で示す実行オブジェクト6の有する機能の他に、拡張命令を供給する機能を備える。また、CPUモデル20は、従来のように実行オブジェクトによるCPU命令で動作するものではなく、実行待ち時間を生成する拡張命令に基づいて動作するCPUモデルに構成される。
FIG. 1 is a configuration diagram of virtual hardware showing an embodiment of the present invention.
仮想ハードウェア上で使用するCPUモデルは、実機のCPUとソフトウェアの互換性は必要不可欠であり、本発明のCPUモデル20も実機のCPUとソフトウェアの互換性を有している。したがって、CPUモデル20は実機CPUが実行できる命令群に加え、実機CPUにはない拡張命令群を処理できる機能が搭載される。また、CPUモデル20は実機のCPUとは異なり、CPUの初期設定内容を備えているため、CPUの初期設定内容を含んだ実行オブジェクトを必要としない。よって、部分的なハードウェアをデバッグするために作成したソフトウェアのみを実行可能である。以下図に基づいて具体的に説明する。 The CPU model used on the virtual hardware must be compatible with the actual CPU and software, and the CPU model 20 of the present invention also has compatibility with the actual CPU and software. Therefore, the CPU model 20 is equipped with a function capable of processing an extended instruction group not found in the actual CPU in addition to an instruction group that can be executed by the actual CPU. Further, unlike the actual CPU, the CPU model 20 has the initial setting contents of the CPU, so that an execution object including the initial setting contents of the CPU is not required. Thus, only software created for debugging partial hardware can be executed. This will be specifically described below with reference to the drawings.
図1の実行オブジェクト10は実機CPUにはない拡張命令群を含んだ実行オブジェクトを実行する。CPUモデル20が実行するオブジェクトも実機のROMに格納されたものと異なる。本発明の仮想CPU20はアセンブラ命令語の文字列を処理することで、命令語のビット数の制限はない。このため、イミディエイトアドレス方式によるイミディエイトデータを扱う命令としたことで、制限を受けずに命令が拡張できて可読性のよいプログラミングに貢献できる。
The
図2は仮想ハードウェアの構成図で、2ポートメモリ30と20A,20Bの2個のCPU(CPU−A,CPU−B)よりなるCPUモデル20から構成される。図2で示す仮想ハードウェアのCPU20A(CPU−A),CPU20B(CPU−B)には図示省略されているが、それぞれには図1で示す被試験論理回路(ASIC)、ROMモデル2とRAMモデル3を備えている。2ポートメモリ30は、CPU−AとCPU−Bの両方よりアクセスできる機能と協調検証を実行するためのシミュレーション機能がプログラム(実行プログラム10A,10B)を有している。
FIG. 2 is a block diagram of the virtual hardware, and is composed of a CPU model 20 comprising a two-
図3は実行オブジェクト10Aと10Bに、例として32ビットイミディエイトデータの0x12345678をレジスタにセットする場合を示したものである。図3(a)は、本来の実機に対する実行オブジェクトが有するCPU命令の1例であるが、本発明での実行オブジェクト10は、さらに(a)図のCPU命令を、図3(b)で示すような拡張命令に1行で実現できる。
FIG. 3 shows a case where 0x12345678 of 32-bit immediate data is set in the execution objects 10A and 10B as an example. FIG. 3A shows an example of the CPU instruction of the execution object for the original actual machine, but the
実行オブジェクト10からは、CPU−A,CPU−Bに対し図4で示すような競合タイミングを発生させる命令が格納され、リードタイミング時におけるCPU−AとCPU−Bは、それぞれ図2で示すように同一のプログラムに基づく動作を実行する。また、実行待ち時間を生成するWAIT拡張命令時では、2ポートメモリ30の競合タイミングを調整しながらハードウェアデバッグを行う。
すなわち、実行待ち時間を生成するWAIT拡張命令は、CPU−AとCPU−Bに対しその待ち時間WAITに差をもたせてタイミング調整しながら試験をする。これによって、競合タイミングを網羅的に作成できるため、実機での試験より高いカバー率での試験が行える。
The
In other words, the WAIT extension instruction for generating the execution waiting time is tested while adjusting the timing of CPU-A and CPU-B with a difference in the waiting time WAIT. As a result, competing timings can be comprehensively created, so that a test with a higher coverage ratio can be performed than a test with an actual machine.
図5はデジタル回路シミュレータ時の実施例である。この実施例は、画面表示を行う拡張命令で、デバッグ中の進行状況の確認に使用する。実機で画面表示を行うには、従来では実機ハードウェアに含まれる表示コントローラを制御するソフトウェアが必要になるが、図5のプログラム例で示すようなPRINT命令を使うことで、表示コントローラを制御するソフトウェアを用いることなく画面表示ができ、その画面表示は、デジタル回路シミュレータのコンソールウインドに表示できる。画面表示を行うPRINT命令はHDL記述の表示系命令(例:$display 、report)を使って実現できる。
なお、仮想ハードウェアは、図1のものが使用される。
FIG. 5 shows an embodiment of the digital circuit simulator. This embodiment is an extension instruction for displaying a screen and is used for checking the progress status during debugging. In order to display the screen on the actual machine, conventionally, software for controlling the display controller included in the actual machine hardware is required. However, the display controller is controlled by using a PRINT instruction as shown in the program example of FIG. The screen can be displayed without using software, and the screen can be displayed on the console window of the digital circuit simulator. The PRINT command that displays the screen can be implemented using HDL description display commands (eg $ display, report).
The virtual hardware shown in FIG. 1 is used.
以上本発明によれば、実行オブジェクトにおいてCPU命令に拡張命令を追加する。2個のCPUと2ポートメモリで構成された仮想ハードウェアに対して待ち時間WAITに差をもたせ、タイミング調整しながらシミュレーションできる。よって、従来のようにCPUの初期設定内容を含んだ実行オブジェクトを必要とせずに、少ない工数でハードウェアに対するデバッグを可能とするものである。 As described above, according to the present invention, the extension instruction is added to the CPU instruction in the execution object. A simulation can be performed while adjusting the timing by setting a difference in the waiting time WAIT for virtual hardware composed of two CPUs and a two-port memory. Therefore, it is possible to debug the hardware with a small number of man-hours without requiring an execution object including the initial setting contents of the CPU as in the prior art.
また、実行オブジェクトからは、命令語のビット長に制限を受けないイミディエイトデータ拡張命令としたことで、可読性のよいプログラムミングが可能となるものである。
また、拡張命令は実行待ち時間を生成するものとしたことで、実機での試験よりも高いカバー率の試験が可能となるものである。
さらに、コンソールウインドで画面表示しながら試験を行う場合においても、画面表示を行うための拡張命令によって、従来のような表示コントローラを制御するソフトウェアを必要とすることなく、画面表示が可能となるものである。
In addition, since the execution object is an immediate data extension instruction that is not limited by the bit length of the instruction word, programming with good readability is possible.
In addition, since the extended instruction generates an execution waiting time, it is possible to perform a test with a higher coverage ratio than a test with an actual machine.
Furthermore, even when a test is performed while displaying the screen on the console window, the screen can be displayed without the need for software for controlling the display controller as in the past by using an extended instruction for displaying the screen. It is.
1… 被試験論理回路(ASIC)
2… ROMモデル
3… RAMモデル
4… 実機と等価なCPUモデル
5… バスモデル
6… 実行オブジェクト
10(10A,10B)… 実行オブジェクト
20(20A,20B)… CPUモデル
30… 2ポートメモリ
1 ... Logic circuit under test (ASIC)
2 ...
Claims (2)
実機CPUより広いビット幅のイミディエイトデータを扱う仮想命令群を処理できる機能を前記仮想ハードウェアに備え、
前記プログラムに、仮想ハードウェアに対する実行命令を拡張命令として加えて前記CPUモデルに入力し、
前記仮想ハードウェアは、2ポートメモリと、それぞれに被試験論理回路を有して2ポートメモリに接続された2組のCPUを備え、
前記プログラムによる拡張命令は、実行待ち時間を生成するWAIT拡張命令であり、WAIT拡張命令時に前記2ポートメモリにおける2組のCPUの競合タイミングを調整することを特徴としたデジタル回路用シミュレーション方法。 In a method for executing a test of a logic circuit under test on a virtual hardware having a CPU model and a logic circuit under test for a digital circuit through a CPU model by a program constituted by CPU instructions,
The virtual hardware has a function capable of processing a virtual instruction group that handles immediate data having a wider bit width than the actual CPU ,
An execution instruction for virtual hardware is added to the program as an extension instruction and input to the CPU model,
The virtual hardware includes a 2-port memory and two sets of CPUs each having a logic circuit under test and connected to the 2-port memory,
The extended instruction by the program, a WAIT extension instructions to generate execution waiting time, the digital circuit simulation method characterized by adjusting the contention timing of two sets of the CPU definitive in the 2-port memory during WAIT extended instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012099590A JP5928128B2 (en) | 2012-04-25 | 2012-04-25 | Simulation method for digital circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012099590A JP5928128B2 (en) | 2012-04-25 | 2012-04-25 | Simulation method for digital circuit |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2013228837A JP2013228837A (en) | 2013-11-07 |
JP2013228837A5 JP2013228837A5 (en) | 2015-04-09 |
JP5928128B2 true JP5928128B2 (en) | 2016-06-01 |
Family
ID=49676417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012099590A Expired - Fee Related JP5928128B2 (en) | 2012-04-25 | 2012-04-25 | Simulation method for digital circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5928128B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3270729B2 (en) * | 1997-12-16 | 2002-04-02 | 三菱電機株式会社 | Extended instruction set simulator |
JP2002082812A (en) * | 2000-09-07 | 2002-03-22 | Seiko Epson Corp | Apparatus and method for developing software and recording medium having software development program recorded thereon |
JP2003330901A (en) * | 2002-05-16 | 2003-11-21 | Yaskawa Electric Corp | Multiprocessor system |
JP5200675B2 (en) * | 2008-06-11 | 2013-06-05 | 富士通株式会社 | SIMULATION DEVICE, SIMULATION METHOD, SIMULATION PROGRAM, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING THE PROGRAM |
-
2012
- 2012-04-25 JP JP2012099590A patent/JP5928128B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2013228837A (en) | 2013-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TW451129B (en) | Semiconductor integrated circuit evaluation system | |
JP4251964B2 (en) | Verification device, verification method, and program | |
US9858371B1 (en) | Method and system for generating post-silicon validation tests | |
CN102521444A (en) | Cooperative simulation/verification method and device for software and hardware | |
US8271252B2 (en) | Automatic verification of device models | |
JP5996125B2 (en) | System construction support device | |
US6185726B1 (en) | System and method for efficiently designing integrated circuit devices | |
US9690681B1 (en) | Method and system for automatically generating executable system-level tests | |
JP6763153B2 (en) | Hardware / software co-verification device and hardware / software co-verification method | |
CN114153674A (en) | Authentication method, authentication apparatus, electronic device, and computer-readable storage medium | |
TW201331775A (en) | Global clock handler object for HDL environment | |
JP4213306B2 (en) | Program debugging device for semiconductor testing | |
JP5928128B2 (en) | Simulation method for digital circuit | |
US9823305B1 (en) | Method and system for generating post-silicon validation tests | |
JP2011039781A (en) | Cooperative simulator and simulation method | |
JP5454349B2 (en) | Performance estimation device | |
JP2007226567A (en) | Circuit simulator and circuit simulation program | |
Choi et al. | Early HW/SW Co-Verification Using Virtual Platforms | |
JP5120103B2 (en) | Debugging method and debugging program | |
JP5387521B2 (en) | Logic verification scenario generation device and logic verification scenario generation program | |
JP4132499B2 (en) | Program debugging device for semiconductor testing | |
Reinbrecht et al. | Applying in education an FPGA-based methodology to prototype ASIC soft cores and test ICs | |
Trost et al. | Logic emulators in digital systems education | |
Lu et al. | Microprocessor modeling and simulation with systemc | |
Kamat | IP testing for heterogeneous SOCs |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150219 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150317 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160105 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160303 |
|
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: 20160329 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160411 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5928128 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |