JP2008112243A - Simulation program, and apparatus, method and program for generating the same - Google Patents

Simulation program, and apparatus, method and program for generating the same Download PDF

Info

Publication number
JP2008112243A
JP2008112243A JP2006293630A JP2006293630A JP2008112243A JP 2008112243 A JP2008112243 A JP 2008112243A JP 2006293630 A JP2006293630 A JP 2006293630A JP 2006293630 A JP2006293630 A JP 2006293630A JP 2008112243 A JP2008112243 A JP 2008112243A
Authority
JP
Japan
Prior art keywords
instruction
simulation
task
execution
simulation program
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.)
Withdrawn
Application number
JP2006293630A
Other languages
Japanese (ja)
Inventor
Hiroyuki Yamashita
博行 山下
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006293630A priority Critical patent/JP2008112243A/en
Publication of JP2008112243A publication Critical patent/JP2008112243A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the effect of synchronization functions inserted between instructions on the actual execution time of simulation on a host computer in a simulation program for causing a host CPU to simulate an instruction execution process of an actual CPU in an application program operation environment. <P>SOLUTION: A simulation program generation apparatus comprises a storage means for storing an application program operable on an actual CPU, and a processing means for scheduling instruction execution timings in consideration of instruction execution times according to internal processing instructions and external synchronization instructions of tasks included in the application program to determine free run periods between the completion of execution of one external synchronization instruction and the execution of the next external synchronization instruction, and generating a simulation program such that in each free run period the internal processing instruction and a function for computing the remaining time of the free run period are executed alternately. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、機器組込み用のアプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレータ(シミュレーションプログラム)に関し、さらに、そのようなシミュレーションプログラムを生成する装置及び方法及びプログラムに関する。   The present invention relates to a simulator (simulation program) for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program for incorporation into a device, and an apparatus, method, and program for generating such a simulation program About.

従来より、機器組込み用のアプリケーションプログラムを開発する場合には、開発対象であるターゲットCPU(「実CPU」ともいう)とシミュレーションを行うホストCPUとが異なる種類のCPUであるようなクロス開発環境において、実CPUの機能やタイミングを検証するためのシミュレーションを行う手法が用いられている。そのようなシミュレーションにおいて、実CPUと等価な処理を行うISS(Instruction Set Simulator:命令セットシミュレータ)に、アプリケーションプログラムを読み込ませて処理を行う方法が知られている。   Conventionally, when developing an application program for incorporation into a device, in a cross development environment where a target CPU (also referred to as a “real CPU”) to be developed and a host CPU that performs simulation are different types of CPUs. A method of performing a simulation for verifying the function and timing of an actual CPU is used. In such a simulation, a method is known in which an ISS (Instruction Set Simulator) that performs processing equivalent to that of a real CPU reads an application program and performs processing.

図15は、ISSを用いて機器組込み用のアプリケーションプログラムを開発する方法を説明するための図である。組込みアプリケーションプログラムの開発においては、ホストCPUが搭載された汎用コンピュータ上の組込みアプリケーション開発環境500において、アプリケーションプログラムのソースコード501が作成され、実CPU用のクロスコンパイラ502を用いてソースコード501をコンパイルすることにより、実CPUにおいて実行可能なアプリケーションプログラムのバイナリコードを含むバイナリ形式の実行ファイル503が生成される。   FIG. 15 is a diagram for explaining a method of developing an application program for device incorporation using ISS. In the development of an embedded application program, an application program source code 501 is created in an embedded application development environment 500 on a general-purpose computer equipped with a host CPU, and the source code 501 is compiled using a cross compiler 502 for an actual CPU. As a result, the binary executable file 503 including the binary code of the application program executable in the real CPU is generated.

次に、ISS510が、ホストCPUに実CPUの動作をシミュレートさせることにより、実CPUの動作の検証が行われる。ISS510の制御の下で、ホストCPUは、実行ファイル503に含まれている命令を1つずつ読み取って、実CPUにおける命令コードのフェッチ504、デコード505、実行506のステージをシミュレートすることにより、アプリケーションプログラムを実行する。   Next, the ISS 510 causes the host CPU to simulate the operation of the real CPU, thereby verifying the operation of the real CPU. Under the control of the ISS 510, the host CPU reads the instructions included in the execution file 503 one by one and simulates the instruction code fetch 504, decode 505, and execution 506 stages in the real CPU. Run the application program.

ところで、ISSを用いるシミュレーションにおいては、ISSが、他のソフトウェアやハードウェア等の外部モジュールのシミュレーションモデルとイベント同期を確立しながら、協調動作を行い、シミュレーションを安定的に進行させて行く。ここで、ISSと外部モジュールとのイベント同期に着目する。   By the way, in the simulation using the ISS, the ISS performs a cooperative operation while establishing event synchronization with a simulation model of an external module such as other software or hardware, and proceeds the simulation stably. Here, attention is focused on event synchronization between the ISS and the external module.

図16は、ISSと外部モジュールとのイベント同期を示す図である。図16において、ISS600には、複数のタスク601が含まれており、各タスク601には、複数の命令が含まれている。また、外部モジュール610は、ISS以外のモジュールを表している。ISS以外のモジュールとは、例えば、ハードウェアであっても良いし、SystemC言語等で記述されたシミュレーションカーネル(中核部分)であっても良い。なお、SystemC言語とは、C言語系のシステムレベル記述言語の1つであり、C++言語の文法を守った上で、ハードウェアやシステムを記述するために必要な言語使用を拡張したものである。 FIG. 16 is a diagram illustrating event synchronization between the ISS and an external module. In FIG. 16, the ISS 600 includes a plurality of tasks 601, and each task 601 includes a plurality of instructions. The external module 610 represents a module other than the ISS. The module other than the ISS may be, for example, hardware or a simulation kernel (core part) described in the SystemC language or the like. The System C language is one of C language system level description languages, and is an extension of language usage necessary to describe hardware and systems while maintaining the grammar of the C ++ language. is there.

ISS600は、命令単位毎に処理を実行して行くサイクルアキュレート型のシミュレーションプログラムである。図16に示すように、従来、タスク601における命令間には、外部モジュール610との間でイベントの同期をとるために、処理進行中のタスク601を、一旦、待機状態に移行させる関数(以下、「同期関数」という)が挿入されている。同期関数としては、例えば、SystemC言語におけるWait関数が該当する。このような同期関数の機能により、モジュール間の同期が確立し、協調動作が可能となり、シミュレーションを安定的に行うことができる。   The ISS 600 is a cycle accurate type simulation program that executes processing for each instruction unit. As shown in FIG. 16, conventionally, in order to synchronize an event with an external module 610 between instructions in a task 601, a function (hereinafter, referred to as a task 601) that temporarily shifts a task 601 in progress of processing. , “Synchronous function”). As the synchronization function, for example, a Wait function in the SystemC language is applicable. With the function of such a synchronization function, synchronization between modules is established, cooperative operation is possible, and simulation can be performed stably.

このように、タスク601において命令間毎に同期関数を挿入することにより、外部モジュール610からの予測できない割込み要求があった場合に、その時点で、処理進行中のタスク601を待機状態として、プログラムの暴走等を予防することができる。   In this way, by inserting a synchronization function for each instruction in the task 601, when there is an unpredictable interrupt request from the external module 610, the task 601 in progress at that time is set in a standby state and the program Can be prevented.

しかしながら、必ずしも、同期関数が挿入されているタイミングにおいて、外部モジュール610からの割込み要求が常にあるとは限らない。割込み要求がない場合でも、同期関数は実行されるが、一般に、同期関数の実行に要する実時間(ホストCPUが処理に要する実時間をいう。以降、ホスト計算機が実際の処理にかかる時間は、特に、実時間とする。)は、タスク601に含まれている個々の命令の実行に要する実時間よりもかなり大きいので、不要な同期関数の実行はホストCPUが処理する時間を増大させる原因となってしまう。   However, there is not always an interrupt request from the external module 610 at the timing when the synchronization function is inserted. Even if there is no interrupt request, the synchronization function is executed, but in general, the real time required for executing the synchronization function (the real time required for processing by the host CPU. Hereinafter, the time required for the host computer to execute the actual processing is In particular, the real time) is much larger than the real time required to execute the individual instructions included in the task 601, and therefore execution of unnecessary synchronization functions is a cause of increasing the processing time of the host CPU. turn into.

一般に、ISSは、CPU又はDSP(Digital Signal Processor:デジタルシグナルプロセッサ)の組込みアプリケーションプログラムを開発するためのエミュレーションツールとしての役割を有しており、ISSの動作の高速化は、アプリケーションプログラムの開発期間の短縮に大きな効果がある。従って、ISSによるアプリケーションプログラムのシミュレーションを高速化するために、様々な技術が開発されている。   In general, the ISS has a role as an emulation tool for developing a built-in application program of a CPU or DSP (Digital Signal Processor). There is a big effect in shortening. Therefore, various techniques have been developed in order to speed up the simulation of application programs by ISS.

下記の特許文献1には、キャッシュ解析の可能な抽象度を保った性能検証を、ISSを必要とせずに、単一の検証プラットフォームにより高速に行うことが可能なシミュレーション装置が開示されている。このシミュレーション装置は、検証処理を実行する検証実行プロセッサを備え、検証対象システムが有する検証対象プロセッサの機能をシミュレートするプロセッサモデルと、前記検証対象システムにおける前記検証対象プロセッサの周辺ハードウェアの機能をシミュレートするハードウェアモデルとを、前記検証実行プロセッサ上で動作させることにより、前記検証対象システムをシミュレートする。   Patent Document 1 below discloses a simulation apparatus capable of performing performance verification with an abstraction level enabling cache analysis at high speed using a single verification platform without requiring ISS. The simulation apparatus includes a verification execution processor that executes a verification process, and includes a processor model that simulates the function of the verification target processor included in the verification target system, and functions of peripheral hardware of the verification target processor in the verification target system. The verification target system is simulated by operating a hardware model to be simulated on the verification execution processor.

このシミュレーション装置によれば、検証対象システムにおいてソフトウェア実装される機能を、検証実行プロセッサ上で動作するソフトウェアモデルによってシミュレートすることによって、ISSを用いずに済むので、高速な性能検証が可能となる。しかしながら、特許文献1には、シミュレーションプログラムにおいて命令間に挿入される同期関数がシミュレーション時間(ホストCPUが処理にかかる実時間)に及ぼす影響を低減することに関しては、特に開示されていない。   According to this simulation apparatus, it is not necessary to use the ISS by simulating the function implemented by the software in the verification target system by the software model operating on the verification execution processor, so that high-speed performance verification is possible. . However, Patent Document 1 does not particularly disclose reducing the influence of the synchronization function inserted between instructions in the simulation program on the simulation time (the real time required for processing by the host CPU).

また、特許文献2には、システム構成要素の種々の並列動作タイミングに対応して、ソフトウェアの総合的な論理検証を行うことができるシミュレータ装置が開示されている。このシミュレータ装置は、実CPUとは異なるホストCPU上で実CPUの命令実行過程を試行するためのCPUシミュレーション装置と、当該命令実行過程と同期して並列動作するシステム構成要素とを有し、前記システム構成要素の並列動作タイミングを変更するための手段を備えている。   Patent Document 2 discloses a simulator device that can perform comprehensive logic verification of software corresponding to various parallel operation timings of system components. The simulator device includes a CPU simulation device for trying a command execution process of a real CPU on a host CPU different from the real CPU, and a system component that operates in parallel in synchronization with the command execution process, Means are provided for changing the parallel operation timing of the system components.

このシミュレータ装置によれば、周辺I/O装置等のシステム構成要素の動作タイミングを任意に変更することができるので、システム構成要素の種々の並列動作タイミングを網羅したソフトウェアの総合的な論理検証を行うことができる。しかしながら、特許文献2において、システム構成要素の並列動作タイミングを変更するための手段とはISSそのものを指しており、ISSにおいて命令間に挿入される同期関数がシミュレーション時間(ホストCPUが処理にかかる実時間)に及ぼす影響を低減することに関しては、特に開示されていない。
特開2004−13227号(第1−2頁、図1) 特開2000−20348号(第1−2頁、図1)
According to this simulator device, the operation timing of system components such as peripheral I / O devices can be arbitrarily changed, so that comprehensive logic verification of software covering various parallel operation timings of system components can be performed. It can be carried out. However, in Patent Document 2, the means for changing the parallel operation timing of the system components refers to the ISS itself, and the synchronization function inserted between instructions in the ISS is the simulation time (the actual processing that the host CPU takes for processing). There is no particular disclosure regarding reducing the effect on time).
JP2004-13227 (page 1-2, FIG. 1) JP 2000-20348 (page 1-2, FIG. 1)

そこで、上記の点に鑑み、本発明は、機器組込み用のアプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムにおいて、命令間に挿入される同期関数がシミュレーション時間(ホストCPUが処理にかかる実時間)に及ぼす影響を低減することを目的とする。   Therefore, in view of the above points, the present invention provides a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program for embedding a device. The object is to reduce the influence on time (actual time taken by the host CPU for processing).

上記課題を解決するため、本発明の1つの観点に係るシミュレーションプログラム生成装置は、アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成装置であって、実CPU上で動作可能なアプリケーションプログラムを格納する格納手段と、格納手段からアプリケーションプログラムを読み出し、読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成する処理手段とを具備する。   In order to solve the above problem, a simulation program generation apparatus according to one aspect of the present invention is a simulation program generation apparatus that generates a simulation program that causes a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program. A storage means for storing an application program operable on a real CPU, an application program read from the storage means, and an internal processing instruction and an external synchronization instruction of a task included in the read application program Based on the instruction execution time, instruction execution timing is scheduled to determine a free run period from the completion of the execution of the external synchronization instruction until the next execution of the external synchronization instruction. A function for obtaining the remaining time of the internal processing instructions and the free-run period and a processing means for generating a simulation program to be executed alternately in the period.

ここで、上記関数として、フリーラン期間の残り時間が正の値でないときに、割込みの有無を判定して割込みが有る場合には割込み処理を実行するようにホストCPUを制御し、その後に外部同期命令を実行するようにホストCPUを制御する関数を用いるようにしても良い。   Here, as the above function, when the remaining time of the free run period is not a positive value, it is determined whether or not there is an interrupt, and if there is an interrupt, the host CPU is controlled to execute the interrupt process, and then the external CPU A function for controlling the host CPU to execute the synchronous command may be used.

また、処理手段が、外部同期命令の実行に伴って同期関数が実行されるようにシミュレーションプログラムを生成するようにしても良く、上記同期関数として、タスクの処理を待機状態にするようにホストCPUを制御し、設定された時間の経過後又はタスク起動要求があった場合にタスクの処理を起動するようにホストCPUを制御する関数を用いるようにしても良い。   Further, the processing means may generate a simulation program so that the synchronization function is executed in accordance with the execution of the external synchronization instruction. As the synchronization function, the host CPU sets the task processing to a standby state. And a function for controlling the host CPU to activate task processing after a set time has elapsed or when there is a task activation request.

本発明の1つの観点に係るシミュレーションプログラム生成方法は、アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成方法であって、実CPU上で動作可能なアプリケーションプログラムを格納する格納手段からアプリケーションプログラムを読み出すステップと、読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成するステップとを具備する。   A simulation program generation method according to one aspect of the present invention is a simulation program generation method for generating a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program. The instruction execution time is taken into account based on the step of reading the application program from the storage means for storing the application program operable in, and the internal processing instruction and external synchronization instruction of the task included in the read application program By executing the instruction execution timing scheduling, a free run period from the completion of the execution of the external synchronization instruction to the next execution of the external synchronization instruction is determined, and the internal processing instruction is executed during the free run period. A function for obtaining the remaining time of the free-run period and generating a simulation program to be executed alternately.

本発明の1つの観点に係るシミュレーションプログラム生成プログラムは、アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成プログラムであって、実CPU上で動作可能なアプリケーションプログラムを格納する格納手段からアプリケーションプログラムを読み出す手順と、読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成する手順とをCPUに実行させる。   A simulation program generation program according to one aspect of the present invention is a simulation program generation program that generates a simulation program that causes a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program. The instruction execution time is taken into account based on the procedure for reading the application program from the storage means for storing the application program that can be operated in the system, and the internal processing instruction and the external synchronization instruction of the task included in the read application program. By executing the instruction execution timing scheduling, a free run period from the completion of execution of the external synchronization instruction to the next execution of the external synchronization instruction is determined. A function for obtaining the remaining time of the physical instruction and free-run period to execute a procedure for generating a simulation program to be executed alternately CPU.

本発明の1つの観点に係るシミュレーションプログラムは、アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムであって、実CPU上で動作可能なアプリケーションプログラムに含まれているタスクの外部同期命令を実行する手順と、外部同期命令の実行が完了した後に、設定されたフリーラン期間において、内部処理命令とフリーラン期間の残り時間を求める関数とを交互に実行する手順と、フリーラン期間の残り時間が正の値でないときに、割込みの有無を判定して割込みが有る場合には割込み処理を実行し、その後に外部同期命令を実行する手順とをホストCPUに実行させる。   A simulation program according to one aspect of the present invention is a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of the application program, and is included in an application program operable on the real CPU. The procedure for executing the external synchronization instruction of the task being executed and the function for calculating the remaining time of the free run period are alternately executed in the set free run period after the execution of the external synchronization instruction is completed. When the remaining time of the free-run period is not a positive value, determine whether or not there is an interrupt and if there is an interrupt, execute the interrupt processing and then execute the external synchronization instruction to the host CPU. Let it run.

本発明によれば、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成するようにしたので、命令間に挿入される同期関数がシミュレーション時間に及ぼす影響を低減することができる。   According to the present invention, by scheduling the instruction execution timing in consideration of the instruction execution time, a free run period from the completion of the execution of the external synchronization instruction to the next execution of the external synchronization instruction is determined, Since the simulation program is generated so that the internal processing instruction and the function for obtaining the remaining time of the free run period are executed alternately during the free run period, the influence of the synchronization function inserted between the instructions on the simulation time Can be reduced.

以下に、本発明を実施するための最良の形態について、図面を参照しながら詳しく説明する。なお、同一の構成要素には同一の参照番号を付して、説明を省略する。
図1は、本発明の一実施形態に係るシミュレーションプログラム生成装置の構成を示す図である。このシミュレーションプログラム生成装置1は、汎用のコンピュータ2と、外部入出力装置9とによって構成されている。コンピュータ2は、ホストCPUとしてのCPU3と、ROM4と、RAM5と、ハードディスク6と、インタフェース(I/F)7とを有している。CPU3、ROM4等は、バス8を介して互いに接続されている。
The best mode for carrying out the present invention will be described below in detail with reference to the drawings. In addition, the same reference number is attached | subjected to the same component and description is abbreviate | omitted.
FIG. 1 is a diagram showing a configuration of a simulation program generation apparatus according to an embodiment of the present invention. The simulation program generation device 1 is composed of a general-purpose computer 2 and an external input / output device 9. The computer 2 includes a CPU 3 as a host CPU, a ROM 4, a RAM 5, a hard disk 6, and an interface (I / F) 7. The CPU 3, ROM 4, etc. are connected to each other via a bus 8.

CPU3は、RAM5又はハードディスク6に格納されたアプリケーションプログラムを読み出し、読み出されたアプリケーションプログラムに対して所定の処理を実行することにより、アプリケーションプログラムを実CPUで動作させたときの動きをシミュレートするためのシミュレーションプログラムを生成して、生成されたシミュレーションプログラムを再びRAM5又はハードディスク6に格納する。   The CPU 3 reads the application program stored in the RAM 5 or the hard disk 6 and executes predetermined processing on the read application program, thereby simulating the movement when the application program is operated on the real CPU. A simulation program is generated, and the generated simulation program is stored in the RAM 5 or the hard disk 6 again.

外部入出力装置9は、インタフェース(I/F)7に接続されており、コンピュータ2に対する指示を行う入力装置としてのキーボードや、コンピュータ2の動作状況を表示する表示装置としてのディスプレイ等を含んでいる。シミュレーションプログラムの生成をCPU3に実行させるシミュレーションプログラム生成プログラムは、予め、ハードディスク6又はRAM5に格納されるようにしても良い。   The external input / output device 9 is connected to an interface (I / F) 7, and includes a keyboard as an input device that gives instructions to the computer 2, a display as a display device that displays the operation status of the computer 2, and the like. Yes. A simulation program generation program that causes the CPU 3 to generate a simulation program may be stored in the hard disk 6 or the RAM 5 in advance.

シミュレーションプログラム生成装置1において、CPU3が、バス8を介してハードディスク6又はROM4に格納されたシミュレーションプログラム生成プログラムを読み出し、読み出されたシミュレーションプログラム生成プログラムを所定のオペレーティングシステムの下で実行することによって、シミュレーションプログラムを生成する。   In the simulation program generation device 1, the CPU 3 reads the simulation program generation program stored in the hard disk 6 or the ROM 4 via the bus 8 and executes the read simulation program generation program under a predetermined operating system. Generate a simulation program.

図2は、本発明の一実施形態におけるプログラム開発手順を示す図である。
図2に示すように、このプログラム開発手順は、組込みアプリケーションプログラム開発環境10と、シミュレーションプログラム生成環境11と、SystemC言語を用いるシミュレーション環境12とにおいて実施される。組込みアプリケーションプログラム開発環境10において、ANSI−C言語で記述されたソースコード13がクロスコンパイラ14でコンパイルされることによって、機器に組み込まれる実CPUにおいて実行可能なアプリケーションプログラム実行ファイル15が生成される。本実施形態においては、コンパイラ14として、例えば、汎用CPUであるC33PE用のコンパイラが使用される。なお、ANSI−C言語とは、ANSI(アメリカ規格協会)規格に準拠したC言語のことである。
FIG. 2 is a diagram showing a program development procedure in one embodiment of the present invention.
As shown in FIG. 2, this program development procedure is executed in an embedded application program development environment 10, a simulation program generation environment 11, and a simulation environment 12 using the SystemC language. In the embedded application program development environment 10, the source code 13 written in the ANSI-C language is compiled by the cross compiler 14, thereby generating an application program execution file 15 that can be executed by the real CPU incorporated in the device. In the present embodiment, a compiler for C33PE, which is a general-purpose CPU, is used as the compiler 14, for example. The ANSI-C language is a C language conforming to ANSI (American Standards Association) standard.

組込みアプリケーションプログラム開発環境10において生成されたアプリケーションプログラム実行ファイル15に基づいて、シミュレーションプログラム生成環境11において、ANSI−C言語で記述されたシミュレーションプログラムコード16が生成される。シミュレーションプログラムコード16は、シミュレーション環境12において、ホストCPUのコンパイラ17によってコンパイルされて、ホストCPU上において実CPUの動作をシミュレートするためのシミュレーションプログラム実行ファイル18が生成される。   Based on the application program execution file 15 generated in the embedded application program development environment 10, a simulation program code 16 written in the ANSI-C language is generated in the simulation program generation environment 11. The simulation program code 16 is compiled by the host CPU compiler 17 in the simulation environment 12 to generate a simulation program execution file 18 for simulating the operation of the real CPU on the host CPU.

図3は、本発明の一実施形態に係るシミュレーションプログラム生成装置の動作を示すフローチャートである。組込みアプリケーションプログラム開発環境において生成されたアプリケーションプログラム実行ファイルは、シミュレーションプログラム生成装置のRAM又はハードディスク等の格納部に格納されている。シミュレーションプログラム生成装置は、ステップS10において、格納部からアプリケーションプログラム実行ファイルを読み出し、ステップS11において、アプリケーションプログラム実行ファイルのバイナリコードを解析して所望の機能を追加し、ステップS12において、ANSI−C言語で記述されたシミュレーションプログラムコードを生成する。   FIG. 3 is a flowchart showing the operation of the simulation program generation apparatus according to the embodiment of the present invention. The application program execution file generated in the embedded application program development environment is stored in a storage unit such as a RAM or a hard disk of the simulation program generation device. In step S10, the simulation program generation apparatus reads the application program execution file from the storage unit, analyzes the binary code of the application program execution file in step S11, adds a desired function, and in step S12, reads the ANSI-C language. The simulation program code described in the above is generated.

ステップS11は、例えば、ステップS10において読み込まれたアプリケーションプログラム実行ファイルの命令を解析し、命令コードを再構成することを含んでいる。ステップS11において、冗長な命令を省略する等の命令コードの再構成を行うことにより、スリム化されたシミュレーションプログラムコードを生成することができる。   Step S11 includes, for example, analyzing the instruction of the application program execution file read in step S10 and reconstructing the instruction code. In step S11, a simplified simulation program code can be generated by reconfiguring the instruction code such as omitting redundant instructions.

図4は、本実施形態におけるシミュレーション環境を示す図である。本実施形態において、生成されたシミュレーションプログラムコードは、SystemC言語の環境で実行される。図4に示すように、このシミュレーション環境においては、モジュールとして、シミュレーションプログラム30と、ハードウェア31と、シミュレーションカーネル32とが存在する。本実施形態において、ハードウエア31とシミュレーションカーネル32は、SystemC言語で記述されている。   FIG. 4 is a diagram showing a simulation environment in the present embodiment. In the present embodiment, the generated simulation program code is executed in a System C language environment. As shown in FIG. 4, in this simulation environment, there are a simulation program 30, hardware 31, and a simulation kernel 32 as modules. In the present embodiment, the hardware 31 and the simulation kernel 32 are described in the SystemC language.

シミュレーションプログラム30には、複数のスレッド(ソフトウェアの実行単位)が存在するが、タスク単位のスレッド制御が行われるので、以下においてはスレッドのことをタスクと称する。モジュール間又はタスク間における矢印は、イベントの送受信を表している。例えば、シミュレーションプログラム30の割込みインタフェースタスク37は、シミュレーションプログラム30におけるその他のタスクを制御する。   Although a plurality of threads (software execution units) exist in the simulation program 30, since thread control is performed in units of tasks, the threads are hereinafter referred to as tasks. Arrows between modules or tasks represent transmission / reception of events. For example, the interrupt interface task 37 of the simulation program 30 controls other tasks in the simulation program 30.

タスクには、実行状態と、待機状態と、割込み状態との3種類の状態が存在し、最初に、全てのタスクが待機状態になっているものとする。図4において、タスク33が実行される場合には、割込みインタフェースタスク37が、タスク33に対してイベントを送信し、タスク33を起動する。タスク33はイベントを受信すると、待機状態から実行状態に移行する。タスク33が実行を終了した場合には、タスク33は、割込みインタフェースタスク37にイベントを送信し、タスク33の終了を通知する。この時、タスク33は、実行状態から待機状態に移行する。   It is assumed that there are three types of tasks, an execution state, a standby state, and an interrupt state, and all tasks are initially in a standby state. In FIG. 4, when the task 33 is executed, the interrupt interface task 37 transmits an event to the task 33 and activates the task 33. When the task 33 receives the event, the task 33 shifts from the standby state to the execution state. When the task 33 finishes executing, the task 33 sends an event to the interrupt interface task 37 to notify the end of the task 33. At this time, the task 33 shifts from the execution state to the standby state.

タスク33から終了通知を受信した割込みインタフェースタスク37は、タスク33の次に優先順位が高いタスク34を起動する。タスク34の起動は、タスク33の場合と同様に、タスク34にイベントを送信することによって行う。   The interrupt interface task 37 that has received the end notification from the task 33 activates the task 34 having the next highest priority after the task 33. The task 34 is activated by transmitting an event to the task 34 as in the case of the task 33.

割込みインタフェースタスク37は、タスクの優先順位に基づいて、それぞれのタスクを順次起動することによりタスク管理を行っている。また、シミュレーションカーネル32からシミュレーションプログラム30に割込み要求があった場合にも、割込みインタフェースタスク37が、割込み要求イベントを受信し、例えば、待機状態の割込み処理タスク35にイベントを送信して起動させる。割込み処理タスク35は、イベントを受信すると、待機状態から実行状態に移行して割込み処理を行う。   The interrupt interface task 37 performs task management by sequentially starting each task based on the priority order of the tasks. Even when an interrupt request is received from the simulation kernel 32 to the simulation program 30, the interrupt interface task 37 receives an interrupt request event and, for example, transmits the event to the interrupt processing task 35 in a standby state and starts it. When receiving the event, the interrupt processing task 35 shifts from the standby state to the execution state and performs interrupt processing.

一般に、割込み処理タスクは通常のタスクより優先順位が高いので、通常のタスクの処理が進行中に、割込み処理タスクを実行することになる。通常のタスクの進行中に割込み処理タスクが実行される場合には、通常のタスクは、実行状態から、一旦、割込み状態に移行する。割込み処理タスクは、待機状態から実行状態に移行して、割込み処理が行われる。割込み処理が終了すると、通常のタスクは、割込み状態から実行状態に移行して処理を再開する。   In general, since an interrupt processing task has a higher priority than a normal task, the interrupt processing task is executed while processing of the normal task is in progress. When the interrupt processing task is executed while the normal task is in progress, the normal task temporarily shifts from the execution state to the interrupt state. The interrupt processing task shifts from the standby state to the execution state, and interrupt processing is performed. When the interrupt process ends, the normal task shifts from the interrupt state to the execution state and resumes the process.

再び図2を参照すると、シミュレーションプログラム生成環境11において生成されたシミュレーションプログラムコード16は、ホストCPUにおいて使用できる命令群(命令セット)によって構成されている。従来のISSにおいては、外部モジュールとの間で同期を確立するために、命令と命令との間にSystemC言語のWait関数が挿入されていた。   Referring to FIG. 2 again, the simulation program code 16 generated in the simulation program generation environment 11 is composed of an instruction group (instruction set) that can be used in the host CPU. In the conventional ISS, in order to establish synchronization with an external module, a Wait function of the System C language is inserted between instructions.

SystemC言語のWait関数は、システム全体の同期をとる機能を有し、処理を進行するために必要な入力を得るまで該当タスクを待機状態とする関数である。命令と命令との間にWait関数が挿入されていることにより、他のモジュールからの割込み要求イベントを受信した場合に、該当するタスクがWait関数を実行することにより、ISSは、外部モジュール(ソフトウェアやハードウェア等の他のモジュール)との同期をとることができるので、シミュレーションが安定的に実行される。   The Wait function of the SystemC language has a function of synchronizing the entire system, and is a function that puts the corresponding task in a standby state until an input necessary for progressing the process is obtained. Since the Wait function is inserted between the instructions, when an interrupt request event from another module is received, the corresponding task executes the Wait function so that the ISS can execute the external module (software And other modules such as hardware etc.), the simulation can be executed stably.

しかしながら、各タスクの命令間に挿入されたWait関数のタイミングにおいて、必ずしも、外部モジュールからの予測できない要求(割込み等)が常にあるとは限らないので、Wait関数は、外部モジュールからの要求に対して利用されるとは限らない。しかしながら、その場合においても、Wait関数は実行され、タスクは待機状態に移行する。一般に、SystemC言語で使用されるWait関数は、ANSI−C言語で記述された命令の実行時間の100倍程度にも達するので、Wait関数を無駄に実行するための時間は、シミュレーション時間増大の大きな原因となる。   However, since there is not always an unpredictable request (such as an interrupt) from the external module at the timing of the Wait function inserted between the instructions of each task, the Wait function does not respond to a request from the external module. It is not always used. However, even in that case, the Wait function is executed, and the task shifts to a standby state. In general, the Wait function used in the SystemC language reaches about 100 times the execution time of an instruction written in the ANSI-C language. Therefore, the time for executing the Wait function wastefully increases the simulation time significantly. Cause.

そこで、本実施形態においては、ANSI−C言語を用いて、新たにtest_sync関数が定義される。これにより、従来、ISSにおいて各タスクの内部処理命令間に挿入されていたWait関数を除去し、test_sync関数が挿入されたANSI−Cコードを新たなシミュレーションプログラムコードとして生成することが可能となる。   Therefore, in the present embodiment, a test_sync function is newly defined using ANSI-C language. As a result, it is possible to remove the Wait function that has been conventionally inserted between the internal processing instructions of each task in the ISS and generate an ANSI-C code in which the test_sync function is inserted as a new simulation program code.

シミュレーションプログラムにおいて用いられる命令は、外部モジュールとの通信の有無を基準にすると、内部処理命令と外部同期命令とに大きく分けることができる。内部処理命令とは、例えばAdd命令等のように、シミュレーションプログラムのモジュール内部で処理され、外部モジュールとの同期通信を必要としない命令のことである。言い換えると、CPU等のレジスタ間演算等が内部処理命令に相当する。一方、外部同期命令とは、外部モジュールとの間で、データの送受信を行なう入出力命令やメモリアクセス命令等が相当する。即ち、外部同期命令は、同期通信を行う命令のことであり、外部同期命令が実行される場合には、シミュレーションプログラムと外部モジュールとの間で同期をとることが必要となる。   The instructions used in the simulation program can be roughly divided into internal processing instructions and external synchronization instructions based on the presence or absence of communication with the external module. The internal processing instruction is an instruction that is processed inside the module of the simulation program and does not require synchronous communication with an external module, such as an Add instruction. In other words, an operation between registers such as a CPU corresponds to an internal processing instruction. On the other hand, the external synchronization command corresponds to an input / output command, a memory access command, or the like for transmitting / receiving data to / from an external module. In other words, the external synchronization command is a command for performing synchronous communication. When the external synchronization command is executed, it is necessary to synchronize between the simulation program and the external module.

従って、シミュレーションプログラムが外部同期命令を実行するときには、それと共にWait関数を実行することにより、処理進行中の該当タスクを待機状態として、外部モジュールからのイベント返信を待つ。外部同期命令としては、例えば、Write命令や、Int命令や、Halt命令や、Reti命令等が該当する。   Therefore, when the simulation program executes the external synchronization instruction, the Wait function is executed together with it to set the corresponding task in process to the standby state and wait for an event return from the external module. Examples of the external synchronization command include a Write command, an Int command, a Halt command, a Reti command, and the like.

図5は、本実施形態においてスケジューリングされたタスクの命令構成を示す図である。本実施形態に係るシミュレーションプログラムの内部においては、内部処理命令をスケジューリングすることができるので、そのスケジューリングに基づいて、シミュレーションプログラムから外部モジュールに外部同期命令を送信するタイミングを予測することができる。   FIG. 5 is a diagram showing an instruction configuration of tasks scheduled in the present embodiment. Since the internal processing instruction can be scheduled inside the simulation program according to the present embodiment, the timing for transmitting the external synchronization instruction from the simulation program to the external module can be predicted based on the scheduling.

例えば、図5において、ポイントAからポイントBまでの処理時間が予測可能である。従って、ポイントAからポイントBまでの期間においては、割込みがない場合に、外部同期命令が実行されないので、タスクの命令間にWait関数を挿入する必要はないと判断できる。即ち、従来においては命令間に挿入されていたWait関数を除去することができる。ここで、タスクの命令間にWait関数が挿入されていない期間を「フリーラン期間」と定義する。本実施形態において、フリーラン期間中、内部処理命令の後にセットで、test_sync関数が挿入される。   For example, in FIG. 5, the processing time from point A to point B can be predicted. Therefore, in the period from point A to point B, when there is no interrupt, the external synchronization instruction is not executed, so it can be determined that there is no need to insert a Wait function between the task instructions. That is, the Wait function that has been inserted between instructions in the past can be removed. Here, a period in which no Wait function is inserted between task instructions is defined as a “free-run period”. In the present embodiment, the test_sync function is inserted as a set after the internal processing instruction during the free-run period.

図6は、test_sync関数が挿入されたタスクの命令構成を示す図である。本実施形態によれば、シミュレーションプログラム内部の内部処理命令のスケジューリングと、それぞれの内部処理命令の処理時間と、外部モジュールとイベント通信する外部同期命令のタイミングとに基づいて、タスクにおけるフリーラン期間を予測することができる。さらに、特定の内部処理命令から外部同期命令までのフリーラン期間も予測することができる。   FIG. 6 is a diagram illustrating an instruction configuration of a task in which the test_sync function is inserted. According to this embodiment, based on the scheduling of the internal processing instructions in the simulation program, the processing time of each internal processing instruction, and the timing of the external synchronization instruction that performs event communication with the external module, the free run period in the task is determined. Can be predicted. Furthermore, a free run period from a specific internal processing instruction to an external synchronization instruction can also be predicted.

例えば、図6に示すように、シミュレーションプログラム生成装置が、内部処理命令Aの実行開始からtest_sync関数Dの実行終了までのフリーラン期間を「10」(任意単位)であると予測した場合について説明する。ここで、スケジューリングされた内部処理命令A〜Dについては、内部処理命令Aの処理時間(シミュレーション上の仮想時間)が「1」、内部処理命令Bの処理時間(シミュレーション上の仮想時間)が「2」、内部処理命令Cの処理時間(シミュレーション上の仮想時間)が「3」、内部処理命令Dの処理時間(シミュレーション上の仮想時間)が「4」と予測されている。なお、test_sync関数の実行に要する時間は計算機上の実時間である。従って、test_sync関数の実行に要する時間は、前記シミュレーション上の仮想時間とは別であり区別される。   For example, as illustrated in FIG. 6, a case where the simulation program generation device predicts that the free run period from the start of execution of the internal processing instruction A to the end of execution of the test_sync function D is “10” (arbitrary unit) will be described. To do. Here, for the scheduled internal processing instructions A to D, the processing time of the internal processing instruction A (virtual time in simulation) is “1”, and the processing time of the internal processing instruction B (virtual time in simulation) is “ 2 ”, the processing time of the internal processing instruction C (virtual time in simulation) is predicted to be“ 3 ”, and the processing time of the internal processing instruction D (virtual time in simulation) is predicted to be“ 4 ”. Note that the time required to execute the test_sync function is the actual time on the computer. Therefore, the time required for executing the test_sync function is different from the virtual time on the simulation and is distinguished.

その場合に、test_sync関数Aにおいて、内部処理命令Aの実行終了後のフリーラン期間Aは、フリーラン期間「10」から内部処理命令Aの処理時間「1」を減じた「9」となる(本願において、この減算を「タイムアップ時間の更新」という)。また、test_sync関数Bにおいて、内部処理命令Bの実行終了後のフリーラン期間Bは、フリーラン期間Aの「9」から内部処理命令Bの処理時間「2」を減じた「7」となる。同様に、test_sync関数Cにおいて、フリーラン期間Cは、「7」から「3」を減じた「4」となる。   In this case, in the test_sync function A, the free run period A after the completion of the execution of the internal processing instruction A is “9”, which is obtained by subtracting the processing time “1” of the internal processing instruction A from the free run period “10” ( In the present application, this subtraction is referred to as “time-up time update”). In the test_sync function B, the free run period B after the completion of the execution of the internal processing instruction B is “7” obtained by subtracting the processing time “2” of the internal processing instruction B from “9” of the free run period A. Similarly, in the test_sync function C, the free run period C is “4” obtained by subtracting “3” from “7”.

また、test_sync関数Dにおいて、フリーラン期間Dは、同様の計算によると、フリーラン期間Cの「4」から内部処理命令Dの処理時間「4」を減じた「0」となる。これは、フリーラン期間の終了を意味し、test_Sync関数Dにおいて、フリーラン期間は、「タイムアップ」と判断される。   In the test_sync function D, according to the same calculation, the free run period D becomes “0” obtained by subtracting the processing time “4” of the internal processing instruction D from “4” of the free run period C. This means the end of the free run period. In the test_Sync function D, the free run period is determined to be “time up”.

このようにして、test_sync関数において、タイムアップ時間の更新の結果が「0」となった場合(一般的には、「0」以下の場合)に、フリーラン期間がタイムアップしたと判断される。また、フリーラン期間が「0」でない場合(一般的には、正の値の場合)には、フリーラン期間中であると判断される。   Thus, in the test_sync function, when the result of updating the time-up time is “0” (generally, “0” or less), it is determined that the free-run period has timed up. . When the free run period is not “0” (generally, a positive value), it is determined that the free run period is in progress.

本発明は、不要なWait関数を除去し、test_sync関数を挿入することによって、命令のフリーラン実行を実現するものである。ここで、命令のフリーラン実行は、内部処理命令の後に挿入されているtest_sync関数がフリーラン期間の残り時間を計算することによって実現される。   The present invention realizes free-run execution of an instruction by removing an unnecessary Wait function and inserting a test_sync function. Here, the free run execution of the instruction is realized by the test_sync function inserted after the internal processing instruction calculating the remaining time of the free run period.

図7は、test_sync関数の処理フローを示すフローチャートである。内部処理命令の実行の後でtest_sync関数が実行された場合に、ステップS20において、test_sync関数によって、フリーラン期間のタイムアップ時間の更新が行われる。   FIG. 7 is a flowchart showing a processing flow of the test_sync function. When the test_sync function is executed after the execution of the internal processing instruction, in step S20, the time-up time of the free run period is updated by the test_sync function.

次に、ステップS21において、更新されたタイムアップ時間に基づいて、処理がフリーラン期間中であるか、又は、フリーラン期間がタイムアップになったかが判断される。ここで、フリーラン期間中であると判断されると、test_sync関数の実行は終了し、次の内部処理命令に移行する。   Next, in step S21, based on the updated time-up time, it is determined whether the process is in the free-run period or whether the free-run period is up. Here, if it is determined that it is during the free run period, the execution of the test_sync function ends, and the process proceeds to the next internal processing instruction.

ステップS21において、フリーラン期間がタイムアップした(即ち、フリーラン期間が終了した)と判断された場合には、処理がステップS22に進む。ステップS22においては、外部モジュールからの割込みの有無が判断される。外部モジュールからの割込みが無いと判断された場合には、処理がステップS23に進み、ホストCPUが、外部同期命令及びWait関数を実行して、test_sync関数を終了する。   If it is determined in step S21 that the free run period has expired (that is, the free run period has ended), the process proceeds to step S22. In step S22, it is determined whether or not there is an interrupt from the external module. If it is determined that there is no interrupt from the external module, the process proceeds to step S23, the host CPU executes the external synchronization instruction and the Wait function, and ends the test_sync function.

また、ステップS22において、外部モジュールからの割込みが有ると判断された場合には、ステップS24において割込み処理が行われる。割込み処理が終了すると、処理がステップS23に進み、ホストCPUが、外部同期命令及びWait関数を実行して、test_sync関数を終了する。   If it is determined in step S22 that there is an interrupt from the external module, an interrupt process is performed in step S24. When the interrupt process ends, the process proceeds to step S23, the host CPU executes the external synchronization instruction and the Wait function, and ends the test_sync function.

図8に示すように、ステップS22において外部モジュールからの割込みが有ると判断された場合に、ステップS30において、割込みの優先順位を判断するようにしても良い。ステップS30において、割込みの優先順位を判断し、当該タスクよりも割込みの優先順位が低い場合には、割込み処理をしないで処理をステップS23に進め、外部同期命令及びWait関数を実行して、test_sync関数を終了する。一方、当該タスクよりも割込みの優先順位が高い場合には、処理をステップS24に進め、割込み処理をした後、ステップS23において、外部同期命令及びWait関数を実行して、test_sync関数を終了する。   As shown in FIG. 8, when it is determined in step S22 that there is an interrupt from an external module, the priority order of the interrupt may be determined in step S30. In step S30, the priority of the interrupt is determined. If the interrupt priority is lower than that of the task, the process proceeds to step S23 without performing the interrupt process, the external synchronization instruction and the Wait function are executed, and test_sync is executed. Exit the function. On the other hand, if the priority of the interrupt is higher than that of the task, the process proceeds to step S24. After the interrupt process, the external synchronization instruction and the Wait function are executed in step S23, and the test_sync function is terminated.

外部モジュールは、シミュレーションプログラムからイベントを受信すると、受信したイベントに対応した一定の処理をした後に、シミュレーションプログラムに対してイベントを返信する。シミュレーションプログラムに基づいて動作するホストCPUは、その一定の処理にかかる時間をあらかじめ予測し、その予測時間をWait関数に盛り込むことができる。Wait関数は、タイマーで指定された予測時間だけ、当該タスク自身を待機状態にする。タイマーで指定された予測時間が経過すると、当該タスクは、待機状態から起動して実行状態に移行する。   When the external module receives an event from the simulation program, it performs a certain process corresponding to the received event, and then returns the event to the simulation program. The host CPU that operates based on the simulation program can predict the time required for the certain processing in advance, and incorporate the predicted time into the Wait function. The Wait function puts the task itself in a standby state for the estimated time specified by the timer. When the estimated time designated by the timer has elapsed, the task starts from the standby state and shifts to the execution state.

当該タスクが起動すると、スケジューリングされた複数の内部処理命令の実行に要する期間をフリーラン期間として、それらの内部処理命令がフリーラン実行される。しかしながら、フリーラン期間において、外部モジュールから割込み要求を受信した場合には、受信した割込み要求に対して、シミュレーションプログラムにおいて割込み処理を実行しなければならない。そこで、本実施形態においては、Wait関数の設定において、予測された時間(設定された時間)をタイマー指定する他に、タスク起動要求がされた場合には常に当該タスクを起動して実行状態に移行させる指定が可能となっている。   When the task is activated, the internal processing instructions are free-run, with the period required for executing the scheduled internal processing instructions as a free-run period. However, when an interrupt request is received from an external module during the free run period, an interrupt process must be executed in the simulation program for the received interrupt request. Therefore, in this embodiment, in the setting of the Wait function, in addition to specifying the estimated time (set time) as a timer, the task is always activated and placed in the execution state when a task activation request is made. It is possible to specify migration.

図9は、test_sync関数のプログラム例を示す図である。図9に示すプログラムにおいては、test_sync関数が、test_sync( )として定義されている。本プログラムの第5行において、フリーラン期間のタイムアップの更新を行うようにしている。   FIG. 9 is a diagram illustrating a program example of the test_sync function. In the program shown in FIG. 9, the test_sync function is defined as test_sync (). In the fifth line of the program, the time run up of the free run period is updated.

また、第8行のif文は、フリーラン期間がタイムアップしたか否かの判断を行っている。第8行のif文の条件は、フリーラン期間から内部処理命令の処理時間を減じた結果に基づいて、フリーラン期間の残り時間が正の値であるか否か、即ち、フリーラン期間がタイムアップしたか否かを判断している。即ち、図7のステップS21における判断がなされる。第8行のif文において、フリーラン期間の残り時間が正の値である場合に、ホストCPUは、処理がフリーラン期間中であると判断し、test_sync関数を終了する。   The if statement in the eighth line determines whether or not the free run period has expired. The condition of the if statement on the eighth line is whether the remaining time of the free run period is a positive value based on the result of subtracting the processing time of the internal processing instruction from the free run period. It is determined whether the time is up. That is, the determination in step S21 in FIG. 7 is made. In the if statement on the eighth line, when the remaining time of the free run period is a positive value, the host CPU determines that the process is in the free run period, and ends the test_sync function.

一方、第8行のif文において、フリーラン期間の残り時間が正の値でない場合、即ち、フリーラン期間がタイムアップした場合に、ホストCPUは、第9行のelse文以下を実行する。第14行から第22行までのwhile文において、割込みの優先順位が低い場合には、ホストCPUが、while文を終了し、第28行のWait関数を実行してtest_sync関数を終了する。一方、割込みの優先順位が高い場合には、ホストCPUが、割込み処理(第19行のV_vec_06関数)を実行した後、第28行のWait関数を実行してtest_sync関数を終了する。   On the other hand, if the remaining time of the free run period is not a positive value in the if statement in the eighth line, that is, if the free run period has timed up, the host CPU executes the else sentence in the ninth line. In the while statement from the 14th line to the 22nd line, if the priority of the interrupt is low, the host CPU ends the while statement, executes the Wait function on the 28th line, and ends the test_sync function. On the other hand, if the interrupt priority is high, the host CPU executes the interrupt process (V_vec_06 function on the 19th line), then executes the Wait function on the 28th line, and ends the test_sync function.

図10A〜図10Cは、test_sync関数が内部処理命令間に挿入されたシミュレーションプログラムの一部の例を示す図である。図10A〜図10Cに示す第133行〜第192行までの内で、第137行、第145行、第151行、第159行、第167行、第173行、第179行、及び、第187行に、test_sync関数が挿入されている。   10A to 10C are diagrams illustrating an example of a part of a simulation program in which a test_sync function is inserted between internal processing instructions. Of lines 133 to 192 shown in FIGS. 10A to 10C, lines 137, 145, 151, 159, 167, 173, 179, and 179, and In line 187, a test_sync function is inserted.

また、第138行〜第144行、第146行〜第150行、第152行〜第158行、第160行〜第166行、第168行〜第172行、第174行〜第178行、及び、第180行〜第186行が、内部処理命令を表している。   Lines 138 to 144, lines 146 to 150, lines 152 to 158, lines 160 to 166, lines 168 to 172, lines 174 to 178, Lines 180 to 186 represent internal processing instructions.

ここで、第168行〜第172行は、内部処理命令の一例であるが、第170行のコメント欄のアセンブラ言語で記述された「ld.w %r3,0x16」が命令の内容を表している。即ち、第168行〜第172行の内部処理命令は、「r3に0x16をロードせよ」というロード命令を表している。   Here, lines 168 to 172 are examples of internal processing instructions, but “ld.w% r3, 0x16” described in the assembler language in the comment field on line 170 represents the contents of the instruction. Yes. In other words, the internal processing instructions on lines 168 to 172 represent a load instruction “load 0x16 to r3”.

このようなアセンブラコードを、シミュレーションプログラム生成装置が解釈した結果、第171行のreg[3]=0x96として、ANSI−Cコードが生成される。アセンブラ命令を静的に解析して、かつ、アセンブラコードを見かけ上、ANSI−Cコードとして実行させることによって、シミュレーションの高速化を図ることは、一般に知られている。   As a result of the simulation program generation apparatus interpreting such an assembler code, ANSI-C code is generated as reg [3] = 0x96 in the 171st line. It is generally known to speed up a simulation by statically analyzing an assembler instruction and apparently executing the assembler code as ANSI-C code.

test_sync関数は、フリーラン期間と命令処理時間の引数を有する。例えば、第167行のtest_sync(15,4)において、引数「15」は外部同期命令までのフリーラン期間を表しており、引数「4」は、内部処理命令自身の処理に要するシミュレーション時間を表している。   The test_sync function has arguments for a free run period and an instruction processing time. For example, in test_sync (15, 4) on line 167, the argument “15” represents the free run period until the external synchronization instruction, and the argument “4” represents the simulation time required for the processing of the internal processing instruction itself. ing.

ここで、第167行〜第187行の処理の流れを説明する。まず、第167行において、test_sync(15,4)とあるが、これは、次の外部同期命令までのフリーラン期間が「15」であることを意味している。即ち、シミュレーションプログラム生成装置が、内部処理命令をスケジューリングすることによって、シミュレーションプログラムが外部モジュールに外部同期命令を発信するタイミングを予測し、フリーラン期間を「15」に設定したということである。   Here, the flow of processing from the 167th line to the 187th line will be described. First, in line 167, test_sync (15, 4) is present, which means that the free-run period until the next external synchronization instruction is “15”. That is, the simulation program generation device predicts the timing at which the simulation program issues an external synchronization command to the external module by scheduling the internal processing command, and sets the free-run period to “15”.

第167行のtest_sync(15,4)の引数「4」は、第160行から第166行までの内部処理命令の処理時間を意味している。このtest_sync関数において、処理がフリーラン期間中であるか否かが判断される。フリーラン期間が「15」であり、内部処理命令(160行〜166行)の処理時間が「4」であるから、フリーラン期間の残り時間は、「15」と「4」の差である「11」となる。即ち、現在の処理がフリーラン期間中であると判断され、次の内部処理命令(第168行〜第172行)が実行される。   The argument “4” of test_sync (15, 4) in the 167th line means the processing time of the internal processing instructions from the 160th line to the 166th line. In this test_sync function, it is determined whether or not the process is in a free-run period. Since the free run period is “15” and the processing time of the internal processing instruction (lines 160 to 166) is “4”, the remaining time of the free run period is the difference between “15” and “4”. “11”. That is, it is determined that the current process is in the free-run period, and the next internal processing instruction (lines 168 to 172) is executed.

また、第168行〜第172行の内部処理命令の処理時間は「3」である。よって、第173行のtest_sync関数において、フリーラン期間の引数は、前回の残り時間「11」と、内部処理命令期間の「3」となる。第173行のtest_sync関数においては、「11」と「3」の差である「8」に基づいて、現在の処理がフリーラン期間中であると判断され、次の内部処理命令(第174行〜第178行)が実行される。   In addition, the processing time of the internal processing instructions in the 168th to 172nd lines is “3”. Therefore, in the test_sync function in the 173rd line, the arguments of the free run period are the previous remaining time “11” and the internal processing instruction period “3”. In the test_sync function on line 173, it is determined that the current process is in the free-run period based on “8” which is the difference between “11” and “3”, and the next internal processing instruction (line 174) To line 178) are executed.

また、第174行〜第178行の内部処理命令の処理時間は「3」である。よって、第179行のtest_sync関数において、フリーラン期間の引数は、前回の残り時間「8」と、内部処理命令期間の「3」となる。第179行のtest_sync関数においては、「8」と「3」の差である「5」に基づいて、現在の処理がフリーラン期間中であると判断され、次の内部処理命令(第180行〜第186行)が実行される。   Further, the processing time of the internal processing instructions in the lines 174 to 178 is “3”. Therefore, in the test_sync function in the 179th line, the arguments of the free run period are the previous remaining time “8” and the internal processing instruction period “3”. In the test_sync function on line 179, it is determined that the current process is in the free-run period based on “5” which is the difference between “8” and “3”, and the next internal processing instruction (line 180) To line 186) are executed.

また、第180行〜第186行の内部処理命令の処理時間は「5」である。よって、第187行のtest_sync関数において、フリーラン期間の引数は、前回の残り時間「5」と、内部処理命令期間の「5」となる。第187行のtest_sync関数においては、「5」と「5」の差である「0」に基づいて、フリーラン期間が終了したと判断される。   In addition, the processing time of the internal processing instructions in the 180th to 186th lines is “5”. Therefore, in the test_sync function in the 187th line, the arguments for the free run period are the previous remaining time “5” and the internal processing instruction period “5”. In the test_sync function in the 187th line, it is determined that the free run period has ended based on “0” which is the difference between “5” and “5”.

ここで、図7の処理フローによると、外部モジュールからの割込みの有無が判断される。ホストCPUは、割込みが無ければ、予測されたフリーラン期間経過後の外部同期命令及びWait関数を実行してtest_sync関数を終了し、割込みが有れば、割込み処理をした後、フリーラン期間経過後の外部同期命令及びWait関数を実行してtest_sync関数を終了する。   Here, according to the processing flow of FIG. 7, it is determined whether or not there is an interrupt from the external module. If there is no interrupt, the host CPU executes the external synchronization instruction and the Wait function after the predicted free-run period has elapsed and ends the test_sync function. If there is an interrupt, the host CPU performs the interrupt process and then the free-run period has elapsed. The later external synchronization instruction and the Wait function are executed to finish the test_sync function.

従来は、ISSの内部処理命令の実行毎に、Wait関数を実行するようにしていた。即ち、図10A〜図10Cに示すプログラム例で説明すると、test_sync関数の替わりにWait関数を実行することによって、外部モジュールからの割込み要求に対応していた。ANSI−C言語で記述された内部処理命令の計算機上の実処理時間は、およそ20ナノ秒〜80ナノ秒である一方、SystemC言語のWait関数の計算機上の実処理時間は、1000ナノ秒程度である。従って、従来のISSにおけるように、Wait関数を全ての内部処理命令の後に挿入することは、無駄なWait関数の計算機上の実実行時間を発生させることになり、シミュレーションの計算機上の実実行時間が大幅に増大する原因となる。   Conventionally, the Wait function is executed every time the ISS internal processing instruction is executed. In other words, in the example of the program shown in FIGS. 10A to 10C, the Wait function is executed instead of the test_sync function, thereby responding to the interrupt request from the external module. The actual processing time on the computer of the internal processing instruction described in ANSI-C language is about 20 nanoseconds to 80 nanoseconds, while the actual processing time on the computer of the Wait function of the SystemC language is about 1000 nanoseconds. It is. Therefore, as in the conventional ISS, the insertion of the Wait function after all the internal processing instructions generates the actual execution time on the computer of the useless Wait function, and the actual execution time on the simulation computer. Cause a significant increase.

本実施形態においては、シミュレーションプログラムの命令セットにフリーラン期間という概念を持たせることにより、シミュレーション速度の高速化を実現している。また、ホストCPUは、シミュレーションプログラムの該当タスクにおいて、外部モジュールに対して外部同期命令を実行すると、SystemC言語のWait関数を実行し、該当タスク自身を待機状態にして、以降の処理を実行させない。   In this embodiment, the simulation speed is increased by giving the concept of a free run period to the instruction set of the simulation program. In addition, when the host CPU executes an external synchronization instruction to the external module in the corresponding task of the simulation program, the host CPU executes the Wait function of the SystemC language, puts the corresponding task into a standby state, and does not execute the subsequent processing.

図11は、シミュレーションプログラムの実行におけるフリーラン期間について説明するための図である。図11において、上段は、外部モジュールがシミュレーションプログラムに対して割込み要求をしなかった場合のタスクのフリーラン期間を表しており、下段は、外部モジュールがシミュレーションプログラムに対して割込み要求をした場合のタスクのフリーラン期間を表している。   FIG. 11 is a diagram for explaining a free-run period in the execution of the simulation program. In FIG. 11, the upper part shows the free run period of the task when the external module does not make an interrupt request to the simulation program, and the lower part shows the case when the external module makes an interrupt request to the simulation program. Represents the free run period of the task.

また、A点は、タスクがWait関数を実行したポイントを表している。A点において、タスクが外部モジュールに対して外部同期命令を実行し、同時に、当該タスク自身の処理を待機状態にして、以降の処理を停止する。タスクは、予測された時間(time)の経過後又はタスク起動要求(event)があった場合に、当該タスクを待機状態から起動して実行状態に移行する。図11において、点線矢印は、タスクの待機状態を表し、矢印は、タスクの実行状態を表している。Wait関数は、Wait(time,event)と表され、Wait関数における引数time及びeventは、予測された時間(time)の経過後又はタスク起動要求(event)のいずれかの指定があった場合に当該タスクを待機状態から起動するという内容を表している。   Point A represents a point where the task executes the Wait function. At point A, the task executes an external synchronization instruction to the external module, and at the same time, puts the task itself in a standby state and stops the subsequent processing. The task starts the task from the standby state and shifts to the execution state after the predicted time (time) has elapsed or when there is a task start request (event). In FIG. 11, a dotted line arrow represents a task standby state, and an arrow represents a task execution state. The Wait function is expressed as Wait (time, event), and the arguments time and event in the Wait function are when either the predicted time (time) has elapsed or a task activation request (event) is specified. The content indicates that the task is activated from a standby state.

図11の上段について説明する。タスクは、A点においてWait関数を実行すると、点線矢印に示されるように、予測された時間(time)が経過するまで、待機状態となる。予測された時間(time)が経過するとB点においてタスクが起動して、矢印に表されるように、スケジューリングされた期間(フリーラン期間)経過後の同期通信の時点(C点)まで内部処理命令を実行する。C点において、タスクは、外部同期命令を実行する。ここで、予測された時間(time)の経過後にタスクが起動してフリーラン実行する内部処理命令列の処理単位を、「同期までの実行単位」と呼ぶことにする。   The upper part of FIG. 11 will be described. When the Wait function is executed at the point A, the task is in a standby state until the predicted time (time) elapses as indicated by the dotted arrow. When the predicted time (time) elapses, the task starts at point B, and as shown by the arrow, internal processing is performed until the point of synchronous communication (point C) after the elapse of the scheduled period (free run period). Execute the instruction. At point C, the task executes an external synchronization instruction. Here, a processing unit of an internal processing instruction sequence in which a task starts and free-runs after a predicted time (time) has elapsed is referred to as an “execution unit until synchronization”.

図11の下段について説明する。タスクは、A点において、Wait関数を実行する。上段と同様に、タスクは、A点において、外部モジュールに対して外部同期命令を実行すると共に、タスク自身の処理を待機状態にして以降の処理を進行させない。外部モジュールは、シミュレーションプログラムからイベントを受信して所定の処理を開始するが、ある時点(割込み到達ポイントD点)において、シミュレーションプログラムに対して割込み要求を送信する。割り込み要求を受信したシミュレーションプログラムは、待機状態となっているタスクを起動する。   The lower part of FIG. 11 will be described. The task executes the Wait function at point A. As in the upper stage, the task executes an external synchronization instruction to the external module at point A, and sets the process of the task itself to a standby state and does not proceed with the subsequent processes. The external module receives an event from the simulation program and starts a predetermined process, but transmits an interrupt request to the simulation program at a certain point (interrupt arrival point D). The simulation program that has received the interrupt request starts a task that is in a standby state.

即ち、下段の場合において、タスクがE点において起動を開始してからフリーラン実行が可能であるのは、割込み到達ポイントD点までの処理に対応したものであるといえる。タスクが起動してから割込み到達ポイントD点までの期間を、「割込みまでの実行単位」とする。タスクが、Wait関数実行後にタスク起動要求(event)を受信した場合、タスクは、フリーラン期間を「同期までの実行単位」期間から「割込みまでの実行単位」期間に短縮する。シミュレーションプログラムにおいては、短縮された「割込みまでの実行単位」が、該当タスクでフリーラン実行され、割込み到達ポイントF点まで処理した後、外部モジュールからの割込み要求された割込み処理を行う。   That is, in the case of the lower stage, it can be said that the free run can be executed after the task starts at the point E corresponding to the processing up to the point D of the interrupt arrival point. The period from the start of the task to the interrupt arrival point D is defined as “execution unit until interrupt”. When the task receives a task activation request (event) after executing the Wait function, the task shortens the free-run period from the “execution unit until synchronization” period to the “execution unit until interrupt” period. In the simulation program, the shortened “execution unit until interrupt” is free-run by the corresponding task, and after processing up to the interrupt arrival point F, interrupt processing requested by an external module is performed.

このように、SystemC言語のWait関数におけるタスクの起動条件を、time指定とevent指定とのOR条件とすることによって、フリーラン実行の動作を維持しつつ、外部モジュールからの割込み要求に対応することができる。   As described above, by setting the task start condition in the Wait function of the SystemC language as an OR condition between the time specification and the event specification, it is possible to respond to an interrupt request from an external module while maintaining a free-run execution operation. Can do.

同期までの実行単位及び割り込みまでの実行単位は、内部処理命令を実行前に静的にスケジューリングすることによって決定される。しかしながら、例えば、バス調停によるストール等が発生した場合のように、静的にスケジューリングが行うことができない場合、即ち、動的にスケジューリングすることが必要な場合が考えられる。このような場合において、シミュレーションプログラムは、同期までの実行単位又は割り込みまでの実行単位を実行する前に、外部モジュールとの通信プロトコルマクロファイルを実行することにより外部モジュールからのイベント受信情報を得て、動的にスケジューリングを行うようにしてもよい。   The execution unit up to the synchronization and the execution unit up to the interrupt are determined by statically scheduling internal processing instructions before execution. However, for example, a case where scheduling cannot be performed statically, such as when a stall due to bus arbitration occurs, that is, a case where dynamic scheduling is necessary is conceivable. In such a case, the simulation program obtains event reception information from the external module by executing the communication protocol macro file with the external module before executing the execution unit until the synchronization or the execution unit until the interrupt. Alternatively, scheduling may be performed dynamically.

ここで、シミュレーションプログラムは、命令セットをサイクルアキュレートに処理するソフトウェアであり、一方、SystemC言語は、イベント発生に応じて外部との同期をとりながらシミュレーションを行うソフトウェアである。このような異なる性質をもったモジュール間の同期通信手法として、本実施形態においては、CSP理論として知られているランデブー同期を採用している。   Here, the simulation program is software that processes an instruction set in a cycle-accurate manner, while the SystemC language is software that performs simulation while synchronizing with the outside in response to the occurrence of an event. In this embodiment, rendezvous synchronization known as CSP theory is adopted as a synchronous communication method between modules having such different properties.

本発明は、フリーラン期間を設定することによって不要なWait関数を除去できるようにするものであるが、異なる処理体系のソフトウェアが混在する環境においても、ランデブー同期の手法を取り入れることにより、シミュレーションプログラムのサイクルアキュレートな処理の手法を維持したまま、シミュレーションの高速化を実現することができる。   The present invention makes it possible to remove an unnecessary wait function by setting a free-run period. However, even in an environment where softwares of different processing systems are mixed, a simulation program can be obtained by incorporating a rendezvous synchronization method. The simulation speed can be increased while maintaining the cycle accurate processing method.

図12は、本実施形態に係るシミュレーションプログラムの動作を説明するための図である。図12の第1列は、モジュールの種別を表している。本実施形態において、存在するモジュールは、外部モジュールとシミュレーションプログラムモジュールとの2種類に大別される。   FIG. 12 is a diagram for explaining the operation of the simulation program according to the present embodiment. The first column in FIG. 12 represents the module type. In the present embodiment, existing modules are roughly classified into two types: external modules and simulation program modules.

図12の第2列は、タスクの種別を表している。動作の説明は外部モジュールのタスクの種別によらないので、外部モジュールについて、モジュール名とタスク名とは同じ名称であるとして説明する。シミュレーションプログラムモジュールは、タスクとして、割込みインタフェースタスクと、割込みタスクと、第1のタスクと、第2のタスクとを含んでいる。   The second column in FIG. 12 represents the task type. Since the description of the operation does not depend on the task type of the external module, the external module will be described assuming that the module name and the task name are the same name. The simulation program module includes an interrupt interface task, an interrupt task, a first task, and a second task as tasks.

図12の第3列は、それぞれのタスクにおける処理の進行を表している。処理の進行は、左から右に向かって進み、ハッチングの部分は、タスクが実行状態であることを表している。それぞれのタスク間の矢印は、タスク間のイベントの送受信を表しており、また、矢印の向きが送受信の向きを表している。   The third column in FIG. 12 represents the progress of processing in each task. The progress of the process proceeds from left to right, and the hatched portion indicates that the task is in an execution state. The arrows between the tasks represent the transmission / reception of events between tasks, and the direction of the arrows represents the direction of transmission / reception.

ここで、タスクの進行図において示されている一重丸印は、SystemC言語の命令であるWait関数を表しており、二重丸印は、フリーランを実行するためのtest_sync関数を表している。   Here, a single circle mark shown in the task progress diagram represents a Wait function that is an instruction of the System C language, and a double circle mark represents a test_sync function for executing a free run.

図12において、矢印に付されている番号に従って、本実施形態に係るシミュレーションプログラムの動作について説明する。まず、割込みインタフェースタスクは、第1のタスクに対して起動要求イベントE1を送信し、第1のタスクを起動する。第1のタスクは、起動後、外部同期命令を実行して外部モジュールにイベントE2を送信すると共に、Wait関数を実行する。第1のタスクは、Wait関数の実行により、待機状態に移行する。   In FIG. 12, the operation of the simulation program according to the present embodiment will be described according to the numbers given to the arrows. First, the interrupt interface task transmits an activation request event E1 to the first task, and activates the first task. After starting, the first task executes an external synchronization command, transmits an event E2 to the external module, and executes a Wait function. The first task shifts to a standby state by executing the Wait function.

外部モジュールは、シミュレーションプログラム(第1のタスク)から受信したイベントE2に応答して所定の処理(割込みまでの実行単位)を実行する。ここでは、外部モジュールが、シミュレーションプログラムに対して割込み要求をする場合について説明する。外部モジュールは、割込みまでの実行単位を実行した時点で、シミュレーションプログラムに対して割込み要求イベントE3を送信する。   The external module executes a predetermined process (execution unit until interruption) in response to the event E2 received from the simulation program (first task). Here, a case where the external module makes an interrupt request to the simulation program will be described. The external module transmits an interrupt request event E3 to the simulation program when the execution unit up to the interrupt is executed.

シミュレーションプログラムは、割込みインタフェースタスクにおいて、割込み要求イベントE3を受信する。割込みインタフェースタスクは、外部モジュールから割込み要求を受信した後、第1のタスクに対して起動要求イベントE4を送信し、第1のタスクを起動する。   The simulation program receives the interrupt request event E3 in the interrupt interface task. After receiving the interrupt request from the external module, the interrupt interface task transmits an activation request event E4 to the first task and activates the first task.

第1のタスクは、実行状態に移行して、フリーラン期間のリスケジューリングを行い、リスケジューリングされたフリーラン期間において、割込みまでの実行単位を実行する(E5)。外部モジュールにおいて実行される「割込みまでの実行単位」と、第1のタスクにおいて実行される「割込みまでの実行単位」とを明確に規定することによって、シミュレーションプログラムと外部モジュールとの間で処理進行における同期をとることができる。   The first task shifts to the execution state, reschedules the free run period, and executes the execution unit up to the interrupt in the rescheduled free run period (E5). By clearly defining the “execution unit until interrupt” executed in the external module and the “execution unit until interrupt” executed in the first task, the process proceeds between the simulation program and the external module. Can be synchronized.

第1のタスクは、test_syncA及びtest_syncBによってフリーラン期間のタイムアップを判断しながら、割込みまでの実行単位をフリーラン実行する。test_syncBが、フリーラン期間のタイムアップを認識すると、割込みインタフェースタスクに対してイベントE6を送信する。第1のタスクは、実行状態から、割込み状態に移行する。   The first task free-runs the execution unit up to the interrupt while determining whether the free-run period is up based on test_syncA and test_syncB. When test_syncB recognizes that the free run period has expired, it sends an event E6 to the interrupt interface task. The first task shifts from the execution state to the interrupt state.

割込みインタフェースタスクは、外部モジュールからの割込み要求に応じて割込み処理をするために、割込みタスクの起動を行う(E7)。割込みインタフェースタスクは、割込みタスクに対して起動要求イベントE8を送信し、割込みタスクを起動する。   The interrupt interface task activates the interrupt task in order to perform interrupt processing in response to an interrupt request from the external module (E7). The interrupt interface task transmits an activation request event E8 to the interrupt task to activate the interrupt task.

割込みタスクは、実行状態に移行して、外部同期命令を実行して外部モジュールにイベントE9を送信すると共に、Wait関数を実行する。割込みタスクは、Wait関数の実行により、待機状態に移行する。   The interrupt task shifts to the execution state, executes the external synchronization instruction, transmits the event E9 to the external module, and executes the Wait function. The interrupt task shifts to a standby state by executing the Wait function.

外部モジュールは、シミュレーションプログラム(割込みタスク)から受信したイベントE9に対して、外部モジュールにおいて所定の処理(同期までの実行単位)を行う。外部モジュールは、同期までの実行単位の実行後、シミュレーションプログラム(割込みタスク)にイベントE10を返信する。   The external module performs predetermined processing (execution unit until synchronization) in the external module for the event E9 received from the simulation program (interrupt task). The external module returns an event E10 to the simulation program (interrupt task) after executing the execution unit until the synchronization.

一方、待機状態にある割込みタスクは、割込みタスク自身が有するタイマーによって起動し、実行状態に移行する。このタイマーは、同期までの実行単位を予測した時間を計測する。割込みタスクは、スケジューリングされたフリーラン期間において、同期までの実行単位を実行する(E11)。   On the other hand, the interrupt task in the standby state is activated by the timer included in the interrupt task itself and shifts to the execution state. This timer measures the time when the execution unit until synchronization is predicted. The interrupt task executes the execution unit until the synchronization in the scheduled free run period (E11).

割込みタスクは、test_syncC及びtest_syncDによって、フリーラン期間のタイムアップを判断しながら、同期までの実行単位をフリーラン実行する。test_syncDが、フリーラン期間のタイムアップを認識すると、割込みインタフェースタスクに対してイベントE12を送信する。   The interrupt task free-runs the execution unit until the synchronization while determining whether the free-run period is up or not based on test_syncC and test_syncD. When test_syncD recognizes that the free-run period has expired, it sends an event E12 to the interrupt interface task.

割込みインタフェースタスクは、外部モジュールからの割込み要求に対する割込み処理が終了したので、処理を第1のタスクに戻す(E13)。割込みインタフェースタスクは、第1のタスクに対して起動要求イベントE14を送信して第1のタスクを再起動する。   The interrupt interface task returns the process to the first task because the interrupt process for the interrupt request from the external module is completed (E13). The interrupt interface task transmits a start request event E14 to the first task to restart the first task.

第1のタスクは、起動後、Wait関数を実行することにより、外部同期命令を実行し、外部モジュールにイベントE15を送信した後、待機状態に移行する。外部モジュールは、シミュレーションプログラム(第1のタスク)から受信したイベントE15に応じて、所定の処理(同期までの実行単位)を行う。外部モジュールは、所定の処理の実行後、シミュレーションプログラム(第1のタスク)にイベントE16を返信する。   After starting, the first task executes a Wait function to execute an external synchronization instruction, transmits an event E15 to the external module, and then shifts to a standby state. The external module performs a predetermined process (execution unit until synchronization) according to the event E15 received from the simulation program (first task). The external module returns an event E16 to the simulation program (first task) after executing the predetermined process.

一方、待機状態にある第1のタスクは、第1のタスク自身が有するタイマーによって起動し、実行状態に移行する。このタイマーは、外部モジュールにおける同期までの実行単位を予測した時間を計測する。第1のタスクは、スケジューリングされたフリーラン期間(同期までの実行単位)を実行する(E17)。   On the other hand, the first task in the standby state is activated by the timer included in the first task itself, and shifts to the execution state. This timer measures the time when the execution unit until the synchronization in the external module is predicted. The first task executes the scheduled free-run period (execution unit until synchronization) (E17).

第1のタスクは、test_syncE及びtest_syncFによって、フリーラン期間のタイムアップを判断しながら、同期までの実行単位をフリーラン実行する。test_syncFが、フリーラン期間のタイムアップを認識すると、割込みインタフェースタスクに対して、タスク終了通知イベントE18を送信する。   The first task free-runs the execution unit until the synchronization while determining whether the free-run period has timed out based on test_syncE and test_syncF. When test_syncF recognizes that the free run period has expired, it sends a task end notification event E18 to the interrupt interface task.

割込みインタフェースタスクは、第1のタスクのタイムアップを検出して、第1のタスクの次に優先順位の高い第2のタスクに実行を移す(E19)。割込みインタフェースタスクは、第2のタスクに対して起動要求イベントE20を送信して第2のタスクを起動する。   The interrupt interface task detects the time-up of the first task, and transfers the execution to the second task having the second highest priority after the first task (E19). The interrupt interface task transmits an activation request event E20 to the second task to activate the second task.

第2のタスクは、起動後、外部同期命令を実行して外部モジュールにイベントを送信すると共に、Wait関数を実行する。第2のタスクは、待機状態に移行する。外部モジュールは、シミュレーションプログラム(第2のタスク)から受信したイベントに応じて、所定の処理(同期までの実行単位)を行う。外部モジュールは、同期までの実行単位の実行後、シミュレーションプログラム(第2のタスク)にイベントE22を返信する。   After starting, the second task executes an external synchronization instruction to transmit an event to the external module and executes a Wait function. The second task enters a standby state. The external module performs a predetermined process (execution unit until synchronization) according to the event received from the simulation program (second task). The external module returns an event E22 to the simulation program (second task) after executing the execution unit until the synchronization.

一方、待機状態にある第2のタスクは、第2のタスク自身が有するタイマーによって起動し、実行状態に移行する。このタイマーは、同期までの実行単位を予測した時間を計測する。第2のタスクは、スケジューリングされたフリーラン期間(同期までの実行単位)を実行する(E23)。   On the other hand, the second task in the standby state is activated by the timer of the second task itself, and shifts to the execution state. This timer measures the time when the execution unit until synchronization is predicted. The second task executes the scheduled free-run period (execution unit until synchronization) (E23).

第2のタスクは、test_syncG及びtest_syncHによって、フリーラン期間のタイムアップを判断しながら、同期までの実行単位をフリーラン実行する。test_syncHが、フリーラン期間のタイムアップを認識すると、割込みインタフェースタスクに対して、タスク終了通知イベントE24を送信する。   The second task performs free-run execution on the execution unit until the synchronization while determining whether the free-run period has expired based on test_syncG and test_syncH. When test_syncH recognizes that the free run period has expired, it sends a task end notification event E24 to the interrupt interface task.

シミュレーションプログラムは、図1に示すシミュレーションプログラム生成装置によって生成されるが、シミュレーションプログラム生成環境において、シミュレーションプログラムを生成するために必要な要素として、コマンド作成用ファイル(ヘッダファイル)と、実CPUのデバイス環境ファイル(cppファイル、ヘッダファイル)とが存在する。   The simulation program is generated by the simulation program generation apparatus shown in FIG. 1, but as a necessary element for generating the simulation program in the simulation program generation environment, a command creation file (header file) and an actual CPU device An environment file (cpp file, header file) exists.

ここで、コマンド操作により、シミュレーションプログラム生成命令を実行すると、シミュレーションプログラム生成装置は、組込みアプリケーション開発環境において生成されたアプリケーションプログラム実行ファイル(saファイル)を読み出し、シミュレーションプログラムコードを生成することにより、シミュレーションプログラムソースファイル(cppファイル、ヘッダファイル)を生成する。   Here, when a simulation program generation instruction is executed by a command operation, the simulation program generation apparatus reads an application program execution file (sa file) generated in the embedded application development environment and generates a simulation program code, thereby performing a simulation. A program source file (cpp file, header file) is generated.

シミュレーション環境において、シミュレーションプログラムソースファイルは、SystemC言語の周辺回路を記述しているファイルとマージされ、SystemC言語上でのシミュレーションプログラムの実行環境が構築され、コンパイルされることによって、シミュレーションプログラム実行ファイルが生成される。シミュレーションプログラム実行ファイルの生成や、シミュレーションプログラムの実行は、使用者によるコマンド操作によって行われる。   In the simulation environment, the simulation program source file is merged with the file describing the peripheral circuit of the SystemC language, and the execution environment of the simulation program on the SystemC language is constructed and compiled. Generated. Generation of the simulation program execution file and execution of the simulation program are performed by command operations by the user.

図13は、シミュレーションプログラムを実行可能なシミュレーション環境のモデルを示す図である。SystemC言語は、最上位階層のメイン関数sc_main400に、モジュールとして、TB_source410と、Ssiss_iss420とが定義されている。Ssiss_iss420は、プロセスとして、SC_METHOD421と、SC_THREAD422とを含んでいる。SC_METHOD421やSC_THREAD422は、一般的に、SystemC言語に含まれるプロセスとして知られているものである。   FIG. 13 is a diagram illustrating a model of a simulation environment in which a simulation program can be executed. In the System C language, TB_source 410 and Ssis_iss 420 are defined as modules in the main function sc_main 400 of the highest hierarchy. The Ssiss_iss 420 includes SC_METHOD 421 and SC_THREAD 422 as processes. SC_METHOD 421 and SC_THREAD 422 are generally known as processes included in the SystemC language.

TB_source410は、本実施形態における外部モジュールに該当する。また、Ssiss_iss420は、本実施形態におけるシミュレーションプログラムに該当する。本実施形態においては、SC_METHOD421に、シミュレーションプログラムへの割込みを受信するスレッドとして、recv_int関数が定義されている。また、SC_THREAD422に、割込みを実施するスレッドとして、V_vec_01関数が定義されている。   TB_source 410 corresponds to the external module in the present embodiment. Ssis_iss 420 corresponds to the simulation program in this embodiment. In this embodiment, a recv_int function is defined in SC_METHOD 421 as a thread for receiving an interrupt to the simulation program. In addition, a function V_vec_01 is defined in SC_THREAD 422 as a thread for executing an interrupt.

TB_source410のtb_reset関数又はtb_int0関数等が実行されると、Ssiss_iss420のrecv_int関数とイベントにより同期が確立される。recv_int関数は、割込み要求等を受信すると、必要に応じて、V_vec_01関数等を実行する。
図13において、test_sync( )、V_vec_01( )〜V_vec_nn( )、V_00C00200( )、V_00C0077E( )は、V_vec_01関数の実行によってリンクされる関数を表している。
When the tb_reset function or the tb_int0 function of the TB_source 410 is executed, synchronization is established by the recv_int function of the Ssiss_iss420 and the event. When receiving the interrupt request or the like, the recv_int function executes the V_vec_01 function or the like as necessary.
In FIG. 13, test_sync (), V_vec_01 () to V_vec_nn (), V_00C00200 (), and V_00C0077E () represent functions linked by execution of the V_vec_01 function.

これらのプロセス、スレッド、リンクされる関数の他に、プロセス実行の上で初期化の機能を持つ一般的なイニシャライズ関数等を含むことにより、SystemC言語上でのシミュレーションプログラム実行環境が構成される。   In addition to these processes, threads, and linked functions, a simulation program execution environment on the SystemC language is configured by including a general initialization function having an initialization function in process execution.

図14は、本実施形態に係るシミュレーションプログラムの実行における効果を示す図である。図14において、横軸は、シミュレーションプログラムの実施試験パターンを示しており、縦軸は、それぞれの実施試験における実行速度を示している。また、それぞれの実施試験パターンについて、外部モジュールとの外部同期の種類によって、次の4つのモードにおける試験を行った。   FIG. 14 is a diagram illustrating an effect in the execution of the simulation program according to the present embodiment. In FIG. 14, the horizontal axis indicates the execution test pattern of the simulation program, and the vertical axis indicates the execution speed in each execution test. In addition, each test pattern was tested in the following four modes depending on the type of external synchronization with the external module.

フリーランモードは、シミュレーションプログラムにおいてWait関数を実行しない試験モードである。
ブロック単位モードは、シミュレーションプログラムのプログラム処理フローにおいて、処理が分岐する分岐ポイントと、分岐された処理が合流する合流ポイントと、関数を呼び出すコールポイントとにおいて、Wait関数を実行する試験モードである。
The free run mode is a test mode in which no Wait function is executed in the simulation program.
The block unit mode is a test mode in which a Wait function is executed at a branch point where a process branches, a merge point where a branched process joins, and a call point that calls a function in the program processing flow of the simulation program.

ライトモードとは、ブロック単位モードに加えて、外部モジュールへのWrite命令を実行するタイミングでWait関数を実行する試験モードである。
ライトリードモードは、ライトモードに加えて、外部モジュールへのRead命令のタイミングでWait関数を実行する試験モードである。
以上の4種類の試験モードの中では、ライトリードパターンが最もWait関数を実行する回数が多く、実際に使用されるシミュレーションプログラムに近い形態である。
The write mode is a test mode in which the Wait function is executed at the timing of executing the Write instruction to the external module in addition to the block unit mode.
The write / read mode is a test mode in which the Wait function is executed at the timing of the Read instruction to the external module in addition to the write mode.
Among the above four types of test modes, the write / read pattern has the largest number of times to execute the Wait function, and is a form close to a simulation program that is actually used.

フリーランモードから、ブロック単位モード、ライトモード、ライトリードモードになるに従って、Wait関数をシミュレーションプログラムに挿入する数が多くなるため、シミュレーションプログラムの実行速度は遅くなる。実施試験パターンにおいては、メモリアクセス等の内部処理命令の回数を変化させて、複数の実施試験パターンとしている。   As the number of Wait functions inserted into the simulation program increases from the free run mode to the block unit mode, the write mode, and the write / read mode, the execution speed of the simulation program decreases. In the execution test pattern, the number of internal processing instructions such as memory access is changed to form a plurality of execution test patterns.

図14に示すように、それぞれの実施試験パターンにおいて、フリーラン状態で、8MIPS(ミリオン・インストラクション・パー・セカンド)、最も実行速度が遅いライトリードモードについても、およそ0.5MIPS〜2MIPSの速度を実現している。従来のISSでは、実使用状態で0.1MIPSから0.5MIPS程度、フリーランに近い状態でも1MIPS程度であるので、本発明の効果が図14によって明白となる。   As shown in FIG. 14, in each test pattern, in the free-run state, 8 MIPS (Million Instruction Per Second), and the write / read mode with the slowest execution speed, about 0.5 MIPS to 2 MIPS Realized. Since the conventional ISS is about 0.1 MIPS to about 0.5 MIPS in the actual use state and about 1 MIPS even in the state close to the free run, the effect of the present invention becomes clear from FIG.

一般に、シミュレーションプログラムには、組込みアプリケーションプログラム等のエミュレーションソフトウェアという役割と、CPUやDSPを開発する段階においてのハードウェアのリファレンスモデルとしての役割とを有している。本発明においては、前者のエミュレーションソフトウェアという役割を有している。エミュレーションソフトウェアは、アプリケーションプログラムのデバッグという観点から繰り返し使用されることが多い。本発明は、シミュレーションプログラムの高速化を実現することによって、アプリケーションプログラム開発の期間を短縮できるという効果を奏する。   In general, a simulation program has a role of emulation software such as an embedded application program and a role of a hardware reference model at the stage of developing a CPU or a DSP. The present invention has the role of the former emulation software. Emulation software is often used repeatedly from the viewpoint of debugging application programs. The present invention achieves the effect of shortening the period of application program development by realizing high-speed simulation programs.

本実施形態においては、実CPUとしてC33PEを使用しているが、それ以外のCPUを使用することもできる。例えば、C33シリーズの他のバージョンや、ARM7−TDMI等を使用することも可能である。   In the present embodiment, C33PE is used as a real CPU, but other CPUs may be used. For example, other versions of the C33 series, ARM7-TDMI, or the like can be used.

本発明の一実施形態に係るシミュレーションプログラム生成装置を示す図。The figure which shows the simulation program production | generation apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態におけるプログラム開発手順を示す図。The figure which shows the program development procedure in one Embodiment of this invention. 本実施形態におけるシミュレーションプログラム生成装置の動作を示す図。The figure which shows operation | movement of the simulation program production | generation apparatus in this embodiment. 本実施形態におけるシミュレーション環境を示す図。The figure which shows the simulation environment in this embodiment. 本実施形態においてスケジューリングされたタスクの命令構成を示す図。The figure which shows the command structure of the task scheduled in this embodiment. test_sync関数が挿入されたタスクの命令構成を示す図。The figure which shows the command structure of the task in which the test_sync function was inserted. test_sync関数の処理フローを示す図。The figure which shows the processing flow of a test_sync function. 割込みの優先判断を含むtest_sync関数の処理フローを示す図。The figure which shows the processing flow of the test_sync function including the priority determination of interruption. test_sync関数のプログラム例を示す図。The figure which shows the example of a program of a test_sync function. シミュレーションプログラムの一部の例を示す図。The figure which shows the example of a part of simulation program. シミュレーションプログラムの一部の例を示す図。The figure which shows the example of a part of simulation program. シミュレーションプログラムの一部の例を示す図。The figure which shows the example of a part of simulation program. フリーラン期間について説明するための図。The figure for demonstrating a free run period. 本実施形態に係るシミュレーションプログラムの動作を説明するための図。The figure for demonstrating operation | movement of the simulation program which concerns on this embodiment. シミュレーションプログラムを実行可能なシミュレーション環境を示す図。The figure which shows the simulation environment which can execute a simulation program. 本実施形態に係るシミュレーションプログラム実行における効果を示す図。The figure which shows the effect in the simulation program execution which concerns on this embodiment. ISSを用いて機器組込みプログラムを開発する方法を説明するための図。The figure for demonstrating the method of developing an apparatus built-in program using ISS. ISSと外部モジュールとのイベント同期を示す図。The figure which shows the event synchronization of ISS and an external module.

符号の説明Explanation of symbols

1 シミュレーションプログラム生成装置、 2 汎用のコンピュータ、 3 CPU、 4 ROM、 5 RAM、 6 ハードディスク、 7 インタフェース、 8 バス、 9 外部入出力装置、 10 組込みアプリケーションプログラム開発環境、 11 シミュレーションプログラム生成環境、 12 シミュレーション環境、 13 ソースコード、 14 クロスコンパイラ、 15 アプリケーションプログラム実行ファイル、 16 シミュレーションプログラムコード、 17 コンパイラ、 18 シミュレーションプログラム実行ファイル、 30 シミュレーションプログラム、 31 ハードウェア、 32 シミュレーションカーネル、 33、34 スレッド(タスク)、 35、36 割込み処理タスク、 37 スレッド(割込みインタフェースタスク)、 400 sc_main、 410 TB_source、 411、412、422 SC_THREAD、 421 SC_METHOD   DESCRIPTION OF SYMBOLS 1 Simulation program production | generation apparatus, 2 General-purpose computer, 3 CPU, 4 ROM, 5 RAM, 6 Hard disk, 7 Interface, 8 Bus, 9 External input / output device, 10 Embedded application program development environment, 11 Simulation program production environment, 12 Simulation Environment, 13 source code, 14 cross compiler, 15 application program execution file, 16 simulation program code, 17 compiler, 18 simulation program execution file, 30 simulation program, 31 hardware, 32 simulation kernel, 33, 34 threads (task), 35, 36 Interrupt processing task, 37 threads (interrupt Interface task), 400 sc_main, 410 TB_source, 411, 412, 422 SC_THREAD, 421 SC_METHOD

Claims (6)

アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成装置であって、
前記実CPU上で動作可能なアプリケーションプログラムを格納する格納手段と、
前記格納手段からアプリケーションプログラムを読み出し、読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成する処理手段と、
を具備するシミュレーションプログラム生成装置。
A simulation program generation device for generating a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program,
Storage means for storing an application program operable on the real CPU;
By reading the application program from the storage means and scheduling the instruction execution timing in consideration of the instruction execution time based on the internal processing instruction and the external synchronization instruction of the task included in the read application program The free run period from the completion of the execution of the external synchronization instruction to the next execution of the external synchronization instruction is determined, and the internal processing instruction and the function for calculating the remaining time of the free run period are alternately executed in the free run period Processing means for generating a simulation program as
A simulation program generating apparatus comprising:
前記関数が、フリーラン期間の残り時間が正の値でないときに、割込みの有無を判定して割込みが有る場合には割込み処理を実行するように前記ホストCPUを制御し、その後に残りの処理と外部同期命令を実行するように前記ホストCPUを制御する関数である、請求項1記載のシミュレーションプログラム生成装置。   When the remaining time of the free run period is not a positive value, the function determines whether or not there is an interrupt, and if there is an interrupt, the function controls the host CPU to execute the interrupt process. The simulation program generation device according to claim 1, which is a function for controlling the host CPU to execute an external synchronization command. 前記処理手段が、外部同期命令の実行に伴って同期関数が実行されるようにシミュレーションプログラムを生成し、前記同期関数が、前記タスクの処理を待機状態にするように前記ホストCPUを制御し、設定された時間の経過後又はタスク起動要求があった場合に前記タスクの処理を起動するように前記ホストCPUを制御する関数である、請求項1又は2記載のシミュレーションプログラム生成装置。   The processing means generates a simulation program so that a synchronization function is executed in accordance with the execution of an external synchronization instruction, and the synchronization function controls the host CPU so that the task processing is in a standby state. The simulation program generation device according to claim 1, wherein the simulation program generation device is a function that controls the host CPU to start processing of the task after elapse of a set time or when there is a task start request. アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成方法であって、
前記実CPU上で動作可能なアプリケーションプログラムを格納する格納手段からアプリケーションプログラムを読み出すステップと、
読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成するステップと、
を具備するシミュレーションプログラム生成方法。
A simulation program generation method for generating a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program,
Reading an application program from storage means for storing an application program operable on the real CPU;
Execution of the external synchronous instruction is completed by scheduling the instruction execution timing in consideration of the instruction execution time based on the internal processing instruction and external synchronous instruction of the task included in the read application program. A free run period from the start to the next execution of the external synchronization instruction is determined, and a simulation program is generated so that the internal processing instruction and the function for obtaining the remaining time of the free run period are alternately executed in the free run period Steps,
A simulation program generation method comprising:
アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムを生成するシミュレーションプログラム生成プログラムであって、
前記実CPU上で動作可能なアプリケーションプログラムを格納する格納手段からアプリケーションプログラムを読み出す手順と、
読み出されたアプリケーションプログラムに含まれているタスクの内部処理命令と外部同期命令とに基づいて、命令実行時間を考慮して命令実行タイミングのスケジューリングを行うことにより、外部同期命令の実行が完了してから次に外部同期命令を実行するまでのフリーラン期間を定め、該フリーラン期間において内部処理命令とフリーラン期間の残り時間を求める関数とが交互に実行されるようにシミュレーションプログラムを生成する手順を、
CPUに実行させるシミュレーションプログラム生成プログラム。
A simulation program generation program for generating a simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program,
A procedure for reading an application program from a storage means for storing an application program operable on the real CPU;
Execution of the external synchronous instruction is completed by scheduling the instruction execution timing in consideration of the instruction execution time based on the internal processing instruction and external synchronous instruction of the task included in the read application program. A free run period from the start to the next execution of the external synchronization instruction is determined, and a simulation program is generated so that the internal processing instruction and the function for obtaining the remaining time of the free run period are alternately executed in the free run period Steps
A simulation program generation program to be executed by the CPU.
アプリケーションプログラムの稼動環境における実CPUの命令実行過程のシミュレーションをホストCPUに行わせるシミュレーションプログラムであって、
前記実CPU上で動作可能なアプリケーションプログラムに含まれているタスクの外部同期命令を実行する手順と、
前記外部同期命令の実行が完了した後に、設定されたフリーラン期間において、内部処理命令とフリーラン期間の残り時間を求める関数とを交互に実行する手順と、
フリーラン期間の残り時間が正の値でないときに、割込みの有無を判定して割込みが有る場合には割込み処理を実行し、その後に外部同期命令を実行する手順を、
前記ホストCPUに実行させるシミュレーションプログラム。
A simulation program for causing a host CPU to perform a simulation of an instruction execution process of a real CPU in an operating environment of an application program,
A procedure for executing an external synchronization instruction of a task included in an application program operable on the real CPU;
A procedure for alternately executing an internal processing instruction and a function for obtaining a remaining time of a free run period in a set free run period after the execution of the external synchronization instruction is completed;
When the remaining time of the free-run period is not a positive value, determine whether or not there is an interrupt, and if there is an interrupt, execute the interrupt process and then execute the external synchronization instruction.
A simulation program to be executed by the host CPU.
JP2006293630A 2006-10-30 2006-10-30 Simulation program, and apparatus, method and program for generating the same Withdrawn JP2008112243A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006293630A JP2008112243A (en) 2006-10-30 2006-10-30 Simulation program, and apparatus, method and program for generating the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006293630A JP2008112243A (en) 2006-10-30 2006-10-30 Simulation program, and apparatus, method and program for generating the same

Publications (1)

Publication Number Publication Date
JP2008112243A true JP2008112243A (en) 2008-05-15

Family

ID=39444741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006293630A Withdrawn JP2008112243A (en) 2006-10-30 2006-10-30 Simulation program, and apparatus, method and program for generating the same

Country Status (1)

Country Link
JP (1) JP2008112243A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421863A (en) * 2022-09-14 2022-12-02 北京计算机技术及应用研究所 Universal MIPS64 processor instruction set virtualization simulation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115421863A (en) * 2022-09-14 2022-12-02 北京计算机技术及应用研究所 Universal MIPS64 processor instruction set virtualization simulation method
CN115421863B (en) * 2022-09-14 2023-04-28 北京计算机技术及应用研究所 Universal MIPS64 processor instruction set virtualization simulation method

Similar Documents

Publication Publication Date Title
JP4667206B2 (en) Multi-core model simulation program, recording medium storing the program, multi-core model simulator, and multi-core model simulation method
JP4717492B2 (en) Multi-core model simulator
JP4975544B2 (en) Simulation apparatus and program
Schliecker et al. Real-time performance analysis of multiprocessor systems with shared memory
EP3364296B1 (en) Simulating execution-time variations and scheduling in a block-oriented simulation system
US20120029900A1 (en) Simulation method and system for simulating a multi-core hardware platform
JP2010286898A (en) Multithread execution device, and multithread execution method
He et al. Timed RTOS modeling for embedded system design
Stattelmann et al. Fast and accurate resource conflict simulation for performance analysis of multi-core systems
Ceng et al. A high-level virtual platform for early MPSoC software development
WO2018149495A1 (en) A method and system to fetch multicore instruction traces from a virtual platform emulator to a performance simulation model
US10445445B2 (en) Sliding time window control mechanism for parallel execution of multiple processor core models in a virtual platform simulation
Razaghi et al. Host-compiled multicore RTOS simulator for embedded real-time software development
Abdi et al. Automatic TLM generation for early validation of multicore systems
Yi et al. Fast and accurate cosimulation of MPSoC using trace-driven virtual synchronization
JP2008059192A (en) Simulator for verifying coordination between hardware and software
JP5542643B2 (en) Simulation apparatus and simulation program
JP5510258B2 (en) Simulation device
Yi et al. Virtual synchronization technique with OS modeling for fast and time-accurate cosimulation
JP2008112243A (en) Simulation program, and apparatus, method and program for generating the same
Wu et al. A distributed timing synchronization technique for parallel multi-core instruction-set simulation
JP5354102B2 (en) Multi-core processor system, communication control method, and communication control program
JP2015170081A (en) simulation device and simulation program
Schnerr et al. Systemc-based performance analysis of embedded systems
JP5226848B2 (en) Simulation apparatus and program

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100105