JP2014142725A - Simulation program, simulation method, and simulation device - Google Patents

Simulation program, simulation method, and simulation device Download PDF

Info

Publication number
JP2014142725A
JP2014142725A JP2013009667A JP2013009667A JP2014142725A JP 2014142725 A JP2014142725 A JP 2014142725A JP 2013009667 A JP2013009667 A JP 2013009667A JP 2013009667 A JP2013009667 A JP 2013009667A JP 2014142725 A JP2014142725 A JP 2014142725A
Authority
JP
Japan
Prior art keywords
block
series
processing
reference source
control unit
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.)
Granted
Application number
JP2013009667A
Other languages
Japanese (ja)
Other versions
JP6011356B2 (en
Inventor
Takayuki Sasaki
貴行 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013009667A priority Critical patent/JP6011356B2/en
Publication of JP2014142725A publication Critical patent/JP2014142725A/en
Application granted granted Critical
Publication of JP6011356B2 publication Critical patent/JP6011356B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve the efficiency of a simulation for evaluating the performance of a system.SOLUTION: A simulation device 100 executes a simulation for evaluating the performance of a system at a level of abstraction higher than that of an RTL such as an ESL. The simulation device 100 executes a reference source RS and an architecture model AM with different threads, thereby executing a simulation for simulating the behavior of a block depending on an algorithm of the reference source RS. Then, the simulation device 100 outputs a simulation result SR.

Description

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

従来、ESL(Electronic System Level)などのRTL(Register Transfer Level)よりも抽象度が高いレベルでシミュレーションモデルを作成してシステムの性能評価が行われる場合がある。また、表計算ソフトなどを用いたユーザの手計算により、システムの性能を見積もる場合がある。   Conventionally, there is a case where a system performance evaluation is performed by creating a simulation model at a higher level of abstraction than RTL (Register Transfer Level) such as ESL (Electronic System Level). Further, the system performance may be estimated by manual calculation by a user using spreadsheet software or the like.

関連する先行技術としては、例えば、ソースコード記述を読み取って、メモリ中に記憶される合成中間形式を生成し、メモリ中の合成中間形式を探索してプロセスごとにアレイを見出して、GUI(Graphical User Interface)中にリストアップする技術がある。また、抽象度の高いシミュレーションを対象とし、設計の上流工程においてシステムアーキテクチャを探求する際に最適なアーキテクチャ構成を求めるための技術がある。また、バスアーキテクチャの設計から論理合成までの条件を統合的に適用してシステム設計を支援する技術がある。   Related prior art includes, for example, reading a source code description to generate a composite intermediate form stored in memory, searching the composite intermediate form in memory to find an array for each process, and GUI (Graphical There is a technology listed in User Interface. Further, there is a technique for obtaining an optimum architecture configuration when searching for a system architecture in an upstream process of design, targeting a simulation with a high level of abstraction. In addition, there is a technology that supports system design by comprehensively applying conditions from bus architecture design to logic synthesis.

特開2009−093682号公報JP 2009-093682 A 特開2010−039677号公報JP 2010-039677 A 特開2006−215852号公報JP 2006-215852 A

しかしながら、従来技術によれば、システムの性能を評価するためのシミュレーションモデルの作成に時間や手間がかかるという問題がある。例えば、ESLであってもシミュレーションモデルの作成に数ヶ月単位の期間を要することがあり、顧客との商談時などの設計段階よりも前の段階にシステムの性能を評価することが難しい。   However, according to the prior art, there is a problem that it takes time and labor to create a simulation model for evaluating the performance of the system. For example, even in ESL, it may take several months to create a simulation model, and it is difficult to evaluate the performance of the system at a stage prior to the design stage such as during a business talk with a customer.

また、近年では、様々なハードウェアブロックを組み合わせてSoC(System on a Chip)を設計する場合が多く、様々な機能が含まれるようになってきている。このため、表計算ソフトなどを用いた手計算でシステムの性能を見積もるには、多数の専門家が経験と勘を駆使して机上検討を行うことになり作業時間やコストが増大する。   In recent years, SoC (System on a Chip) is often designed by combining various hardware blocks, and various functions have been included. For this reason, in order to estimate the performance of the system by manual calculation using spreadsheet software or the like, a large number of specialists will make use of experience and intuition, and desk work will be required, which will increase work time and cost.

1つの側面では、本発明は、システムの性能を評価するシミュレーションの効率化を図るシミュレーションプログラム、シミュレーション方法およびシミュレーション装置を提供することを目的とする。   In one aspect, an object of the present invention is to provide a simulation program, a simulation method, and a simulation apparatus for improving the efficiency of simulation for evaluating the performance of a system.

本発明の一側面によれば、システムの機能をプログラム言語で記述したリファレンスソースを取得し、前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させるシミュレーションプログラム、シミュレーション方法およびシミュレーション装置が提案される。   According to one aspect of the present invention, an architecture is provided that includes a reference source that describes a system function in a programming language, a plurality of blocks that simulate the operation of the system, and a control unit that controls the plurality of blocks. A model is acquired, and a loop process of a series of processes including a process whose contents change by a conditional branch based on data sequentially selected from a data string to be processed is executed based on the reference source, and the series of processes is performed. Each time execution of the included processing is completed, the parameter value set according to the processing content of the processing is written into a buffer accessed by a block that realizes the processing among the plurality of blocks, and the control unit When the execution of the series of processes is completed, the process executed first in the series of processes is realized. Activating the locking, by the block, by to read the parameter values from the buffer in which the block is accessed, a simulation program for executing the calculation processing based on the parameter value, a simulation method and simulation apparatus is proposed.

本発明の一態様によれば、システムの性能を評価するシミュレーションの効率化を図ることができるという効果を奏する。   According to one aspect of the present invention, it is possible to improve the efficiency of simulation for evaluating the performance of a system.

図1は、実施の形態にかかるシミュレーション方法の一実施例を示す説明図である。FIG. 1 is an explanatory diagram of an example of the simulation method according to the embodiment. 図2は、リファレンスソースRSを擬似コードで記述した記述例を示す説明図である。FIG. 2 is an explanatory diagram illustrating a description example in which the reference source RS is described in pseudo code. 図3は、アーキテクチャモデルAMの具体例を示す説明図(その1)である。FIG. 3 is an explanatory diagram (part 1) of a specific example of the architecture model AM. 図4は、アーキテクチャモデルAMの動作シーケンスの一例を示す説明図である。FIG. 4 is an explanatory diagram showing an example of an operation sequence of the architecture model AM. 図5は、制御部の記述例を示す説明図である。FIG. 5 is an explanatory diagram illustrating a description example of the control unit. 図6は、ブロックの記述例を示す説明図である。FIG. 6 is an explanatory diagram showing an example of block description. 図7は、シミュレーションモデルのメイン記述例を示す説明図である。FIG. 7 is an explanatory diagram illustrating a main description example of the simulation model. 図8は、シミュレーション装置100のハードウェア構成例を示すブロック図である。FIG. 8 is a block diagram illustrating a hardware configuration example of the simulation apparatus 100. 図9は、シミュレーション装置100の機能的構成例を示すブロック図である。FIG. 9 is a block diagram illustrating a functional configuration example of the simulation apparatus 100. 図10Aは、リファレンスソースRSの記述例を示す説明図(その1)である。FIG. 10A is an explanatory diagram (part 1) of a description example of the reference source RS. 図10Bは、リファレンスソースRSの記述例を示す説明図(その2)である。FIG. 10B is an explanatory diagram (part 2) of a description example of the reference source RS. 図11は、入力ファイルの具体例を示す説明図である。FIG. 11 is an explanatory diagram showing a specific example of an input file. 図12は、出力ファイルの具体例を示す説明図である。FIG. 12 is an explanatory diagram showing a specific example of an output file. 図13は、先行アクセス記述の挿入例を示す説明図である。FIG. 13 is an explanatory diagram of an example of inserting a preceding access description. 図14Aは、リファレンスソースRSとアーキテクチャモデルAMとの接続部分の記述例を示す説明図(その1)である。FIG. 14A is an explanatory diagram (part 1) of a description example of a connection portion between the reference source RS and the architecture model AM. 図14Bは、リファレンスソースRSとアーキテクチャモデルAMとの接続部分の記述例を示す説明図(その2)である。FIG. 14B is an explanatory diagram (part 2) of a description example of a connection portion between the reference source RS and the architecture model AM. 図15は、アーキテクチャモデルAMの具体例を示す説明図(その2)である。FIG. 15 is an explanatory diagram (part 2) of a specific example of the architecture model AM. 図16は、プローバ関数の挿入例を示す説明図である。FIG. 16 is an explanatory diagram of an example of inserting a prober function. 図17Aは、部品の記述例を示す説明図(その1)である。FIG. 17A is an explanatory diagram (part 1) of a description example of a component. 図17Bは、部品の記述例を示す説明図(その2)である。FIG. 17B is an explanatory diagram (part 2) of a description example of a component. 図17Cは、部品の記述例を示す説明図(その3)である。FIG. 17C is an explanatory diagram (part 3) of a description example of a component. 図17Dは、部品の記述例を示す説明図(その4)である。FIG. 17D is an explanatory diagram (part 4) of a description example of a component. 図18は、部品間の結線関係の記述例を示す説明図である。FIG. 18 is an explanatory diagram illustrating a description example of the connection relationship between components. 図19は、リファレンスソースRSを起動するための記述例を示す説明図である。FIG. 19 is an explanatory diagram showing a description example for starting the reference source RS. 図20は、リファレンスソースRS・アーキテクチャモデルAM間のソフトウェア構造を示す説明図である。FIG. 20 is an explanatory diagram showing a software structure between the reference source RS and the architecture model AM. 図21は、シミュレーション結果SRの具体例を示す説明図である。FIG. 21 is an explanatory diagram of a specific example of the simulation result SR. 図22は、シミュレーション装置100のシミュレーション処理手順の一例を示すフローチャートである。FIG. 22 is a flowchart illustrating an example of a simulation processing procedure of the simulation apparatus 100. 図23は、リファレンスソースRSの処理手順の一例を示すフローチャートである。FIG. 23 is a flowchart illustrating an example of a processing procedure of the reference source RS. 図24は、制御部CTの処理手順の一例を示すフローチャートである。FIG. 24 is a flowchart illustrating an example of a processing procedure of the control unit CT. 図25は、ブロックBiの処理手順の一例を示すフローチャートである。FIG. 25 is a flowchart illustrating an example of the processing procedure of the block Bi.

以下に図面を参照して、本発明にかかるシミュレーションプログラム、シミュレーション方法およびシミュレーション装置の実施の形態を詳細に説明する。   Exemplary embodiments of a simulation program, a simulation method, and a simulation apparatus according to the present invention will be described below in detail with reference to the drawings.

(シミュレーション方法の一実施例)
図1は、実施の形態にかかるシミュレーション方法の一実施例を示す説明図である。図1において、シミュレーション装置100は、ESLなどのRTLよりも抽象度が高いレベルでのシステムの性能を評価するシミュレーションを実行するコンピュータである。評価対象となるシステムは、例えば、複数のハードウェアブロックがバスを介して接続されるシステムである。シミュレーションは、例えば、各ハードウェアブロックがバスにトランザクションを投げた際のバスの混み具合から、システムの性能が破綻しないかどうかを評価するためのものである。
(One Example of Simulation Method)
FIG. 1 is an explanatory diagram of an example of the simulation method according to the embodiment. In FIG. 1, a simulation apparatus 100 is a computer that executes a simulation for evaluating the performance of a system at a higher level of abstraction than RTL such as ESL. The system to be evaluated is, for example, a system in which a plurality of hardware blocks are connected via a bus. The simulation is for, for example, evaluating whether the performance of the system does not fail based on how busy the bus is when each hardware block throws a transaction on the bus.

ハードウェアブロックは、例えば、バスを介してメモリにアクセスして計算処理を行うモデルである。具体的には、例えば、ハードウェアブロックは、指定サイズ分のデータのリード/ライトを行い、指定サイクル分の遅延時間を発生させて計算時間を再現するモデルである。以下の説明では、システム内のハードウェアブロックを単に「ブロック」と表記する場合がある。   The hardware block is, for example, a model that performs calculation processing by accessing a memory via a bus. Specifically, for example, the hardware block is a model that reads / writes data for a specified size and generates a delay time for a specified cycle to reproduce the calculation time. In the following description, a hardware block in the system may be simply referred to as “block”.

シミュレーション装置100は、リファレンスソースRSとアーキテクチャモデルAMとに基づいて、リファレンスソースRSのアルゴリズムに依存したブロックの振る舞いを模擬するシミュレーションを実行して、シミュレーション結果SRを出力する。リファレンスソースRSは、例えば、アルゴリズムの評価・開発を目的に作成され、実現したいシステムの機能をC言語などのプログラミング言語で記述したものである。また、アーキテクチャモデルAMは、システム内のブロックとバスとの構成を示すものである。   Based on the reference source RS and the architecture model AM, the simulation apparatus 100 executes a simulation that simulates the behavior of the block depending on the algorithm of the reference source RS, and outputs a simulation result SR. The reference source RS is created, for example, for the purpose of algorithm evaluation / development, and describes the function of the system to be realized in a programming language such as C language. The architecture model AM indicates the configuration of blocks and buses in the system.

ここで、アーキテクチャモデルAM内のブロックに入力されるパラメータ値は、システムの機能に依存する。ブロックに入力されるパラメータ値としては、例えば、1回当たりのデータサイズ、アクセスの間隔、アクセス回数などがある。このため、リファレンスソースRSから、アーキテクチャモデルAM内のモデルに入力するパラメータ値の変化を観測または予測することが可能である。   Here, the parameter value input to the block in the architecture model AM depends on the function of the system. Examples of parameter values input to the block include a data size per access, an access interval, and the number of accesses. For this reason, it is possible to observe or predict a change in the parameter value input to the model in the architecture model AM from the reference source RS.

そこで、本実施の形態では、シミュレーション装置100は、リファレンスソースRSとアーキテクチャモデルAMとを用いて、リファレンスソースRSの振る舞いに合わせたアーキテクチャモデルAMの振る舞いを再現する。リファレンスソースRSを使ってシミュレーションしたい典型例として動画像処理がある。動画像処理は、ある処理を繰り返し行うという特徴を有しており、リファレンスソースRSも繰り返し文で記述される。   Therefore, in the present embodiment, the simulation apparatus 100 uses the reference source RS and the architecture model AM to reproduce the behavior of the architecture model AM in accordance with the behavior of the reference source RS. There is a moving image processing as a typical example of simulation using the reference source RS. The moving image processing has a feature that a certain process is repeatedly performed, and the reference source RS is also described in a repeated sentence.

図2は、リファレンスソースRSを擬似コードで記述した記述例を示す説明図である。図2の擬似コード200で示すように、リファレンスソースRSは、例えば、(1)処理対象となるファイルをオープンし、(2)ファイルをパーズして1処理分のデータを取り出して、(3)取り出した1処理分のデータに対して所望の処理を繰り返すといった記述となる。一方、アーキテクチャモデルAMの主目的は、データ転送機能のモデル化である。ここで、アーキテクチャモデルAMの具体例について説明する。   FIG. 2 is an explanatory diagram illustrating a description example in which the reference source RS is described in pseudo code. As shown by the pseudo code 200 in FIG. 2, the reference source RS, for example, (1) opens a file to be processed, (2) parses the file, extracts data for one process, and (3) It is described that a desired process is repeated for the extracted data for one process. On the other hand, the main purpose of the architecture model AM is to model the data transfer function. Here, a specific example of the architecture model AM will be described.

図3は、アーキテクチャモデルAMの具体例を示す説明図(その1)である。図3において、アーキテクチャモデル300は、制御部301と、ブロック302と、ブロック303と、ブロック304と、RAM(Random Access Memory)305と、データ転送部306と、を含む構成である。   FIG. 3 is an explanatory diagram (part 1) of a specific example of the architecture model AM. In FIG. 3, the architecture model 300 includes a control unit 301, a block 302, a block 303, a block 304, a RAM (Random Access Memory) 305, and a data transfer unit 306.

アーキテクチャモデル300では、制御部301の指示に従ってブロック302〜304が動作し、制御部301、ブロック302〜304およびRAM305がデータ転送部306を共有しながら動作する。具体的には、例えば、データ転送部306へのアクセス関数をaccess(int byte_num)とし、データ転送部306に指定されたバス幅をn[byte]とする時、byte_num/n+αサイクルの時間をかけて、アクセス関数を呼んだブロックからRAM305へ書き込みが行われる。   In the architecture model 300, the blocks 302 to 304 operate in accordance with instructions from the control unit 301, and the control unit 301, the blocks 302 to 304, and the RAM 305 operate while sharing the data transfer unit 306. Specifically, for example, when the access function to the data transfer unit 306 is set to access (int byte_num) and the bus width specified to the data transfer unit 306 is set to n [bytes], it takes time of byte_num / n + α cycles. Thus, writing to the RAM 305 is performed from the block that called the access function.

図4は、アーキテクチャモデルAMの動作シーケンスの一例を示す説明図である。図4において、アーキテクチャモデル300(図3参照)の動作シーケンスが示されている。具体的には、制御部301が各ブロック302〜304を起動し、各ブロック302〜304が適宜RAM305にアクセスする。そして、各ブロック302〜304は、所望のアクセスをすべて終えたら、doneを制御部301に返す。ここで、制御部301の記述例について説明する。   FIG. 4 is an explanatory diagram showing an example of an operation sequence of the architecture model AM. FIG. 4 shows an operation sequence of the architecture model 300 (see FIG. 3). Specifically, the control unit 301 activates each of the blocks 302 to 304, and each of the blocks 302 to 304 accesses the RAM 305 as appropriate. Then, each block 302 to 304 returns a done to the control unit 301 after completing all desired accesses. Here, a description example of the control unit 301 will be described.

図5は、制御部の記述例を示す説明図である。図5において、記述例500は、図4に示すような処理を10回繰り返す場合の制御部301の記述例である。記述例500において、to_tar[i]はblock i(ブロック302〜304)との通信路であり、to_tar[i]−>start()で起動信号を送っている。   FIG. 5 is an explanatory diagram illustrating a description example of the control unit. In FIG. 5, a description example 500 is a description example of the control unit 301 when the process shown in FIG. 4 is repeated ten times. In the description example 500, to_tar [i] is a communication path with block i (blocks 302 to 304), and an activation signal is sent with to_tar [i]-> start ().

to_tar[i]−>get_done_event()はdoneイベントを取り出す関数であり、記述例500では取り出したイベントが発生するのを待っている。また、to_tar[i]−>get_done()はdone状態かどうかを示すフラグを取り出す関数であり、while(・・・)の()内部の式が真になった時、do{・・・}while()を抜けてイベント待ちの状態から抜ける。このようにして、制御部301は、各ブロック302〜304と同期する。   to_tar [i]-> get_done_event () is a function for extracting a done event, and in the description example 500, it waits for an event to be extracted. Also, to_tar [i]-> get_done () is a function for extracting a flag indicating whether or not a done state, and when the expression inside () of while (...) becomes true, do {...} Exit from while () to exit from the event waiting state. In this way, the control unit 301 synchronizes with the blocks 302 to 304.

つぎに、ブロック(ブロック302〜304)の記述例について説明する。ただし、ここでは、ブロックに与えるパラメータ値を、ブロック記述の中に記述する手法について説明する。なお、RAM305、データ転送部306については、例えば、既存のメモリモデルやバスモデルを利用することができる。   Next, description examples of the blocks (blocks 302 to 304) will be described. However, here, a method of describing parameter values to be given to a block in the block description will be described. For the RAM 305 and the data transfer unit 306, for example, an existing memory model or bus model can be used.

図6は、ブロックの記述例を示す説明図である。図6に示す記述例600において、block0は、制御部301との通信用ポートfrom_iniと、データ転送部306との通信用ポートtransactionを持つ。th0がデータ転送の機能を実現する部分である。ここで、th0の中の記述について説明する。   FIG. 6 is an explanatory diagram showing an example of block description. In the description example 600 illustrated in FIG. 6, block 0 has a communication port from_ini with the control unit 301 and a communication port transaction with the data transfer unit 306. th0 is the part that implements the data transfer function. Here, description in th0 will be described.

(0)は、制御部301からの起動信号を待つ記述である。(1)は、1起動当たり1000回の処理を行うことを定義する記述である。(2)は、この処理にかかる処理時間分の遅延を生成する記述である。ここでは一律40[ns]の処理時間がかかるようになっている。(3)は、データ転送部306へのアクセスを表現する記述である。ここでは、データ100バイト分のアクセスが表現されている。   (0) is a description waiting for an activation signal from the control unit 301. (1) is a description defining that processing is performed 1000 times per activation. (2) is a description for generating a delay corresponding to the processing time required for this processing. Here, a uniform processing time of 40 [ns] is required. (3) is a description expressing access to the data transfer unit 306. Here, access for 100 bytes of data is expressed.

(1)〜(3)の処理を1000回行うとfor文を抜けて(4)に移る。(4)は、制御部301に終了信号を送る記述である。終了信号は、from_iniのdone()をコールすることにより実現する。このようにして、制御部301と協調しながらデータ転送部306にデータアクセスを発生させるモデルが実現できている。   When the processes (1) to (3) are performed 1000 times, the for sentence is exited and the process proceeds to (4). (4) is a description for sending an end signal to the control unit 301. The end signal is realized by calling done () of from_ini. In this way, a model for causing the data transfer unit 306 to generate data access in cooperation with the control unit 301 can be realized.

しかしながら、記述例600では、block0に与えるパラメータ値を、記述例600の中にユーザが記述する必要がある。図6の例では、例えば、小処理の回数(上記(1)の1000という値)、小処理の処理時間(上記(2)の40[ns]という値)および小処理で発生するアクセス量(上記(3)100バイトという値)を、記述例600の中にユーザが記述する必要がある。この手法は、ユーザの予想に基づくシミュレーションができ、簡便で使い勝手がよい反面、重要なパラメータ値をユーザが指定することになるという問題がある。   However, in the description example 600, the user needs to describe the parameter value given to block 0 in the description example 600. In the example of FIG. 6, for example, the number of times of small processing (value of 1000 in (1) above), the processing time of small processing (value of 40 [ns] in (2) above), and the amount of access generated in small processing ( The above (3) value of 100 bytes) needs to be described in the description example 600 by the user. Although this method can perform simulation based on the user's expectation and is convenient and convenient, there is a problem that the user specifies important parameter values.

そこで、本実施の形態では、シミュレーション装置100は、ブロック(例えば、図3に示したブロック302〜304)に与えるパラメータ値をリファレンスソースRSの実行により決定する。具体的には、シミュレーション装置100は、リファレンスソースRSとアーキテクチャモデルAMを別々のスレッドで実行する。   Therefore, in the present embodiment, the simulation apparatus 100 determines a parameter value to be given to a block (for example, the blocks 302 to 304 shown in FIG. 3) by executing the reference source RS. Specifically, the simulation apparatus 100 executes the reference source RS and the architecture model AM in separate threads.

図7は、シミュレーションモデルのメイン記述例を示す説明図である。図7において、メイン記述700に示すように、シミュレーション装置100は、リファレンスソースRSを実行するスレッド0とアーキテクチャモデルAMを実行するスレッド1とを同時に実行する。   FIG. 7 is an explanatory diagram illustrating a main description example of the simulation model. In FIG. 7, as shown in the main description 700, the simulation apparatus 100 simultaneously executes a thread 0 that executes the reference source RS and a thread 1 that executes the architecture model AM.

シミュレーションにおいて、リファレンスソースRSとアーキテクチャモデルAMは、共有メモリMMを用いて通信を行う。データは、リファレンスソースRSからアーキテクチャモデルAMに送られる。具体的には、リファレンスソースRSに埋め込まれたプローブ関数がコールされると、シミュレーション装置100は、対応する引数の値を共有メモリMM上のFIFO(First In First Out)バッファに書き込む。これにより、プローブした値がFIFOバッファに溜まっていく。   In the simulation, the reference source RS and the architecture model AM communicate using the shared memory MM. Data is sent from the reference source RS to the architecture model AM. Specifically, when the probe function embedded in the reference source RS is called, the simulation apparatus 100 writes the value of the corresponding argument in a FIFO (First In First Out) buffer on the shared memory MM. As a result, the probed values accumulate in the FIFO buffer.

一方、アーキテクチャモデルAM側では、各ブロックが、各々参照すべき値をFIFOバッファから適時取り出して、取り出した値をパラメータ値としてアーキテクチャシミュレーションを実行する。これにより、リファレンスソースRSで生成したパラメータ値をアーキテクチャシミュレーションで利用でき、かつ、1つの実行形式の中で実行することができる。ただし、リファレンスソースRSよりもアーキテクチャモデルAMのほうが先行して動作するとシミュレーションが破綻してしまう。   On the other hand, on the architecture model AM side, each block retrieves a value to be referred to from the FIFO buffer in a timely manner, and executes an architecture simulation using the retrieved value as a parameter value. Thereby, the parameter value generated by the reference source RS can be used in the architecture simulation, and can be executed in one execution format. However, if the architecture model AM operates ahead of the reference source RS, the simulation fails.

そこで、本実施の形態では、アーキテクチャモデルAMに対してリファレンスソースRSが先行している先行量を表す変数領域を共有メモリMM上に用意する。以下、この変数を「先行度変数」と表記する場合がある。   Therefore, in the present embodiment, a variable area representing the preceding amount preceded by the reference source RS with respect to the architecture model AM is prepared on the shared memory MM. Hereinafter, this variable may be referred to as a “preceding degree variable”.

リファレンスソースRS側は、一連の処理が終わった時に先行度変数を1加算する。図2の例では、(3)が終わった段階で先行度変数を1加算する。一方、アーキテクチャモデルAM側は、例えば、図3に示した制御部301で先行度変数を参照する。図5の例では、(1)の前に先行度変数が1以上の時に先に進み、0の時は1になるまで待つ処理を入れる。つぎに、先行度変数を1減算する。ここまでの例は変数のみを利用した例になっているが、後述の例では、FIFOを利用した実現例となっている。この場合、リファレンスソースRS側は適当な値(例えば、ループ実行回数)をFIFOに送出する。アーキテクチャモデルAM側はFIFOが空でなければ値を取り出して、FIFOが空だったら、空ではなくなるのを待って、値を取り出す。このようにすると、先の先行度をFIFOのサイズで表現することができる。   The reference source RS side increments the leading degree variable by 1 when a series of processing ends. In the example of FIG. 2, the leading degree variable is incremented by 1 when (3) is completed. On the other hand, on the architecture model AM side, for example, the control unit 301 shown in FIG. In the example of FIG. 5, before (1), the process advances when the leading degree variable is 1 or more and waits until it becomes 1 when 0. Next, 1 is subtracted from the leading degree variable. The example so far is an example using only variables, but the example described later is an implementation example using FIFO. In this case, the reference source RS side sends an appropriate value (for example, the number of loop executions) to the FIFO. The architecture model AM side extracts a value if the FIFO is not empty, and if the FIFO is empty, waits for the FIFO to be empty and extracts the value. In this way, the previous leading degree can be expressed by the size of the FIFO.

これにより、共有メモリMM上のFIFOバッファの中に一連の処理の計算に必要な全パラメータが格納された後、アーキテクチャモデルAM側が動作する制御が可能になる。なお、FIFOバッファのメモリ量を制限する場合は、例えば、先行量の上限Nを決めておき、先行量が上限Nを超えている時には、先行量が上限N以下になるまでリファレンスソースRS側の実行を遅延させる制御を入れることにしてもよい。   Thereby, after all parameters necessary for calculation of a series of processes are stored in the FIFO buffer on the shared memory MM, it is possible to control the operation of the architecture model AM side. When the memory amount of the FIFO buffer is limited, for example, an upper limit N of the preceding amount is determined, and when the preceding amount exceeds the upper limit N, the reference source RS side is set until the preceding amount becomes the upper limit N or less. You may decide to put control which delays execution.

このように、本実施の形態では、アーキテクチャモデルAM内の各ブロックが処理するのに必要なパラメータ値を共有メモリMMに渡す関数(プローブ関数)をリファレンスソースRSに埋め込む。また、アーキテクチャモデルAM内の各ブロックが共有メモリMMから必要なデータを取り出す関数をアーキテクチャモデルAMに埋め込む。これにより、リファレンスソースRSに基づくアーキテクチャシミュレーションが可能になり、ソースを分割してブロックごとに機能が入っているような複雑なモデルを作ることなく性能の評価が可能になる。   As described above, in this embodiment, a function (probe function) for passing a parameter value necessary for processing by each block in the architecture model AM to the shared memory MM is embedded in the reference source RS. In addition, each block in the architecture model AM embeds a function for extracting necessary data from the shared memory MM in the architecture model AM. As a result, an architecture simulation based on the reference source RS becomes possible, and the performance can be evaluated without creating a complicated model in which the source is divided and a function is included for each block.

(シミュレーション装置100のハードウェア構成例)
図8は、シミュレーション装置100のハードウェア構成例を示すブロック図である。図8において、シミュレーション装置100は、CPU801と、ROM(Read‐Only Memory)802と、RAM803と、磁気ディスクドライブ804と、磁気ディスク805と、光ディスクドライブ806と、光ディスク807と、I/F(Interface)808と、ディスプレイ809と、キーボード810と、マウス811と、を有する。また、各構成部はバス812によってそれぞれ接続されている。
(Hardware configuration example of simulation apparatus 100)
FIG. 8 is a block diagram illustrating a hardware configuration example of the simulation apparatus 100. In FIG. 8, a simulation apparatus 100 includes a CPU 801, a ROM (Read-Only Memory) 802, a RAM 803, a magnetic disk drive 804, a magnetic disk 805, an optical disk drive 806, an optical disk 807, and an I / F (Interface). ) 808, a display 809, a keyboard 810, and a mouse 811. Each component is connected by a bus 812.

ここで、CPU801は、シミュレーション装置100の全体の制御を司る。ROM802は、ブートプログラムなどのプログラムを記憶する。RAM803は、CPU801のワークエリアとして使用される。磁気ディスクドライブ804は、CPU801の制御に従って磁気ディスク805に対するデータのリード/ライトを制御する。磁気ディスク805は、磁気ディスクドライブ804の制御で書き込まれたデータを記憶する。   Here, the CPU 801 governs overall control of the simulation apparatus 100. The ROM 802 stores a program such as a boot program. The RAM 803 is used as a work area for the CPU 801. The magnetic disk drive 804 controls reading / writing of data with respect to the magnetic disk 805 according to the control of the CPU 801. The magnetic disk 805 stores data written under the control of the magnetic disk drive 804.

光ディスクドライブ806は、CPU801の制御にしたがって光ディスク807に対するデータのリード/ライトを制御する。光ディスク807は、光ディスクドライブ806の制御で書き込まれたデータを記憶したり、光ディスク807に記憶されたデータをコンピュータに読み取らせたりする。   The optical disk drive 806 controls reading / writing of data with respect to the optical disk 807 according to the control of the CPU 801. The optical disk 807 stores data written under the control of the optical disk drive 806, and causes the computer to read data stored on the optical disk 807.

I/F808は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク820に接続され、ネットワーク820を介して他のコンピュータに接続される。そして、I/F808は、ネットワーク820と内部のインターフェースを司り、他のコンピュータからのデータの入出力を制御する。I/F808には、例えば、モデムやLANアダプタなどを採用することができる。   The I / F 808 is connected to a network 820 such as a LAN (Local Area Network), a WAN (Wide Area Network), and the Internet through a communication line, and is connected to another computer via the network 820. The I / F 808 controls an internal interface with the network 820 and controls input / output of data from other computers. For example, a modem or a LAN adapter may be employed as the I / F 808.

ディスプレイ809は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ809は、例えば、CRT、TFT液晶ディスプレイ、プラズマディスプレイなどを採用することができる。   A display 809 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box. As the display 809, for example, a CRT, a TFT liquid crystal display, a plasma display, or the like can be adopted.

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

なお、シミュレーション装置100は、上述した構成のうち、例えば、光ディスクドライブ806や光ディスク807を有さないことにしてもよい。また、シミュレーション装置100は、上述した構成部のほかに、例えば、スキャナやプリンタを有することにしてもよい。   Note that the simulation apparatus 100 may not include, for example, the optical disk drive 806 or the optical disk 807 among the above-described configurations. The simulation apparatus 100 may include, for example, a scanner or a printer in addition to the above-described components.

(シミュレーション装置100の機能的構成例)
図9は、シミュレーション装置100の機能的構成例を示すブロック図である。図9において、シミュレーション装置100は、取得部901と、第1の実行部902と、第2の実行部903と、出力部904と、を含む構成である。各機能部は、具体的には、例えば、図8に示したROM802、RAM803、磁気ディスク805、光ディスク807などの記憶装置に記憶されたプログラムをCPU801に実行させることにより、または、I/F808により、その機能を実現する。また、各機能部の処理結果は、例えば、RAM803、磁気ディスク805、光ディスク807などの記憶装置に記憶される。
(Functional configuration example of the simulation apparatus 100)
FIG. 9 is a block diagram illustrating a functional configuration example of the simulation apparatus 100. In FIG. 9, the simulation apparatus 100 is configured to include an acquisition unit 901, a first execution unit 902, a second execution unit 903, and an output unit 904. Specifically, for example, each function unit causes the CPU 801 to execute a program stored in a storage device such as the ROM 802, the RAM 803, the magnetic disk 805, and the optical disk 807 illustrated in FIG. 8, or by the I / F 808. Realize its function. In addition, the processing result of each functional unit is stored in a storage device such as the RAM 803, the magnetic disk 805, and the optical disk 807, for example.

取得部901は、リファレンスソースRSを取得する機能を有する。ここで、リファレンスソースRSは、評価対象となるシステムの機能をプログラム言語で記述したソースコードである。リファレンスソースRSは、例えば、if文等の条件分岐を含み、入力ファイルに記述された処理対象となるデータ列からデータを順次選択して、実装したアルゴリズムで一連の処理を行い、処理結果を出力ファイルに書き出すものである。   The acquisition unit 901 has a function of acquiring the reference source RS. Here, the reference source RS is a source code describing the function of the system to be evaluated in a programming language. The reference source RS includes, for example, a conditional branch such as an “if” statement, sequentially selects data from the data string to be processed described in the input file, performs a series of processing with the implemented algorithm, and outputs the processing result It is what you write to a file.

具体的には、例えば、取得部901は、図8に示したキーボード810やマウス811を用いたユーザの操作入力により、リファレンスソースRSを取得する。また、取得部901は、外部のコンピュータからリファレンスソースRSを受信することにしてもよい。リファレンスソースRSの具体例については、図10A、図10B、図13および図16を用いて後述する。   Specifically, for example, the acquisition unit 901 acquires the reference source RS by a user operation input using the keyboard 810 and the mouse 811 illustrated in FIG. The acquisition unit 901 may receive the reference source RS from an external computer. Specific examples of the reference source RS will be described later with reference to FIGS. 10A, 10B, 13 and 16.

また、リファレンスソースRSにおいて処理対象となるデータ列が記述された入力ファイルは、例えば、キーボード810やマウス811を用いたユーザの操作入力により取得される。入力ファイルの具体例については、図11を用いて後述する。   Also, an input file in which a data string to be processed is described in the reference source RS is acquired by a user operation input using the keyboard 810 or the mouse 811, for example. A specific example of the input file will be described later with reference to FIG.

また、取得部901は、アーキテクチャモデルAMを取得する機能を有する。ここで、アーキテクチャモデルAMは、評価対象となるシステム内のブロックとバスとの構成を示すものであり、例えば、複数のブロックと、複数のブロックを制御する制御部とを含む。ブロックは、システムの動作を模擬するモデルであり、バスを介してメモリにアクセスして計算処理を行う計算ブロックである。   The acquisition unit 901 has a function of acquiring the architecture model AM. Here, the architecture model AM indicates the configuration of blocks and buses in the system to be evaluated, and includes, for example, a plurality of blocks and a control unit that controls the plurality of blocks. The block is a model that simulates the operation of the system, and is a calculation block that performs a calculation process by accessing a memory via a bus.

なお、以下の説明では、アーキテクチャモデルAMに含まれる複数のブロックを「ブロックB1〜Bn」と表記し、ブロックB1〜Bnのうちの任意のブロックを「ブロックBi」と表記する場合がある。また、ブロックB1〜Bnを制御する制御部を「制御部CT」と表記する場合がある。   In the following description, a plurality of blocks included in the architecture model AM may be referred to as “blocks B1 to Bn”, and an arbitrary block among the blocks B1 to Bn may be referred to as “block Bi”. In addition, the control unit that controls the blocks B1 to Bn may be referred to as “control unit CT”.

具体的には、例えば、取得部901は、キーボード810やマウス811を用いたユーザの操作入力により、アーキテクチャモデルAMを取得する。また、取得部901は、外部のコンピュータからアーキテクチャモデルAMを受信することにしてもよい。なお、アーキテクチャモデルAMは、例えば、キーボード810やマウス811を用いたユーザの操作入力により、新規作成、または、データベースに登録されているブロックモデルやインターフェースモデル等を再利用または組み合わせることにより作成されることにしてもよい。   Specifically, for example, the acquisition unit 901 acquires the architecture model AM by a user operation input using the keyboard 810 and the mouse 811. The acquisition unit 901 may receive the architecture model AM from an external computer. Note that the architecture model AM is created, for example, by a user operation input using the keyboard 810 or the mouse 811, or by reusing or combining block models, interface models, and the like registered in the database. You may decide.

第1の実行部902は、リファレンスソースRSを実行する機能を有する。具体的には、例えば、第1の実行部902は、リファレンスソースRSに実装されたアルゴリズムで一連の処理のループ処理を実行する。ここで、一連の処理は、引数の値を変えながら繰り返し実行されるものであり、例えば、動画像を圧縮する動画像処理などである。   The first execution unit 902 has a function of executing the reference source RS. Specifically, for example, the first execution unit 902 executes a loop process of a series of processes using an algorithm implemented in the reference source RS. Here, the series of processing is repeatedly executed while changing the value of the argument, for example, moving image processing for compressing a moving image.

より具体的には、例えば、第1の実行部902は、入力ファイルに記述されたデータ列からデータを順次選択して、選択したデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理を実行する。なお、一連の処理は、例えば、後述する関数calc,関数calc2に相当する。   More specifically, for example, the first execution unit 902 sequentially selects data from the data string described in the input file, and includes a series of processes including a process whose process contents change depending on a conditional branch based on the selected data. Execute. Note that a series of processing corresponds to, for example, a function calc and a function calc2 described later.

また、第1の実行部902は、一連の処理に含まれる処理の実行が完了する度に、該処理の処理内容に応じて設定されたパラメータ値を、ブロックB1〜Bnのうちの該処理を実現するブロックBiがアクセスするバッファに書き込む機能を有する。ここで、パラメータ値は、ブロックBiの計算処理に用いられるパラメータの値である。   Further, each time the execution of the process included in the series of processes is completed, the first execution unit 902 changes the parameter value set according to the processing content of the process to the process among the blocks B1 to Bn. The realized block Bi has a function of writing in a buffer to be accessed. Here, the parameter value is a parameter value used in the calculation process of the block Bi.

パラメータ値は、一連の処理に含まれる各々の処理の処理内容と対応付けてリファレンスソースRSに記述される。パラメータ値の具体例としては、例えば、計算処理にかかるサイクル数、リードデータ量、ライトデータ量やブロックBiの動作周波数などである。また、ブロックBiがアクセスするバッファとは、例えば、共有メモリMM上にブロックBiごとに設けられたFIFO構造のバッファである。   The parameter value is described in the reference source RS in association with the processing content of each process included in the series of processes. Specific examples of the parameter value include, for example, the number of cycles for calculation processing, the amount of read data, the amount of write data, the operating frequency of the block Bi, and the like. The buffer accessed by the block Bi is, for example, a FIFO structure buffer provided for each block Bi on the shared memory MM.

また、第1の実行部902は、一連の処理の実行が完了する度に、一連の処理の実行が完了したことを示す情報を制御部CTがアクセスするバッファに書き込む機能を有する。ここで、一連の処理の実行が完了したことを示す情報とは、例えば、アーキテクチャモデルAMに対してリファレンスソースRSが先行している先行量を表す先行度変数である。   The first execution unit 902 has a function of writing information indicating that execution of a series of processes is completed to a buffer accessed by the control unit CT every time execution of the series of processes is completed. Here, the information indicating that the execution of the series of processes is completed is, for example, a leading degree variable that represents a leading amount that the reference source RS precedes the architecture model AM.

また、制御部CTがアクセスするバッファとは、例えば、共有メモリMM上に設けられたFIFO構造のバッファである。具体的には、例えば、第1の実行部902は、一連の処理の実行が完了する度に、先行度変数をインクリメントして制御部CTがアクセスするFIFO構造のバッファに書き込む。   Further, the buffer accessed by the control unit CT is, for example, a FIFO structure buffer provided on the shared memory MM. Specifically, for example, each time the execution of a series of processes is completed, the first execution unit 902 increments the leading degree variable and writes it to the FIFO structure buffer accessed by the control unit CT.

また、第1の実行部902は、制御部CTがアクセスするFIFO構造のバッファに所定数N以上の先行度変数が記憶されている場合には、当該バッファに記憶されている先行度変数が所定数N未満となるまでループ処理の実行を停止することにしてもよい。これにより、アーテクチャモデルAMに対するリファレンスソースRSの先行量が上限N以上となった時にFIFO構造のバッファに先行度変数が蓄積されていくのを防いで、バッファのメモリ量を制限することができる。   In addition, when a predetermined number N or more of leading degree variables are stored in the FIFO structure buffer accessed by the control unit CT, the first execution unit 902 sets the leading degree variable stored in the buffer to a predetermined value. You may decide to stop execution of a loop process until it becomes less than the number N. As a result, when the preceding amount of the reference source RS with respect to the architecture model AM exceeds the upper limit N, it is possible to prevent the leading degree variable from being accumulated in the buffer having the FIFO structure, and to limit the memory amount of the buffer. .

第2の実行部903は、アーキテクチャモデルAMのアーキテクチャシミュレーションを実行する機能を有する。具体的には、例えば、第2の実行部903は、第1の実行部902による一連の処理の実行が完了した場合に、制御部CTにより、一連の処理のうちの最初に実行される処理を実現するブロックBiを起動させる。   The second execution unit 903 has a function of executing an architecture simulation of the architecture model AM. Specifically, for example, the second execution unit 903, when the execution of a series of processes by the first execution unit 902 is completed, is executed first by the control unit CT among the series of processes. The block Bi that realizes is activated.

より具体的には、例えば、第2の実行部903は、制御部CTにより、制御部CTがアクセスするFIFO構造のバッファに先行度変数が記憶されている場合に、一連の処理のうちの最初に実行される処理を実現するブロックBiに起動命令を出力する。すなわち、FIFO構造のバッファに未読み出しの先行度変数がある場合は、アーキテクチャモデルAMに対してリファレンスソースRSが先行していることが保証される。   More specifically, for example, the second execution unit 903, when the leading degree variable is stored in the buffer of the FIFO structure accessed by the control unit CT by the control unit CT, The start command is output to the block Bi that implements the processing executed in the above. That is, when there is an unread precedence variable in the FIFO structure buffer, it is guaranteed that the reference source RS precedes the architecture model AM.

また、第2の実行部903は、ブロックBiにより、ブロックBiがアクセスするバッファからパラメータ値を読み出させることにより、該パラメータ値に基づく計算処理を実行させる。具体的には、例えば、第2の実行部903は、制御部CTからの起動命令を受け付けたブロックBiにより、ブロックBiがアクセスするバッファに記憶されているパラメータ値に基づく計算処理を実行させる。   Further, the second execution unit 903 causes the block Bi to read the parameter value from the buffer accessed by the block Bi, thereby executing the calculation process based on the parameter value. Specifically, for example, the second execution unit 903 causes the block Bi that has received the activation command from the control unit CT to execute a calculation process based on the parameter value stored in the buffer accessed by the block Bi.

また、第2の実行部903は、ブロックBiにより、パラメータ値に基づく計算処理の実行が完了した場合、一連の処理のうちのつぎの処理を実現するブロックBjに起動命令を出力する(j≠i)。そして、第2の実行部903は、ブロックBiからの起動命令を受け付けたブロックBjにより、ブロックBjがアクセスするバッファに記憶されているパラメータ値に基づく計算処理を実行させる。また、第2の実行部903は、ブロックBjが一連の処理のうちの最後の処理を実現するブロックの場合、ブロックBjにより、一連の処理の実行が完了したことを示す完了通知を制御部CTに出力させる。   Further, when the execution of the calculation process based on the parameter value is completed by the block Bi, the second execution unit 903 outputs a start instruction to the block Bj that realizes the next process in the series of processes (j ≠ i). Then, the second execution unit 903 executes calculation processing based on the parameter value stored in the buffer accessed by the block Bj by the block Bj that has received the activation command from the block Bi. In addition, when the block Bj is the block that realizes the last process in the series of processes, the second execution unit 903 sends a completion notification indicating that the execution of the series of processes is completed by the block Bj. To output.

出力部904は、第1の実行部902によって実行された実行結果を出力する機能を有する。具体的には、例えば、出力部904は、後述の図12に示すような出力ファイル1200を出力することにしてもよい。また、出力部904は、第2の実行部903によって実行された実行結果を出力する機能を有する。具体的には、例えば、出力部904は、後述の図21に示すようなシミュレーション結果SRを出力することにしてもよい。   The output unit 904 has a function of outputting the execution result executed by the first execution unit 902. Specifically, for example, the output unit 904 may output an output file 1200 as shown in FIG. The output unit 904 has a function of outputting the execution result executed by the second execution unit 903. Specifically, for example, the output unit 904 may output a simulation result SR as shown in FIG.

なお、出力部904の出力形式としては、例えば、RAM803、磁気ディスク805、光ディスク807などの記憶装置への記憶、ディスプレイ809への表示、プリンタ(不図示)への印刷出力、I/F808による外部のコンピュータへの送信などがある。   As an output format of the output unit 904, for example, storage in a storage device such as the RAM 803, the magnetic disk 805, and the optical disk 807, display on the display 809, print output to a printer (not shown), external by the I / F 808 Sending to other computers.

(リファレンスソースRSの記述例)
図10Aおよび図10Bは、リファレンスソースRSの記述例を示す説明図である。図10Aおよび図10Bにおいて、リファレンスソースRSは、関数calcと、関数calc2と、デバッグ用の関数print_resultと、を含む。mainは、入力ファイルと出力ファイルをオープンして、入力ファイルを解析してデータを抽出し、関数calc、関数calc2に渡すメソッドである。
(Example of reference source RS description)
10A and 10B are explanatory diagrams illustrating a description example of the reference source RS. 10A and 10B, the reference source RS includes a function calc, a function calc2, and a debug function print_result. “main” is a method that opens an input file and an output file, analyzes the input file, extracts data, and passes the data to the function calc and the function calc2.

また、関数calc、関数calc2が実行されると、バッファresultに結果が格納され、バッファresultに格納された結果が関数print_resultに渡されて、結果が出力される。このように、リファレンスソースRSは、入力ファイルに記述されたデータを読み、実装したアルゴリズムで処理を行い、処理結果を出力ファイルに書き出す。   When the function calc and the function calc2 are executed, the result is stored in the buffer result, the result stored in the buffer result is passed to the function print_result, and the result is output. As described above, the reference source RS reads the data described in the input file, performs processing using the implemented algorithm, and writes the processing result to the output file.

ここで、図11および図12を用いて、リファレンスソースRSの処理対象となる入力ファイルおよび出力ファイルについて説明する。   Here, an input file and an output file to be processed by the reference source RS will be described with reference to FIGS. 11 and 12.

図11は、入力ファイルの具体例を示す説明図である。図11において、入力ファイル1100は、リファレンスソースRSの処理対象となるデータが記述されたものである。入力ファイル1100において、要素数が1個の行は「処理すべきデータ数」を表し、要素数が3個の行は「データ」を表す。また、データは、演算種別、数値0、数値1を表す。   FIG. 11 is an explanatory diagram showing a specific example of an input file. In FIG. 11, an input file 1100 describes data to be processed by the reference source RS. In the input file 1100, a line with one element represents “the number of data to be processed”, and a line with three elements represents “data”. Further, the data represents an operation type, a numerical value 0, and a numerical value 1.

リファレンスソースRSでは、処理すべきデータ数が示されている単位(例えば、符号1101)を一塊として処理する。具体的には、リファレンスソースRSでは、2次元配列dataにデータを格納し、timesにデータ数を格納する。その後、times、data、result(計算結果格納用)を、関数calc、関数calc2に渡して計算を行い、その結果を関数print_resultに渡して出力ファイルを出力する。   In the reference source RS, a unit (for example, reference numeral 1101) indicating the number of data to be processed is processed as a lump. Specifically, in the reference source RS, data is stored in the two-dimensional array data, and the number of data is stored in times. After that, “times”, “data”, and “result” (for storing the calculation result) are passed to the function “calc” and the function “calc2”, the calculation is performed, and the result is passed to the function “print_result” to output an output file.

関数calcは、演算種別に依存した計算を行う。具体的には、関数calcは、演算種別が0の場合は数値0と数値1の和を計算し、演算種別が1の場合は数値0と数値1の積を計算し、その結果を配列resultの所定場所に書き込む。また、関数calc2は、関数calcの後続の処理である。具体的には、関数calc2は、resultの値を1ビット左シフトして、その結果をresultに書き戻す。   The function calc performs calculation depending on the operation type. Specifically, the function calc calculates the sum of the numerical value 0 and the numerical value 1 when the operation type is 0, calculates the product of the numerical value 0 and the numerical value 1 when the operation type is 1, and stores the result in the array result. Write in the designated place. The function calc2 is a process subsequent to the function calc. Specifically, the function calc2 shifts the result value to the left by 1 bit and writes the result back to the result.

図12は、出力ファイルの具体例を示す説明図である。図12において、出力ファイル1200は、リファレンスソースRSに実装されたアルゴリズムで入力ファイル1100(図11参照)に記述されたデータが順次処理された処理結果を示す出力データである。   FIG. 12 is an explanatory diagram showing a specific example of an output file. In FIG. 12, an output file 1200 is output data indicating a processing result obtained by sequentially processing data described in the input file 1100 (see FIG. 11) by an algorithm implemented in the reference source RS.

(先行アクセス記述の記述例)
つぎに、リファレンスソースRSに挿入される先行アクセス記述について説明する。先行アクセス記述は、アーキテクチャモデルAMよりもリファレンスソースRSのほうが先行して動作するように制御するためのものであり、上述した先行度変数を用いた制御に相当する。
(Example of preceding access description)
Next, the preceding access description inserted into the reference source RS will be described. The preceding access description is for controlling the reference source RS to operate earlier than the architecture model AM, and corresponds to the control using the preceding degree variable.

図13は、先行アクセス記述の挿入例を示す説明図である。図13において、リファレンスソースRSに挿入された先行アクセス記述1300が示されている。先行アクセス記述1300は、アーキテクチャモデルAMに対してリファレンスソースRSがいくらでも先行してもよいとした記述例である。すなわち、1つでも、リファレンスソースRSがアーキテクチャモデルAMよりも先行していればよいとする記述例である。   FIG. 13 is an explanatory diagram of an example of inserting a preceding access description. In FIG. 13, the preceding access description 1300 inserted in the reference source RS is shown. The preceding access description 1300 is a description example in which the reference source RS may precede any number of times for the architecture model AM. That is, it is a description example in which even one reference source RS only needs to precede the architecture model AM.

リファレンスソースRSに先行アクセス記述1300を挿入する場合、例えば、ユーザは、名前がバッティングしないようにするためにnamespaceを利用して、図10Aおよび図10Bに示したリファレンスソースRSの記述例をネームスペースの内部にコピーする。つぎに、ユーザは、リファレンスソースRSに先行アクセス記述1300(以下、「セパレータ」と表記する場合がある)を挿入する。   When the preceding access description 1300 is inserted into the reference source RS, for example, the user uses namespace to prevent the name from batting, and the description example of the reference source RS illustrated in FIGS. 10A and 10B is a namespace. Copy inside. Next, the user inserts a preceding access description 1300 (hereinafter may be referred to as “separator”) into the reference source RS.

ハードウェア化したいアプリケーションの場合、図10Aおよび図10Bに示したリファレンスソースRSの記述例のようにループ文で繰り返し実行するようなアルゴリズムの場合が多い。そこで、このループに「切れ目」(セパレータ)を入れる。セパレータ(先行アクセス記述1300)は、セパレータまでの処理が完了していれば、アーキテクチャモデルAM側のシミュレーションが破綻しないことを保証するものである。pipe_tは、リファレンスソースRSとアーキテクチャモデルAMとを繋ぐ部品である。   In the case of an application to be implemented as hardware, there are many algorithms that are repeatedly executed in a loop statement as in the description example of the reference source RS shown in FIGS. 10A and 10B. Therefore, a “cut” (separator) is put in this loop. The separator (preceding access description 1300) ensures that the simulation on the architecture model AM side does not fail if the processing up to the separator is completed. Pipe_t is a component that connects the reference source RS and the architecture model AM.

(リファレンスソースRSとアーキテクチャモデルAMとの接続部分の記述例)
図14Aおよび図14Bは、リファレンスソースRSとアーキテクチャモデルAMとの接続部分の記述例を示す説明図である。図14Aおよび図14Bにおいて、記述例1400は、リファレンスソースRS向けのクラス関数と、アーキテクチャモデルAM向けのクラス関数とを含む。具体的には、pipe_tクラスは、リファレンスソースRS部分とアーキテクチャモデルAM部分の通信部分をまとめたものである。
(Description example of the connection part between the reference source RS and the architecture model AM)
14A and 14B are explanatory diagrams illustrating a description example of a connection part between the reference source RS and the architecture model AM. 14A and 14B, the description example 1400 includes a class function for the reference source RS and a class function for the architecture model AM. Specifically, the pipe_t class is a collection of communication parts of the reference source RS part and the architecture model AM part.

また、クラス変数m_separatorが、リファレンスソースRS部分からアーキテクチャモデルAM部分にセパレータへの到達を通知するためのバッファである。メンバー変数のうち静的なメンバー変数を、静的メンバ変数、または、クラス変数という。ここでは、STL(Standard Template Logic)のdequeを用いて実装している。さらに、m_separator_idで発行済みIDの最大値を保存する。   The class variable m_separator is a buffer for notifying the arrival of the separator from the reference source RS part to the architecture model AM part. Of the member variables, static member variables are called static member variables or class variables. Here, it is implemented using a STL (Standard Template Logic) request. Furthermore, the maximum value of the issued ID is stored with m_separator_id.

また、このクラスの中でクラス関数separator()が定義されている。これが、図13に示したリファレンスソースRSの中で呼ばれる関数(先行アクセス記述1300)である。この関数も、記述例1400の中で定義されている。最初の1回は読み飛ばして、2回目以降は現在のm_separator_idをm_separatorにプッシュし、m_separator_idをインクリメントする。   In addition, a class function separator () is defined in this class. This is a function (preceding access description 1300) called in the reference source RS shown in FIG. This function is also defined in the description example 1400. The first time is skipped, and after the second time, the current m_separator_id is pushed to m_separator, and m_separator_id is incremented.

さらに、add_end_marker()の中で、後述する任意のバッファの最後に−1を追加する。−1は「終わり」を示す。最後に、リファレンスソースRSがセパレータに到達することを待っているソースを起こすために、pthread_cond_broadcastを行う。   Further, in add_end_marker (), −1 is added to the end of an arbitrary buffer described later. -1 indicates "end". Finally, pthread_cond_broadcast is performed to wake up the source waiting for the reference source RS to reach the separator.

なお、共有メモリMMなどのクリティカルセクションの変数は、記述例1400のクラス変数が該当する。pipe_tで公開されているpublicな関数は、いずれも排他制御(lock(),unlock())で囲われているので、クリティカルセクションの制御ができている。   Note that the variable of the critical section such as the shared memory MM corresponds to the class variable of the description example 1400. Since all public functions disclosed by pipe_t are surrounded by exclusive control (lock (), unlock ()), the critical section can be controlled.

クラス変数の中のm_separatorは、セパレータをリファレンスソースRSからアーキテクチャモデルAMに伝達するために利用される共有メモリである。また、m_bufferは、IDごとのdequeを用意しており、dequeにはリファレンスソースRSで計算されたパラメータ値が格納される。   M_separator in the class variable is a shared memory used for transmitting the separator from the reference source RS to the architecture model AM. Further, m_buffer prepares a request for each ID, and a parameter value calculated by the reference source RS is stored in the request.

図15は、アーキテクチャモデルAMの具体例を示す説明図(その2)である。図15において、アーキテクチャモデルAMは、制御部CTと、ブロックB1と、ブロックB2と、を含む構成である。なお、図15では、アーキテクチャモデルAMの一部を抜粋して示す(例えば、図3に示したRAM305やデータ転送部306に相当する部分は省略する。)。   FIG. 15 is an explanatory diagram (part 2) of a specific example of the architecture model AM. In FIG. 15, the architecture model AM includes a control unit CT, a block B1, and a block B2. In FIG. 15, a part of the architecture model AM is extracted and shown (for example, portions corresponding to the RAM 305 and the data transfer unit 306 shown in FIG. 3 are omitted).

ここでは、ブロックB1により関数calcの処理を実現し、ブロックB2により関数calc2の処理を実現する場合を想定する。この場合、ブロックB1およびブロックB2の計算処理で用いるパラメータ値をアーキテクチャモデルAMに渡せるようにするため、ユーザはリファレンスソースRSにプローバ関数を挿入する。   Here, it is assumed that the processing of the function calc is realized by the block B1, and the processing of the function calc2 is realized by the block B2. In this case, the user inserts a prober function into the reference source RS so that the parameter values used in the calculation processing of the block B1 and the block B2 can be passed to the architecture model AM.

図16は、プローバ関数の挿入例を示す説明図である。図16において、リファレンスソースRSに挿入されたプローバ関数1601〜1603が示されている。なお、図16では、リファレンスソースRSの一部を抜粋して示す。   FIG. 16 is an explanatory diagram of an example of inserting a prober function. In FIG. 16, prober functions 1601 to 1603 inserted in the reference source RS are shown. In FIG. 16, a part of the reference source RS is extracted and shown.

ここで、プローバ関数1601〜1603は、ブロックBiの計算処理に用いられるパラメータ値をブロックBiに対応するFIFOバッファに書き込むための関数である。図16に示すリファレンスソースRSでは、リファレンスソースRSからアーキテクチャモデルAMへのデータ転送に複数の転送経路が用意されており、各々にID番号が振られている。図16の例では、ブロックB1用にID=0が割り振られ、ブロックB2用にID=1が割り振られている。また、ここでは計算サイクル数を渡す例を示している。   Here, the prober functions 1601 to 1603 are functions for writing the parameter values used for the calculation processing of the block Bi to the FIFO buffer corresponding to the block Bi. In the reference source RS shown in FIG. 16, a plurality of transfer paths are prepared for data transfer from the reference source RS to the architecture model AM, and an ID number is assigned to each. In the example of FIG. 16, ID = 0 is allocated for the block B1, and ID = 1 is allocated for the block B2. Here, an example is shown in which the number of calculation cycles is passed.

ユーザは、ソースを主観的に解析して、おおむねのサイクル数を見積もる。図16の例では、加算に10サイクル、掛け算に100サイクル、シフト演算に50サイクルかかるとしている。また、各々の計算が終わった後で、pipe_t::send_paramを呼ぶことになっている。なお、ここでは、第1引数がID番号であり、第2引数がサイクル数である。このようにして、パラメータ値をリファレンスソースRSから送出することができる。   The user subjectively analyzes the source and estimates the approximate number of cycles. In the example of FIG. 16, it is assumed that addition takes 10 cycles, multiplication takes 100 cycles, and shift operation takes 50 cycles. In addition, after each calculation is finished, pipe_t :: send_param is to be called. Here, the first argument is an ID number, and the second argument is the number of cycles. In this way, the parameter value can be sent from the reference source RS.

(アーキテクチャモデルAMの記述例)
つぎに、図15に示したアーキテクチャモデルAMの記述例について説明する。アーキテクチャモデルAMは、例えば、図17A、図17B、図17Cおよび図17Dに示す記述例1700と、図18に示す記述例1800とを含む。
(Description example of architecture model AM)
Next, description examples of the architecture model AM shown in FIG. 15 will be described. The architecture model AM includes, for example, a description example 1700 shown in FIGS. 17A, 17B, 17C, and 17D and a description example 1800 shown in FIG.

図17A、図17B、図17Cおよび図17Dは、部品の記述例を示す説明図である。図17A、図17B、図17Cおよび図17Dにおいて、記述例1700は、図15に示したアーキテクチャモデルAMに含まれる部品の記述例である。記述例1700中のMODULE(CONT)は、制御部CTに対応する記述である。この記述は、ループで回っていて、pipe_t::wait_separator()で、リファレンスソースRS側の状態をチェックする。   FIG. 17A, FIG. 17B, FIG. 17C, and FIG. 17A, FIG. 17B, FIG. 17C, and FIG. 17D, a description example 1700 is a description example of components included in the architecture model AM shown in FIG. MODULE (CONT) in the description example 1700 is a description corresponding to the control unit CT. This description is a loop, and the state on the reference source RS side is checked with pipe_t :: wait_separator ().

リファレンスソースRS側の状態がOKの場合は、つぎに実施するアーキテクチャシミュレーションに必要なパラメータ値がpipe_t内部のメモリに格納されていることを示しており、アーキテクチャシミュレーションを実施しても破綻しないことを示す。なお、リファレンスソースRS側の状態は、例えば、m_separatorに値が記憶されていればOKとなり、m_separatorに値が記憶されていなければNGとなる。   When the state on the reference source RS side is OK, it indicates that the parameter value necessary for the next architecture simulation is stored in the memory inside the pipe_t, and it does not fail even if the architecture simulation is performed. Show. Note that the state on the reference source RS side is, for example, OK if a value is stored in m_separator, and NG if no value is stored in m_separator.

pipe_t::wait_separator()では、リファレンスソースRS側の状態が、OKであれば処理を進め、NGであれば、OKになるまで、リファレンスソースRS側の処理が進むのを待つ。その後、ブロックB1を起動してブロックB2からの完了を待つ記述がなされている。   In pipe_t :: wait_separator (), if the state on the reference source RS side is OK, the process proceeds. If it is NG, the process on the reference source RS side waits until it becomes OK. After that, there is a description of starting block B1 and waiting for completion from block B2.

記述例1700中のMODULE(A)は、ブロックB1に対応する記述である。この記述では、制御部CTから送られてきたスタート(起動命令)をもとに実行を開始し、リファレンスソースRSから送られてきたパラメータ値をすべて利用しきると、つぎの起動命令を待つ(run())。   MODULE (A) in the description example 1700 is a description corresponding to the block B1. In this description, execution starts based on a start (start command) sent from the control unit CT, and when all parameter values sent from the reference source RS are used up, the next start command is waited (run). ()).

run()からloop関数が呼ばれているが、主処理はloop()の中に定義されている。loopは、リファレンスソースRSから送られてきたパラメータ値に対応した処理を行う。最初にpipe_t::get_param(0)でID=0のデータを1個取り出す。ここで、取り出したデータが正であれば、処理すべき値のため処理する。   A loop function is called from run (), but the main process is defined in loop (). The loop performs processing corresponding to the parameter value sent from the reference source RS. First, one piece of data with ID = 0 is extracted by pipe_t :: get_param (0). If the extracted data is positive, it is processed because it is a value to be processed.

ここでは、1サイクル10[ns]とする。このため、ブロックB1の処理時間は、取り出した値data*10[ns]となる。この処理時間を、wait文を使って実現する。この処理が終わったらブロックB2とのハンドシェイクをチェックする。ブロックB2が、つぎの処理に入れる状態、すなわち、req=trueかをチェックする。このようにして、もらったパラメータ値に即した計算時間を表現する。   Here, one cycle is 10 [ns]. For this reason, the processing time of the block B1 is the extracted value data * 10 [ns]. This processing time is realized by using a wait statement. When this process is finished, the handshake with block B2 is checked. It is checked whether the block B2 enters the next process, that is, whether req = true. In this way, the calculation time corresponding to the received parameter value is expressed.

記述例1700中のMODULE(B)は、ブロックB2に対応する記述である。この記述では、ブロックB2は、ブロックB1からTRIGGERかFINISHが送られるまで待つ。ブロックB2は、TRIGGERかFINISHが送られてくると、reqを下げて、自分がタスク処理を始めたことをブロックB1に通知する。   MODULE (B) in the description example 1700 is a description corresponding to the block B2. In this description, block B2 waits until either TRIGGER or FINISH is sent from block B1. When a TRIGGER or FINISH is sent, the block B2 lowers req and notifies the block B1 that it has started task processing.

その後、ブロックB1と同様にpipe_t::get_param(1)でデータを取り出す。取り出したデータが正であれば、有効なパラメータなので、それに該当する処理をする。ここでは、データはサイクル数のため、ブロックB1と同様に、ブロックB2はdata*10[ns]待つ処理をする。   Thereafter, the data is extracted with pipe_t :: get_param (1) as in the block B1. If the extracted data is positive, it is a valid parameter, and the corresponding processing is performed. Here, since the data is the number of cycles, similarly to the block B1, the block B2 performs a process of waiting for data * 10 [ns].

ブロックB2は、この処理が終わると、reqをtrue、すなわち、つぎの仕事ができることを通知して、最初に戻って、つぎのackを待つ。一方、データが負の場合、リファレンスソースRS上の処理の終端を表すため、ブロックB2は一連の処理が終了したことを検出して、制御部CTに終了を通知する。   When this process is completed, the block B2 notifies req to true, that is, the next work can be performed, returns to the beginning, and waits for the next ack. On the other hand, if the data is negative, it represents the end of the process on the reference source RS, so that the block B2 detects the end of the series of processes and notifies the control unit CT of the end.

図18は、部品間の結線関係の記述例を示す説明図である。図18において、記述例1800は、図15に示したアーキテクチャモデルAMに含まれる部品間の結線関係を表す記述例である。記述例1800によれば、MODULE(CONT)、MODULE(A)およびMODULE(B)を用いて、図15に示したアーキテクチャモデルAMを実現することができる。また、記述例1800において、符号1801の部分は、図18に示すnamespaceの関数を呼び出す記述である。   FIG. 18 is an explanatory diagram illustrating a description example of the connection relationship between components. In FIG. 18, a description example 1800 is a description example showing a connection relationship between components included in the architecture model AM shown in FIG. According to the description example 1800, the architecture model AM shown in FIG. 15 can be realized using MODULE (CONT), MODULE (A), and MODULE (B). Further, in the description example 1800, a part denoted by reference numeral 1801 is a description for calling the function of the namespace shown in FIG.

図19は、リファレンスソースRSを起動するための記述例を示す説明図である。図19において、void run()は、スレッドを走らせるための処理である。また、run_base()は、スレッドとなる関数である。argc,argvは、sc_main()の引数でもらったargc,argvをref::mainに渡すための変数である。このようにして、アーキテクチャモデルAMから、リファレンスソースRSを実行するスレッドを起動することができる。   FIG. 19 is an explanatory diagram showing a description example for starting the reference source RS. In FIG. 19, void run () is a process for running a thread. Also, run_base () is a function that becomes a thread. argc and argv are variables for passing argc and argv received as an argument of sc_main () to ref :: main. In this way, a thread for executing the reference source RS can be activated from the architecture model AM.

(リファレンスソースRS・アーキテクチャモデルAM間のソフトウェア構造)
図20は、リファレンスソースRS・アーキテクチャモデルAM間のソフトウェア構造を示す説明図である。図20において、リファレンスソースRSは、セパレータSPと、プローバPB1と、プローバPB2と、を含む。共有メモリMMは、セパレータ用FIFO(m_separator)と、パラメータ用FIFOs(m_buffer)と、を含む。パラメータ用FIFOs(m_buffer)には、第0FIFOと、第1FIFOと、が含まれている。アーキテクチャモデルAMは、制御部CTと、ブロックB1と、ブロックB2とを含む。
(Software structure between reference source RS and architecture model AM)
FIG. 20 is an explanatory diagram showing a software structure between the reference source RS and the architecture model AM. In FIG. 20, the reference source RS includes a separator SP, a prober PB1, and a prober PB2. The shared memory MM includes a separator FIFO (m_separator) and parameter FIFOs (m_buffer). The parameter FIFOs (m_buffer) include a 0th FIFO and a 1st FIFO. The architecture model AM includes a control unit CT, a block B1, and a block B2.

ここで、セパレータSPは、関数calc,関数calc2の実行が完了した場合に、m_separator_idをm_separatorに書き込んで、m_separator_idをインクリメントする。プローバPB1は、関数calcが実行された場合に、ブロックB1の計算処理に用いられるパラメータ値を第0FIFOに書き込む。   Here, when the execution of the functions calc and calc2 is completed, the separator SP writes m_separator_id to m_separator and increments m_separator_id. When the function calc is executed, the prober PB1 writes the parameter value used for the calculation process of the block B1 into the 0th FIFO.

具体的には、関数calcの処理内容が「加算」の場合は、第0FIFOに計算サイクル数「10」が書き込まれる。関数calcの処理内容が「積」の場合は、第0FIFOに計算サイクル数「100」が書き込まれる。プローバPB2は、関数calc2が実行された場合に、ブロックB2の計算処理に用いられるパラメータ値(計算サイクル数「50」)を第1FIFOに書き込む。   Specifically, when the processing content of the function calc is “addition”, the calculation cycle number “10” is written in the 0th FIFO. When the processing content of the function calc is “product”, the number of calculation cycles “100” is written in the 0th FIFO. When the function calc2 is executed, the prober PB2 writes the parameter value (number of calculation cycles “50”) used for the calculation process of the block B2 to the first FIFO.

制御部CTは、m_separatorから値(m_separator_id)を読み出した場合に、ブロックB1に起動命令を出力する。ブロックB1は、制御部CTからの起動命令を受け付けた場合、第0FIFOからパラメータ値を読み出して、そのパラメータ値に基づく計算処理を行う。   When the control unit CT reads a value (m_separator_id) from m_separator, the control unit CT outputs an activation command to the block B1. When receiving an activation command from the control unit CT, the block B1 reads a parameter value from the 0th FIFO and performs a calculation process based on the parameter value.

また、ブロックB1は、計算処理の実行が完了した場合、ブロックB2に起動命令(例えば、TRIGGER)を出力する。ブロックB2は、ブロックB1から起動命令を受け付けた場合、第1FIFOからパラメータ値を読み出して、そのパラメータ値に基づく計算処理を行う。そして、ブロックB2は、計算処理の実行が完了した場合、制御部CTに完了通知を出力する。   In addition, when the execution of the calculation process is completed, the block B1 outputs a start command (for example, TRIGGER) to the block B2. When the block B2 receives an activation command from the block B1, the parameter value is read from the first FIFO and calculation processing based on the parameter value is performed. Then, the block B2 outputs a completion notification to the control unit CT when the execution of the calculation process is completed.

(シミュレーション結果SRの具体例)
図21は、シミュレーション結果SRの具体例を示す説明図である。図21において、シミュレーション結果SRは、リファレンスソースRSとアーキテクチャモデルAMとに基づいて、リファレンスソースRSのアルゴリズムに依存したブロックの振る舞いを模擬したシミュレーション結果である。具体的には、シミュレーション結果SRは、図15に示したアーキテクチャモデルAM内の制御部CT、ブロックB1およびブロックB2の各々のモジュールのis_runを出力した結果である。
(Specific example of simulation result SR)
FIG. 21 is an explanatory diagram of a specific example of the simulation result SR. In FIG. 21, the simulation result SR is a simulation result simulating the behavior of the block depending on the algorithm of the reference source RS based on the reference source RS and the architecture model AM. Specifically, the simulation result SR is a result of outputting is_run of each module of the control unit CT, the block B1, and the block B2 in the architecture model AM shown in FIG.

(シミュレーション装置100のシミュレーション処理手順)
つぎに、シミュレーション装置100のシミュレーション処理手順について説明する。
(Simulation processing procedure of the simulation apparatus 100)
Next, a simulation processing procedure of the simulation apparatus 100 will be described.

図22は、シミュレーション装置100のシミュレーション処理手順の一例を示すフローチャートである。図22のフローチャートにおいて、シミュレーション装置100は、リファレンスソースRSおよびアーキテクチャモデルAMの入力を受け付けたか否かを判断する(ステップS2201)。   FIG. 22 is a flowchart illustrating an example of a simulation processing procedure of the simulation apparatus 100. In the flowchart of FIG. 22, the simulation apparatus 100 determines whether or not the input of the reference source RS and the architecture model AM has been received (step S2201).

ここで、シミュレーション装置100は、リファレンスソースRSおよびアーキテクチャモデルAMの入力を受け付けるのを待つ(ステップS2201:No)。そして、シミュレーション装置100は、リファレンスソースRSおよびアーキテクチャモデルAMの入力を受け付けた場合(ステップS2201:Yes)、リファレンスソースRSに先行アクセス記述を挿入する(ステップS2202)。   Here, the simulation apparatus 100 waits for the input of the reference source RS and the architecture model AM (step S2201: No). When the simulation apparatus 100 receives input of the reference source RS and the architecture model AM (step S2201: Yes), the preceding access description is inserted into the reference source RS (step S2202).

つぎに、シミュレーション装置100は、リファレンスソースRSにプローバ関数を挿入する(ステップS2203)。そして、シミュレーション装置100は、リファレンスソースRSをスレッド実行するためのスレッド記述を生成する(ステップS2204)。つぎに、シミュレーション装置100は、アーキテクチャモデルAMをスレッド実行するためのスレッド記述を生成する(ステップS2205)。   Next, the simulation apparatus 100 inserts a prober function into the reference source RS (step S2203). Then, the simulation apparatus 100 generates a thread description for executing thread execution of the reference source RS (step S2204). Next, the simulation apparatus 100 generates a thread description for threading the architecture model AM (step S2205).

そして、シミュレーション装置100は、メイン記述を生成する(ステップS2206)。つぎに、シミュレーション装置100は、リファレンスソースRSのスレッド記述とアーキテクチャモデルAMのスレッド記述とメイン記述とをコンパイルして実行形式を生成する(ステップS2207)。   Then, the simulation apparatus 100 generates a main description (step S2206). Next, the simulation apparatus 100 compiles the thread description of the reference source RS, the thread description of the architecture model AM, and the main description to generate an execution format (step S2207).

そして、シミュレーション装置100は、シミュレーションを実行し(ステップS2208)、シミュレーション結果SRを出力して(ステップS2209)、本フローチャートによる一連の処理を終了する。   Then, the simulation apparatus 100 executes a simulation (step S2208), outputs a simulation result SR (step S2209), and ends a series of processes according to this flowchart.

このように、リファレンスソースRSとアーキテクチャモデルAMとの関連付けを行うことにより、評価対象となるシステムの性能評価シミュレーションを行うことができる。この際、ユーザはリファレンスソースRSに先行アクセス記述やプローバ関数を挿入すればよく、リファレンスソースRSを解析してモジュール分割し、各々がハードウェアモデルとして動作するように書き直してシミュレーションする手法に比べて作業工数を削減することができる。   As described above, by associating the reference source RS with the architecture model AM, it is possible to perform a performance evaluation simulation of a system to be evaluated. At this time, the user only has to insert a preceding access description or a prober function into the reference source RS, and the reference source RS is analyzed and divided into modules, and rewritten so that each operates as a hardware model and simulated. Work man-hours can be reduced.

また、各ブロックBiに対して処理内容に応じたパラメータ値を与えることができるため、各ブロックBiのブロック記述にパラメータ値を埋め込んだりする必要がない。この結果、各ブロックBiのブロック記述にパラメータ値を埋め込む手法と同程度の精度を維持しつつシミュレーションにかかる作業工数を削減することができる。   Also, since parameter values corresponding to the processing contents can be given to each block Bi, there is no need to embed parameter values in the block description of each block Bi. As a result, it is possible to reduce the work man-hours required for the simulation while maintaining the same accuracy as the method of embedding the parameter value in the block description of each block Bi.

なお、上述した説明では、アーキテクチャモデルAMの入力を受け付ける場合を例に挙げて説明したが、キーボード810やマウス811を用いたユーザの操作入力により、アーキテクチャモデルAMを作成することにしてもよい。   In the above description, the case where the input of the architecture model AM is received has been described as an example. However, the architecture model AM may be created by a user operation input using the keyboard 810 or the mouse 811.

また、上述した説明では、先行アクセス記述およびプローバ関数が未挿入のリファレンスソースRSの入力を受け付ける場合を例に挙げて説明したが、先行アクセス記述およびプローバ関数が挿入済みのリファレンスソースRS(例えば、図16参照)の入力を受け付けることにしてもよい。   In the above description, the case where the preceding access description and the prober function accept the input of the reference source RS that has not been inserted has been described as an example, but the reference source RS (for example, the preceding access description and the prober function that has been inserted) You may decide to receive the input of FIG.

(リファレンスソースRSの処理手順)
つぎに、図22に示したステップS2208のシミュレーションにおいて実行されるリファレンスソースRSの処理手順について説明する。ここでは、入力ファイル(例えば、入力ファイル1100)に記述されているデータ列から選択されたデータごとに実行されるリファレンスソースRSの処理手順について説明する。
(Processing procedure of reference source RS)
Next, the processing procedure of the reference source RS executed in the simulation of step S2208 shown in FIG. 22 will be described. Here, the processing procedure of the reference source RS executed for each data selected from the data string described in the input file (for example, the input file 1100) will be described.

図23は、リファレンスソースRSの処理手順の一例を示すフローチャートである。図23のフローチャートにおいて、シミュレーション装置100は、入力ファイルに記述されているデータ列から選択されたデータから特定される演算種別が0か否かを判断する(ステップS2301)。   FIG. 23 is a flowchart illustrating an example of a processing procedure of the reference source RS. In the flowchart of FIG. 23, the simulation apparatus 100 determines whether or not the operation type specified from the data selected from the data string described in the input file is 0 (step S2301).

ここで、演算種別が0の場合(ステップS2301:Yes)、シミュレーション装置100は、入力ファイルに記述されているデータ列から選択されたデータから特定される数値0と数値1の和を計算する(ステップS2302)。そして、シミュレーション装置100は、「ID=0」のFIFOバッファに計算サイクル数「10」を送出する(ステップS2303)。   Here, when the calculation type is 0 (step S2301: Yes), the simulation apparatus 100 calculates the sum of the numerical value 0 and the numerical value 1 specified from the data selected from the data string described in the input file ( Step S2302). Then, the simulation apparatus 100 sends the calculation cycle number “10” to the FIFO buffer with “ID = 0” (step S2303).

一方、演算種別が0ではない場合(ステップS2301:No)、シミュレーション装置100は、入力ファイルに記述されているデータ列から選択されたデータから特定される数値0と数値1の積を計算する(ステップS2304)。そして、シミュレーション装置100は、「ID=0」のFIFOバッファに計算サイクル数「100」を送出する(ステップS2305)。   On the other hand, when the calculation type is not 0 (step S2301: No), the simulation apparatus 100 calculates the product of the numerical value 0 and the numerical value 1 specified from the data selected from the data string described in the input file ( Step S2304). Then, the simulation apparatus 100 sends the calculation cycle number “100” to the FIFO buffer with “ID = 0” (step S2305).

つぎに、シミュレーション装置100は、計算結果をシフト演算して(ステップS2306)、「ID=1」のFIFOバッファに計算サイクル数「50」を送出する(ステップS2307)。そして、シミュレーション装置100は、m_separator_idをm_separatorに送出し(ステップS2308)、m_separator_idをインクリメントして(ステップS2309)、本フローチャートによる一連の処理を終了する。   Next, the simulation apparatus 100 shifts the calculation result (step S2306) and sends the calculation cycle number “50” to the FIFO buffer of “ID = 1” (step S2307). Then, the simulation apparatus 100 sends m_separator_id to m_separator (step S2308), increments m_separator_id (step S2309), and ends the series of processing according to this flowchart.

これにより、入力ファイルに記述されているデータ列から選択されたデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理を実行することができる。また、一連の処理に含まれる処理の処理内容に応じて設定されているパラメータ値を、該処理を実現するブロックBiのFIFOバッファに送出することができる。   Thereby, a series of processes including a process whose process contents change by a conditional branch based on data selected from the data string described in the input file can be executed. Also, parameter values set according to the processing contents of the processing included in the series of processing can be sent to the FIFO buffer of the block Bi that realizes the processing.

(アーキテクチャモデルAM内の制御部CTの処理手順)
つぎに、図22に示したステップS2208のシミュレーションにおいて実行されるアーキテクチャモデルAM内の制御部CTの処理手順について説明する。ここでは、ループ処理される一連の処理(関数calc、関数calc2)の一回分の実行に対応する制御部CTの処理手順について説明する。
(Processing procedure of the control unit CT in the architecture model AM)
Next, the processing procedure of the control unit CT in the architecture model AM executed in the simulation of step S2208 shown in FIG. 22 will be described. Here, a processing procedure of the control unit CT corresponding to one execution of a series of processing (function calc, function calc2) subjected to loop processing will be described.

図24は、制御部CTの処理手順の一例を示すフローチャートである。図24において、制御部CTは、m_separatorに値があるか否かを判断する(ステップS2401)。ここで、m_separatorに値がない場合(ステップS2401:No)、制御部CTは、m_separatorに値が書き込まれるのを待つ。   FIG. 24 is a flowchart illustrating an example of a processing procedure of the control unit CT. In FIG. 24, the control unit CT determines whether m_separator has a value (step S2401). Here, when there is no value in m_separator (step S2401: No), the control unit CT waits for a value to be written in m_separator.

一方、m_separatorに値がある場合(ステップS2401:Yes)、制御部CTは、ブロックB1に起動命令を出力する(ステップS2402)。つぎに、制御部CTは、ブロックB2から完了通知を受け付けたか否かを判断する(ステップS2403)。   On the other hand, when m_separator has a value (step S2401: Yes), the control unit CT outputs an activation command to the block B1 (step S2402). Next, the control unit CT determines whether or not a completion notification has been received from the block B2 (step S2403).

ここで、制御部CTは、ブロックB2から完了通知を受け付けるのを待って(ステップS2403:No)、ブロックB2から完了通知を受け付けた場合(ステップS2403:Yes)、本フローチャートによる一連の処理を終了する。これにより、リファレンスソースRSよりもアーキテクチャモデルAMのほうが先行して動作することを防いで、シミュレーションが破綻するのを回避することができる。   Here, the control unit CT waits to receive a completion notification from the block B2 (step S2403: No), and when it receives a completion notification from the block B2 (step S2403: Yes), ends the series of processes according to this flowchart. To do. As a result, the architecture model AM can be prevented from operating earlier than the reference source RS, and the simulation can be prevented from failing.

(アーキテクチャモデルAM内のブロックBiの処理手順)
つぎに、図22に示したステップS2208のシミュレーションにおいて実行されるアーキテクチャモデルAM内のブロックBiの処理手順について説明する。ここでは、ループ処理されるcalc,calc2の一回分の処理に対応するブロックBi(ブロックB1、ブロックB2)の処理手順について説明する。
(Processing procedure of block Bi in architecture model AM)
Next, the processing procedure of the block Bi in the architecture model AM executed in the simulation of step S2208 shown in FIG. 22 will be described. Here, the processing procedure of the block Bi (block B1, block B2) corresponding to one processing of calc and calc2 to be loop-processed will be described.

図25は、ブロックBiの処理手順の一例を示すフローチャートである。図25において、ブロックBiは、ブロックBiに対応するFIFOバッファからパラメータ値を読み出す(ステップS2501)。そして、ブロックBiは、読み出したパラメータ値を用いて計算処理を行って(ステップS2502)、本フローチャートによる一連の処理を終了する。これにより、リファレンスソースRSの実行により決定されるパラメータ値を用いて計算処理を行うことができる。   FIG. 25 is a flowchart illustrating an example of the processing procedure of the block Bi. In FIG. 25, the block Bi reads the parameter value from the FIFO buffer corresponding to the block Bi (step S2501). Then, the block Bi performs a calculation process using the read parameter value (step S2502), and ends a series of processes according to this flowchart. Thereby, a calculation process can be performed using the parameter value determined by execution of the reference source RS.

以上説明したように、実施の形態にかかるシミュレーション装置100によれば、リファレンスソースRSに基づいて、入力ファイルから順次選ばれるデータに基づく条件分岐により処理内容が変わる処理(例えば、関数calc)を含む一連の処理(例えば、関数calc、関数calc2)のループ処理を実行することができる。また、シミュレーション装置100によれば、一連の処理に含まれる各処理の実行が完了する度に、該処理の処理内容に応じて設定されたパラメータ値を、該処理を実現するブロックBiのFIFOバッファ(例えば、第0FIFOと、第1FIFO)に書き込むことができる。   As described above, the simulation apparatus 100 according to the embodiment includes the process (for example, the function calc) in which the process contents change according to the conditional branch based on the data sequentially selected from the input file based on the reference source RS. A loop process of a series of processes (for example, the function calc and the function calc2) can be executed. Further, according to the simulation apparatus 100, each time the execution of each process included in the series of processes is completed, the parameter value set according to the processing content of the process is changed to the FIFO buffer of the block Bi that realizes the process. (For example, the 0th FIFO and the 1st FIFO) can be written.

また、シミュレーション装置100によれば、一連の処理の実行が完了した場合に、アーキテクチャモデルAM内の制御部CTにより、一連の処理のうちの最初に実行される処理を実現するブロックBiを起動させることができる。また、シミュレーション装置100によれば、ブロックBiにより、ブロックBi用に設けられたFIFOバッファからパラメータ値を読み出させて計算処理を実行させることができる。   Further, according to the simulation apparatus 100, when execution of a series of processes is completed, the control unit CT in the architecture model AM activates the block Bi that realizes the first process executed in the series of processes. be able to. Further, according to the simulation apparatus 100, the block Bi can read the parameter value from the FIFO buffer provided for the block Bi and execute the calculation process.

これにより、リファレンスソースRSの実行により決定されるパラメータ値を用いてブロックBiに計算処理を行わせることができ、リファレンスソースRSのアルゴリズムに依存したブロックBiの振る舞いを再現することができる。   Thereby, it is possible to cause the block Bi to perform a calculation process using the parameter value determined by the execution of the reference source RS, and to reproduce the behavior of the block Bi depending on the algorithm of the reference source RS.

また、シミュレーション装置100によれば、一連の処理の実行が完了する度に、一連の処理の実行が完了したことを示す先行度変数(例えば、m_separator_id)を制御部CTがアクセスするFIFOバッファ(例えば、m_separator)に書き込むことができる。また、シミュレーション装置100によれば、制御部CTにより、FIFOバッファ(例えば、m_separator)に記憶されている先行度変数に基づいて、一連の処理の実行が完了したか否かを判定し、一連の処理の実行が完了したと判定した場合に、ブロックBiを起動させることができる。   Further, according to the simulation apparatus 100, each time a series of processes is completed, a FIFO buffer (for example, the control unit CT) accesses a leading degree variable (for example, m_separator_id) indicating that the series of processes is completed. , M_separator). Further, according to the simulation apparatus 100, the control unit CT determines whether or not a series of processes has been executed based on the leading degree variable stored in the FIFO buffer (for example, m_separator), When it is determined that the execution of the process is completed, the block Bi can be activated.

これにより、リファレンスソースRSよりもアーキテクチャモデルAMのほうが先行して動作することを防いで、シミュレーションが破綻するのを回避することができる。   As a result, the architecture model AM can be prevented from operating earlier than the reference source RS, and the simulation can be prevented from failing.

また、シミュレーション装置100によれば、制御部CTがアクセスするFIFO構造のバッファに所定数N以上の先行度変数が記憶されている場合に、当該バッファに記憶されている先行度変数が所定数N未満となるまでループ処理の実行を停止することができる。これにより、アーテクチャモデルAMに対するリファレンスソースRSの先行量が上限N以上となった時にFIFO構造のバッファに先行度変数が蓄積されていくのを防いで、バッファのメモリ量を制限することができる。   Further, according to the simulation apparatus 100, when a predetermined number N or more of the leading degree variables are stored in the FIFO structure buffer accessed by the control unit CT, the leading degree variable stored in the buffer is the predetermined number N. Execution of the loop process can be stopped until the value becomes less than. As a result, when the preceding amount of the reference source RS with respect to the architecture model AM exceeds the upper limit N, it is possible to prevent the leading degree variable from being accumulated in the buffer having the FIFO structure, and to limit the memory amount of the buffer. .

このように、実施の形態にかかるシミュレーションプログラム、シミュレーション方法およびシミュレーション装置によれば、リファレンスソースRSのアルゴリズムに応じたアーキテクチャモデルAMの振る舞いを再現してアーキテクチャシミュレーションを行うことができる。また、リファレンスソースRSを分割してブロックごとに機能が入っているような複雑なモデルを作ることなくシステムの性能の評価が可能になるため、シミュレーションモデルの作成工数を削減してシミュレーション期間を短縮させることができる。   As described above, according to the simulation program, the simulation method, and the simulation apparatus according to the embodiment, it is possible to perform the architecture simulation by reproducing the behavior of the architecture model AM according to the algorithm of the reference source RS. In addition, the system performance can be evaluated without creating a complex model that divides the reference source RS and contains functions for each block, reducing the number of simulation model creation steps and shortening the simulation period. Can be made.

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

また、本実施の形態で説明したシミュレーション装置100は、スタンダードセルやストラクチャードASIC(Application Specific Integrated Circuit)などの特定用途向けIC(以下、単に「ASIC」と称す。)やFPGAなどのPLD(Programmable Logic Device)によっても実現することができる。具体的には、例えば、シミュレーション装置100の機能(取得部901〜出力部904)をHDL記述によって機能定義し、そのHDL記述を論理合成してASICやPLDに与えることにより、シミュレーション装置100を製造することができる。   In addition, the simulation apparatus 100 described in the present embodiment includes a specific cell IC (hereinafter simply referred to as “ASIC”) such as a standard cell or a structured ASIC (Application Specific Integrated Circuit), or a PLD (Programmable Logic) such as an FPGA. It can also be realized by Device). Specifically, for example, the function of the simulation apparatus 100 (acquisition unit 901 to output unit 904) is defined by HDL description, and the HDL description is logically synthesized and given to the ASIC or PLD to manufacture the simulation apparatus 100. can do.

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

(付記1)コンピュータに、
システムの機能をプログラム言語で記述したリファレンスソースを取得し、
前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、
前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、
前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる、
処理を実行させることを特徴とするシミュレーションプログラム。
(Supplementary note 1)
Get a reference source that describes the system functions in a programming language.
Obtaining an architecture model including a plurality of blocks for simulating the operation of the system and a control unit for controlling the plurality of blocks;
Based on the reference source, execute a loop process of a series of processes including a process whose process contents change by conditional branching based on data sequentially selected from a data string to be processed,
Each time execution of the processing included in the series of processing is completed, the parameter value set according to the processing content of the processing is written to the buffer accessed by the block that realizes the processing among the plurality of blocks. ,
When the execution of the series of processes is completed by the control unit, the block that realizes the process executed first in the series of processes is activated,
Causing the block to perform a calculation process based on the parameter value by causing the parameter value to be read from a buffer accessed by the block;
A simulation program characterized by causing processing to be executed.

(付記2)前記コンピュータに、
前記一連の処理の実行が完了する度に、前記一連の処理の実行が完了したことを示す情報を前記制御部がアクセスするバッファに書き込み、
前記制御部により、前記制御部がアクセスするバッファに記憶されている情報に基づいて、前記一連の処理の実行が完了したか否かを判定し、
前記制御部により、前記一連の処理の実行が完了したと判定した場合に、前記ブロックを起動させる、
処理を実行させることを特徴とする付記1に記載のシミュレーションプログラム。
(Supplementary note 2)
Each time the execution of the series of processes is completed, information indicating that the execution of the series of processes is completed is written in a buffer accessed by the control unit,
The control unit determines whether or not the execution of the series of processes is completed based on information stored in a buffer accessed by the control unit,
When the control unit determines that the execution of the series of processes is completed, the block is activated.
The simulation program according to appendix 1, wherein the process is executed.

(付記3)前記制御部がアクセスするバッファは、FIFO(First In First Out)構造のバッファであり、
前記コンピュータに、
前記制御部により、前記制御部がアクセスするバッファに前記情報が記憶されている場合に、前記ブロックを起動させる、
処理を実行させることを特徴とする付記2に記載のシミュレーションプログラム。
(Supplementary Note 3) The buffer accessed by the control unit is a FIFO (First In First Out) structure buffer.
In the computer,
The control unit activates the block when the information is stored in a buffer accessed by the control unit.
The simulation program according to appendix 2, wherein the process is executed.

(付記4)前記コンピュータに、
前記制御部がアクセスするバッファに所定数以上の前記情報が記憶されている場合、当該バッファに記憶されている前記情報が所定数未満となるまで前記ループ処理の実行を停止する処理を実行させることを特徴とする付記3に記載のシミュレーションプログラム。
(Supplementary note 4)
When a predetermined number or more of the information is stored in a buffer accessed by the control unit, a process for stopping execution of the loop process is executed until the information stored in the buffer becomes less than a predetermined number The simulation program according to appendix 3, characterized by:

(付記5)コンピュータが、
システムの機能をプログラム言語で記述したリファレンスソースを取得し、
前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、
前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、
前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる、
処理を実行することを特徴とするシミュレーション方法。
(Appendix 5) The computer
Get a reference source that describes the system functions in a programming language.
Obtaining an architecture model including a plurality of blocks for simulating the operation of the system and a control unit for controlling the plurality of blocks;
Based on the reference source, execute a loop process of a series of processes including a process whose process contents change by conditional branching based on data sequentially selected from a data string to be processed,
Each time execution of the processing included in the series of processing is completed, the parameter value set according to the processing content of the processing is written to the buffer accessed by the block that realizes the processing among the plurality of blocks. ,
When the execution of the series of processes is completed by the control unit, the block that realizes the process executed first in the series of processes is activated,
Causing the block to perform a calculation process based on the parameter value by causing the parameter value to be read from a buffer accessed by the block;
A simulation method characterized by executing processing.

(付記6)システムの機能をプログラム言語で記述したリファレンスソース、および前記システムの動作を模擬する複数のブロックと前記複数のブロックを制御する制御部とを含むアーキテクチャモデルを取得する取得部と、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込む第1の実行部と、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる第2の実行部と、
を有することを特徴とするシミュレーション装置。
(Supplementary Note 6) A reference source that describes a system function in a programming language, an acquisition unit that acquires an architecture model including a plurality of blocks that simulate the operation of the system and a control unit that controls the plurality of blocks;
Based on the reference source, a loop process of a series of processes including a process whose contents change by a conditional branch based on data sequentially selected from a data string to be processed is executed, and the processes included in the series of processes are executed A first execution unit that writes a parameter value set according to the processing content of the processing to a buffer accessed by a block that realizes the processing among the plurality of blocks,
When the execution of the series of processes is completed by the control unit, the block that implements the process to be executed first of the series of processes is activated, and the parameter is set by the block from the buffer accessed by the block. A second execution unit that executes a calculation process based on the parameter value by reading the value;
A simulation apparatus comprising:

(付記7)コンピュータに、
システムの機能をプログラム言語で記述したリファレンスソースを取得し、
前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、
前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、
前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる、
処理を実行させるシミュレーションプログラムを記録したことを特徴とする前記コンピュータに読み取り可能な記録媒体。
(Appendix 7)
Get a reference source that describes the system functions in a programming language.
Obtaining an architecture model including a plurality of blocks for simulating the operation of the system and a control unit for controlling the plurality of blocks;
Based on the reference source, execute a loop process of a series of processes including a process whose process contents change by conditional branching based on data sequentially selected from a data string to be processed,
Each time execution of the processing included in the series of processing is completed, the parameter value set according to the processing content of the processing is written to the buffer accessed by the block that realizes the processing among the plurality of blocks. ,
When the execution of the series of processes is completed by the control unit, the block that realizes the process executed first in the series of processes is activated,
Causing the block to perform a calculation process based on the parameter value by causing the parameter value to be read from a buffer accessed by the block;
A computer-readable recording medium on which a simulation program for executing processing is recorded.

100 シミュレーション装置
901 取得部
902 第1の実行部
903 第2の実行部
904 出力部
RS リファレンスソース
AM アーキテクチャモデル
DESCRIPTION OF SYMBOLS 100 Simulation apparatus 901 Acquisition part 902 1st execution part 903 2nd execution part 904 Output part RS reference source AM Architecture model

Claims (5)

コンピュータに、
システムの機能をプログラム言語で記述したリファレンスソースを取得し、
前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、
前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、
前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる、
処理を実行させることを特徴とするシミュレーションプログラム。
On the computer,
Get a reference source that describes the system functions in a programming language.
Obtaining an architecture model including a plurality of blocks for simulating the operation of the system and a control unit for controlling the plurality of blocks;
Based on the reference source, execute a loop process of a series of processes including a process whose process contents change by conditional branching based on data sequentially selected from a data string to be processed,
Each time execution of the processing included in the series of processing is completed, the parameter value set according to the processing content of the processing is written to the buffer accessed by the block that realizes the processing among the plurality of blocks. ,
When the execution of the series of processes is completed by the control unit, the block that realizes the process executed first in the series of processes is activated,
Causing the block to perform a calculation process based on the parameter value by causing the parameter value to be read from a buffer accessed by the block;
A simulation program characterized by causing processing to be executed.
前記コンピュータに、
前記一連の処理の実行が完了する度に、前記一連の処理の実行が完了したことを示す情報を前記制御部がアクセスするバッファに書き込み、
前記制御部により、前記制御部がアクセスするバッファに記憶されている情報に基づいて、前記一連の処理の実行が完了したか否かを判定し、
前記制御部により、前記一連の処理の実行が完了したと判定した場合に、前記ブロックを起動させる、
処理を実行させることを特徴とする請求項1に記載のシミュレーションプログラム。
In the computer,
Each time the execution of the series of processes is completed, information indicating that the execution of the series of processes is completed is written in a buffer accessed by the control unit,
The control unit determines whether or not the execution of the series of processes is completed based on information stored in a buffer accessed by the control unit,
When the control unit determines that the execution of the series of processes is completed, the block is activated.
The simulation program according to claim 1, wherein the process is executed.
前記制御部がアクセスするバッファは、FIFO(First In First Out)構造のバッファであり、
前記コンピュータに、
前記制御部により、前記制御部がアクセスするバッファに前記情報が記憶されている場合に、前記ブロックを起動させる、
処理を実行させることを特徴とする請求項2に記載のシミュレーションプログラム。
The buffer accessed by the control unit is a FIFO (First In First Out) structure buffer,
In the computer,
The control unit activates the block when the information is stored in a buffer accessed by the control unit.
The simulation program according to claim 2, wherein the process is executed.
コンピュータが、
システムの機能をプログラム言語で記述したリファレンスソースを取得し、
前記システムの動作を模擬する複数のブロックと、前記複数のブロックを制御する制御部と、を含むアーキテクチャモデルを取得し、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、
前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込み、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、
前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる、
処理を実行することを特徴とするシミュレーション方法。
Computer
Get a reference source that describes the system functions in a programming language.
Obtaining an architecture model including a plurality of blocks for simulating the operation of the system and a control unit for controlling the plurality of blocks;
Based on the reference source, execute a loop process of a series of processes including a process whose process contents change by conditional branching based on data sequentially selected from a data string to be processed,
Each time execution of the processing included in the series of processing is completed, the parameter value set according to the processing content of the processing is written to the buffer accessed by the block that realizes the processing among the plurality of blocks. ,
When the execution of the series of processes is completed by the control unit, the block that realizes the process executed first in the series of processes is activated,
Causing the block to perform a calculation process based on the parameter value by causing the parameter value to be read from a buffer accessed by the block;
A simulation method characterized by executing processing.
システムの機能をプログラム言語で記述したリファレンスソース、および前記システムの動作を模擬する複数のブロックと前記複数のブロックを制御する制御部とを含むアーキテクチャモデルを取得する取得部と、
前記リファレンスソースに基づいて、処理対象となるデータ列から順次選ばれるデータに基づく条件分岐により処理内容が変わる処理を含む一連の処理のループ処理を実行し、前記一連の処理に含まれる処理の実行が完了する度に、前記処理の処理内容に応じて設定されたパラメータ値を、前記複数のブロックのうちの前記処理を実現するブロックがアクセスするバッファに書き込む第1の実行部と、
前記制御部により、前記一連の処理の実行が完了した場合に、前記一連の処理のうちの最初に実行される処理を実現するブロックを起動させ、前記ブロックにより、前記ブロックがアクセスするバッファからパラメータ値を読み出させることにより、前記パラメータ値に基づく計算処理を実行させる第2の実行部と、
を有することを特徴とするシミュレーション装置。
A reference source describing a function of the system in a programming language; and an acquisition unit that acquires an architecture model including a plurality of blocks that simulate the operation of the system and a control unit that controls the plurality of blocks;
Based on the reference source, a loop process of a series of processes including a process whose contents change by a conditional branch based on data sequentially selected from a data string to be processed is executed, and the processes included in the series of processes are executed A first execution unit that writes a parameter value set according to the processing content of the processing to a buffer accessed by a block that realizes the processing among the plurality of blocks,
When the execution of the series of processes is completed by the control unit, the block that implements the process to be executed first of the series of processes is activated, and the parameter is set by the block from the buffer accessed by the block. A second execution unit that executes a calculation process based on the parameter value by reading the value;
A simulation apparatus comprising:
JP2013009667A 2013-01-22 2013-01-22 Simulation program, simulation method, and simulation apparatus Expired - Fee Related JP6011356B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013009667A JP6011356B2 (en) 2013-01-22 2013-01-22 Simulation program, simulation method, and simulation apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013009667A JP6011356B2 (en) 2013-01-22 2013-01-22 Simulation program, simulation method, and simulation apparatus

Publications (2)

Publication Number Publication Date
JP2014142725A true JP2014142725A (en) 2014-08-07
JP6011356B2 JP6011356B2 (en) 2016-10-19

Family

ID=51423966

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013009667A Expired - Fee Related JP6011356B2 (en) 2013-01-22 2013-01-22 Simulation program, simulation method, and simulation apparatus

Country Status (1)

Country Link
JP (1) JP6011356B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5404496A (en) * 1992-07-01 1995-04-04 Hewlett-Packard Company Computer-based system and method for debugging a computer system implementation
JP2000311186A (en) * 1999-04-28 2000-11-07 Sony Corp Method and device for evaluating performance
JP2004318654A (en) * 2003-04-18 2004-11-11 Fujitsu Ltd Performance evaluation device, performance evaluation method and program
JP2007018440A (en) * 2005-07-11 2007-01-25 Mitsubishi Electric Corp Architecture verification apparatus
JP2012203451A (en) * 2011-03-23 2012-10-22 Toshiba Corp Semiconductor integrated circuit simulation device and semiconductor integrated circuit simulation method
WO2014064788A1 (en) * 2012-10-24 2014-05-01 富士通株式会社 Simulation program, simulation device, simulation method, bus model and bus circuit

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5404496A (en) * 1992-07-01 1995-04-04 Hewlett-Packard Company Computer-based system and method for debugging a computer system implementation
JP2000311186A (en) * 1999-04-28 2000-11-07 Sony Corp Method and device for evaluating performance
JP2004318654A (en) * 2003-04-18 2004-11-11 Fujitsu Ltd Performance evaluation device, performance evaluation method and program
JP2007018440A (en) * 2005-07-11 2007-01-25 Mitsubishi Electric Corp Architecture verification apparatus
JP2012203451A (en) * 2011-03-23 2012-10-22 Toshiba Corp Semiconductor integrated circuit simulation device and semiconductor integrated circuit simulation method
WO2014064788A1 (en) * 2012-10-24 2014-05-01 富士通株式会社 Simulation program, simulation device, simulation method, bus model and bus circuit

Also Published As

Publication number Publication date
JP6011356B2 (en) 2016-10-19

Similar Documents

Publication Publication Date Title
US7882462B2 (en) Hardware definition language generation for frame-based processing
US8453110B2 (en) Automatic generation of code for component interfaces in models
US8701084B1 (en) Preview of auto-fix changes to software code
US20220083706A1 (en) Systems and methods for creating model adaptors
US8762916B1 (en) Automatic generation of a data transfer network
JP5910108B2 (en) High-level synthesis apparatus, high-level synthesis method, high-level synthesis program, integrated circuit design method
Ahn et al. SoCDAL: System-on-chip design AcceLerator
US7992112B2 (en) Hardware verification programming description generation apparatus, high-level synthesis apparatus, hardware verification programming description generation method, hardware verification program generation method, control program and computer-readable recording medium
US9003339B2 (en) Synthesis of clock gated circuit
US10970183B1 (en) System and method for improving model performance
Garavel Reflections on the future of concurrency theory in general and process calculi in particular
JP6011356B2 (en) Simulation program, simulation method, and simulation apparatus
US10666255B1 (en) System and method for compacting X-pessimism fixes for gate-level logic simulation
Frias et al. Efficient analysis of DynAlloy specifications
Asheim et al. VHDL Generation From Python Synchronous Message Exchange Networks
JP2010049630A (en) Simulation control program, simulation control device, and simulation control method
JP5071297B2 (en) Design support program, design support apparatus, and design support method
Klein et al. Migrating software to hardware on FPGAs
TWI427496B (en) Method and system of generating a model of an integrated circuit
JP2008217071A (en) High-level synthesis apparatus and high-level synthesis method
Lange et al. HW/SW co-design by automatic embedding of complex IP cores
Harrath et al. Timed SystemC Waiting–State Automata
Madani et al. Testing the CARE Properties of Multimodal Applications by Means of a Synchronous Approach.
Akpan An FPGA realization of integrated embedded multi-processors system: A hardware-software co-design approach
Zhang et al. Challenges and opportunities of ESL design automation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150903

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160818

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160823

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160905

R150 Certificate of patent or registration of utility model

Ref document number: 6011356

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees