JP2014085956A - Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method - Google Patents

Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method Download PDF

Info

Publication number
JP2014085956A
JP2014085956A JP2012236084A JP2012236084A JP2014085956A JP 2014085956 A JP2014085956 A JP 2014085956A JP 2012236084 A JP2012236084 A JP 2012236084A JP 2012236084 A JP2012236084 A JP 2012236084A JP 2014085956 A JP2014085956 A JP 2014085956A
Authority
JP
Japan
Prior art keywords
storage area
hardware model
software
simulation
address
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
Application number
JP2012236084A
Other languages
Japanese (ja)
Inventor
Shinichi Ishigaki
信市 石垣
Masaru Terajima
大 寺島
Ryo Kuge
諒 久家
Yasuki Nakamura
泰基 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2012236084A priority Critical patent/JP2014085956A/en
Publication of JP2014085956A publication Critical patent/JP2014085956A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten a processing time required for a cooperative simulation between a hardware model and software.SOLUTION: A simulation device 100 calls an API 112 when software 102 executes a RegWrite instruction or a RegRead instruction. Then, the simulation device 100 loads the processing contents of the API 112 into context information of the software 102, and executes the RegWrite instruction or the RegRead instruction. The called API 112 determines whether an access request is a read request to a specific storage area. When determining that the access request is not the read request to the specific storage area, the API 112 accesses a memory model 103_s and executes access processing for the access request.

Description

本発明は、シミュレーション制御プログラム、シミュレーションプログラム、シミュレーション制御装置、シミュレーション装置、シミュレーション制御方法、およびシミュレーション方法に関する。   The present invention relates to a simulation control program, a simulation program, a simulation control apparatus, a simulation apparatus, a simulation control method, and a simulation method.

従来、ハードウェアの動作を検証する技術がある。たとえば、ハードウェアを模倣するエミュレーション装置が、エミュレーション装置が分割される複数の各クロックドメインに共通の制御情報を分配し、またクロックドメインに個別化したクロック制御を与える技術がある。   Conventionally, there is a technique for verifying hardware operation. For example, there is a technique in which an emulation device that imitates hardware distributes common control information to each of a plurality of clock domains into which the emulation device is divided, and provides individual clock control to the clock domain.

また、ハードウェアモデルとソフトウェアの協調シミュレーションを行う技術がある。たとえば、ソフトウェアシミュレータが保持するメモリモデルに従い検証対象回路を検証する場合にソフトウェアクロックを選択し、ハードウェアエミュレータが保持するメモリモデルに従い検証対象回路を検証する場合にハードウェアクロックを選択する技術がある。また、Central Processing Unit(CPU)以外の周辺デバイスの動作にかかる部分を、ハードウェアの論理シミュレーションで実行し、ソフトウェアの部分を汎用の計算機上で実行する技術がある。また、ハードウェアのシミュレーションを複数のアプリケーションで実現し、実現したアプリケーションを連携動作する技術がある(たとえば、下記特許文献1〜6を参照。)。   In addition, there is a technology for performing a co-simulation of a hardware model and software. For example, there is a technique for selecting a software clock when verifying a verification target circuit according to a memory model held by a software simulator, and selecting a hardware clock when verifying a verification target circuit according to a memory model held by a hardware emulator. . In addition, there is a technique in which a part related to the operation of peripheral devices other than the central processing unit (CPU) is executed by hardware logic simulation, and a software part is executed on a general-purpose computer. In addition, there is a technology that realizes hardware simulation with a plurality of applications, and operates the realized applications in cooperation (see, for example, Patent Documents 1 to 6 below).

特開平8−320804号公報JP-A-8-320804 特開2006−349699号公報JP 2006-349699 A 特開2007−42122号公報JP 2007-42122 A 特開2010−250365号公報JP 2010-250365 A 特開平10−260865号公報Japanese Patent Laid-Open No. 10-260865 特開平11−296408号公報Japanese Patent Laid-Open No. 11-296408

しかしながら、従来技術において、ソフトウェアを検証対象とした協調シミュレーションの実行中に、ハードウェアモデルとソフトウェアとの間で実行権を切り替える処理が頻繁に発生する場合があり、シミュレーション時間の増大化を招く。   However, in the prior art, during execution of the collaborative simulation with software as a verification target, processing for switching execution rights between the hardware model and the software may frequently occur, leading to an increase in simulation time.

本発明は、上述した従来技術による問題点を解消するため、ハードウェアモデルとソフトウェアとの協調シミュレーションにかかる処理時間の短縮化を図るシミュレーション制御プログラム、シミュレーションプログラム、シミュレーション制御装置、シミュレーション装置、シミュレーション制御方法、およびシミュレーション方法を提供することを目的とする。   The present invention eliminates the above-described problems caused by the prior art, and includes a simulation control program, a simulation program, a simulation control apparatus, a simulation apparatus, and a simulation control for shortening the processing time required for the cooperative simulation between the hardware model and the software. It is an object to provide a method and a simulation method.

上述した課題を解決し、目的を達成するため、本発明の一側面によれば、ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中にソフトウェアから呼び出されるシミュレーション制御プログラムであって、ソフトウェアから発生したアクセス要求が、ハードウェアモデルの記憶領域のうちのハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、特定の記憶領域への読込要求か否かを判断し、アクセス要求が特定の記憶領域への読込要求でないと判断した場合、ハードウェアモデルの記憶領域にアクセスして、アクセス要求に対するアクセス処理を実行するシミュレーション制御プログラム、シミュレーション制御装置、およびシミュレーション制御方法が提案される。   In order to solve the above-described problems and achieve the object, according to one aspect of the present invention, a simulation control program called from software during execution of a co-simulation of a hardware model and software, which is generated from the software Whether the access request is a read request to a specific storage area with reference to the storage unit storing the address of the specific storage area whose storage contents are updated by the hardware model of the storage area of the hardware model If the access request is not a read request to a specific storage area, a simulation control program, a simulation control apparatus, and a simulation that access the storage area of the hardware model and execute access processing for the access request A control method is proposed.

また、本発明の他の側面によれば、ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、ソフトウェアから、ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、検出したアクセス要求が、ハードウェアモデルの記憶領域のうちのハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、特定の記憶領域への読込要求か否かを判断し、アクセス要求が特定の記憶領域への読込要求でないと判断した場合、ソフトウェアによって、ハードウェアモデルの記憶領域にアクセスしてアクセス要求に対するアクセス処理を実行するシミュレーションプログラム、シミュレーション装置、およびシミュレーション方法が提案される。   In addition, according to another aspect of the present invention, during execution of the cooperative simulation between the hardware model and the software, it is detected that an access request to the storage area of the hardware model is generated from the software, and the detected access Whether the request is a read request to a specific storage area with reference to the storage unit storing the address of the specific storage area whose storage contents are updated by the hardware model of the storage area of the hardware model When determining and determining that the access request is not a read request to a specific storage area, a simulation program, a simulation apparatus, and a simulation method for accessing the storage area of the hardware model by software and executing access processing for the access request Is proposed.

本発明の一側面によれば、ハードウェアモデルとソフトウェアとの協調シミュレーションにかかる処理時間の短縮化を図ることができるという効果を奏する。   According to one aspect of the present invention, it is possible to reduce the processing time required for the cooperative simulation between the hardware model and the software.

図1は、本実施の形態にかかるシミュレーション装置の動作例を示す説明図である。FIG. 1 is an explanatory diagram illustrating an operation example of the simulation apparatus according to the present embodiment. 図2は、シミュレーション装置のハードウェア構成の一例を示すブロック図である。FIG. 2 is a block diagram illustrating an example of a hardware configuration of the simulation apparatus. 図3は、シミュレーション装置の機能構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a functional configuration example of the simulation apparatus. 図4は、処理テーブルの記憶内容の一例を示す説明図である。FIG. 4 is an explanatory diagram showing an example of the stored contents of the processing table. 図5は、ソフトウェアのソースコードの一例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of software source code. 図6は、メモリモデルのソースコードの一例を示す説明図である。FIG. 6 is an explanatory diagram showing an example of the source code of the memory model. 図7は、ハードウェアモデルのソースコードの一例を示す説明図である。FIG. 7 is an explanatory diagram showing an example of the source code of the hardware model. 図8Aは、ソフトウェアのソースコードとハードウェアモデルのソースコードのビルドの一例を示す説明図である。FIG. 8A is an explanatory diagram illustrating an example of building a software source code and a hardware model source code. 図8Bは、ソフトウェアのソースコードとハードウェアモデルのソースコードのビルドの他の例を示す説明図である。FIG. 8B is an explanatory diagram illustrating another example of building of a software source code and a hardware model source code. 図9Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegWrite命令実行時のシミュレーション処理の一例を示すシーケンス図である。FIG. 9A is a sequence diagram illustrating an example of a simulation process when a RegWrite instruction is executed in a form in which a memory model is included in a hardware model. 図9Bは、本実施の形態におけるRegWrite命令実行時のシミュレーション処理の一例を示すシーケンス図である。FIG. 9B is a sequence diagram illustrating an example of a simulation process when a RegWrite instruction is executed in the present embodiment. 図10Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegRead命令実行時のシミュレーション処理の一例を示すシーケンス図である。FIG. 10A is a sequence diagram illustrating an example of a simulation process when a RegRead instruction is executed in a form in which a memory model is included in a hardware model. 図10Bは、本実施の形態におけるRegRead命令実行時のシミュレーション処理の一例を示すシーケンス図である。FIG. 10B is a sequence diagram illustrating an example of a simulation process when the RegRead instruction is executed in the present embodiment. 図11Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegRead命令実行時のシミュレーション処理の他の例を示すシーケンス図である。FIG. 11A is a sequence diagram illustrating another example of the simulation process when the RegRead instruction is executed in a form in which the memory model is included in the hardware model. 図11Bは、本実施の形態におけるRegRead命令実行時のシミュレーション処理の他の例を示すシーケンス図である。FIG. 11B is a sequence diagram illustrating another example of the simulation process when the RegRead instruction is executed in the present embodiment. 図12は、同一のアドレスに連続してRegWrite命令を行う場合の動作の一例を示すシーケンス図である。FIG. 12 is a sequence diagram illustrating an example of an operation when a RegWrite instruction is continuously performed on the same address. 図13は、シミュレーション処理手順の一例を示すフローチャートである。FIG. 13 is a flowchart illustrating an example of a simulation processing procedure. 図14は、シミュレーション処理手順の他の例を示すフローチャートである。FIG. 14 is a flowchart illustrating another example of the simulation processing procedure. 図15は、RegRead処理手順の一例を示すフローチャートである。FIG. 15 is a flowchart illustrating an example of the RegRead processing procedure. 図16は、アドレスCに対するハードウェアモデル処理手順の一例を示すフローチャートである。FIG. 16 is a flowchart illustrating an example of a hardware model processing procedure for the address C.

以下に添付図面を参照して、開示のシミュレーション制御プログラム、シミュレーションプログラム、シミュレーション制御装置、シミュレーション装置、シミュレーション制御方法、およびシミュレーション方法の実施の形態を詳細に説明する。本実施の形態にかかるシミュレーション制御プログラムについては、検証対象のソフトウェアから呼び出されるApplication Programming Interface(API)として採用された例を用いて説明する。   Exemplary embodiments of a disclosed simulation control program, simulation program, simulation control apparatus, simulation apparatus, simulation control method, and simulation method will be described below in detail with reference to the accompanying drawings. The simulation control program according to the present embodiment will be described using an example adopted as an Application Programming Interface (API) called from the verification target software.

図1は、本実施の形態にかかるシミュレーション装置の動作例を示す説明図である。本実施の形態にかかるシミュレーション装置100は、ハードウェアモデル101とソフトウェア102との協調シミュレーションを行うコンピュータである。図1の(A)では、シミュレーション装置100のソフトウェア構成例について説明する。また、図1の(B)では、シミュレーション装置100の動作例について説明する。   FIG. 1 is an explanatory diagram illustrating an operation example of the simulation apparatus according to the present embodiment. A simulation apparatus 100 according to the present embodiment is a computer that performs cooperative simulation of the hardware model 101 and software 102. In FIG. 1A, a software configuration example of the simulation apparatus 100 will be described. Further, in FIG. 1B, an operation example of the simulation apparatus 100 will be described.

本実施の形態にかかるシミュレーション装置100は、ソフトウェア102を検証対象とした協調シミュレーションを行う。開発者は、協調シミュレーションの結果を用いて、ソフトウェア102の動作が仕様通りの動作となっているかを確認する。一方、ハードウェアモデル101の動作は、ハードウェアモデル101の模擬対象となるハードウェアの動作と異なっていてもよい。本実施の形態にかかるシミュレーション装置100は、ハードウェアモデル101の動作が、模擬対象となるハードウェアの動作と異なっていてもよいことを利用して、協調シミュレーションにかかる処理時間を短縮する。   The simulation apparatus 100 according to the present embodiment performs cooperative simulation with the software 102 as a verification target. The developer confirms whether the operation of the software 102 conforms to the specification using the result of the co-simulation. On the other hand, the operation of the hardware model 101 may be different from the operation of the hardware to be simulated by the hardware model 101. The simulation apparatus 100 according to the present embodiment reduces the processing time required for the cooperative simulation by using the fact that the operation of the hardware model 101 may be different from the operation of the hardware to be simulated.

図1の(A)にて、シミュレーション装置100は、ハードウェアモデル101と、ソフトウェア102と、メモリモデル103_sと、シミュレータ111と、API112と、を含む。   1A, the simulation apparatus 100 includes a hardware model 101, software 102, a memory model 103_s, a simulator 111, and an API 112.

ハードウェアモデル101は、シミュレーション対象システムのうちのハードウェアの動作が記述されたモデルである。具体的に、ハードウェアモデル101は、SystemC、Verilogといったハードウェア記述言語で記述されている。シミュレータ111は、ハードウェアモデル101を読み込んで、ハードウェアモデル101の動作を実行するスレッドを生成する。ハードウェアモデル101の動作を実行するスレッドは、コンテキスト情報を有する。コンテキスト情報は、プログラムの実行に用いられる情報である。ハードウェアモデル101のコンテキスト情報は、たとえば、ハードウェアモデル101が使用する変数の値や、ハードウェアモデル101の状態を示す値である。   The hardware model 101 is a model in which the operation of hardware in the simulation target system is described. Specifically, the hardware model 101 is described in a hardware description language such as SystemC or Verilog. The simulator 111 reads the hardware model 101 and generates a thread for executing the operation of the hardware model 101. A thread that executes the operation of the hardware model 101 has context information. The context information is information used for program execution. The context information of the hardware model 101 is, for example, a value of a variable used by the hardware model 101 or a value indicating the state of the hardware model 101.

さらに、ハードウェアモデル101は、演算処理121を含む。演算処理121は、模擬対象となるハードウェアが実行する処理を、ハードウェア記述言語を用いて表現した処理である。模擬対象となるハードウェアの演算処理は、ハードウェア内の記憶領域に対して行われる処理となる。ハードウェア内の記憶領域は、たとえば、ハードウェアの状態を示すレジスタであったり、ハードウェアが処理に用いるデータを記憶するバッファであったりする。   Further, the hardware model 101 includes a calculation process 121. The arithmetic processing 121 is processing that expresses processing executed by the hardware to be simulated using a hardware description language. The calculation process of the hardware to be simulated is a process performed on a storage area in the hardware. The storage area in the hardware is, for example, a register that indicates the state of the hardware, or a buffer that stores data used by the hardware for processing.

このとき、模擬対象となるハードウェアの演算処理を、開発者により、あるがまま模擬された場合、演算処理121は、ハードウェア内の記憶領域を模したメモリモデル103_rに対して行われる処理となる。しかし、ハードウェアモデル101がハードウェアの動作と異なっていてもよいことを利用し、演算処理121は、ハードウェア内の記憶領域を模しており、かつ、ソフトウェア102から直接アクセス可能なメモリモデル103_sに対して行われる処理とする。なお、開発者は、ハードウェア内の記憶領域のうちの、ソフトウェア102によってアクセスされる記憶領域を、メモリモデル103_sとして定義し、ソフトウェア102によってアクセスされない記憶領域を、メモリモデル103_rとして定義してもよい。以下の説明では、本実施の形態にかかるハードウェアモデル101には、メモリモデル103_rが存在しない場合について説明する。   At this time, when the calculation process of the hardware to be simulated is simulated as it is by the developer, the calculation process 121 is a process performed on the memory model 103_r simulating the storage area in the hardware. Become. However, using the fact that the hardware model 101 may be different from the operation of the hardware, the arithmetic processing 121 imitates a storage area in the hardware and can be directly accessed from the software 102. The processing performed for Note that the developer may define a storage area that is accessed by the software 102 as a memory model 103_s, and define a storage area that is not accessed by the software 102 as a memory model 103_r. Good. In the following description, a case where the memory model 103_r does not exist in the hardware model 101 according to the present embodiment will be described.

ソフトウェア102は、シミュレーション対象システムのうちの模擬対象となるCPUの処理が記述された実行オブジェクトである。具体的に、ソフトウェア102は、C言語、C++言語といった言語で記述されている。シミュレータ111は、ソフトウェア102を読み込んで、模擬対象となるCPUの動作を行うスレッドを生成する。また、模擬対象となるCPUの動作を行うスレッドは、コンテキスト情報を有する。ソフトウェア102のコンテキスト情報は、たとえば、ソフトウェア102が使用する変数の値や、ソフトウェア102の状態を示す値である。   The software 102 is an execution object in which processing of a CPU to be simulated in the simulation target system is described. Specifically, the software 102 is described in a language such as C language or C ++ language. The simulator 111 reads the software 102 and generates a thread for operating the CPU to be simulated. Further, the thread that performs the operation of the CPU to be simulated has context information. The context information of the software 102 is, for example, a variable value used by the software 102 or a value indicating the state of the software 102.

以下、説明を簡略化するため、ハードウェアモデル101の動作を実行するスレッドも、単にハードウェアモデル101と呼称する。同様に、ソフトウェア102を読み込んで、模擬対象となるCPUの動作を行うスレッドも、単にソフトウェア102と呼称する。   Hereinafter, to simplify the description, a thread that executes the operation of the hardware model 101 is also simply referred to as the hardware model 101. Similarly, a thread that reads the software 102 and operates the CPU to be simulated is simply referred to as software 102.

シミュレータ111は、ハードウェアモデル101とソフトウェア102との協調シミュレーションを実行する。具体的に、シミュレータ111は、協調シミュレーションの進行度合いを示すシミュレーション時刻の進行に合わせて、ハードウェアモデル101とソフトウェア102との実行権の切換処理を行う。本実施の形態にかかるシミュレーション装置100は、切換処理の回数を減少させて、シミュレーション時間の短縮化を図る。   The simulator 111 executes a cooperative simulation between the hardware model 101 and the software 102. Specifically, the simulator 111 performs an execution right switching process between the hardware model 101 and the software 102 in accordance with the progress of the simulation time indicating the progress of the cooperative simulation. The simulation apparatus 100 according to the present embodiment reduces the number of switching processes to shorten the simulation time.

ここで、ハードウェアモデル101からソフトウェア102に実行権を切り換える場合を例として、実行権の切換処理について説明する。シミュレータ111は、シミュレーション装置100のCPUのレジスタに設定されているハードウェアモデル101のコンテキスト情報をシミュレーション装置100のRandom Access Memory(RAM)に退避する。次に、シミュレータ111は、シミュレーション装置100のRAMに記憶されているソフトウェア102のコンテキスト情報を、シミュレーション装置100のCPUのレジスタに設定する。以上の処理を実行することにより、シミュレータ111は、ハードウェアモデル101からソフトウェア102に実行権を切り換える。   Here, the execution right switching process will be described by taking as an example the case where the execution right is switched from the hardware model 101 to the software 102. The simulator 111 saves the context information of the hardware model 101 set in the CPU register of the simulation apparatus 100 to a random access memory (RAM) of the simulation apparatus 100. Next, the simulator 111 sets the context information of the software 102 stored in the RAM of the simulation apparatus 100 in the CPU register of the simulation apparatus 100. By executing the above processing, the simulator 111 switches the execution right from the hardware model 101 to the software 102.

API112は、シミュレータ111が提供する機能であり、シミュレータ111を制御する。具体的に、API112は、メモリモデル103_sへの読込処理を提供するRegRead命令と、メモリモデル103_sへの書込処理を提供するRegWrite命令と、を有する。API112が行うシミュレータ111への制御内容として、たとえば、API112の呼び元となったソフトウェア102から実行権を移し、シミュレータ111に対して、ハードウェアモデル101に実行権を設定するように指示する。   The API 112 is a function provided by the simulator 111 and controls the simulator 111. Specifically, the API 112 includes a RegRead instruction that provides a read process to the memory model 103_s and a RegWrite instruction that provides a write process to the memory model 103_s. As a control content to the simulator 111 performed by the API 112, for example, the execution right is transferred from the software 102 that has called the API 112, and the simulator 111 is instructed to set the execution right to the hardware model 101.

次に、図1の(B)にて、シミュレーション装置100の動作例について説明する。図1の(B)では、ソフトウェア102が、“RegWrite(アドレスA,0x02);”を呼び出した例を示している。“RegWrite(アドレスA,0x02);”は、メモリモデル103_s内のアドレスAに対する0x02の書込処理である。   Next, an operation example of the simulation apparatus 100 will be described with reference to FIG. FIG. 1B shows an example in which the software 102 calls “RegWrite (address A, 0x02);”. “RegWrite (address A, 0x02);” is a write process of 0x02 to address A in the memory model 103_s.

シミュレーション装置100は、ソフトウェア102がRegWrite命令またはRegRead命令を実行すると、API112を呼び出す。続けて、シミュレーション装置100は、ソフトウェア102のコンテキスト情報内に、API112の処理内容をロードして、RegWrite命令またはRegRead命令を実行する。シミュレーション装置100は、API112の処理内容に従ってRegWrite命令またはRegRead命令を実行する。   The simulation apparatus 100 calls the API 112 when the software 102 executes a RegWrite instruction or a RegRead instruction. Subsequently, the simulation apparatus 100 loads the processing contents of the API 112 into the context information of the software 102 and executes the RegWrite instruction or the RegRead instruction. The simulation apparatus 100 executes a RegWrite instruction or a RegRead instruction according to the processing content of the API 112.

呼び出されたAPI112は、アクセス要求が特定の記憶領域への読込要求か否かを判断する。ここで、特定の記憶領域とは、メモリモデル103_s内のうちのハードウェアモデル101によって記憶内容が更新される記憶領域のことである。図1の(B)の例では、RegWrite命令が呼び出されたため、書込要求が発生していることから、API112は、アクセス要求が特定の記憶領域への読込要求でないと判断する。   The called API 112 determines whether or not the access request is a read request to a specific storage area. Here, the specific storage area is a storage area whose storage contents are updated by the hardware model 101 in the memory model 103_s. In the example of FIG. 1B, since the RegWrite instruction has been called and a write request has occurred, the API 112 determines that the access request is not a read request to a specific storage area.

アクセス要求が特定の記憶領域への読込要求でないと判断した場合、API112は、メモリモデル103_sにアクセスして、アクセス要求に対するアクセス処理を実行する。図1の(B)の例では、API112は、アドレスAに0x02を書き込んで、書込完了をソフトウェア102に通知する。   If it is determined that the access request is not a read request to a specific storage area, the API 112 accesses the memory model 103_s and executes an access process for the access request. In the example of FIG. 1B, the API 112 writes 0x02 to the address A and notifies the software 102 of the completion of writing.

このように、シミュレーション装置100は、ソフトウェア102のアクセス要求によっては、ハードウェアモデル101に記憶領域に関する処理をさせず、ソフトウェア102から呼び出されるAPI112にて処理する。これにより、シミュレーション装置100は、ハードウェアモデル101とソフトウェア102との切換回数を減少させることができるため、協調シミュレーションにかかる処理時間を短縮することができる。以下、図2〜図16を用いて、シミュレーション装置100について詳細に説明する。   As described above, the simulation apparatus 100 performs processing by the API 112 called from the software 102 without causing the hardware model 101 to perform processing related to the storage area depending on the access request of the software 102. As a result, the simulation apparatus 100 can reduce the number of times of switching between the hardware model 101 and the software 102, so that the processing time required for the cooperative simulation can be shortened. Hereinafter, the simulation apparatus 100 will be described in detail with reference to FIGS.

(シミュレーション装置100のハードウェア)
図2は、シミュレーション装置のハードウェア構成の一例を示すブロック図である。図2において、シミュレーション装置100は、CPU201と、Read‐Only Memory(ROM)202と、RAM203と、を含む。また、シミュレーション装置100は、ディスクドライブ204と、ディスク205と、通信インターフェース206と、を含む。また、シミュレーション装置100は、ディスプレイ207と、キーボード208と、マウス209とを含む。また、CPU201〜マウス209はバス210によってそれぞれ接続されている。
(Hardware of the simulation apparatus 100)
FIG. 2 is a block diagram illustrating an example of a hardware configuration of the simulation apparatus. In FIG. 2, the simulation apparatus 100 includes a CPU 201, a read-only memory (ROM) 202, and a RAM 203. The simulation apparatus 100 includes a disk drive 204, a disk 205, and a communication interface 206. Further, the simulation apparatus 100 includes a display 207, a keyboard 208, and a mouse 209. Further, the CPU 201 to the mouse 209 are respectively connected by a bus 210.

CPU201は、シミュレーション装置100の全体の制御を司る演算処理装置である。ROM202は、ブートプログラムなどのプログラムを記憶する不揮発性メモリである。RAM203は、CPU201のワークエリアとして使用される揮発性メモリである。   The CPU 201 is an arithmetic processing device that controls the entire simulation apparatus 100. The ROM 202 is a non-volatile memory that stores a program such as a boot program. A RAM 203 is a volatile memory used as a work area for the CPU 201.

ディスクドライブ204は、CPU201の制御に従ってディスク205に対するデータのリードおよびライトを制御する制御装置である。ディスクドライブ204には、たとえば、磁気ディスクドライブ、光ディスクドライブ、ソリッドステートドライブなどを採用することができる。ディスク205は、ディスクドライブ204の制御で書き込まれたデータを記憶する不揮発性メモリである。たとえばディスクドライブ204が磁気ディスクドライブである場合、ディスク205には、磁気ディスクを採用することができる。また、ディスクドライブ204が光ディスクドライブである場合、ディスク205には、光ディスクを採用することができる。また、ディスクドライブ204がソリッドステートドライブである場合、ディスク205には、半導体素子メモリを採用することができる。   The disk drive 204 is a control device that controls reading and writing of data with respect to the disk 205 in accordance with the control of the CPU 201. As the disk drive 204, for example, a magnetic disk drive, an optical disk drive, a solid state drive, or the like can be adopted. The disk 205 is a non-volatile memory that stores data written under the control of the disk drive 204. For example, when the disk drive 204 is a magnetic disk drive, a magnetic disk can be adopted as the disk 205. Further, when the disk drive 204 is an optical disk drive, an optical disk can be adopted as the disk 205. When the disk drive 204 is a solid state drive, a semiconductor element memory can be adopted for the disk 205.

通信インターフェース206は、ネットワーク211と内部のインターフェースを司り、外部装置からのデータの入出力を制御する制御装置である。具体的に、通信インターフェース206は、通信回線を通じてネットワーク211となるLocal Area Network(LAN)、Wide Area Network(WAN)、インターネットなどに接続され、ネットワーク211を介して他の装置に接続される。通信インターフェース206には、たとえば、モデムやLANアダプタなどを採用することができる。   The communication interface 206 is a control device that controls an internal interface with the network 211 and controls input / output of data from an external device. Specifically, the communication interface 206 is connected to a local area network (LAN), a wide area network (WAN), the Internet, or the like that is the network 211 through a communication line, and is connected to other devices via the network 211. For example, a modem or a LAN adapter may be employed as the communication interface 206.

ディスプレイ207は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する装置である。ディスプレイ207には、たとえば、Cathode Ray Tube(CRT)、Thin Film Transistor(TFT)液晶ディスプレイ、プラズマディスプレイなどを採用することができる。   The display 207 is a device that displays data such as a cursor, an icon, or a tool box, as well as data such as a document, an image, and function information. As the display 207, for example, a Cathode Ray Tube (CRT), a Thin Film Transistor (TFT) liquid crystal display, a plasma display, or the like can be employed.

キーボード208は、文字、数字、各種指示などの入力のためのキーを有し、データの入力を行う装置である。また、キーボード208は、タッチパネル式の入力パッドやテンキーなどであってもよい。マウス209は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などを行う装置である。マウス209は、ポインティングデバイスとして同様に機能を有するものであれば、トラックボールやジョイスティックなどであってもよい。   The keyboard 208 is a device that has keys for inputting characters, numbers, various instructions, and the like and inputs data. The keyboard 208 may be a touch panel type input pad or a numeric keypad. The mouse 209 is a device for moving a cursor, selecting a range, moving a window, changing a size, and the like. The mouse 209 may be a trackball or a joystick as long as it has the same function as a pointing device.

(シミュレーション装置100の機能構成)
次に、シミュレーション装置100の機能について説明する。図3は、シミュレーション装置の機能構成例を示すブロック図である。シミュレーション装置100は、判断部301と、出力部302と、実行部303とを含む。制御部となる判断部301〜実行部303は、記憶装置に記憶されたプログラムをCPU201が実行することにより、判断部301〜実行部303の機能を実現する。記憶装置とは、具体的には、たとえば、図2に示したROM202、RAM203、ディスク205などである。または、通信インターフェース206を経由して他のCPUが実行することにより、判断部301〜実行部303の機能を実現してもよい。
(Functional configuration of simulation apparatus 100)
Next, functions of the simulation apparatus 100 will be described. FIG. 3 is a block diagram illustrating a functional configuration example of the simulation apparatus. The simulation apparatus 100 includes a determination unit 301, an output unit 302, and an execution unit 303. The determination unit 301 to the execution unit 303 serving as a control unit realize the functions of the determination unit 301 to the execution unit 303 when the CPU 201 executes a program stored in the storage device. Specifically, the storage device is, for example, the ROM 202, the RAM 203, the disk 205, etc. shown in FIG. Alternatively, the functions of the determination unit 301 to the execution unit 303 may be realized by another CPU executing via the communication interface 206.

また、シミュレーション装置100は、処理テーブル310にアクセス可能である。処理テーブル310は、特定の記憶領域のアドレスを記憶する。たとえば、メモリモデル103_sが、アドレスA、アドレスB、アドレスCの記憶内容を記憶するとする。このとき、処理テーブル310には、特定の記憶領域のアドレスとして、アドレスCを記憶する。また、処理テーブル310は、特定の記憶領域が複数ある場合、特定の記憶領域の上限のアドレスと下限のアドレスとを記憶していてもよい。   In addition, the simulation apparatus 100 can access the processing table 310. The processing table 310 stores an address of a specific storage area. For example, it is assumed that the memory model 103_s stores the storage contents of the address A, the address B, and the address C. At this time, the processing table 310 stores an address C as an address of a specific storage area. Further, when there are a plurality of specific storage areas, the processing table 310 may store an upper limit address and a lower limit address of the specific storage area.

また、処理テーブル310は、ハードウェアモデル101の記憶領域のうちの更新処理に用いられる情報の記憶先の記憶領域のアドレスを記憶していてもよい。たとえば、処理テーブル310は、アドレスCの記憶内容が更新される際に、ハードウェアモデル101の更新処理に用いられる情報の記憶先の記憶領域のアドレスであるアドレスAを記憶する。以降の説明では、ハードウェアモデル101の更新処理に用いられる情報の記憶先の記憶領域を、「更新処理に用いられる記憶領域」と称する。また、処理テーブル310は、RAM203、ディスク205といった記憶装置に格納されている。また、処理テーブル310の記憶内容の一例は、図4にて後述する。   Further, the processing table 310 may store the address of the storage area of the storage area of the information used for the update process in the storage area of the hardware model 101. For example, the processing table 310 stores an address A that is an address of a storage area for storing information used for the update processing of the hardware model 101 when the storage content of the address C is updated. In the following description, the storage area of the storage destination of information used for the update process of the hardware model 101 is referred to as “storage area used for the update process”. The processing table 310 is stored in a storage device such as the RAM 203 and the disk 205. An example of the contents stored in the processing table 310 will be described later with reference to FIG.

判断部301は、処理テーブル310を参照して、アクセス要求のアクセス先のアドレスに基づいて、アクセス要求が特定の記憶領域への読込要求か否かを判断してもよい。たとえば、判断部301は、アクセス要求のアクセス先のアドレスが処理テーブル310に記憶されている上限のアドレスと下限のアドレスの間であり、かつ、アクセス要求が読込要求であれば、アクセス要求が特定の記憶領域への読込要求であると判断する。   The determination unit 301 may refer to the processing table 310 to determine whether the access request is a read request to a specific storage area based on the access destination address of the access request. For example, if the access destination address of the access request is between the upper limit address and the lower limit address stored in the processing table 310 and the access request is a read request, the determination unit 301 specifies the access request. Is determined to be a read request to the storage area.

また、判断部301は、処理テーブル310を参照して、アクセス要求のアクセス先のアドレスに基づいて、アクセス要求が更新処理に用いられる記憶領域への書込要求であるか否かを判断する。なお、判断結果は、RAM203、ディスク205などの記憶領域に記憶される。   Further, the determination unit 301 refers to the processing table 310 to determine whether the access request is a write request to the storage area used for the update process, based on the access destination address of the access request. Note that the determination result is stored in a storage area such as the RAM 203 or the disk 205.

出力部302は、判断部301によってアクセス要求が特定の記憶領域への読込要求であると判断された場合、特定の記憶領域を更新する更新処理の実行要求を出力する。たとえば、判断部301が、アクセス要求が特定の記憶領域となるアドレスCへの読込要求であると判断したとする。このとき、出力部302は、アドレスCを更新する更新処理の実行要求を出力する。具体的な出力例として、たとえば、出力部302は、シミュレータ111に、ハードウェアモデル101に対する実行要求を出力する。続けて、シミュレータ111は、実行権をソフトウェア102からハードウェアモデル101に切り換える。実行権を得たハードウェアモデル101は、更新処理を実行する。   When the determination unit 301 determines that the access request is a read request to a specific storage area, the output unit 302 outputs an update process execution request for updating the specific storage area. For example, it is assumed that the determination unit 301 determines that the access request is a read request to the address C serving as a specific storage area. At this time, the output unit 302 outputs an execution request for update processing for updating the address C. As a specific output example, for example, the output unit 302 outputs an execution request for the hardware model 101 to the simulator 111. Subsequently, the simulator 111 switches the execution right from the software 102 to the hardware model 101. The hardware model 101 that has obtained the execution right executes update processing.

実行部303は、判断部301によってアクセス要求が特定の記憶領域への読込要求でないと判断された場合、メモリモデル103_sにアクセスして、アクセス要求に対するアクセス処理を実行する。たとえば、判断部301が、アクセス要求を特定の記憶領域とならない、アドレスBへの読込要求であると判断したとする。このとき、実行部303は、メモリモデル103_sにアクセスして、アドレスBへの読込処理を実行する。また、判断部301が、アクセス要求を特定の記憶領域となる、アドレスCへの書込要求であると判断したとする。このとき、実行部303は、メモリモデル103_sにアクセスして、アドレスCへの書込処理を実行する。   If the determination unit 301 determines that the access request is not a read request to a specific storage area, the execution unit 303 accesses the memory model 103_s and executes access processing for the access request. For example, it is assumed that the determination unit 301 determines that the access request is a read request to the address B that does not become a specific storage area. At this time, the execution unit 303 accesses the memory model 103_s and executes a read process to the address B. Further, it is assumed that the determination unit 301 determines that the access request is a write request to the address C that is a specific storage area. At this time, the execution unit 303 accesses the memory model 103_s and executes a writing process to the address C.

また、実行部303は、出力部302によって実行要求が出力された結果、ハードウェアモデル101によって更新処理が実行された場合、特定の記憶領域を読み込んで、ソフトウェア102に読込結果を通知してもよい。たとえば、実行部303は、ハードウェアモデル101が更新処理を実行して、アドレスCの記憶内容が更新された後、アドレスCの記憶内容を読み込んで、ソフトウェア102に読込結果を通知する。   Further, the execution unit 303 may read a specific storage area and notify the software 102 of the read result when an update process is executed by the hardware model 101 as a result of the execution request output by the output unit 302. Good. For example, after the hardware model 101 executes the update process and the storage content of the address C is updated, the execution unit 303 reads the storage content of the address C and notifies the software 102 of the read result.

また、実行部303は、判断部301によってアクセス要求が更新処理に用いられる記憶領域への書込要求であると判断された場合、バッファに書込要求の書込データを書き込む。書き込んだ後、実行部303は、書込完了通知をソフトウェア102に出力してもよい。また、ソフトウェア102が、書込要求に対する応答を待たずに処理を進める場合、実行部303は、書込完了通知をソフトウェア102に出力しなくともよい。ここで、バッファは、アクセス要求以降に発生する特定の記憶領域への読込要求に対して実行される更新処理に用いられる情報を蓄積するバッファである。バッファは、たとえば、First−In First−Out(FIFO:先入れ先出し)方式を用いて、情報を蓄積する。   If the determination unit 301 determines that the access request is a write request to the storage area used for the update process, the execution unit 303 writes the write data for the write request in the buffer. After the writing, the execution unit 303 may output a writing completion notification to the software 102. When the software 102 proceeds without waiting for a response to the write request, the execution unit 303 may not output a write completion notification to the software 102. Here, the buffer is a buffer for accumulating information used for update processing executed in response to a read request to a specific storage area generated after the access request. The buffer accumulates information using, for example, a first-in first-out (FIFO) method.

たとえば、更新処理に用いられる記憶領域のアドレスをアドレスAとし、特定の記憶領域をアドレスCとする。さらに、ソフトウェア102から2回のアクセス要求が発生したとして、1回目のアクセス要求が、アドレスAに対する書込データ“0x02”の書込要求であるとする。2回目のアクセス要求が、アドレスAに対する書込データ“0x03”の書込要求であるとする。バッファは、1回目のアクセス要求となる書込データ“0x02”と2回目のアクセス要求となる書込データ“0x03”を記憶する。2回目のアクセス要求以降、アドレスCへの読込要求が発生した場合、ハードウェアモデル101は、書込データ“0x02”と書込データ“0x03”とを用いて、アドレスCに対する更新処理を実行する。   For example, an address of a storage area used for update processing is address A, and a specific storage area is address C. Further, suppose that two access requests are generated from the software 102, and the first access request is a write request of the write data “0x02” for the address A. Assume that the second access request is a write request for write data “0x03” for address A. The buffer stores write data “0x02” serving as the first access request and write data “0x03” serving as the second access request. When a read request to address C occurs after the second access request, hardware model 101 executes an update process for address C using write data “0x02” and write data “0x03”. .

ところで、本実施の形態では、API112が呼び出される場合、アクセス要求が発生していることになるため、API112は、アクセス要求の発生を検出しなくてもよい。一方、他の形態として、シミュレータ111が、ハードウェアモデル101とソフトウェア102との協調シミュレーションの実行中に、ソフトウェア102から、ハードウェアモデル101の記憶領域へのアクセス要求が発生したことを検出してもよい。具体的には、シミュレータ111は、ソフトウェア102が実行する命令を監視しており、ソフトウェア102が実行した命令がRegWrite命令かRegRead命令かを検出する。検出した結果は、RAM203、ディスク205などの記憶領域に記憶される。   By the way, in the present embodiment, when the API 112 is called, an access request is generated. Therefore, the API 112 does not need to detect the generation of the access request. On the other hand, as another form, the simulator 111 detects that an access request to the storage area of the hardware model 101 is generated from the software 102 during execution of the cooperative simulation between the hardware model 101 and the software 102. Also good. Specifically, the simulator 111 monitors an instruction executed by the software 102 and detects whether the instruction executed by the software 102 is a RegWrite instruction or a RegRead instruction. The detected result is stored in a storage area such as the RAM 203 and the disk 205.

アクセス要求が発生したことを検出した場合、判断部301〜実行部303が、上述した処理を実行する。判断部301〜実行部303は、API112に含まれていてもよいし、シミュレータ111に含まれていてもよい。   When it is detected that an access request has occurred, the determination unit 301 to the execution unit 303 execute the above-described processing. The determination unit 301 to the execution unit 303 may be included in the API 112 or may be included in the simulator 111.

続けて、図4〜図16を用いて、処理テーブル310の説明と、ハードウェアモデル101と、ソフトウェア102と、シミュレータ111の動作について説明する。また、ハードウェアモデル101について、異なるハードウェアを模した、ハードウェアモデル101#1とハードウェアモデル101#2を用いて説明を行う。   Subsequently, the processing table 310, the hardware model 101, the software 102, and the operation of the simulator 111 will be described with reference to FIGS. The hardware model 101 will be described using a hardware model 101 # 1 and a hardware model 101 # 2 that simulate different hardware.

図4は、処理テーブルの記憶内容の一例を示す説明図である。図4に示す処理テーブル310は、レコード401−1〜401−3を記憶する。処理テーブル310は、指定アドレス、対応ハードウェアモデル、処理内容という3つのフィールドを含む。指定アドレスフィールドには、メモリモデル103_s内のアドレスが格納される。対応ハードウェアモデルフィールドには、アドレスに対して書込を行うハードウェアモデル101の識別情報が格納される。処理内容フィールドには、ハードウェアモデル101またはソフトウェア102が指定アドレスに対して実行する処理内容が格納される。   FIG. 4 is an explanatory diagram showing an example of the stored contents of the processing table. The processing table 310 illustrated in FIG. 4 stores records 401-1 to 401-3. The processing table 310 includes three fields: a designated address, a corresponding hardware model, and processing contents. In the designated address field, an address in the memory model 103_s is stored. The corresponding hardware model field stores identification information of the hardware model 101 that writes to the address. The processing content field stores processing content executed by the hardware model 101 or the software 102 on the designated address.

たとえば、レコード401−1は、指定アドレスがアドレスAであり、アドレスAに対して書き込むハードウェアモデル101が無いことを示す。さらに、レコード401−1は、アドレスAに対するWriteアクセス時には、処理内容が、ソフトウェア102がアドレスAに書込データを書き込むことを示す。また、レコード401−1は、アドレスAに対するReadアクセス時には、処理内容が、ソフトウェア102がアドレスAを読み込むことを示す。   For example, the record 401-1 indicates that the designated address is the address A and there is no hardware model 101 to be written to the address A. Further, the record 401-1 indicates that the processing content writes that the software 102 writes the write data to the address A at the time of Write access to the address A. In addition, the record 401-1 indicates that the content of processing indicates that the software 102 reads the address A at the time of Read access to the address A.

また、レコード401−3は、指定アドレスがアドレスCであり、アドレスCに対して書き込むハードウェアモデル101がハードウェアモデル101#1であることを示す。さらに、レコード401−3は、アドレスCに対するReadアクセス時には、処理内容が、ハードウェアモデル101#1がアドレスAとアドレスBの和をアドレスCに書き込んだ後、ソフトウェア102がアドレスCを読み込むことを示す。   Further, the record 401-3 indicates that the designated address is the address C and the hardware model 101 written to the address C is the hardware model 101 # 1. Further, in the record 401-3, at the time of Read access to the address C, the processing content is that the software 102 reads the address C after the hardware model 101 # 1 writes the sum of the address A and the address B to the address C. Show.

また、処理テーブル310は、更新処理に用いられる記憶領域であるか否かを示す識別子を格納するフィールドを有していてもよい。たとえば、アドレスAについて格納するレコード401−1は、更新処理に用いられる記憶領域であることを示す識別子を有してもよい。同様に、たとえば、アドレスBについて格納するレコード401−2は、更新処理に用いられる記憶領域でないことを示す識別子を有してもよい。   Further, the processing table 310 may have a field for storing an identifier indicating whether or not the storage area is used for update processing. For example, the record 401-1 stored for the address A may have an identifier indicating that it is a storage area used for update processing. Similarly, for example, the record 401-2 stored for the address B may have an identifier indicating that it is not a storage area used for update processing.

図5は、ソフトウェアのソースコードの一例を示す説明図である。図5では、ソフトウェアソースコード501に含まれる、行番号0001〜行番号0003について説明する。行番号0001の命令“RegWrite(アドレスA,0x02);”は、アドレスAに値0x02を書き込むことを示す。行番号0002の命令“RegWrite(アドレスB,0x03);”は、アドレスBに値0x03を書き込むことを示す。行番号0003の命令“Result=RegRead(アドレスC);”は、アドレスCから演算結果を読み込むことを示す。   FIG. 5 is an explanatory diagram showing an example of software source code. In FIG. 5, the line numbers 0001 to 0003 included in the software source code 501 will be described. The instruction “RegWrite (address A, 0x02);” at line number 0001 indicates that the value 0x02 is written to address A. The instruction “RegWrite (address B, 0x03);” at line number 0002 indicates that the value 0x03 is written to address B. The instruction “Result = RegRead (address C);” of the line number 0003 indicates that the operation result is read from the address C.

図6は、メモリモデルのソースコードの一例を示す説明図である。図6では、メモリモデルソースコード601に含まれる、アドレスA〜アドレスCのソースコードを示す。アドレスA〜アドレスCは、int型にて定義されている。また、更新処理に用いられる記憶領域であって、同じアドレスに連続してアクセスされる可能性がある場合には、開発者は配列にて定義してもよい。たとえば、更新処理に用いられる記憶領域となるアドレスAが2回連続してアクセスされる可能性がある場合、開発者は“int アドレスA[2];”として定義する。さらに、アドレスA[2]を先入れ先出し方式にてアクセスするため、開発者は、アドレスA[2]に対するリードポインタ、ライトポインタを定義してもよい。リードポインタ、ライトポインタは、API112、ハードウェアモデル101にて用いられる。   FIG. 6 is an explanatory diagram showing an example of the source code of the memory model. FIG. 6 shows source codes of address A to address C included in the memory model source code 601. Address A to address C are defined as an int type. Further, when there is a possibility that the storage area used for the update process is continuously accessed to the same address, the developer may define it by an array. For example, when there is a possibility that the address A serving as a storage area used for the update process is accessed twice in succession, the developer defines it as “int address A [2];”. Furthermore, in order to access the address A [2] by the first-in first-out method, the developer may define a read pointer and a write pointer for the address A [2]. The read pointer and the write pointer are used in the API 112 and the hardware model 101.

図7は、ハードウェアモデルのソースコードの一例を示す説明図である。図7では、ハードウェアモデルソースコード701に含まれる、ハードウェアモデル記述言語に従って、ハードウェアモデル101の動作を記述したソースコードを示している。図7に示すハードウェアモデルソースコード701は、ハードウェアモデル101#1のヘッダファイルとなる“hw1_model.h”と、ソースファイルとなる“hw1_model.c”を示している。“hw1_model.h”は、ハードウェアモデル101#1の入出力のポートとプロセスの宣言を行っている。“hw1_model.c”は、ハードウェアモデル101#1のプロセスの実装を記述している。   FIG. 7 is an explanatory diagram showing an example of the source code of the hardware model. FIG. 7 shows source code describing the operation of the hardware model 101 according to the hardware model description language included in the hardware model source code 701. The hardware model source code 701 illustrated in FIG. 7 indicates “hw1_model.h” that is a header file of the hardware model 101 # 1 and “hw1_model.c” that is a source file. “Hw1_model.h” declares input / output ports and processes of the hardware model 101 # 1. “Hw1_model.c” describes the implementation of the process of the hardware model 101 # 1.

図8Aは、ソフトウェアのソースコードとハードウェアモデルのソースコードのビルドの一例を示す説明図である。図8Aでは、命令セットレベルでシミュレーションを行う命令セットシミュレータを用いた場合の、ビルドの一例を示す。ビルドとは、実行オブジェクトを生成する処理のことであり、具体的には、ソースコードから中間言語ファイルを生成するコンパイルと、中間言語ファイルを結合して実行オブジェクトを生成するリンクとを行う。ビルドを行う装置は、シミュレーション装置100でもよいし、他の装置でもよい。図8Aおよび図8Bでは、シミュレーション装置100がビルドを行う例にて説明する。   FIG. 8A is an explanatory diagram illustrating an example of building a software source code and a hardware model source code. FIG. 8A shows an example of a build when an instruction set simulator that performs simulation at the instruction set level is used. The build is a process for generating an execution object, and specifically, compiling to generate an intermediate language file from source code and linking to generate an execution object by combining the intermediate language files. The apparatus that performs the build may be the simulation apparatus 100 or another apparatus. 8A and 8B will be described using an example in which the simulation apparatus 100 performs a build.

用語の定義として、協調シミュレーションの模擬対象となるCPUを、「ターゲット」と呼称する。また、ターゲットが実行可能なコードを、「ターゲットコード」と呼称する。一方、CPU201が実行可能なコードを、「ネイティブコード」と呼称する。   As a definition of terms, a CPU that is a simulation target of a cooperative simulation is referred to as a “target”. The code that can be executed by the target is referred to as “target code”. On the other hand, code executable by the CPU 201 is referred to as “native code”.

シミュレーション装置100は、ソフトウェアソースコード501を、ターゲット用にコンパイルおよびリンクして、ターゲットコードで記述されたソフトウェア実行オブジェクト801を生成する。ソフトウェア実行オブジェクト801には、RegRead命令またはRegWrite命令が呼ぶコードが含まれる。また、シミュレーション装置100は、ハードウェアモデルソースコード701とAPIソースコード802とを、ネイティブ用にコンパイルおよびリンクして、ネイティブコードで記述されたハードウェアモデル実行オブジェクト803を生成する。APIソースコード802は、API112の処理内容が記述されたソースコードである。   The simulation apparatus 100 compiles and links the software source code 501 for the target, and generates a software execution object 801 described in the target code. The software execution object 801 includes a code called by the RegRead instruction or RegWrite instruction. Further, the simulation apparatus 100 compiles and links the hardware model source code 701 and the API source code 802 for native use, and generates a hardware model execution object 803 described in the native code. The API source code 802 is source code in which the processing content of the API 112 is described.

シミュレータ111は、ソフトウェア実行オブジェクト801を、Instruction Set Simulator(ISS)810を用いて読み込んで、ソフトウェア102を生成する。また、シミュレータ111は、ハードウェアモデル実行オブジェクト803を読み込んでハードウェアモデル101を生成する。   The simulator 111 reads the software execution object 801 by using an Instruction Set Simulator (ISS) 810 and generates the software 102. Further, the simulator 111 reads the hardware model execution object 803 and generates the hardware model 101.

図8Bは、ソフトウェアのソースコードとハードウェアモデルのソースコードのビルドの他の例を示す説明図である。図8Bは、ISS810を用いない例を示している。   FIG. 8B is an explanatory diagram illustrating another example of building of a software source code and a hardware model source code. FIG. 8B shows an example in which the ISS 810 is not used.

シミュレーション装置100は、ソフトウェアソースコード501を、ネイティブ用にコンパイルおよびリンクして、ネイティブコードで記述されたソフトウェア実行オブジェクト804を生成する。ソフトウェア実行オブジェクト804には、RegRead命令またはRegWrite命令が呼ぶコードが含まれる。ハードウェアモデルソースコード701とAPIソースコード802のコンパイル、リンクについては図8Aと同等であるため、説明を省略する。   The simulation apparatus 100 compiles and links the software source code 501 for native, and generates a software execution object 804 described in the native code. The software execution object 804 includes code called by the RegRead instruction or the RegWrite instruction. The compiling and linking of the hardware model source code 701 and the API source code 802 are the same as those in FIG.

シミュレータ111は、ソフトウェア実行オブジェクト804とハードウェアモデル実行オブジェクト803を読み込んでソフトウェア102とハードウェアモデル101を生成する。   The simulator 111 reads the software execution object 804 and the hardware model execution object 803 to generate the software 102 and the hardware model 101.

以下、図9A〜図11Bにて、RegWrite命令実行時と、RegRead命令実行時のシーケンス図を示す。図9Aと図9Bでは、RegWrite命令実行時のシーケンス図を示す。図10Aと図10Bでは、特定の記憶領域へのRegRead命令実行時のシーケンス図を示す。図11Aと図11Bでは、特定の記憶領域でない記憶領域へのRegRead命令実行時のシーケンス図を示す。   9A to 11B show sequence diagrams when the RegWrite instruction is executed and when the RegRead instruction is executed. 9A and 9B show sequence diagrams when the RegWrite instruction is executed. 10A and 10B show sequence diagrams when a RegRead instruction is executed to a specific storage area. 11A and 11B show sequence diagrams when the RegRead instruction is executed to a storage area that is not a specific storage area.

図9Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegWrite命令実行時のシミュレーション処理の一例を示すシーケンス図である。図9Aにおいて、ソフトウェア102は、“RegWrite(アドレスA,0x02);”を実行する(ステップS901)。アドレスAに値0x02を書き込むため、実行権がシミュレータ111に切り替わり、シミュレータ111は、アドレスAに対応する処理内容を実行するハードウェアモデル101を選択する(ステップS902)。本実施の形態では、アドレスAに対応するハードウェアモデルがハードウェアモデル101#2であるとする。   FIG. 9A is a sequence diagram illustrating an example of a simulation process when a RegWrite instruction is executed in a form in which a memory model is included in a hardware model. In FIG. 9A, the software 102 executes “RegWrite (address A, 0x02);” (step S901). Since the value 0x02 is written to the address A, the execution right is switched to the simulator 111, and the simulator 111 selects the hardware model 101 that executes the processing content corresponding to the address A (step S902). In the present embodiment, it is assumed that the hardware model corresponding to address A is hardware model 101 # 2.

次に、シミュレータ111は、実行権をハードウェアモデル101#2に設定する(ステップS903)。実行権を得たハードウェアモデル101#2は、アドレスAに値0x02を書き込む(ステップS904)。ハードウェアモデル101#2の処理が終了したため、シミュレータ111は、実行権をシミュレータ111に設定する(ステップS905)。続けて、シミュレータ111は、実行権をソフトウェア102に設定する(ステップS906)。実行権を得たソフトウェア102は、次の命令を実行する。   Next, the simulator 111 sets the execution right to the hardware model 101 # 2 (step S903). The hardware model 101 # 2 that has obtained the execution right writes the value 0x02 to the address A (step S904). Since the processing of the hardware model 101 # 2 is completed, the simulator 111 sets the execution right in the simulator 111 (step S905). Subsequently, the simulator 111 sets the execution right in the software 102 (step S906). The software 102 that has obtained the execution right executes the following instruction.

図9Bは、本実施の形態におけるRegWrite命令実行時のシミュレーション処理の一例を示すシーケンス図である。図9Bにおいて、ソフトウェア102は、“RegWrite(アドレスA,0x02);”を実行することにより、アドレスAに値0x02を書き込む(ステップS951)。続けて、ソフトウェア102は、次の命令を実行する。   FIG. 9B is a sequence diagram illustrating an example of a simulation process when a RegWrite instruction is executed in the present embodiment. In FIG. 9B, the software 102 writes “0x02” to the address A by executing “RegWrite (address A, 0x02);” (step S951). Subsequently, the software 102 executes the next instruction.

ここで、図9Aと図9Bの実行結果を用いて、実行権の切換回数について説明する。図9Aでは、ステップS901、ステップS903、ステップS905、ステップS906にて実行権の切換が行われており、実行権の切換回数は4回である。一方、図9Bでは、実行権の切換が行われておらず、実行権の切換回数は0回である。このように、ソフトウェア102が実行する命令群にRegWrite命令が含まれる場合、シミュレーション装置100は、実行権の切換回数が少なくなるため、協調シミュレーションにかかる処理時間を短縮することができる。   Here, the number of execution rights switching will be described using the execution results of FIGS. 9A and 9B. In FIG. 9A, execution rights are switched in steps S901, S903, S905, and S906, and the number of execution rights switching is four. On the other hand, in FIG. 9B, the execution right is not switched, and the number of execution right switching is zero. As described above, when the RegWrite instruction is included in the instruction group executed by the software 102, the simulation apparatus 100 can reduce the processing time required for the co-simulation because the number of execution rights switching is reduced.

図10Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegRead命令実行時のシミュレーション処理の一例を示すシーケンス図である。図10Aにおいて、ソフトウェア102は、“Result=RegRead(アドレスC);”を実行する(ステップS1001)。アドレスCを読み込むため、実行権がシミュレータ111に切り替わり、シミュレータ111は、アドレスCに対応するハードウェアモデル101を選択する(ステップS1002)。本実施の形態では、アドレスCに対応するハードウェアモデル101がハードウェアモデル101#1であるとする。   FIG. 10A is a sequence diagram illustrating an example of a simulation process when a RegRead instruction is executed in a form in which a memory model is included in a hardware model. In FIG. 10A, the software 102 executes “Result = RegRead (address C);” (step S1001). Since the address C is read, the execution right is switched to the simulator 111, and the simulator 111 selects the hardware model 101 corresponding to the address C (step S1002). In the present embodiment, it is assumed that hardware model 101 corresponding to address C is hardware model 101 # 1.

次に、シミュレータ111は、実行権をハードウェアモデル101#1に設定する(ステップS1003)。実行権を得たハードウェアモデル101#1は、アドレスCに対応する処理内容を取得する(ステップS1004)。次に、ハードウェアモデル101#1は、処理内容の引数の1つ目となるアドレスAの値を読み込む(ステップS1005)。同様に、ハードウェアモデル101#1は、処理内容の引数の2つ目となるアドレスBの値を読み込む(ステップS1006)。   Next, the simulator 111 sets the execution right to the hardware model 101 # 1 (step S1003). The hardware model 101 # 1 that has obtained the execution right acquires the processing content corresponding to the address C (step S1004). Next, the hardware model 101 # 1 reads the value of the address A, which is the first argument of the processing content (step S1005). Similarly, hardware model 101 # 1 reads the value of address B, which is the second argument of the processing content (step S1006).

引数を読み込んだため、ハードウェアモデル101#1は、処理内容となる“アドレスC=アドレスA+アドレスB”を実行する(ステップS1007)。具体的に、ハードウェアモデル101#1は、アドレスCの値を、アドレスAの値0x02+アドレスBの値0x03=0x05として算出する。次に、ハードウェアモデル101#1は、アドレスCに演算結果を書き込む(ステップS1008)。また、ハードウェアモデル101#1は、演算結果をソフトウェア102に通知する(ステップS1009)。続けて、ハードウェアモデル101#1の処理が終了したため、シミュレータ111は、実行権をシミュレータ111に設定する(ステップS1010)。   Since the argument is read, the hardware model 101 # 1 executes “address C = address A + address B” as the processing content (step S1007). Specifically, the hardware model 101 # 1 calculates the value of the address C as the value of the address A 0x02 + the value of the address B 0x03 = 0x05. Next, the hardware model 101 # 1 writes the calculation result at the address C (step S1008). Also, the hardware model 101 # 1 notifies the software 102 of the calculation result (step S1009). Subsequently, since the processing of the hardware model 101 # 1 is completed, the simulator 111 sets the execution right in the simulator 111 (step S1010).

続けて、シミュレータ111は、実行権をソフトウェア102に設定する(ステップS1011)。実行権を得たソフトウェア102は、ハードウェアモデル101#1から受け付けた値をResultに設定する(ステップS1012)。続けて、ソフトウェア102は、次の命令を実行する。   Subsequently, the simulator 111 sets an execution right in the software 102 (step S1011). The software 102 that has obtained the execution right sets the value received from the hardware model 101 # 1 to Result (step S1012). Subsequently, the software 102 executes the next instruction.

図10Bは、本実施の形態におけるRegRead命令実行時のシミュレーション処理の一例を示すシーケンス図である。図10Bにおいて、ステップS1055〜ステップS1058は、ステップS1005〜ステップS1008と同一の処理内容であるため、説明を省略する。   FIG. 10B is a sequence diagram illustrating an example of a simulation process when the RegRead instruction is executed in the present embodiment. In FIG. 10B, steps S1055 to S1058 have the same processing contents as steps S1005 to S1008, and thus description thereof is omitted.

図10Bにおいて、ソフトウェア102は、“Result=RegRead(アドレスC);”を実行する(ステップS1051)。アドレスCを読み込むため、実行権がシミュレータ111に切り替わり、シミュレータ111は、アドレスCの値を更新する処理内容を実行するハードウェアモデル101を選択する(ステップS1052)。本実施の形態では、アドレスCの値を更新する処理内容を実行するハードウェアモデル101がハードウェアモデル101#1であるとする。   In FIG. 10B, the software 102 executes “Result = RegRead (address C);” (step S1051). In order to read the address C, the execution right is switched to the simulator 111, and the simulator 111 selects the hardware model 101 that executes the processing content for updating the value of the address C (step S1052). In the present embodiment, it is assumed that hardware model 101 that executes the processing content for updating the value of address C is hardware model 101 # 1.

次に、シミュレータ111は、実行権をハードウェアモデル101#1に設定する(ステップS1053)。実行権を得たハードウェアモデル101#1は、アドレスCの値を更新する処理内容を取得する(ステップS1054)。次に、ハードウェアモデル101#1は、ステップS1055の処理を実行する。   Next, the simulator 111 sets the execution right to the hardware model 101 # 1 (step S1053). The hardware model 101 # 1 that has obtained the execution right acquires the processing content for updating the value of the address C (step S1054). Next, the hardware model 101 # 1 executes the process of step S1055.

ステップS1058の処理実行後、ハードウェアモデル101#1の処理が終了したため、シミュレータ111は、実行権をシミュレータ111に設定する(ステップS1059)。続けて、シミュレータ111は、実行権をソフトウェア102に設定する(ステップS1060)。実行権を得たソフトウェア102は、アドレスCの値を読み込む(ステップS1061)。次に、ソフトウェア102は、読み込んだ値をResultに設定する(ステップS1062)。続けて、ソフトウェア102は、次の命令を実行する。   Since the processing of the hardware model 101 # 1 is completed after the processing of step S1058, the simulator 111 sets an execution right for the simulator 111 (step S1059). Subsequently, the simulator 111 sets an execution right in the software 102 (step S1060). The software 102 that has obtained the execution right reads the value of the address C (step S1061). Next, the software 102 sets the read value to Result (step S1062). Subsequently, the software 102 executes the next instruction.

ここで、図10Aと図10Bの実行結果を用いて、実行権の切換回数について説明する。図10Aでは、ステップS1001、ステップS1003、ステップS1010、ステップS1011にて実行権の切換が行われており、実行権の切換回数は4回である。一方、図10Bでは、ステップS1051、ステップS1053、ステップS1059、ステップS1060にて実行権の切換が行われており、実行権の切換回数は4回である。このように、特定のアドレスへのRegRead命令が含まれる場合、シミュレーション装置100の実行権の切換回数は、メモリモデル103_sがハードウェアモデル101に含まれる形態におけるシミュレーション装置と実行権の切換回数と同一となる。   Here, the number of execution rights switching will be described using the execution results of FIGS. 10A and 10B. In FIG. 10A, execution rights are switched in steps S1001, S1003, S1010, and S1011. The number of execution rights switching is four. On the other hand, in FIG. 10B, execution rights are switched in steps S1051, S1053, S1059, and S1060, and the number of execution rights switching is four. As described above, when the RegRead instruction to a specific address is included, the number of times of execution right switching of the simulation apparatus 100 is the same as the number of times of execution right switching with the simulation apparatus in the form in which the memory model 103_s is included in the hardware model 101. It becomes.

図11Aは、メモリモデルがハードウェアモデルに含まれる形態におけるRegRead命令実行時のシミュレーション処理の他の例を示すシーケンス図である。図11Aにおいて、ソフトウェア102は、“Result=RegRead(アドレスA);”を実行する(ステップS1101)。アドレスAを読み込むため、実行権がシミュレータ111に切り替わり、シミュレータ111は、アドレスAに対応したハードウェアモデル101を選択する(ステップS1102)。本実施の形態では、アドレスAに対応するハードウェアモデル101がハードウェアモデル101#2であるとする。   FIG. 11A is a sequence diagram illustrating another example of the simulation process when the RegRead instruction is executed in a form in which the memory model is included in the hardware model. In FIG. 11A, the software 102 executes “Result = RegRead (address A);” (step S1101). Since the address A is read, the execution right is switched to the simulator 111, and the simulator 111 selects the hardware model 101 corresponding to the address A (step S1102). In the present embodiment, it is assumed that hardware model 101 corresponding to address A is hardware model 101 # 2.

次に、シミュレータ111は、実行権をハードウェアモデル101#2に設定する(ステップS1103)。実行権を得たハードウェアモデル101#2は、アドレスAから値を読み込む(ステップS1104)。次に、ハードウェアモデル101#2は、読み込んだ値をソフトウェア102に通知する(ステップS1105)。続けて、ハードウェアモデル101#2の処理が終了したため、シミュレータ111は、実行権をシミュレータ111に設定する(ステップS1106)。続けて、シミュレータ111は、実行権をソフトウェア102に設定する(ステップS1107)。実行権を得たソフトウェア102は、ハードウェアモデル101#2から受け付けた値をResultに設定する(ステップS1108)。続けて、ソフトウェア102は、次の命令を実行する。   Next, the simulator 111 sets the execution right to the hardware model 101 # 2 (step S1103). The hardware model 101 # 2 that has obtained the execution right reads a value from the address A (step S1104). Next, the hardware model 101 # 2 notifies the software 102 of the read value (step S1105). Subsequently, since the processing of the hardware model 101 # 2 is completed, the simulator 111 sets the execution right in the simulator 111 (step S1106). Subsequently, the simulator 111 sets an execution right in the software 102 (step S1107). The software 102 that has obtained the execution right sets the value received from the hardware model 101 # 2 to Result (step S1108). Subsequently, the software 102 executes the next instruction.

図11Bは、本実施の形態におけるRegRead命令実行時のシミュレーション処理の他の例を示すシーケンス図である。図11Bにおいて、ソフトウェア102は、“Result=RegRead(アドレスA);”を実行する(ステップS1151)。アドレスAを読み込むため、実行権がシミュレータ111に切り替わり、シミュレータ111は、処理テーブル310を参照して、アドレスAの値を更新する処理内容を実行するハードウェアモデル101を選択する(ステップS1152)。図4に示したように、レコード401−1の対応ハードウェアモデルフィールドには、Aの値を更新する処理内容を実行するハードウェアモデル101が無いことを示す“無し”が格納されている。したがって、シミュレータ111は、アドレスAに対応するハードウェアモデル101が無いと判断し、実行権をソフトウェア102に設定する(ステップS1153)。   FIG. 11B is a sequence diagram illustrating another example of the simulation process when the RegRead instruction is executed in the present embodiment. In FIG. 11B, the software 102 executes “Result = RegRead (address A);” (step S1151). In order to read the address A, the execution right is switched to the simulator 111, and the simulator 111 refers to the processing table 310 and selects the hardware model 101 that executes the processing content for updating the value of the address A (step S1152). As shown in FIG. 4, “None” indicating that there is no hardware model 101 that executes the processing content for updating the value of A is stored in the corresponding hardware model field of the record 401-1. Therefore, the simulator 111 determines that there is no hardware model 101 corresponding to the address A, and sets the execution right in the software 102 (step S1153).

実行権を得たソフトウェア102は、アドレスAから値を読み込む(ステップS1154)。次に、ソフトウェア102は、読み込んだ値をResultに設定する(ステップS1155)。続けて、ソフトウェア102は、次の命令を実行する。   The software 102 that has obtained the execution right reads a value from the address A (step S1154). Next, the software 102 sets the read value to Result (step S1155). Subsequently, the software 102 executes the next instruction.

ここで、図11Aと図11Bの実行結果を用いて、実行権の切換回数について説明する。図11Aでは、ステップS1101、ステップS1103、ステップS1106、ステップS1107にて実行権の切換が行われており、実行権の切換回数は4回である。一方、図11Bでは、ステップS1151、ステップS1153にて実行権の切換が行われており、実行権の切換回数は2回である。このように、ソフトウェア102が実行する命令群に特定の記憶領域でない記憶領域へのRegRead命令が含まれる場合、シミュレーション装置100は、実行権の切換回数が少なくなるため、協調シミュレーションにかかる処理時間を短縮することができる。   Here, the number of execution rights switching will be described using the execution results of FIGS. 11A and 11B. In FIG. 11A, execution rights are switched in steps S1101, S1103, S1106, and S1107, and the number of execution rights switching is four. On the other hand, in FIG. 11B, execution rights are switched in steps S1151 and S1153, and the number of execution rights switching is two. In this way, when the instruction group executed by the software 102 includes a RegRead instruction to a storage area that is not a specific storage area, the simulation apparatus 100 reduces the number of times of execution right switching, and therefore reduces the processing time required for the cooperative simulation. It can be shortened.

図12は、同一のアドレスに連続してRegWrite命令を行う場合の動作の一例を示すシーケンス図である。図12にて示すソフトウェア102は、行番号0002の命令が“RegWrite(アドレスB,0x03);”から“RegWrite(アドレスA,0x03);”に開発者によって書き換えられている。また、API112は、メモリモデル103_sのアドレスAに記憶される値を、先入れ先出し方式を用いて、FIFOバッファ1201に記憶する。また、処理テーブル310のアドレスCの処理内容フィールドに、“Readアクセス時 ハードウェアモデル101#1:アドレスC=アドレスAに書き込まれた値の合計値 ソフトウェア:アドレスCを読込”が格納されている。   FIG. 12 is a sequence diagram illustrating an example of an operation when a RegWrite instruction is continuously performed on the same address. In the software 102 shown in FIG. 12, the instruction of the line number 0002 has been rewritten by the developer from “RegWrite (address B, 0x03);” to “RegWrite (address A, 0x03);”. Further, the API 112 stores the value stored in the address A of the memory model 103_s in the FIFO buffer 1201 using the first-in first-out method. In the processing content field of the address C in the processing table 310, “Read access hardware model 101 # 1: address C = total value written to address A software: read address C” is stored. .

ソフトウェア102は、行番号0001の命令を読み込んで“RegWrite(アドレスA,0x02);”を実行することにより、アドレスAに値0x02を書き込む(ステップS1201)。ステップS1201の処理について、ソフトウェア102は、FIFOバッファ1201に0x02をエンキューする。具体的な実装として、ソフトウェア102から呼ばれたAPI112が、FIFOバッファ1201のライトポインタが示す位置に0x02を書き込み、ライトポインタの値をインクリメントする。   The software 102 reads the instruction at the line number 0001 and executes “RegWrite (address A, 0x02);” to write the value 0x02 to the address A (step S1201). For the processing in step S1201, the software 102 enqueues 0x02 in the FIFO buffer 1201. As a specific implementation, the API 112 called from the software 102 writes 0x02 to the position indicated by the write pointer in the FIFO buffer 1201, and increments the value of the write pointer.

次に、ソフトウェア102は、行番号0002の命令を読み込んで“RegWrite(アドレスA,0x03);”を実行することにより、アドレスAに値0x03を書き込む(ステップS1202)。ステップS1202の処理について、ソフトウェア102は、FIFOバッファ1201に0x03をエンキューする。具体的な実装として、ソフトウェア102から呼ばれたAPI112が、FIFOバッファ1201のライトポインタが示す位置に0x03を書き込み、ライトポインタの値をインクリメントする。   Next, the software 102 reads the instruction of the line number 0002 and executes “RegWrite (address A, 0x03);” to write the value 0x03 to the address A (step S1202). For the processing in step S1202, the software 102 enqueues 0x03 into the FIFO buffer 1201. As a specific implementation, the API 112 called from the software 102 writes 0x03 to the position indicated by the write pointer in the FIFO buffer 1201, and increments the value of the write pointer.

続けて、ソフトウェア102は、行番号0003の命令を読み込んで“RegRead(アドレスC);”を実行する(ステップS1203)。図12では図示していないが、シミュレータ111は、処理テーブル310を参照して、アドレスCの値を更新する処理内容があるか検索する。図12の場合、アドレスCの値を更新する処理内容が有ると判断し、シミュレータ111は、実行権を、処理内容を実行するハードウェアモデル101#1に設定する。このとき、処理内容は、アドレスAに書き込まれた値の合計値を算出し、算出した値をアドレスCに書き込む処理とする。   Subsequently, the software 102 reads the instruction of the line number 0003 and executes “RegRead (address C);” (step S1203). Although not shown in FIG. 12, the simulator 111 refers to the processing table 310 and searches for processing contents for updating the value of the address C. In the case of FIG. 12, it is determined that there is processing content for updating the value of the address C, and the simulator 111 sets the execution right to the hardware model 101 # 1 that executes the processing content. At this time, the processing content is a process of calculating the total value written to the address A and writing the calculated value to the address C.

ハードウェアモデル101#1は、アドレスCの値を更新する処理内容を取得する(ステップS1204)。ハードウェアモデル101#1は、処理内容の引数となるアドレスAから値を読み込む。このとき、ハードウェアモデル101#1は、FIFOバッファ1201に格納された値を全て読み込む。具体的に、ハードウェアモデル101#1は、FIFOバッファ1201から0x02を読み込む(ステップS1205)。続けて、ハードウェアモデル101#1は、FIFOバッファ1201から0x03を読み込む(ステップS1206)。具体的な実装として、ハードウェアモデル101#1は、FIFOバッファ1201の、リードポインタが示す位置の値を読み込んで、リードポインタをインクリメントする。続けて、ハードウェアモデル101#1は、リードポインタとライトポインタが一致するまで読込を続ける。   The hardware model 101 # 1 acquires the processing content for updating the value of the address C (step S1204). The hardware model 101 # 1 reads a value from an address A that is an argument of processing contents. At this time, the hardware model 101 # 1 reads all the values stored in the FIFO buffer 1201. Specifically, the hardware model 101 # 1 reads 0x02 from the FIFO buffer 1201 (step S1205). Subsequently, the hardware model 101 # 1 reads 0x03 from the FIFO buffer 1201 (step S1206). As a specific implementation, the hardware model 101 # 1 reads the value of the position indicated by the read pointer in the FIFO buffer 1201, and increments the read pointer. Subsequently, the hardware model 101 # 1 continues reading until the read pointer matches the write pointer.

引数を読み込んだため、ハードウェアモデル101#1は、処理内容となる“アドレスAに書き込まれた値の合計値の算出処理”を実行する(ステップS1207)。具体的に、ハードウェアモデル101#1は、アドレスCの値を、1回目にアドレスAに書き込まれた値0x02+2回目にアドレスAに書き込まれた値0x03=0x05として算出する。次に、ハードウェアモデル101#1は、アドレスCに算出した値となる0x05を書き込む(ステップS1208)。   Since the argument is read, the hardware model 101 # 1 executes “calculation processing of the total value written in the address A” which is the processing content (step S1207). Specifically, the hardware model 101 # 1 calculates the value of the address C as a value 0x02 written to the address A for the first time + 0x03 = 0x05 written to the address A for the second time. Next, the hardware model 101 # 1 writes 0x05, which is the calculated value, at the address C (step S1208).

続けて、ハードウェアモデル101#1の処理が終了したため、シミュレータ111は、実行権をソフトウェア102に設定する。実行権を得たソフトウェア102は、アドレスCの値0x05をResultに設定する(ステップS1209)。続けて、ソフトウェア102は、次の命令を実行する。続けて、図13〜図16にて、シミュレーション処理のフローチャートを説明する。図13〜図16のフローチャートにて、アドレスAが更新処理に用いられる記憶領域であり、アドレスCが特定の記憶領域であり、アドレスBが更新処理に用いられる記憶領域でもなく、特定の記憶領域でもないものとして、説明する。   Subsequently, since the processing of the hardware model 101 # 1 is completed, the simulator 111 sets the execution right in the software 102. The software 102 that has obtained the execution right sets the value 0x05 of the address C to Result (step S1209). Subsequently, the software 102 executes the next instruction. Subsequently, a flowchart of the simulation process will be described with reference to FIGS. 13 to 16, the address A is a storage area used for the update process, the address C is a specific storage area, and the address B is not a storage area used for the update process, but a specific storage area. However, I will explain it as something that is not.

図13は、シミュレーション処理手順の一例を示すフローチャートである。シミュレーション処理は、ハードウェアモデル101とソフトウェア102の協調シミュレーションを行う処理である。シミュレーション装置100は、シミュレータ111により、実行権をソフトウェア102に設定する(ステップS1301)。次に、シミュレーション装置100は、ソフトウェア102により、1命令を読み込む(ステップS1302)。続けて、シミュレーション装置100は、ソフトウェア102により、読み込んだ命令の種類を確認する(ステップS1303)。読み込んだ命令の種類がRegWrite命令である場合(ステップS1303:RegWrite命令)、シミュレーション装置100は、ソフトウェア102から呼ばれたAPI112により、RegWrite命令で指定されたアドレスを確認する(ステップS1304)。   FIG. 13 is a flowchart illustrating an example of a simulation processing procedure. The simulation process is a process for performing a co-simulation of the hardware model 101 and the software 102. The simulation apparatus 100 sets the execution right in the software 102 by the simulator 111 (step S1301). Next, the simulation apparatus 100 reads one command by the software 102 (step S1302). Subsequently, the simulation apparatus 100 confirms the type of the read instruction using the software 102 (step S1303). When the type of the read instruction is a RegWrite instruction (step S1303: RegWrite instruction), the simulation apparatus 100 checks the address specified by the RegWrite instruction using the API 112 called from the software 102 (step S1304).

アドレスAである場合(ステップS1304:アドレスA)、シミュレーション装置100は、API112により、アドレスAのFIFOバッファ1201にRegWrite命令で指定された値を書き込む(ステップS1305)。また、アドレスAとは異なる他のアドレスである場合(ステップS1304:他のアドレス)、シミュレーション装置100は、API112により、他のアドレスにRegWrite命令で指定された値を書き込む(ステップS1306)。ステップS1305、またはステップS1306の処理終了後、API112は処理を終了する。続けて、シミュレーション装置100は、ステップS1302の処理に移行する。   When the address is A (step S1304: address A), the simulation apparatus 100 writes the value specified by the RegWrite instruction to the FIFO buffer 1201 of the address A by the API 112 (step S1305). If the address is other than the address A (step S1304: other address), the simulation apparatus 100 writes the value specified by the RegWrite instruction to the other address by the API 112 (step S1306). After the process of step S1305 or step S1306, the API 112 ends the process. Subsequently, the simulation apparatus 100 proceeds to the process of step S1302.

読み込んだ命令の種類がRegRead命令である場合(ステップS1303:RegRead命令)、シミュレーション装置100は、API112により、RegRead処理を実行する(ステップS1307)。RegRead処理の詳細は、図15にて後述する。ステップS1307の終了後、シミュレーション装置100は、ステップS1302の処理に移行する。また、読み込んだ命令の種類が、RegWrite命令およびRegRead命令とは異なる他の命令である場合(ステップS1303:他の命令)、シミュレーション装置100は、ソフトウェア102により、他の命令に従った処理を実行する。実行後、シミュレーション装置100は、ステップS1302の処理に移行する。   When the type of the read instruction is a RegRead instruction (step S1303: RegRead instruction), the simulation apparatus 100 executes a RegRead process using the API 112 (step S1307). Details of the RegRead process will be described later with reference to FIG. After the end of step S1307, the simulation apparatus 100 proceeds to the process of step S1302. When the type of the read instruction is another instruction different from the RegWrite instruction and RegRead instruction (step S1303: other instruction), the simulation apparatus 100 executes processing according to the other instruction by the software 102. To do. After execution, the simulation apparatus 100 proceeds to the process of step S1302.

図14は、シミュレーション処理手順の他の例を示すフローチャートである。図14にて示すシミュレーション処理は、アクセス要求をシミュレータ111にて検出する処理の例である。   FIG. 14 is a flowchart illustrating another example of the simulation processing procedure. The simulation process shown in FIG. 14 is an example of a process for detecting an access request by the simulator 111.

シミュレーション装置100は、シミュレータ111により、実行権をソフトウェア102に設定する(ステップS1401)。次に、シミュレーション装置100は、シミュレータ111により、RegWrite命令かRegRead命令が呼ばれたことを検出したか否かを判断する(ステップS1402)。検出していない場合(ステップS1402:No)、シミュレーション装置100は、一定時間経過後、ステップS1402の処理を再び実行する。検出した場合(ステップS1402:Yes)、シミュレーション装置100は、シミュレータ111により、呼ばれた命令の種類を確認する(ステップS1403)。   The simulation apparatus 100 sets the execution right in the software 102 by the simulator 111 (step S1401). Next, the simulation apparatus 100 determines whether the simulator 111 detects that a RegWrite instruction or a RegRead instruction is called (step S1402). If not detected (step S1402: No), the simulation apparatus 100 executes the process of step S1402 again after a predetermined time has elapsed. If detected (step S1402: Yes), the simulation apparatus 100 confirms the type of the called instruction by the simulator 111 (step S1403).

呼ばれた命令の種類がRegWrite命令である場合(ステップS1403:RegWrite命令)、シミュレーション装置100は、ソフトウェア102から呼ばれたAPI112により、RegWrite命令で指定されたアドレスを確認する(ステップS1404)。   When the type of the called instruction is a RegWrite instruction (step S1403: RegWrite instruction), the simulation apparatus 100 checks the address specified by the RegWrite instruction using the API 112 called from the software 102 (step S1404).

アドレスAである場合(ステップS1404:アドレスA)、シミュレーション装置100は、API112により、アドレスAのFIFOバッファ1201にRegWrite命令で指定された値を書き込む(ステップS1405)。また、アドレスAとは異なる他のアドレスである場合(ステップS1404:他のアドレス)、シミュレーション装置100は、API112により、他のアドレスにRegWrite命令で指定された値を書き込む(ステップS1406)。ステップS1405、または、ステップS1406の終了後、API112は処理を終了する。続けて、シミュレーション装置100は、ステップS1402の処理に移行する。   When the address is A (step S1404: address A), the simulation apparatus 100 writes the value specified by the RegWrite instruction to the FIFO buffer 1201 of the address A by the API 112 (step S1405). If the address is other than the address A (step S1404: other address), the simulation apparatus 100 writes the value specified by the RegWrite instruction to the other address by the API 112 (step S1406). After step S1405 or step S1406 ends, the API 112 ends the process. Subsequently, the simulation apparatus 100 proceeds to the process of step S1402.

呼ばれた命令の種類がRegRead命令である場合(ステップS1403:RegRead命令)、シミュレーション装置100は、API112により、RegRead処理を実行する(ステップS1407)。ステップS1407の終了後、シミュレーション装置100は、ステップS1402の処理に移行する。   When the type of the called instruction is a RegRead instruction (step S1403: RegRead instruction), the simulation apparatus 100 executes a RegRead process using the API 112 (step S1407). After the end of step S1407, the simulation apparatus 100 proceeds to the process of step S1402.

図15は、RegRead処理手順の一例を示すフローチャートである。シミュレーション装置100は、API112により、実行権をシミュレータ111に設定する(ステップS1501)。次に、シミュレーション装置100は、RegRead命令で指定されたアドレスを確認する(ステップS1502)。   FIG. 15 is a flowchart illustrating an example of the RegRead processing procedure. The simulation apparatus 100 sets an execution right in the simulator 111 using the API 112 (step S1501). Next, the simulation apparatus 100 confirms the address specified by the RegRead instruction (step S1502).

指定されたアドレスがアドレスCである場合(ステップS1502:アドレスC)、シミュレーション装置100は、シミュレータ111により、アドレスCに対するハードウェアモデル処理を実行する(ステップS1503)。ハードウェアモデル処理の詳細については、図16にて後述する。ステップS1503の実行後、シミュレーション装置100は、シミュレータ111により、実行権をソフトウェア102に設定する(ステップS1504)。次に、シミュレーション装置100は、ソフトウェア102から呼ばれているAPI112により、アドレスCから値を読み込む(ステップS1505)。続けて、シミュレーション装置100は、API112により、読み込んだ値をResultに設定する(ステップS1506)。ステップS1506の実行終了後、シミュレーション装置100は、RegRead処理を終了する。   When the designated address is address C (step S1502: address C), the simulation apparatus 100 executes hardware model processing for address C by the simulator 111 (step S1503). Details of the hardware model processing will be described later with reference to FIG. After executing step S1503, the simulation apparatus 100 sets the execution right in the software 102 by the simulator 111 (step S1504). Next, the simulation apparatus 100 reads a value from the address C by the API 112 called from the software 102 (step S1505). Subsequently, the simulation apparatus 100 sets the read value to Result using the API 112 (step S1506). After completing the execution of step S1506, the simulation apparatus 100 ends the RegRead process.

指定されたアドレスがアドレスAである場合(ステップS1502:アドレスA)、シミュレーション装置100は、シミュレータ111により、実行権をソフトウェア102に設定する(ステップS1507)。次に、シミュレーション装置100は、ソフトウェア102から呼ばれているAPI112により、アドレスAから値を読み込む(ステップS1508)。続けて、シミュレーション装置100は、API112により、読み込んだ値をResultに設定する(ステップS1509)。ステップS1509の実行終了後、シミュレーション装置100は、RegRead処理を終了する。   When the designated address is address A (step S1502: address A), the simulation apparatus 100 sets the execution right in the software 102 by the simulator 111 (step S1507). Next, the simulation apparatus 100 reads a value from the address A by the API 112 called from the software 102 (step S1508). Subsequently, the simulation apparatus 100 sets the read value to Result using the API 112 (step S1509). After completing the execution of step S1509, the simulation apparatus 100 ends the RegRead process.

指定されたアドレスが、アドレスCともアドレスAとも異なる他のアドレスである場合(ステップS1502:他のアドレス)、シミュレーション装置100は、シミュレータ111により、実行権をソフトウェア102に設定する。次に、シミュレーション装置100は、ソフトウェア102から呼ばれているAPI112により、アドレスAから値を読み込んで、読み込んだ値をResultに設定する。続けて、シミュレーション装置100は、RegRead処理を終了する。   When the designated address is another address different from both the address C and the address A (step S1502: another address), the simulation apparatus 100 sets the execution right in the software 102 by the simulator 111. Next, the simulation apparatus 100 reads a value from the address A by the API 112 called from the software 102, and sets the read value to Result. Subsequently, the simulation apparatus 100 ends the RegRead process.

図16は、アドレスCに対するハードウェアモデル処理手順の一例を示すフローチャートである。シミュレーション装置100は、シミュレータ111により、実行権をハードウェアモデル101#1に設定する(ステップS1601)。次に、シミュレーション装置100は、ハードウェアモデル101#1により、処理テーブル310の処理内容フィールドを基に、アドレスAの値を読み込む(ステップS1602)。続けて、シミュレーション装置100は、ハードウェアモデル101#1により、処理テーブル310の処理内容フィールドを基に、アドレスBの値を読み込む(ステップS1603)。次に、シミュレーション装置100は、ハードウェアモデル101#1により、アドレスAの値にアドレスBの値を加算する(ステップS1604)。   FIG. 16 is a flowchart illustrating an example of a hardware model processing procedure for the address C. The simulation apparatus 100 sets the execution right to the hardware model 101 # 1 using the simulator 111 (step S1601). Next, the simulation apparatus 100 reads the value of the address A using the hardware model 101 # 1 based on the processing content field of the processing table 310 (step S1602). Subsequently, the simulation apparatus 100 reads the value of the address B by the hardware model 101 # 1 based on the processing content field of the processing table 310 (step S1603). Next, the simulation apparatus 100 adds the value of the address B to the value of the address A using the hardware model 101 # 1 (step S1604).

続けて、シミュレーション装置100は、ハードウェアモデル101#1により、加算した値をアドレスCに書き込む(ステップS1605)。次に、シミュレーション装置100は、ハードウェアモデル101#1により、実行権をシミュレータ111に設定する(ステップS1606)。ステップS1606の実行終了後、シミュレーション装置100は、ハードウェアモデル処理を終了する。   Subsequently, the simulation apparatus 100 writes the added value to the address C using the hardware model 101 # 1 (step S1605). Next, the simulation apparatus 100 sets an execution right in the simulator 111 using the hardware model 101 # 1 (step S1606). After completing the execution of step S1606, the simulation apparatus 100 ends the hardware model process.

以上説明したように、API112、シミュレータ111によれば、ソフトウェア102によるハードウェアモデル101のレジスタへのアクセス要求が、ソフトウェア102からの読込時に更新されるレジスタへの読込要求でなければAPI112が処理する。これにより、シミュレーション装置100は、ハードウェアモデル101に実行権を渡さずに済むため、ソフトウェア102の検証時間を短縮することができる。   As described above, according to the API 112 and the simulator 111, if the access request to the register of the hardware model 101 by the software 102 is not a read request to the register updated when reading from the software 102, the API 112 processes. . As a result, the simulation apparatus 100 does not have to give the execution right to the hardware model 101, so that the verification time of the software 102 can be shortened.

また、API112、シミュレータ111によれば、ソフトウェア102からのアクセス要求が、ソフトウェア102からの読込時に更新されるレジスタへの読込要求であれば、ハードウェアモデル101に処理させる。これにより、シミュレーション装置100は、実際の処理結果と、シミュレーションの処理結果とを同一にすることができる。   Further, according to the API 112 and the simulator 111, if the access request from the software 102 is a read request to a register updated when reading from the software 102, the hardware model 101 is processed. Thereby, the simulation apparatus 100 can make the actual processing result and the simulation processing result the same.

また、API112、シミュレータ111によれば、ソフトウェア102からのアクセス要求が、読込時に更新されるレジスタの更新処理に用いられる情報の記憶先となるレジスタへの書込要求であれば、バッファに書込要求の書込データを書き込んでもよい。これにより、実際にはソフトウェア102からの書込要求の度にハードウェアが処理するといった一連の処理群がある場合でも、シミュレーション装置100は、実際の処理結果と、シミュレーションの処理結果とを同一にすることができる。   Further, according to the API 112 and the simulator 111, if the access request from the software 102 is a write request to a register serving as a storage destination of information used for update processing of a register updated at the time of reading, the data is written to the buffer. The requested write data may be written. As a result, even when there is a series of processing groups in which the hardware processes each time a write request from the software 102 actually exists, the simulation apparatus 100 makes the actual processing result and the simulation processing result the same. can do.

また、シミュレーション対象システムとして組み込みシステムを想定することがあり、この場合、組み込みシステム内のプロセッサが行う処理は、他のハードウェアに対するアクセスを行う処理が、全体の大半を占める場合がある。したがって、メモリモデル103_sがハードウェアモデル101に含まれる形態におけるシミュレーション装置は、ハードウェアモデル101とソフトウェア102を切り換える回数が多くなる。一方、本実施の形態にかかるシミュレーション装置100は、協調シミュレーションにかかる処理時間を大きく削減することができる。   In some cases, an embedded system is assumed as the simulation target system. In this case, the processing performed by the processor in the embedded system may occupy most of the processing for accessing other hardware. Therefore, in the simulation apparatus in which the memory model 103_s is included in the hardware model 101, the number of times of switching between the hardware model 101 and the software 102 increases. On the other hand, the simulation apparatus 100 according to the present embodiment can greatly reduce the processing time required for the cooperative simulation.

また、メモリモデル103_rがハードウェアモデル101に含まれる形態における本実施の形態であっても、ソフトウェア102は、RegRead命令やRegWrite命令を提供するAPIを呼び出している。したがって、メモリモデル103_rがハードウェアモデル101に含まれる形態から、本実施の形態に対応する際、開発者は、ソフトウェア102の記述を変更しなくて済む。開発者は、ソフトウェア102に、本実施の形態にかかるAPI112を合わせてコンパイル、リンクするだけで、本実施の形態にかかるシミュレーション環境を得ることができる。   Even in the present embodiment in which the memory model 103_r is included in the hardware model 101, the software 102 calls an API that provides a RegRead instruction and a RegWrite instruction. Therefore, when the memory model 103_r is included in the hardware model 101 and corresponds to this embodiment, the developer does not need to change the description of the software 102. The developer can obtain the simulation environment according to the present embodiment only by compiling and linking the software 112 with the API 112 according to the present embodiment.

なお、本実施の形態で説明したシミュレーション方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本シミュレーションプログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本シミュレーションプログラムは、インターネット等のネットワークを介して配布してもよい。   The simulation method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. The simulation program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The simulation program may be distributed through a network such as the Internet.

上述した本実施の形態に関し、さらに以下の付記を開示する。   The following additional notes are disclosed with respect to the above-described embodiment.

(付記1)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御プログラムであって、
コンピュータに、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する、
処理を実行させることを特徴とするシミュレーション制御プログラム。
(Supplementary Note 1) A simulation control program called from the software during execution of a co-simulation between a hardware model and software,
On the computer,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. Determine whether it is a read request to the area,
If it is determined that the access request is not a read request to the specific storage area, access to the storage area of the hardware model to execute an access process for the access request,
A simulation control program characterized by causing a process to be executed.

(付記2)前記コンピュータに、
前記アクセス要求が前記特定の記憶領域への読込要求であると判断した場合、前記特定の記憶領域の記憶内容を更新する更新処理の実行要求を出力する処理を実行させ、
前記実行する処理は、
前記実行要求を出力した結果、前記ハードウェアモデルによって前記更新処理が完了した場合、前記特定の記憶領域を読み込んで、前記ソフトウェアに読込結果を出力することを特徴とする付記1に記載のシミュレーション制御プログラム。
(Supplementary note 2)
When it is determined that the access request is a read request to the specific storage area, a process for outputting an execution request for an update process for updating the storage contents of the specific storage area is executed,
The process to be executed is as follows:
As a result of outputting the execution request, when the update process is completed by the hardware model, the specific storage area is read, and the read result is output to the software. program.

(付記3)前記記憶部は、さらに、前記ハードウェアモデルの記憶領域のうちの前記更新処理に用いられる情報の記憶先の記憶領域のアドレスを記憶しており、
前記コンピュータに、
前記記憶部を参照して、前記アクセス要求が前記記憶先の記憶領域への書込要求か否かを判断する処理を実行させ、
前記実行する処理は、
前記アクセス要求が前記記憶先の記憶領域への書込要求であると判断した場合、前記アクセス要求以降に前記ソフトウェアから発生する前記特定の記憶領域への読込要求に対して実行される前記更新処理に用いられる情報を蓄積するバッファに前記書込要求の書込データを書き込むことを特徴とする付記2に記載のシミュレーション制御プログラム。
(Additional remark 3) The said memory | storage part has further memorize | stored the address of the storage area of the storage destination of the information used for the said update process among the storage areas of the said hardware model,
In the computer,
Referencing the storage unit, causing the access request to determine whether or not the write request to the storage area of the storage destination,
The process to be executed is as follows:
When it is determined that the access request is a write request to the storage area of the storage destination, the update process executed for a read request to the specific storage area generated from the software after the access request 3. The simulation control program according to appendix 2, wherein the write data of the write request is written into a buffer for storing information used in the above.

(付記4)コンピュータに、
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、
検出した前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する、
処理を実行させることを特徴とするシミュレーションプログラム。
(Appendix 4)
During the execution of the co-simulation between the hardware model and software, the software detects that an access request to the storage area of the hardware model has occurred,
The detected access request refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model, out of the storage areas of the hardware model, and enters the specific storage area To determine whether or not
If it is determined that the access request is not a read request to the specific storage area, the software accesses the storage area of the hardware model and executes an access process for the access request.
A simulation program characterized by causing processing to be executed.

(付記5)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御プログラムであって、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する、
処理をコンピュータに実行させるシミュレーション制御プログラムを記録したことを特徴とする記録媒体。
(Supplementary Note 5) A simulation control program that is called from the software during execution of a co-simulation between a hardware model and software,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. Determine whether it is a read request to the area,
If it is determined that the access request is not a read request to the specific storage area, access to the storage area of the hardware model to execute an access process for the access request,
A recording medium on which a simulation control program for causing a computer to execute processing is recorded.

(付記6)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、
検出した前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する、
処理をコンピュータに実行させるシミュレーションプログラムを記録したことを特徴とする記録媒体。
(Supplementary note 6) During execution of the co-simulation between the hardware model and the software, the software detects that an access request to the storage area of the hardware model has occurred,
The detected access request refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model, out of the storage areas of the hardware model, and enters the specific storage area To determine whether or not
If it is determined that the access request is not a read request to the specific storage area, the software accesses the storage area of the hardware model and executes an access process for the access request.
A recording medium on which a simulation program for causing a computer to execute processing is recorded.

(付記7)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御装置であって、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する実行部と、
を有することを特徴とするシミュレーション制御装置。
(Supplementary note 7) A simulation control device called from the software during the execution of the co-simulation between the hardware model and the software,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. A determination unit for determining whether or not it is a read request to the area;
An execution unit that accesses the storage area of the hardware model and executes an access process for the access request when the determination unit determines that the access request is not a read request to the specific storage area;
A simulation control apparatus comprising:

(付記8)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御装置であって、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する実行部と、
を有するコンピュータを含むことを特徴とするシミュレーション制御装置。
(Supplementary note 8) A simulation control device called from the software during the execution of the co-simulation between the hardware model and the software,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. A determination unit for determining whether or not it is a read request to the area;
An execution unit that accesses the storage area of the hardware model and executes an access process for the access request when the determination unit determines that the access request is not a read request to the specific storage area;
A simulation control apparatus comprising: a computer having:

(付記9)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出する検出部と、
前記検出部によって検出された前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する実行部と、
を有することを特徴とするシミュレーション装置。
(Additional remark 9) The detection part which detects that the access request to the storage area of the said hardware model generate | occur | produced from the said software during execution of the co-simulation of a hardware model and software,
The access request detected by the detection unit refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model, A determination unit for determining whether or not a read request to a specific storage area;
When the determination unit determines that the access request is not a read request to the specific storage area, the execution unit executes access processing for the access request by accessing the storage area of the hardware model by the software When,
A simulation apparatus comprising:

(付記10)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出する検出部と、
前記検出部によって検出された前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する実行部と、
を有するコンピュータを含むことを特徴とするシミュレーション装置。
(Additional remark 10) The detection part which detects that the access request to the storage area of the said hardware model generate | occur | produced from the said software during execution of the co-simulation of a hardware model and software,
The access request detected by the detection unit refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model, A determination unit for determining whether or not a read request to a specific storage area;
When the determination unit determines that the access request is not a read request to the specific storage area, the execution unit executes access processing for the access request by accessing the storage area of the hardware model by the software When,
A simulation apparatus comprising: a computer having:

(付記11)ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御方法であって、
コンピュータが、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する、
処理を実行することを特徴とするシミュレーション制御方法。
(Supplementary Note 11) A simulation control method that is called from the software during the execution of a co-simulation between a hardware model and software,
Computer
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. Determine whether it is a read request to the area,
If it is determined that the access request is not a read request to the specific storage area, access to the storage area of the hardware model to execute an access process for the access request,
The simulation control method characterized by performing a process.

(付記12)コンピュータが、
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、
検出した前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する、
処理を実行することを特徴とするシミュレーション方法。
(Supplementary note 12)
During the execution of the co-simulation between the hardware model and software, the software detects that an access request to the storage area of the hardware model has occurred,
The detected access request refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model, out of the storage areas of the hardware model, and enters the specific storage area To determine whether or not
If it is determined that the access request is not a read request to the specific storage area, the software accesses the storage area of the hardware model and executes an access process for the access request.
A simulation method characterized by executing processing.

101 ハードウェアモデル
102 ソフトウェア
103_s メモリモデル
111 シミュレータ
112 API
301 判断部
302 出力部
303 実行部
310 処理テーブル
101 Hardware Model 102 Software 103_s Memory Model 111 Simulator 112 API
301 Determination Unit 302 Output Unit 303 Execution Unit 310 Processing Table

Claims (8)

ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御プログラムであって、
コンピュータに、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する、
処理を実行させることを特徴とするシミュレーション制御プログラム。
A simulation control program called from the software during the execution of the co-simulation between the hardware model and the software,
On the computer,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. Determine whether it is a read request to the area,
If it is determined that the access request is not a read request to the specific storage area, access to the storage area of the hardware model to execute an access process for the access request,
A simulation control program characterized by causing a process to be executed.
前記コンピュータに、
前記アクセス要求が前記特定の記憶領域への読込要求であると判断した場合、前記特定の記憶領域の記憶内容を更新する更新処理の実行要求を出力する処理を実行させ、
前記実行する処理は、
前記実行要求を出力した結果、前記ハードウェアモデルによって前記更新処理が完了した場合、前記特定の記憶領域を読み込んで、前記ソフトウェアに読込結果を出力することを特徴とする請求項1に記載のシミュレーション制御プログラム。
In the computer,
When it is determined that the access request is a read request to the specific storage area, a process for outputting an execution request for an update process for updating the storage contents of the specific storage area is executed,
The process to be executed is as follows:
The simulation according to claim 1, wherein when the update process is completed by the hardware model as a result of outputting the execution request, the specific storage area is read and the read result is output to the software. Control program.
前記記憶部は、さらに、前記ハードウェアモデルの記憶領域のうちの前記更新処理に用いられる情報の記憶先の記憶領域のアドレスを記憶しており、
前記コンピュータに、
前記記憶部を参照して、前記アクセス要求が前記記憶先の記憶領域への書込要求か否かを判断する処理を実行させ、
前記実行する処理は、
前記アクセス要求が前記記憶先の記憶領域への書込要求であると判断した場合、前記アクセス要求以降に前記ソフトウェアから発生する前記特定の記憶領域への読込要求に対して実行される前記更新処理に用いられる情報を蓄積するバッファに前記書込要求の書込データを書き込むことを特徴とする請求項2に記載のシミュレーション制御プログラム。
The storage unit further stores an address of a storage area of a storage destination of information used for the update process in the storage area of the hardware model,
In the computer,
Referencing the storage unit, causing the access request to determine whether or not the write request to the storage area of the storage destination,
The process to be executed is as follows:
When it is determined that the access request is a write request to the storage area of the storage destination, the update process executed for a read request to the specific storage area generated from the software after the access request The simulation control program according to claim 2, wherein the write data of the write request is written in a buffer for storing information used in the process.
コンピュータに、
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、
検出した前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する、
処理を実行させることを特徴とするシミュレーションプログラム。
On the computer,
During the execution of the co-simulation between the hardware model and software, the software detects that an access request to the storage area of the hardware model has occurred,
The detected access request refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model, out of the storage areas of the hardware model, and enters the specific storage area To determine whether or not
If it is determined that the access request is not a read request to the specific storage area, the software accesses the storage area of the hardware model and executes an access process for the access request.
A simulation program characterized by causing processing to be executed.
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御装置であって、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する実行部と、
を有することを特徴とするシミュレーション制御装置。
A simulation control device called from the software during execution of a co-simulation between a hardware model and software,
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. A determination unit for determining whether or not it is a read request to the area;
An execution unit that accesses the storage area of the hardware model and executes an access process for the access request when the determination unit determines that the access request is not a read request to the specific storage area;
A simulation control apparatus comprising:
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出する検出部と、
前記検出部によって検出された前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断する判断部と、
前記判断部によって前記アクセス要求が前記特定の記憶領域への読込要求でないと判断された場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する実行部と、
を有することを特徴とするシミュレーション装置。
A detection unit for detecting that an access request to the storage area of the hardware model is generated from the software during execution of the co-simulation of the hardware model and the software;
The access request detected by the detection unit refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model, A determination unit for determining whether or not a read request to a specific storage area;
When the determination unit determines that the access request is not a read request to the specific storage area, the execution unit executes access processing for the access request by accessing the storage area of the hardware model by the software When,
A simulation apparatus comprising:
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に前記ソフトウェアから呼び出されるシミュレーション制御方法であって、
コンピュータが、
前記ソフトウェアから発生したアクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ハードウェアモデルの記憶領域にアクセスして、前記アクセス要求に対するアクセス処理を実行する、
処理を実行することを特徴とするシミュレーション制御方法。
A simulation control method that is called from the software during execution of a co-simulation between a hardware model and software,
Computer
The access request generated from the software refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model of the storage area of the hardware model. Determine whether it is a read request to the area,
If it is determined that the access request is not a read request to the specific storage area, access to the storage area of the hardware model to execute an access process for the access request,
The simulation control method characterized by performing a process.
コンピュータが、
ハードウェアモデルとソフトウェアとの協調シミュレーションの実行中に、前記ソフトウェアから、前記ハードウェアモデルの記憶領域へのアクセス要求が発生したことを検出し、
検出した前記アクセス要求が、前記ハードウェアモデルの記憶領域のうちの前記ハードウェアモデルによって記憶内容が更新される特定の記憶領域のアドレスを記憶する記憶部を参照して、前記特定の記憶領域への読込要求か否かを判断し、
前記アクセス要求が前記特定の記憶領域への読込要求でないと判断した場合、前記ソフトウェアによって、前記ハードウェアモデルの記憶領域にアクセスして前記アクセス要求に対するアクセス処理を実行する、
処理を実行することを特徴とするシミュレーション方法。
Computer
During the execution of the co-simulation between the hardware model and software, the software detects that an access request to the storage area of the hardware model has occurred,
The detected access request refers to a storage unit that stores an address of a specific storage area whose storage content is updated by the hardware model, out of the storage areas of the hardware model, and enters the specific storage area To determine whether or not
If it is determined that the access request is not a read request to the specific storage area, the software accesses the storage area of the hardware model and executes an access process for the access request.
A simulation method characterized by executing processing.
JP2012236084A 2012-10-25 2012-10-25 Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method Pending JP2014085956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012236084A JP2014085956A (en) 2012-10-25 2012-10-25 Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012236084A JP2014085956A (en) 2012-10-25 2012-10-25 Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method

Publications (1)

Publication Number Publication Date
JP2014085956A true JP2014085956A (en) 2014-05-12

Family

ID=50788934

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012236084A Pending JP2014085956A (en) 2012-10-25 2012-10-25 Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method

Country Status (1)

Country Link
JP (1) JP2014085956A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258930A (en) * 2014-10-05 2020-06-09 亚马逊技术股份有限公司 Emulated endpoint configuration

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111258930A (en) * 2014-10-05 2020-06-09 亚马逊技术股份有限公司 Emulated endpoint configuration
CN111258930B (en) * 2014-10-05 2024-04-12 亚马逊技术股份有限公司 Emulation endpoint configuration

Similar Documents

Publication Publication Date Title
CN112074817A (en) Execution control with cross-level trace mapping
US11294645B2 (en) Visual virtual programming machine for real-time interactive creation, playback, execution, inspection and manipulation of programming elements
US9183060B2 (en) Computer product, migration executing apparatus, and migration method
JP2011528471A (en) Pan and zoom control
KR20110112980A (en) Apparatus and method for sensing touch
CN107741760A (en) Double-screen notebook and double-screen display method
US20230004281A1 (en) Intelligent interaction method and device, and storage medium
US20150113452A1 (en) Graphical user interface
JP5280965B2 (en) Touch panel device and method, program, and recording medium
JP2014191651A (en) Storage system, storage device, control method of storage system, and control program of storage device
JP5287092B2 (en) Verification support program, verification support apparatus, and verification support method
US10387547B2 (en) Layout engine for creating a visual layout tree for a document
JP2017215801A (en) Information processing apparatus, information processing method, and program
JPWO2010044150A1 (en) Program change management apparatus, program change management program, and program change management method
JP2014085956A (en) Simulation control program, simulation program, simulation control device, simulation device, simulation control method, and simulation method
US20140310248A1 (en) Verification support program, verification support apparatus, and verification support method
JP5644344B2 (en) DESIGN DATA GENERATION DEVICE, DESIGN DATA GENERATION METHOD, AND PROGRAM
US20120124091A1 (en) Application file system access
JP5794133B2 (en) Data processing apparatus, conversion apparatus, data processing system, conversion method, and conversion program
CN109388716A (en) Relational graph update method and equipment
Rüegg et al. Incremental diagram layout for automated model migration
JP6797524B2 (en) Operation record playback program, operation playback program, operation record playback system and operation record playback method
JP5449284B2 (en) User interface design support device, user interface design support method, and user interface design support program
JP4789759B2 (en) Display control apparatus and control method thereof
JP6528646B2 (en) Operation reproduction program, operation reproduction apparatus and operation reproduction method