JP2010033130A - Simulation method, system, and program - Google Patents

Simulation method, system, and program Download PDF

Info

Publication number
JP2010033130A
JP2010033130A JP2008191731A JP2008191731A JP2010033130A JP 2010033130 A JP2010033130 A JP 2010033130A JP 2008191731 A JP2008191731 A JP 2008191731A JP 2008191731 A JP2008191731 A JP 2008191731A JP 2010033130 A JP2010033130 A JP 2010033130A
Authority
JP
Japan
Prior art keywords
electronic control
input event
input
emulator
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
JP2008191731A
Other languages
Japanese (ja)
Other versions
JP5224957B2 (en
Inventor
Shuichi Shimizu
周一 清水
Hideaki Komatsu
秀昭 小松
Koichi Kajitani
浩一 梶谷
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2008191731A priority Critical patent/JP5224957B2/en
Publication of JP2010033130A publication Critical patent/JP2010033130A/en
Application granted granted Critical
Publication of JP5224957B2 publication Critical patent/JP5224957B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently simulate a system having a plurality of heterogeneous ECUs by software means. <P>SOLUTION: Referring to an ECU emulator or each physical apparatus simulator as a logical process, each ECU emulator is speculatively emulated, and in each logical process, even if an input event is not reached, input is predicted to proceed with processing. By this speculative execution, processing is performed in advance without waiting for output of another logical process, thus improving parallelism in processes. If actual input received belatedly does not match with input for predicted speculative execution, the speculative execution ends in failure, thereby returning back to a state at the previous time, and on the basis of actual input, the processing is reexecuted. An allowable error is set for matching determination for actually received input and input at predictive speculative execution, thus enabling setting to satisfy both of accuracy and speed of simulation. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、自動車などに使用される電子制御ユニット(ECU)のテストに関し、より詳しくは、ソフトウェア・ベースでの複数ECUのテスト及びエミュレーションに関するものである。   The present invention relates to testing of electronic control units (ECUs) used in automobiles and the like, and more particularly to testing and emulation of multiple ECUs on a software basis.

自動車は、その初期の時代の20世紀初頭は、動力としてのエンジンと、ブレーキ、アクセル、ハンドル、トランスミッション、サスペンジョンを含む、機構部品からなっていたが、エンジンのプラグの点火、ヘッドライト以外は、電気的な仕組みはほとんど利用していなかった。   In the early twentieth century of the early era, automobiles consisted of mechanical parts including an engine as power and a brake, accelerator, steering wheel, transmission, and suspension. Except for the ignition of the engine plug and the headlight, Almost no electrical mechanism was used.

ところが、1970年代頃から、大気汚染、石油危機などに備えて、エンジンを効率的に制御する必要性が生じ、このためエンジンの制御に、ECUが使用されるようになってきた。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成される。   However, since the 1970s, there has been a need to efficiently control the engine in preparation for air pollution, oil crisis, and the like, and thus ECUs have been used for engine control. The ECU generally includes an input interface for A / D conversion, for example, an input interface from a sensor, a logical operation unit (microcomputer) that processes a digital input signal in accordance with a predetermined logic, and the processing result as an actuator. And an output interface for converting into an operation signal.

いまや、エンジンやトランスミッションなどの制御システム、Anti-lock Breaking System (ABS)、Electronic Stability Control (ESC)、パワーステアリングだけでなく、ワイパー制御やセキュリティ・モニタリング・システムなどに至るまで、最近の自動車では、機構部品だけでなく、エレクトロニクス部品やソフトウエアが重要な比率を占める。後者に関する開発費は全体の25%とも40%とも言われ、ハイブリッド型の自動車では70%を占める。   Nowadays, in automobiles such as control systems such as engines and transmissions, Anti-lock Breaking System (ABS), Electronic Stability Control (ESC), power steering as well as wiper control and security monitoring system, Not only mechanical parts but also electronic parts and software account for an important proportion. The development cost for the latter is said to be 25% or 40% of the total, accounting for 70% for hybrid type vehicles.

電子制御は、ECUを複数、配置して行われる。ECU間は車載ネットワーク、例えば、Controller Area Network (CAN) で相互に接続される。また、制御の対象である、エンジンやトランスミッションなどには、それぞれのECUから直接ワイヤリングして接続する。   Electronic control is performed by arranging a plurality of ECUs. The ECUs are connected to each other via an in-vehicle network, for example, a controller area network (CAN). In addition, an engine, a transmission, or the like, which is a control target, is directly wired from each ECU and connected.

ECUは、小さなコンピュータであり、センサ入力などからの割り込みに応じて動作する。一方、エンジンなどは連続的に機械的動作を行っている。すなわち、コンピュータ系のディジタル・システムと、機械系の物理システムが、自動車という単一システムにおいて、並列に協調動作を行っている。当然、これを支えるソフトウエアは複雑さがますます増大しており、ECU単体で動作を検証するだけでなく、複数を同時に検証する仕組みの実現が急務である。   The ECU is a small computer and operates in response to an interrupt from a sensor input or the like. On the other hand, an engine or the like continuously performs a mechanical operation. That is, a computer-based digital system and a mechanical-system physical system perform a cooperative operation in parallel in a single system called an automobile. Naturally, the software that supports this is becoming increasingly complex, and it is urgent to implement a mechanism that not only verifies the operation of the ECU alone, but also verifies the plurality at the same time.

ここで、ECUに信号を入力するセンサには、エンジンの温度などを計測する温度センサ、エンジンに吸入される圧力を推定するための圧力センサ、アクセスペダルの踏み量を測定するスロットル・ポジション・センサ、ステアリング舵角センサ、車高センサ、回転速度センサ、ノックセンサ、加速度センサ、流量センサ、酸素センサ、希薄空燃比センサなどがある。   Here, the sensor that inputs a signal to the ECU includes a temperature sensor that measures the temperature of the engine, a pressure sensor that estimates the pressure sucked into the engine, and a throttle position sensor that measures the amount of depression of the access pedal Steering angle sensor, vehicle height sensor, rotational speed sensor, knock sensor, acceleration sensor, flow sensor, oxygen sensor, lean air-fuel ratio sensor, and the like.

一方、ECUの出力信号によって駆動されるアクチュエータには、電磁ソレノイド及びモータ等がある。ソレノイドは例えば、エンジンのインジェクタ、トランスミッションのシフト・コントロール、ブレーキのバルブ制御、ドアロックなどに使用される。   On the other hand, the actuator driven by the output signal of the ECU includes an electromagnetic solenoid and a motor. Solenoids are used, for example, for engine injectors, transmission shift control, brake valve control, and door locks.

モータは、主としてサーボ機構として、エンジンのスタータ、エンジンのフューエル・コントロール、ブレーキの油圧ポンプ、舵角制御、ステアリング、ワイパ、パワーウインドウ、シートベルト、エアバックなどに使用される。   The motor is mainly used as a servo mechanism for an engine starter, engine fuel control, brake hydraulic pump, rudder angle control, steering, wiper, power window, seat belt, airbag, and the like.

このようなテストにために従来行われている技法として、HILS(Hardware In the Loop Simulation)がある。特に、自動車全体のECUをテストする環境は、フルビークルHILSと呼ばれる。フルビークルHILSにおいては、実験室内で、本物のECUが、エンジン、トランスミッション機構などをエミュレーションする専用のハードウェア装置に接続され、所定のシナリオに従って、テストが行われる。ECUからの出力は、監視用のコンピュータに入力され、さらにはディスプレイに表示されて、テスト担当者がディスプレイを眺めながら、異常動作がないかどうか、チェックする。   As a technique conventionally performed for such a test, there is HILS (Hardware In the Loop Simulation). In particular, the environment for testing the ECU of the entire vehicle is called full vehicle HILS. In the full vehicle HILS, a real ECU is connected to a dedicated hardware device that emulates an engine, a transmission mechanism, and the like in a laboratory, and a test is performed according to a predetermined scenario. The output from the ECU is input to a monitoring computer and further displayed on a display, and a tester checks whether there is an abnormal operation while looking at the display.

しかし、HILSは、専用のハードウェア装置を使い、それと本物のECUの間を物理的に配線しなくてはならないので、準備が大変である。また、別のECUに取り替えてのテストも、物理的に接続し直さなくてはならないので、手間がかかる。さらに、本物のECUを用いたテストであるため、テストに実時間を要する。従って、多くのシナリオをテストすると、膨大な時間がかかる。また、HILSのエミュレーション用のハードウェア装置は、一般に、非常に高価である。   However, HILS requires a dedicated hardware device and has to be physically wired between it and a real ECU, so preparation is difficult. In addition, the test after replacing with another ECU also takes time since it must be physically reconnected. Furthermore, since the test is performed using a real ECU, real time is required for the test. Therefore, testing many scenarios takes a huge amount of time. In addition, a hardware device for HILS emulation is generally very expensive.

そこで近年、高価なエミュレーション用ハードウェア装置を使うことなく、ソフトウェアで構成する手法が存在する。この手法は、SILS(Software In the Loop Simulation)と呼ばれ、ECUに搭載されるマイクロコンピュータ、入出力回路、制御のシナリオなどを全て、ソフトウェア・シミュレータで構成する技法である。これによれば、ECUのハードウェアが存在しなくても、テストを実行可能である。   Therefore, in recent years, there is a method of configuring with software without using an expensive emulation hardware device. This method is called SILS (Software In the Loop Simulation), and is a technique in which a microcomputer, an input / output circuit, a control scenario, etc. mounted on an ECU are all configured by a software simulator. According to this, the test can be executed without the ECU hardware.

ここで、ECUエミュレータと、物理装置シミュレータ、特にエンジン・シミュレータとが協働する例について説明する。なお、以下、便宜上、ECUエミュレータとエンジン・シミュレータではなく、実際のECUとエンジンの間の動作として説明する。先ず、クランクシャフトの回転にあわせてピストンが上死点に達する30度前のタイミングで、エンジンは、ECUに割り込みを引き起こす。その割り込みを受けたECUは、燃料噴射のタイミングを計算して、その時刻に噴射の指示を出す。それを受けたエンジンは、燃料を噴射して、引き続き、惰性で回転するクランクの動作を計算する。そして、ピストンが再び上死点の30度前に達したら、エンジンは、ECUに割り込みを引き起して、ECUに知らせる。すると、ECUは、点火のタイミングを計算して、その時刻にエンジンに指示を出す。これに応じて、エンジンは、シリンダー内の燃料を爆発させて、新たな回転の動作を計算し始める。このような動作が繰り返し行われる。   Here, an example in which an ECU emulator and a physical device simulator, particularly an engine simulator, cooperate will be described. Hereinafter, for the sake of convenience, the operation between the actual ECU and the engine will be described instead of the ECU emulator and the engine simulator. First, at a timing 30 degrees before the piston reaches top dead center in accordance with the rotation of the crankshaft, the engine interrupts the ECU. The ECU that has received the interrupt calculates the fuel injection timing and issues an injection instruction at that time. The engine receiving it injects fuel and then calculates the operation of the crank that rotates by inertia. When the piston reaches 30 degrees before the top dead center again, the engine causes an interruption to the ECU and notifies the ECU. Then, the ECU calculates the ignition timing and issues an instruction to the engine at that time. In response, the engine explodes the fuel in the cylinder and begins calculating a new rotation action. Such an operation is repeated.

このように、エンジンとECUが交互に動く動作は、クリティカル・パスとして捉えられる。従って、自動車の離散イベントを並列にシミュレーションする場合には、このようなクリティカル・パスの存在によって、計算性能の観点からみて、並列性を十分に発揮しえない。従って、マルチプロセッサ・システムのコンピュータを用いたフルビークルHILSにおいて、複数のECUエミュレータにそれぞれ、個別のCPUを割り当てたとしても、最悪の場合、1個のCPUで、複数のECUエミュレータ及びエンジン・エミュレータをシリアルに計算する程度の性能しかでないことがある。   Thus, the operation in which the engine and the ECU move alternately is regarded as a critical path. Therefore, when simulating discrete events of an automobile in parallel, due to the presence of such a critical path, the parallelism cannot be sufficiently exhibited from the viewpoint of calculation performance. Therefore, even in the full vehicle HILS using a computer of a multiprocessor system, even if individual CPUs are assigned to a plurality of ECU emulators, in the worst case, a plurality of ECU emulators and engine emulators can be obtained with one CPU. May only be of a performance that can be calculated serially.

複数の論理プロセスを並列に矛盾なく動作させるための、もっとも簡単な方法は、全体の号令にあわせて各論理プロセスを動作させることである。しかし、この方法では、割り込みなどのイベントが発生しない時刻でもすべて同期処理を行う必要があるため、処理の負荷が大きく、また、処理が遅くなる。   The simplest method for operating a plurality of logical processes in parallel without contradiction is to operate each logical process in accordance with the entire command. However, in this method, since it is necessary to perform all synchronous processing even at the time when an event such as an interrupt does not occur, the processing load is large and the processing is slow.

複数の論理プロセスを非同期的に並列に動作させる、離散イベントのシミュレーションでは、プロセス間の通信は、タイム・スタンプの付いたイベントを、メッセージとして送受信することによって行われる。このとき、タイム・スタンプは、シミュレーション・システム全体で共通の時刻が記録される。このような時刻をシミュレーション時計と呼ぶことにすると、シミュレーション時計のどの時点で処理を行うかは、各論理プロセスで独立で、必ずしも一致する必要はない。但し、各論理プロセスが協働して処理を行う場合は、必ずタイム・スタンプの順序で行う必要がある。そのように処理を進める限り、全体をシリアルに処理する場合と同じように処理を進めることができる。   In the simulation of discrete events in which a plurality of logical processes are asynchronously operated in parallel, communication between processes is performed by transmitting and receiving time-stamped events as messages. At this time, the time stamp records a common time in the entire simulation system. If such a time is called a simulation clock, the timing at which the simulation clock is processed is independent in each logical process and does not necessarily have to coincide. However, when the logical processes cooperate to perform processing, it is necessary to always perform them in the order of time stamps. As long as the process proceeds in this way, the process can proceed in the same way as when the entire process is processed serially.

非同期処理の1つに、保守的同期(conservative synchronization)がある。この方法では、必ず、タイム・スタンプの古い順位のイベントを処理する。   One asynchronous process is conservative synchronization. This method always handles events with the oldest time stamp.

保守的同期の例を説明すると、ある論理プロセスに、2つの上流プロセスからのキューがあり、その一方に、時間t1をもつイベントと、時間t2をもつイベントが届いているとする。時間t1の方が時間t2よりも古いとする。また、他方のキューには何も届いていないとする。すると、その論理プロセスは、時間t1をもつイベントから順に処理していけばよさそうなものだが、時間t1よりも古い時間をもつイベントが上流から、他方のキューに届く可能性があり、すなわち、時間t1が最古であることが保証されないため、処理を進めることができない。特に、論理プロセス間に送受信のループがある構成では、このような構成ではデッドロックを引き起こすことがある。 To explain an example of conservative synchronization, assume that a logical process has queues from two upstream processes, and an event having a time t 1 and an event having a time t 2 have arrived at one of the queues. Assume that time t 1 is older than time t 2 . Also assume that nothing has arrived in the other queue. Then, the logical process is likely to be processed in order from the event with time t 1 , but an event with a time older than time t 1 may reach the other queue from upstream, That is, since it is not guaranteed that the time t 1 is the oldest, the process cannot proceed. In particular, in a configuration where there is a transmission / reception loop between logical processes, such a configuration may cause a deadlock.

このような状況を回避するために、空メッセージ(null message)を利用した方法が知られている。この方法では、上流の論理プロセスが、ある時刻まではイベントを発生することがないことを示すために、その時刻をもつ空メッセージを、下流の論理プロセスに送る。そのような時刻は、タイム・スタンプ上の下位境界(lower bound on the timestamp:LBTS)と呼ばれる。このような空メッセージを受け取った下流の論理プロセスは、届いているイベントのタイムスタンプと、そのLBTSとを比較し、それより古いタイム・スタンプのイベントを確定とみなして処理することができる。   In order to avoid such a situation, a method using a null message is known. In this method, an upstream message with that time is sent to the downstream logical process to indicate that the upstream logical process will not generate an event until a certain time. Such a time is called the lower bound on the timestamp (LBTS). A downstream logical process that receives such an empty message compares the time stamp of the event that has arrived with its LBTS, and can process an event with an older time stamp as definite.

空メッセージを利用しない方法として、楽観的同期(optimistic synchronization)と呼ばれる手法が考え出された。この方法では、ある論理プロセスに、2つの上流プロセスからのキューがあり、時間t1をもつイベントと、時間t2をもつイベントが届いていて、時間t1の方が時間t2よりも古いとするとき、且つ他方のキューに何も届いていないときに、とりあえず時間t1をもつイベントを最も古いと仮定して処理を進める。その後で、時間t1よりも古い時刻をもつイベントが他方のキューに届いたら、先の時間t1のイベントを発端とする一連の処理を、遡及メッセージ(reverse message)を送ることによって順に取り消してから、新たに、時間t1よりも古い時刻をもつイベントを処理する。この方法では、論理プロセスから出力されるイベントは、一時的に必ずしもタイム・スタンプどおりではないが、ロールバックにより、最終的には、タイム・スタンプどおりになることが保証される。 A method called optimistic synchronization has been devised as a method not using empty messages. In this method, a logical process has queues from two upstream processes, an event with time t 1 and an event with time t 2 have arrived, and time t 1 is older than time t 2 And when nothing has arrived in the other queue, the processing is performed assuming that the event having time t 1 is the oldest for the time being. After that, when an event with a time older than time t 1 arrives in the other queue, a series of processing starting from the event at the previous time t 1 is canceled in order by sending a retroactive message (reverse message). Then, a new event having a time older than time t 1 is processed. In this method, the event output from the logical process is not necessarily temporarily in accordance with the time stamp, but rollback ensures that the event is finally in accordance with the time stamp.

このような方法で、デッドロックを回避しつつ、正しい順序でイベントが送り出されるようにすることができる。しかし、このような方法では、依然として処理の直列化は回避できず、よって処理はやはり、高速化できない。   In this way, events can be sent out in the correct order while avoiding deadlocks. However, with such a method, serialization of processes cannot be avoided, and thus the process cannot be accelerated.

特開平6−161987号公報は、ECUハードウェアを擬似的に実現して、ソフトウェアによる実機評価を可能ならしめることを目的とするものであって、マトリックス・スイッチを切り替えることによって、所望の機能のハードウェアをシミュレートすることを開示する。   Japanese Patent Laid-Open No. 6-161987 is intended to simulate ECU hardware and enable real machine evaluation by software. By switching matrix switches, a desired function can be obtained. Disclose to simulate hardware.

特開平11−14507号公報は、車両全体のロジックを机上で検証できるようにすることを課題とするものであり、エンジン制御模擬装置(ECU)と、車両制御模擬装置からなる車両シミュレーション装置を開示する。ECUは、エンジンモデルの制御パラメータを演算し、その演算結果を車両制御模擬装置に送信する。車両制御模擬装置は、ECUから送られてくる制御パラメータを用いて車両モデルの各部の状態量を演算してその演算結果をECUに返送する。車両モデルは、ドライバモデル、吸気系モデル、燃料系モデル、燃焼系モデル、エンジン温推定モデル、駆動系モデル、触媒モデル、A/Fセンサモデル、リアO2 センサモデルから構成されている。ドライバモデルは、目標車速の変化パターンを入力する車速パターン入力手段を有する。 Japanese Patent Application Laid-Open No. 11-14507 discloses a vehicle simulation apparatus that includes an engine control simulation device (ECU) and a vehicle control simulation device. To do. The ECU calculates the control parameter of the engine model and transmits the calculation result to the vehicle control simulation device. The vehicle control simulation device calculates a state quantity of each part of the vehicle model using control parameters sent from the ECU, and returns the calculation result to the ECU. The vehicle model includes a driver model, an intake system model, a fuel system model, a combustion system model, an engine temperature estimation model, a drive system model, a catalyst model, an A / F sensor model, and a rear O 2 sensor model. The driver model has vehicle speed pattern input means for inputting a change pattern of the target vehicle speed.

しかし、これらの文献には、論理プロセス間で同期をとる技術には言及はない。そこで、本願発明者らは、2008年6月18日に出願した特願2008−158995号特許出願において、各ECUエミュレータを、投機的にエミュレートする技法を提示した。すなわち、その発明によれば、クリティカル・パスを作らずに、各論理プロセスをできるだけ並列に実行させるために、ECUエミュレータや各物理装置シミュレータなどの各論理プロセスにおいて、入力イベントが届いていない場合でも、入力を予測して処理が進められる。このような投機的実行により、他の論理プロセスの出力を待つことなく、先行して処理を行うことにより、処理の並列性が高められる。そうして、もし遅れて受信する実際の入力と、予測して投機実行したときの入力が一致していない場合には、投機実行が失敗だったとして、その前の時刻に状態が戻され、その実際の入力に基づき、処理が再実行される。   However, these documents do not mention a technique for synchronizing logical processes. Accordingly, the inventors of the present application presented a technique for speculatively emulating each ECU emulator in the Japanese Patent Application No. 2008-158995 filed on June 18, 2008. That is, according to the invention, in order to execute each logical process in parallel as much as possible without creating a critical path, even if an input event does not arrive in each logical process such as an ECU emulator or each physical device simulator. The process proceeds by predicting the input. By such speculative execution, processing parallelism is improved by performing processing in advance without waiting for the output of another logical process. So, if the actual input received late and the input when speculative execution was predicted do not match, the speculation execution failed and the status is returned to the previous time, The process is re-executed based on the actual input.

特開平6−161987号公報JP-A-6-161987 特開平11−14507号公報Japanese Patent Laid-Open No. 11-14507 特願2008−158995号明細書Japanese Patent Application No. 2008-158995

特願2008−158995号明細書に記述された技法によれば、フルビークルSILSで、動作の直列性に拘束されることなく、高速にシミュレーションを行うことが可能となった。   According to the technique described in the specification of Japanese Patent Application No. 2008-158995, it has become possible to perform a high-speed simulation without being restricted by the seriality of operations in the full vehicle SILS.

しかし、依然として課題はあり、すなわち、シミュレーションにおいては、その精度と速度の折り合いをどうつけるか、ということが常に課題になるが、特願2008−158995号明細書に記述された技法の範囲では、その調整の余地があまりなかった。   However, there is still a problem, that is, in the simulation, how to strike a balance between accuracy and speed is always a problem, but within the scope of the technique described in Japanese Patent Application No. 2008-158895, There was not much room for adjustment.

この発明の目的は、特願2008−158995号明細書に記述された技法を、さらに改良することにある。   An object of the present invention is to further improve the technique described in Japanese Patent Application No. 2008-158995.

より具体的には、この発明の目的は、フルビークルSILSなどのシミュレーション・システムにおいて、の精度と速度の間の調整を行うための技法を提供することにある。   More specifically, it is an object of the present invention to provide a technique for adjusting between accuracy and speed in a simulation system such as a full vehicle SILS.

本発明の実施のために、必須ではないが、好適にはマルチCPUのワークステーションが用意される。また、各ECUのソフトウェア・エミュレータが用意される。一般的には、ECUのソフトウェア・エミュレータは、そのECUのメーカから入手可能である。   For implementing the present invention, a multi-CPU workstation is preferably provided, although it is not essential. In addition, a software emulator for each ECU is prepared. In general, an ECU software emulator is available from the ECU manufacturer.

各ECUのソフトウェア・エミュレータは、好適には、マルチCPUのワークステーション上で走るように、ワークステーションのオペレーティング・システムの所定のレイヤとインターフェースする。各ECUのソフトウェア・エミュレータには、好適には、マルチCPUのうちの各々のCPUが割り当てられ、以って、各CPUによって、各ECUエミュレータは独立に動作可能である。ECUの数よりもCPUの数が少ない場合は、1つのCPUに、複数のECUエミュレータが割り当てられる。いずれにしても、オペレーティング・システムは、各ECUエミュレータ毎に1つのプロセスを割り当て、以って、各ECUエミュレータは、固有の異なるクロックで動作しているように、エミュレーションを行うことができる。すなわち、各ECUエミュレータは、異種ECUであってよい。   Each ECU's software emulator preferably interfaces with a predetermined layer of the workstation's operating system to run on a multi-CPU workstation. Preferably, each of the multi-CPUs is assigned to a software emulator of each ECU, so that each ECU emulator can operate independently by each CPU. When the number of CPUs is smaller than the number of ECUs, a plurality of ECU emulators are assigned to one CPU. In any case, the operating system allocates one process for each ECU emulator, so that each ECU emulator can perform emulation so that it operates with a different clock. That is, each ECU emulator may be a heterogeneous ECU.

各ECUエミュレータには、ワークステーションのメモリの一部が、内部処理用のプライベート・メモリとして割り当てられる。さらに、ECUエミュレータは、ワークステーションの共用メモリとして割り当てられた箇所にもアクセス可能であり、この共用メモリを介して、各ECUエミュレータは、互いにデータをやりとりしたり、同期したり、通信したりすることが可能である。あるいは、ECUエミュレータは、CAN(controller area network)エミュレータで接続してもよい。   A part of the memory of the workstation is allocated to each ECU emulator as a private memory for internal processing. Furthermore, the ECU emulator can also access a portion allocated as a shared memory of the workstation, and through this shared memory, each ECU emulator exchanges data, synchronizes, and communicates with each other. It is possible. Alternatively, the ECU emulator may be connected by a CAN (controller area network) emulator.

これらのECUエミュレータから入力を受け取る、エンジン・シミュレータ、トランスミッション・シミュレータなどの、物理装置シミュレータが用意され、やはりワークステーションの共用メモリ、またはCAN(controller area network)エミュレータで、ECUエミュレータと接続される。   Physical device simulators such as engine simulators and transmission simulators that receive inputs from these ECU emulators are prepared, and are also connected to the ECU emulators using a shared memory of a workstation or a CAN (controller area network) emulator.

本発明においては、各ECUエミュレータは、投機的にエミュレートされる。すなわち、ここで、ECUエミュレータや各物理装置シミュレータを論理プロセスと呼ぶことにすると、本発明によれば、クリティカル・パスを作らずに、各論理プロセスをできるだけ並列に実行させるために、各論理プロセスにおいて、入力イベントが届いていない場合でも、入力を予測して処理が進められる。例えば、タイム・スタンプt1のイベントと、タイム・スタンプt2のイベントを処理した後は、今までの入力から、タイム・スタンプt3のイベントが来ると予測して、その処理を先行投機的に実行する。 In the present invention, each ECU emulator is speculatively emulated. That is, here, the ECU emulator and each physical device simulator are called logical processes. According to the present invention, each logical process is executed in order to execute each logical process in parallel as much as possible without creating a critical path. Even if an input event has not arrived, the input is predicted and the process proceeds. For example, the event timestamp t 1, after processing the event time stamp t 2 from the input so far, we expect the event timestamp t 3 comes, prior speculative its processing To run.

このような投機的実行により、他の論理プロセスの出力を待つことなく、先行して処理を行うことにより、処理の並列性が高められる。そうして、もし遅れて受信する実際の入力と、予測して投機実行したときの入力が一致していない場合には、投機実行が失敗だったとして、その前の時刻に状態が戻され(ロールバック)、その実際の入力に基づき、処理が再実行される。このような投機実行は、入力の予測が容易である、自動車などの離散イベント・シミュレーションに特に有効である。   By such speculative execution, processing parallelism is improved by performing processing in advance without waiting for the output of another logical process. Then, if the actual input received late and the input when speculative execution was predicted do not match, the speculation execution failed and the status is returned to the previous time ( Rollback), and the process is re-executed based on the actual input. Such speculative execution is particularly effective for a discrete event simulation such as an automobile in which input prediction is easy.

本発明の特徴によれば、遅れて受信する実際の入力と、予測して投機実行したときの入力の一致を判断する際に、その一致判断の誤差、あるいは許容度が調整可能とされる。すなわち、許容誤差を広げると、遅れて受信する実際の入力と、予測して投機実行したときの入力が一致していると判断される頻度が増加し、よって、ロールバックの頻度が減るので、シミュレーションを高速化できる。しかし、許容誤差を広げすぎると、不正確な値のままシミュレーションが進むので、シミュレーションの精度は低下してしまう。   According to the feature of the present invention, when determining a match between an actual input received with a delay and an input when predicting and executing speculation, an error or tolerance of the match determination can be adjusted. That is, if the tolerance is increased, the frequency at which it is determined that the actual input received with a delay is the same as the input when the speculative execution is predicted is increased, and thus the frequency of rollback is reduced. Simulation can be speeded up. However, if the tolerance is excessively widened, the simulation proceeds with an inaccurate value, and the accuracy of the simulation decreases.

一方、許容誤差を狭めると、遅れて受信する実際の入力と、予測して投機実行したときの入力がかなり近いときにしか、それらの入力が一致していると判断されないので、シミュレーションの精度は向上する。しかし、その分、ロールバックの頻度が増えるので、シミュレーションの速度が低下する。   On the other hand, if the tolerance is narrowed, it can only be judged that the actual input received late and the input when the speculative execution is predicted and the input is quite close, so the accuracy of the simulation is improves. However, since the frequency of rollback increases accordingly, the simulation speed decreases.

このような一致判断の誤差を設定するために、本発明によれば、好適には、予めある期間シミュレーションを実行して、各論理プロセス毎に、遅れて受信する実際の入力と、予測して投機実行したときの入力の差が、その頻度とともに、例えばコンピュータ・メモリ上に、ヒストグラムとして記録される。そのヒストグラムは、次に、累積ヒストグラムに変換されて、再度、コンピュータ・メモリ上に保存される。   In order to set such a match determination error, according to the present invention, it is preferable to execute a simulation for a certain period in advance to predict the actual input received in a delayed manner for each logical process. The difference in input at the time of speculative execution is recorded as a histogram together with the frequency, for example, on a computer memory. The histogram is then converted to a cumulative histogram and stored again in computer memory.

このような誤差の累積ヒストグラムは、各論理プロセス毎に保存され、オペレータは、好適には単一の100分率の値を閾値として設定し、設定された閾値は、共通メモリ領域などを介して、各論理プロセス全体に提供される。   Such a cumulative histogram of errors is stored for each logical process, and the operator preferably sets a single 100-percentage value as a threshold, and the set threshold is set via a common memory area or the like. Provided to the entire logical process.

各論理プロセスは、受領した、100分率である閾値を、その累積ヒストグラムに突き合わせて、実際の入力と、予測して投機実行したときの入力の許容誤差の値を取得する。そうして、その後、その許容誤差で以って、その後のシミュレーションで、遅れて受信する実際の入力と、予測して投機実行したときの入力が一致しているかどうかの判断を行うことになる。   Each logical process matches the received threshold value, which is a 100-percentage rate, with its cumulative histogram to obtain the actual input and the value of the input tolerance when it is speculated and predicted. Then, after that, with the tolerance, in the subsequent simulation, it is determined whether the actual input received with a delay coincides with the input when the speculative execution is predicted. .

この発明によれば、フルビークルSILSなどのシミュレーション・システムにおいて、オペレータの操作により、シミュレーションの精度と速度の間の調整を行うための技法が提供される。   According to the present invention, in a simulation system such as a full vehicle SILS, a technique is provided for adjusting between the accuracy and speed of simulation by an operator's operation.

以下、図面を参照して、本発明の一実施例の構成及び処理を説明する。以下の記述では、特に断わらない限り、図面に亘って、同一の要素は同一の符号で参照されるものとする。なお、ここで説明する構成と処理は、一実施例として説明するものであり、本発明の技術的範囲をこの実施例に限定して解釈する意図はないことを理解されたい。   The configuration and processing of an embodiment of the present invention will be described below with reference to the drawings. In the following description, the same elements are referred to by the same reference numerals throughout the drawings unless otherwise specified. It should be understood that the configuration and processing described here are described as an example, and the technical scope of the present invention is not intended to be limited to this example.

本発明を実現するための構成を説明する前に、その前提として、ECUについて説明する。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成されるものである。   Before describing the configuration for realizing the present invention, the ECU will be described as a premise thereof. The ECU generally includes an input interface for A / D conversion, for example, an input interface from a sensor, a logical operation unit (microcomputer) that processes a digital input signal in accordance with a predetermined logic, and the processing result as an actuator. And an output interface for converting into an operation signal.

この発明は、説明の便宜上、以下では、自動車のECUに関連して説明するが、それには限定されず、航空機、ロボットなどその他のECUをもつメカトロニクス機構全般に適用可能であることを理解されたい。   For convenience of explanation, the present invention will be described below in connection with an ECU of an automobile. However, the present invention is not limited thereto, and it should be understood that the present invention can be applied to general mechatronic mechanisms having other ECUs such as an aircraft and a robot. .

ECUは、周辺や環境状態、エンジンなどの駆動機構の状態、及び人間による指示操作の内容をセンサで検出して、信号として入力する。具体的には、水温センサ、吸気温センサ、過給圧センサ、ポンプ角センサ、クランク角センサ、車速センサ、アクセル位置センサ、A/Tシフト・ポジション、スタータ・スイッチ、エアコンECUなどからの信号がある。   The ECU detects the surroundings, the environmental state, the state of the driving mechanism such as the engine, and the content of the instruction operation by a human with a sensor and inputs it as a signal. Specifically, signals from a water temperature sensor, intake air temperature sensor, boost pressure sensor, pump angle sensor, crank angle sensor, vehicle speed sensor, accelerator position sensor, A / T shift position, starter switch, air conditioner ECU, etc. is there.

ECUは、これらの信号を入力して、電磁スピル弁、フュエル・カット・ソレノイド、タイミング・コントロール・バルブ、吸気絞りVSV、グロー・プラグ・リレー、タコメータ及びエアコン・リレーなどを駆動する信号を出力する。   The ECU inputs these signals and outputs signals for driving the electromagnetic spill valve, fuel cut solenoid, timing control valve, intake throttle VSV, glow plug relay, tachometer, air conditioner relay, etc. .

1つのECUが複数の異なる機構を制御するための駆動信号を出力するようにすることは不可能ではないが、例えば、エンジンとエアコンのように、応答性やその制御の厳密性が異なるものを単一のECUで制御することは合理的でなく、従って、一般的に自動車にECUは複数個設けられる。   Although it is not impossible for one ECU to output drive signals for controlling a plurality of different mechanisms, for example, an engine and an air conditioner that have different responsiveness and strict control. It is not rational to control with a single ECU. Therefore, in general, a plurality of ECUs are provided in an automobile.

図1は、ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。すなわち、図1において、ある目標の信号が、ECUであるコントローラ102に入力され、ECUは、目標の信号を内部処理することによって、駆動信号を出力し、制御対象モデルである、エンジンなどのプラント104を駆動し、プラント104の出力は、センサ106を介して、コントローラ102の入力にフィードバックされる。   FIG. 1 is a diagram illustrating an example of a feedback closed loop system that is a typical control of the ECU. That is, in FIG. 1, a target signal is input to a controller 102 that is an ECU, and the ECU internally processes the target signal to output a drive signal, which is a model to be controlled, such as a plant such as an engine. The output of the plant 104 is fed back to the input of the controller 102 via the sensor 106.

ここで目標信号として与えられるのは、例えば、スロットル開度、アイドル・コントロール、ブレーキ力、シフト、スタータON・OFF、バッテリ電圧、インジェクション通電時間、インジェクション通電回数、デポジット、ドウェル角、進角値、吸気完了フラグ、点火完了フラグ、大気圧、車両重量、転がり抵抗係数、道路勾配、粘着係数、吸気温、などのパラメータである。   The target signal given here is, for example, throttle opening, idle control, brake force, shift, starter ON / OFF, battery voltage, injection energization time, number of times of injection energization, deposit, dwell angle, advance value, The parameters are an intake completion flag, ignition completion flag, atmospheric pressure, vehicle weight, rolling resistance coefficient, road gradient, adhesion coefficient, intake air temperature, and the like.

また、センサ信号としてフィードバックされるのは、スロットル開度、吸気圧力、吸入空気量、シフト、エンジン回転数、車速、排気温、O、冷却水温、空燃比、ノック、点火異常、などである。 Also, feedback of sensor signals includes throttle opening, intake pressure, intake air amount, shift, engine speed, vehicle speed, exhaust temperature, O 2 , cooling water temperature, air-fuel ratio, knock, ignition abnormality, etc. .

ECUが制御する対象は、ニュートンの力学方程式で解かれる、機構系システムであったり、電気回路の応答方程式で解かれる、電気駆動回路であったり、それらの組み合わせであったりする。これらは、基本的に微分方程式であり、制御工学によれば、ラプラス変換によって応答関数に変換されて、記述することができる。   An object controlled by the ECU is a mechanical system solved by Newton's dynamic equation, an electric drive circuit solved by a response equation of an electric circuit, or a combination thereof. These are basically differential equations and can be described by being converted into a response function by Laplace transform according to control engineering.

図2は、そのような応答関数による記述の例である。図2で破線202で囲った箇所が、図1のコントローラ102に対応し、破線204で囲った箇所が、図1の制御対象モデル104に対応し、センサ106が、ブロック206に対応する。なお、図2は、応答関数による表現の一例であって、特に本発明を限定する意図はないことを理解されたい。   FIG. 2 is an example of such a response function description. 2 corresponds to the controller 102 in FIG. 1, the portion surrounded by the broken line 204 corresponds to the control target model 104 in FIG. 1, and the sensor 106 corresponds to the block 206. Note that FIG. 2 is an example of expression by a response function, and it should be understood that the present invention is not particularly limited.

さて、例えば、ECUが制御する対象が、ニュートンの力学方程式で解かれる、機構系システムであるとする。すると、ある時点のECUの制御出力は、その機構系システムの可動部分の位置及び速度という内部状態変数をもち、その時点の入力だけでは決まらない。そのことは、電気回路にもあてはまり、電気回路のキャパシタに残っている電荷の量や、コイルのインダクタンスによる磁力などの内部状態変数が、やはり存在する。   Now, for example, it is assumed that an object controlled by the ECU is a mechanical system that is solved by Newton's dynamic equation. Then, the control output of the ECU at a certain time has internal state variables such as the position and speed of the movable part of the mechanical system, and is not determined only by the input at that time. This also applies to the electric circuit, and there are still internal state variables such as the amount of charge remaining in the capacitor of the electric circuit and the magnetic force due to the inductance of the coil.

従って、ECUは、図3に示すように、入力uに対して、その内部状態xを勘案した値yを出力することになる。   Accordingly, as shown in FIG. 3, the ECU outputs a value y that takes into account the internal state x with respect to the input u.

さて、前述したSILSのようなテストの目的で、自動車部品メーカーは、自社が提供する機器のECUのソフトウェア・エミュレータを提供する。すなわち、図2に示すような機能を、アセンブラまたはCなどの言語が書かれたコードをアセンブリまたはコンパイルした実行可能プログラムにより、純粋にソフトウェア的に実現する。   Now, for the purpose of the test such as SILS described above, an auto parts manufacturer provides a software emulator for ECU of equipment provided by the auto part manufacturer. That is, the functions shown in FIG. 2 are realized purely in software by an executable program obtained by assembling or compiling a code written in a language such as assembler or C.

本発明のこの実施例では、ECUのソフトウェア・エミュレータの内部状態を取り出して利用する。ソフトウェア・エミュレータによっては、内部状態が取り出し可能である場合と、そのままでは、内部状態が取り出し可能でない場合がある。   In this embodiment of the present invention, the internal state of the software emulator of the ECU is taken out and used. Depending on the software emulator, there are a case where the internal state can be taken out and a case where the internal state cannot be taken out as it is.

そこで、ECUのソフトウェア・エミュレータの内部状態がそのままでは、内部状態が取り出し可能でない場合、ソースコード解析ツールによって、次のような処理を行う。   Therefore, when the internal state of the software emulator of the ECU cannot be taken out as it is, the following processing is performed by the source code analysis tool.

もし、ECUのソフトウェア・エミュレータのソースコードが入手可能であるならそれをそのまま利用し、実行可能バイナリ・ファイルしかなければ、所定のツールで、逆アセンブルまたは逆コンパイルする。そうして、ECUのソフトウェア・エミュレータのソースコードに対して、データーフロー解析という技法を適用して、ソースコードを基本ブロックに分割する。基本ブロックとは、ソースコードを、複数の制御が合流するところ、または、制御が複数に分岐するところで分断した、各々の部分のことである。このような基本ブロックをノードとして、その分岐の制御の流れのリンクで接続すると、有向グラフ構造になる。これは特に、制御フローグラフとも呼ばれる。制御フローグラフは、始点ノードと終点ノードをもち、プログラムで実行され得るノードは全て、始点ノードからの有効エッジをもつ。基本ブロックのうち、exit()やreturnなどのステートメントを含む制御の末端ノードは全て、終点ノードへの有効エッジをもつ。   If the source code of the ECU software emulator is available, it is used as it is, and if there is only an executable binary file, it is disassembled or decompiled with a predetermined tool. Then, a technique called data flow analysis is applied to the source code of the ECU software emulator to divide the source code into basic blocks. A basic block is a portion of the source code that is divided where a plurality of controls merge or where the control branches into a plurality. When such a basic block is used as a node and connected by a link of the control flow of the branch, a directed graph structure is obtained. This is also called a control flow graph. The control flow graph has a start point node and an end point node, and all nodes that can be executed by the program have valid edges from the start point node. In the basic block, all control end nodes including exit () and return statements have a valid edge to the end node.

次に、制御フローグラフの始点ノードと終点ノードの可能な全てのパスに対して、Use/Def解析を行う。ここで、Useとは、ある変数が、別の変数に値をストアするために使用される場合をいう。典型的には、代入式の右辺である。Defとは、ある変数に、値がストアされる場合をいう。典型的には、代入式の左辺である。   Next, Use / Def analysis is performed on all possible paths of the start and end nodes of the control flow graph. Here, “Use” means a case where a variable is used to store a value in another variable. Typically, it is the right side of an assignment expression. Def means that a value is stored in a certain variable. Typically, it is the left side of an assignment expression.

この場合、個々のパス毎に、Defの前あるいは、DefなしでUseされている変数、すなわち未定義参照変数があるかどうかがチェックされ、もし未定義参照変数があると、その変数名は一旦保存される。   In this case, for each path, it is checked whether there is a variable that is used before Def or without Def, that is, there is an undefined reference variable. If there is an undefined reference variable, the variable name is temporarily Saved.

こうして、全てのパスがスキャンされた後に保存されている変数名を用いて、後述するように、ラッパ(wrapper)コードが生成される。   Thus, a wrapper code is generated using a variable name stored after all paths have been scanned, as will be described later.

ところで、実行フローのスキャンと、Use/Def解析は、データーフロー解析という技法を用いることによって、より効率的に実行することができるので、以下、それについて説明する。   By the way, execution flow scanning and use / def analysis can be executed more efficiently by using a technique called data flow analysis.

その第1ステップは、各基本ブロックにおけるdefリストの計算である。具体的にはプログラム全体で使用される変数のリストを1ビットで表現し、各基本ブロックごとに定義される変数を1されないものを0としたビットベクタで表現する。   The first step is the calculation of the def list in each basic block. Specifically, a list of variables used in the entire program is expressed by 1 bit, and a variable defined for each basic block is expressed by a bit vector where 0 is not set.

その第2ステップは、プログラム全体の到達可能なdefリストの計算である。すなわち、各基本ブロックでは、複数の入力がある場合には論理積(AND)してから,自身への入力とする。自身からの出力は、その入力と、自身で定義したdefリストの論理和(OR)をとり、後続の基本ブロックに渡す。実行していく順番は、制御フローグラフ上での深さ優先順序が効率的である。   The second step is the calculation of the reachable def list for the entire program. That is, in each basic block, when there are a plurality of inputs, the logical product (AND) is performed and then input to itself. The output from itself takes the logical sum (OR) of the input and the def list defined by itself, and passes it to the subsequent basic block. As the order of execution, the depth priority order on the control flow graph is efficient.

第3ステップは、クロージャ解析アルゴリズムにより、到達可能なdefリストのクロージャを求めることである。そして、上記第2ステップを、全ての基本ブロックの出力defリストが変化しなくなるまで、繰り返す。ここで、クロージャとは、環境と結び付けられた値のことである。   The third step is to obtain a reachable def list closure by a closure analysis algorithm. Then, the second step is repeated until the output def lists of all basic blocks are not changed. Here, the closure is a value associated with the environment.

第4ステップは、未定義変数の使用の発見である。すなわち、各基本ブロックの入力defリストが0として表現された変数が、useとして使用されているものを検出する。   The fourth step is the discovery of the use of undefined variables. That is, a variable in which the input def list of each basic block is expressed as 0 is used as a use.

なお、データフロー解析のより詳しい説明については、Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, "Compilers Principles, Technologies, and Tools", Addison-Wesley Publishing Company, 1986, p. 608-633などを参照されたい。   For a more detailed explanation of data flow analysis, see Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, "Compilers Principles, Technologies, and Tools", Addison-Wesley Publishing Company, 1986, p. 608-633. Please refer.

さて、例えば、元のECUシミュレーション・ソースコードが、関数 Func(x,y,z) であらわされるとする。また、未定義参照変数として、a, bが登録されていたとする。   For example, it is assumed that the original ECU simulation source code is represented by a function Func (x, y, z). Also assume that a and b are registered as undefined reference variables.

すると、例えば、_Func(x,y,z,_a,_b)という関数が用意され、
_Func(x,y,z,_a,_b)
{
a = _a;
b = _b;
Func(x,y,z);
_a = a;
_b = b;
return;
}
Then, for example, a function _Func (x, y, z, _a, _b) is prepared,
_Func (x, y, z, _a, _b)
{
a = _a;
b = _b;
Func (x, y, z);
_a = a;
_b = b;
return;
}

_Func(x,y,z,_a,_b)
{
a = _a;
b = _b;
の部分のところを、入力用ラッパコードと呼び、
_a = a;
_b = b;
return;
}
の部分のところを、出力用ラッパコードと呼ぶ。
_Func (x, y, z, _a, _b)
{
a = _a;
b = _b;
Is called the input wrapper code,
_a = a;
_b = b;
return;
}
This part is called an output wrapper code.

なお、 Func(x,y,z); のところは、関数呼び出しではなく、インライン展開でもよい。このような関数_Func(x,y,z,_a,_b)を、_a,_bに適当な値を入れて呼び出すことにより、Func(x,y,z)の内部状態をセットすることができ、また、_Func(x,y,z,_a,_b)を呼び出した結果、_a,_bに、処理後の内部状態の値がセットされるので、必要に応じて、それらの値を別途保存するなど、利用可能である。このようにラッパコードが付されたソースコードは、実行可能プログラムを生成するために、コンパイルまたはアセンブルされる。   Note that Func (x, y, z); may be inlined, not a function call. By calling the function _Func (x, y, z, _a, _b) with appropriate values in _a and _b, the internal state of Func (x, y, z) can be set. In addition, as a result of calling _Func (x, y, z, _a, _b), the value of the internal state after processing is set in _a, _b, so save those values separately if necessary Etc. are available. The source code with wrapper code in this way is compiled or assembled to produce an executable program.

また、C++など、特定の処理言語の仕様によっては、_Func(x,y,z,_a,_b)でなく、_Func(x,y,z,&_a,&_b)のように、参照演算子&をつけて関数に引数として与える必要があることもある。   Also, depending on the specifications of a specific processing language such as C ++, the reference operator & may be used as _Func (x, y, z, & _ a, & _ b) instead of _Func (x, y, z, _a, _b). Sometimes it is necessary to give it as an argument to the function.

こうして、内部状態あるいは、内部変数を取り出すことができるようになった後のECUのソフトウェア・エミュレータを図式的に、図4に示す。そこに示すように、ECUのソフトウェア・エミュレータ402は、内部ロジックfを示す部分と、内部状態または状態変数xとに好都合に分離される。   FIG. 4 schematically shows the software emulator of the ECU after the internal state or internal variable can be extracted in this way. As shown there, the software emulator 402 of the ECU is conveniently separated into a portion indicating the internal logic f and an internal state or state variable x.

すると、内部ロジックfを用いて、出力y = f(t,x,u, ...) と記述することができる。ここでtは、時間である。また、状態変数xに係るコードが分離されたことによって、任意の時点、すなわち典型的には出力がなされるタイミングで、状態変数xと、好ましくは入力uも、状態リポジトリ404として、ハードディスクドライブに書き出すことができる。   Then, the output y = f (t, x, u,...) Can be described using the internal logic f. Where t is time. In addition, since the code related to the state variable x is separated, the state variable x and preferably the input u are also stored in the hard disk drive as the state repository 404 at an arbitrary time point, that is, typically at the timing when output is performed. Can be exported.

状態変数xに係るコードを分離した効果はこれだけではない。すなわち、矢印406で示すように、ソフトウェア・エミュレータ402には、任意の時点で、状態変数xをセットすることができる。これによって、状態リポジトリ404から入力と状態変数xを選んでセットすることにより、ECUのソフトウェア・エミュレータ402を、その状態変数xが状態リポジトリ404に書き出された任意の時点の状態に戻して、そこから計算をやり直させることができる。   This is not the only effect of separating the code related to the state variable x. That is, as indicated by an arrow 406, the state variable x can be set in the software emulator 402 at an arbitrary time. Thereby, by selecting and setting the input and the state variable x from the state repository 404, the ECU software emulator 402 is returned to the state at an arbitrary time when the state variable x is written in the state repository 404. From there, you can redo the calculation.

次に、図5を参照して、本発明を実施するために使用されるコンピュータのハードウェアについて説明する。図5において、ホスト・バス502には、複数のCPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dが接続されている。ホスト・バス502にはさらに、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dの演算処理のためのメイン・メモリ506が接続されている。   Next, computer hardware used to implement the present invention will be described with reference to FIG. In FIG. 5, a plurality of CPU0 504a, CPU1 504b, CPU2 504c, and CPU3 504d are connected to the host bus 502. Further connected to the host bus 502 is a main memory 506 for arithmetic processing of the CPU0 504a, CPU1 504b, CPU2 504c, and CPU3 504d.

一方、I/Oバス508には、キーボード510、マウス512、ディスプレイ514及びハードティスク・ドライブ516が接続されている。I/Oバス508は、I/Oブリッジ518を介して、ホスト・バス502に接続されている。キーボード510及びマウス512は、オペレータが、コマンドを打ち込んだり、メニューをクリックするなどして、操作するために使用される。ディスプレイ514は、後述する本発明に係るプログラムをGUIで操作するための画面イメージを表示するために使用される。   On the other hand, a keyboard 510, a mouse 512, a display 514, and a hard disk drive 516 are connected to the I / O bus 508. The I / O bus 508 is connected to the host bus 502 via the I / O bridge 518. The keyboard 510 and the mouse 512 are used by an operator to enter commands or click menus to perform operations. The display 514 is used to display a screen image for operating a program according to the present invention to be described later using a GUI.

この目的のために使用される好適なコンピュータ・システムのハードウェアとして、IBM(R)System Xがある。その際、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dは、例えば、インテル(R)Core 2 DUOであり、オペレーティング・システムは、Windows(商標)Server 2003である。オペレーティング・システムは、ハードティスク・ドライブ516に格納され、コンピュータ・システムの起動時に、ハードティスク・ドライブ516からメイン・メモリ506に読み込まれる。   IBM (R) System X is the preferred computer system hardware used for this purpose. At that time, the CPU0 504a, the CPU1 504b, the CPU2 504c, and the CPU3 504d are, for example, Intel® Core 2 DUO, and the operating system is Windows (trademark) Server 2003. The operating system is stored in the hard disk drive 516 and is read from the hard disk drive 516 into the main memory 506 when the computer system is started.

なお、本発明を実施するために使用可能なコンピュータ・システムのハードウェアは、IBM(R)System Xに限定されず、ECUエミュレータ・プログラムを走らせることができるものであれば、任意のコンピュータ・システムを使用することができる。オペレーティング・システムも、Windows(R)に限定されず、Linux(R)、Mac OS(R)など、任意のオペレーティング・システムを使用することができる。さらに、ECUエミュレータ・プログラムを高速で動作させるために、POWER(商標)6ベースで、オペレーティング・システムがAIX(商標)のIBM(R)System Pなどのコンピュータ・システムを使用してもよい。   Note that the hardware of the computer system that can be used to implement the present invention is not limited to the IBM (R) System X, and any computer computer can be used as long as it can run an ECU emulator program. The system can be used. The operating system is not limited to Windows (R), and any operating system such as Linux (R) or Mac OS (R) can be used. Further, in order to operate the ECU emulator program at high speed, a computer system such as IBM (R) System P whose operating system is AIX (trademark) based on POWER (trademark) 6 may be used.

ハードディスク・ドライブ516にはさらに、テストするための複数のECUエミュレータ・プログラム、及び、それら複数のECUエミュレータ・プログラムを協働させてテストするための、本発明に係るプログラムが格納され、キーボード510及びマウス512によって起動操作可能である。   The hard disk drive 516 further stores a plurality of ECU emulator programs for testing, and a program according to the present invention for cooperating and testing the plurality of ECU emulator programs. The mouse 512 can be activated.

好適には、フルビークルSILSを実現するために、1台の自動車で使われるすべてのECUのエミュレータ・プログラムが、ハードティスク・ドライブ516に保存されている。そのECUのエミュレータ・プログラムが、そのままでは内部の状態変数を取り出せないものてある場合は、上述したラッパコードを被せることにより、予め、状態変数をセット及び取り出し可能としておくものとする。   Preferably, in order to realize full vehicle SILS, emulator programs of all ECUs used in one automobile are stored in the hard disk drive 516. If the ECU emulator program cannot extract an internal state variable as it is, the state variable can be set and extracted in advance by covering the above-described wrapper code.

ハードティスク・ドライブ516にはさらに、後述するECUエミュレータ・プログラムのためのスケジューラ、エンジン、トランスミッション、ステアリング、ワイパなどの物理装置(プラント)シミュレータ・プログラム、全体のシステムの入力を同期させるためのグローバル・スケジューラ及び、登り坂道、高速道路、つづら折道などの様々な、テストのためのシナリオを格納したシナリオ・ジェネレータのプログラムも格納されている。   The hard disk drive 516 further includes a scheduler for an ECU emulator program to be described later, a physical device (plant) simulator program such as an engine, a transmission, a steering, and a wiper, and a global for synchronizing inputs of the entire system. A scheduler and a scenario generator program that stores various test scenarios such as climbing slopes, highways, and zigzag roads are also stored.

なお、ここでの「エミュレータ」と、「シミュレータ」の用語の使い分けであるが、もともとの、別のプロセッサで動くことを想定して書かれていたECUのコードを、CPU0〜CPU3などをターゲットとして動くようにすることを、エミュレーションと呼び、それを行うプログラムを、エミュレータと呼ぶ。一方、エンジンなどの物理的システムの動作を仮想計算するシステムを、シミュレータと呼ぶ。   Note that the terms “emulator” and “simulator” are used properly here, but the ECU code originally written on the assumption that it runs on another processor is targeted for CPU0 to CPU3, etc. Making it run is called emulation, and the program that does it is called an emulator. On the other hand, a system that virtually calculates the operation of a physical system such as an engine is called a simulator.

次に、図6を参照して、本発明のシミュレーション・システムの機能論理ブロック図を説明する。図6において、共有メモリ602は、実際は、図5に示すメイン・メモリ506の一部であってよい。共有メモリ602には、ECUエミュレータ・プログラム604a、604b、・・・604nと、グローバル・スケジューラ608と、物理装置シミュレータ・プログラム606a、・・・606mが論理的に結合されている。   Next, a functional logic block diagram of the simulation system of the present invention will be described with reference to FIG. In FIG. 6, the shared memory 602 may actually be a part of the main memory 506 shown in FIG. In the shared memory 602, ECU emulator programs 604a, 604b,... 604n, a global scheduler 608, and physical device simulator programs 606a,.

グローバル・スケジューラ608は、ECUエミュレータ・プログラム604a、604b、・・・604n及び物理装置シミュレータ・プログラム606a、・・・606mの間のイベントのタイム・スタンプに基づき、それらのイベントの間の一貫性を維持するように動作する。グローバル・スケジューラ608のより詳しい動作は、後述する。   The global scheduler 608 is based on the time stamps of events between the ECU emulator programs 604a, 604b,... 604n and the physical device simulator programs 606a,. Operate to maintain. A more detailed operation of the global scheduler 608 will be described later.

ECUのエミュレータ・プログラム604a、604b、・・・604nは、それぞれ、エンジン、ブレーキ、トランスミッション、ステアリングなど、車の異なる部分の制御に対応するもので、それぞれが異なる速度のクロックで動作するので、対応するECUのエミュレータ・プログラムも、それに比例するクロック比で動作するものとする。   The ECU emulator programs 604a, 604b,... 604n correspond to the control of different parts of the car, such as the engine, brake, transmission, steering, etc., and each operates with a clock with a different speed. It is assumed that the emulator emulator program that operates also operates at a proportional clock ratio.

一例として、スレッドを作成いることにより、複数のCPUに、ECUのエミュレータ・プログラムを割り当てるコードを、C言語を例にとって示す。
void* ecu_wrapper(void* parm)
{
...
/* define state_repository */
...
LOOP_BEGIN:
...
/* ECUのユニット処理を行う */
LOOP_END:
...
}
As an example, a code for assigning an ECU emulator program to a plurality of CPUs by creating a thread will be described by taking C language as an example.
void * ecu_wrapper (void * parm)
{
...
/ * define state_repository * /
...
LOOP_BEGIN:
...
/ * Perform ECU unit processing * /
LOOP_END:
...
}

上記のようなコードを用意しておいて、
pthread_t thread_id;
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
pthread_create(&thread_id, thread_attr, ecu_wrapper, NULL);
pthread_attr_destroy(&thread_attr);
とすると、オペレーティング・システムがスレッドを生成して、それをECUのエミュレータ・プログラムに割り当てる。物理的には、そのスレッドは、CPU0〜CPU3のどれかに割り当てられるが、それはオペレーティング・システムに任され、エミュレータ・プログラムにとっては、透過的である。
このような割り当て処理は、ECUエミュレータ・プログラム604a、604b、・・・604n各々に個別に行われる。
Prepare code like the above,
pthread_t thread_id;
pthread_attr_t thread_attr;
pthread_attr_init (&thread_attr);
pthread_create (& thread_id, thread_attr, ecu_wrapper, NULL);
pthread_attr_destroy (&thread_attr);
Then, the operating system creates a thread and assigns it to the emulator program of the ECU. Physically, the thread is assigned to one of CPU0 to CPU3, but it is left to the operating system and is transparent to the emulator program.
Such allocation processing is performed individually for each of the ECU emulator programs 604a, 604b,.

なお、図6に示した論理構成では、ECUエミュレータ・プログラム604a、604b、・・・604n、物理装置シミュレータ・プログラム606a、・・・606m及びグローバル・スケジューラ608は、共有メモリ602を使用してデータを交換するが、代わりに、CAN(controller area network)エミュレータを使用してもよい。   6, the ECU emulator programs 604a, 604b,... 604n, the physical device simulator programs 606a,... 606m, and the global scheduler 608 use the shared memory 602 for data. However, a CAN (controller area network) emulator may be used instead.

図示しないが、図6の構成には、登り坂道、高速道路、つづら折道などの様々な、テストのためのシナリオを格納したシナリオ・ジェネレータも接続される。   Although not shown in the figure, a scenario generator storing various test scenarios such as an uphill road, a highway, and a zigzag road is also connected to the configuration of FIG.

図7は、ECUエミュレータ・プログラム604の内部の、より詳細な論理ブロック図を示す。ここでは、ECUエミュレータ・プログラム604a、604b、・・・604nなどを、総称的に、ECUエミュレータ・プログラム604として説明する。   FIG. 7 shows a more detailed logic block diagram inside the ECU emulator program 604. Here, the ECU emulator programs 604a, 604b,... 604n, etc. will be generically described as the ECU emulator program 604.

ECUエミュレータ制御ロジック・モジュール702は、いわゆるECUエミュレータの本来のロジックを含む本体である。   The ECU emulator control logic module 702 is a main body including the original logic of a so-called ECU emulator.

ロールバック表704は、前述したラッパコード付加の方法で、制御ロジック・モジュール702から取り出した内部状態変数を順次保存する機能をもつ。   The rollback table 704 has a function of sequentially storing internal state variables extracted from the control logic module 702 by the above-described wrapper code addition method.

ローカル・スケジューラ706は、ロールバック表704に保存されている内部状態変数を、制御ロジック・モジュール702に書き戻すことにより、ECUエミュレータ・プログラム604を所望の状態に戻す機能を持つ。   The local scheduler 706 has a function of returning the ECU emulator program 604 to a desired state by writing the internal state variable stored in the rollback table 704 back to the control logic module 702.

なお、制御ロジック・モジュール702には、共有メモリ602から、通信インターフェース・モジュール708を介して、イベント入力が提供される。   The control logic module 702 is provided with an event input from the shared memory 602 via the communication interface module 708.

ECUエミュレータ・プログラム604はさらに、機能ブロックとして、判断ブロック710、閾値ブロック712及び予測ブロック714をもつ。   The ECU emulator program 604 further includes a determination block 710, a threshold block 712, and a prediction block 714 as functional blocks.

閾値ブロック712は、受信する実際の入力と、予測して投機実行したときの入力が一致しているとみなす基準となる許容誤差値の累積ヒストグラムを保持する。予測して投機実行したときの入力は、ロールバック表704に記録された入力から、タイムスタンプに従い、選ばれる。この累積ヒストグラムは、メイン・メモリ506上のECUエミュレータ・プログラム604専用のメモリ領域、または、ハードディスク516の所定の領域に保存されている。なお、累積ヒストグラムの作成処理については、後述する。   The threshold value block 712 holds a cumulative histogram of allowable error values serving as a reference that is regarded as a match between the actual input to be received and the input when the speculative execution is predicted. The input when the speculative execution is predicted is selected according to the time stamp from the input recorded in the rollback table 704. This cumulative histogram is stored in a memory area dedicated to the ECU emulator program 604 on the main memory 506 or a predetermined area on the hard disk 516. The cumulative histogram creation process will be described later.

予測ブロック714は、予測して投機実行したときの入力を与える。この実施例では、基本的には、前回の入力と同じ入力を、投機実行入力として与える。   The prediction block 714 gives an input when the speculation is executed by prediction. In this embodiment, basically, the same input as the previous input is given as a speculative execution input.

判断ブロック710は、受信した実際の入力と、予測して投機実行したときの入力とを比較する。このとき、閾値ブロック712から提供された値を許容誤差として用い、受信した実際の入力と、予測して投機実行したときの入力の値の差がこの許容誤差範囲内のとき、それらが一致しているとの判断を与え、そうでないとき、不一致の判断を与える。   The decision block 710 compares the received actual input with the input when the speculative execution is predicted. At this time, the value provided from the threshold block 712 is used as an allowable error, and when the difference between the received actual input and the input value when the speculative execution is predicted is within the allowable error range, they match. If not, give a discrepancy decision.

なお、図示しないが、ECUエミュレータ604は、入力イベントを一旦格納するためのキューをもつ。キューは、ローカル・スケジューラ706内に設けてもよいし、メイン・メモリ506内の専用のプライベート・メモリ領域内に設けてもよい。   Although not shown, the ECU emulator 604 has a queue for temporarily storing input events. The queue may be provided in the local scheduler 706 or in a dedicated private memory area in the main memory 506.

例えば、エアコンECUの出力は、エンジンECUに入力される。エアコンの駆動状態に応じて、エンジンの回転数を変え、以って発電量を調整する必要があるからである。   For example, the output of the air conditioner ECU is input to the engine ECU. This is because it is necessary to adjust the power generation amount by changing the engine speed according to the driving state of the air conditioner.

通信インターフェース・モジュール708は、制御ロジック・モジュール702からの出力を、共有メモリ702または、CAN(controller area network)エミュレータ(図示しない)に送出する。   The communication interface module 708 sends the output from the control logic module 702 to the shared memory 702 or a CAN (controller area network) emulator (not shown).

次に、ECUエミュレータ604の閾値ブロック710に記録される誤差分布の概念について説明する。統計的に、投機入力の誤差が、指数分布に従う場合を示す。
指数分布の確率密度関数f(x) = μe-μxのグラフは、図8に示すとおりである。すなわち、誤差が小さいほど、生起確率が高い。
Next, the concept of the error distribution recorded in the threshold block 710 of the ECU emulator 604 will be described. Statistically, the case where the speculative input error follows an exponential distribution is shown.
The graph of the probability density function f (x) = μe− μx of the exponential distribution is as shown in FIG. That is, the smaller the error, the higher the occurrence probability.

図9は、指数分布の累積分布関数F(x) = 1 - e-μxのグラフを示す。この累積分布関数に従うと、図示するように、百分率を与えると、許容誤差εが得られる。 FIG. 9 shows a graph of the cumulative distribution function F (x) = 1−e− μx of the exponential distribution. According to this cumulative distribution function, as shown in the figure, if a percentage is given, an allowable error ε is obtained.

図10の(A)は、あるECUエミュレータにおける、受信した実際の入力と、予測して投機実行したときの入力の値の誤差のヒストグラムである。横軸は、誤差xで、縦軸は度数である。このようなヒストグラムは、各ECU毎に、次のようにして記録される。先ず、許容誤差を0として、シミュレーション処理を行う。具体的なシミュレーション処理は、図15に関連して、後で詳細に説明する。   FIG. 10A is a histogram of an error between an actual input received and an input value when speculatively executed by prediction in a certain ECU emulator. The horizontal axis is the error x, and the vertical axis is the frequency. Such a histogram is recorded for each ECU as follows. First, simulation processing is performed with an allowable error of 0. A specific simulation process will be described later in detail with reference to FIG.

こうして、実際の入力が与えられる度に、予測値と入力の値の絶対値
|予測値 - 実測値|が、計算される。その値に応じて、予め等間隔Δのレンジに区切られたビンのカウンタがインクリメントされる。すなわち、予測値と入力の値の絶対値xが、
i * Δ <= x < (i+1) * Δ (i = 0,1,...,N-1)をみたすとき、i * Δに対応するカウンタが、1だけインクリメントされる。
Thus, every time an actual input is given, the absolute value of the predicted value and the input value
| Predicted value-Actual value | is calculated. In accordance with the value, the counter of bins divided in advance into a range of equal intervals Δ is incremented. That is, the absolute value x of the predicted value and the input value is
When satisfying i * Δ <= x <(i + 1) * Δ (i = 0, 1,..., N−1), the counter corresponding to i * Δ is incremented by one.

結果的に、図10の(A)のような等間隔Δ刻みのヒストグラムが得られる。このような計算は、ヒストグラムの十分な精度が得られた時点で一旦完了し、以下で計算する累積ヒストグラムに基づく閾値に切り替えられる。   As a result, a histogram with equal intervals Δ increments as shown in FIG. Such calculation is once completed when sufficient accuracy of the histogram is obtained, and is switched to a threshold value based on the cumulative histogram calculated below.

ヒストグラムの十分な精度が得られたとは、観測数が十分に大きくなったということであり、さらに言うとそれは予測値との差の絶対値が閾値より大きいサンプルが、一定数(例えば、20)を超えた、ということである。より一般的に言うと、予測値との差の絶対値が閾値より大きいサンプルの数をMとすると、Mの平方根を、全体のサンプル数Nで割った数が十分小さくなることを意味する。   The sufficient accuracy of the histogram is obtained when the number of observations is sufficiently large. Further, it means that a certain number (for example, 20) of samples whose absolute value of the difference from the predicted value is larger than the threshold value. It is that it exceeded. More generally speaking, if the number of samples whose absolute value of the difference from the predicted value is larger than the threshold is M, it means that the number obtained by dividing the square root of M by the total number of samples N is sufficiently small.

Δiに対応するカウンタを、h[i]とすると、累積ヒストグラムを得るために、次のようなc[i]を計算する。なお、以下では、例示的にC言語の記法を用いる。ここでは、h[i]は整数であり、一方、c[i]は、浮動小数点数とする。
c[0] = h[0];
for ( i = 1; i < N; i++ ) // 累積値の計算
c[i] = c[i-1] + h[i];
for (i = 0; i < N; i++ ) // 全体の合計 c[N-1]で正規化
c[i] /= c[N-1];
The counter corresponding to the delta i, When h [i], in order to obtain the cumulative histogram, calculates the following c [i]. In the following, the C language notation is used as an example. Here, h [i] is an integer, while c [i] is a floating point number.
c [0] = h [0];
for (i = 1; i <N; i ++) // cumulative value calculation
c [i] = c [i-1] + h [i];
for (i = 0; i <N; i ++) // Normalize by total c [N-1]
c [i] / = c [N-1];

この結果、c[i] を、 i = 0, 1, 2, ,,,, N - 1 の順に並べると、図10(B)に示すように、1に漸近する累積ヒストグラムとなる。   As a result, when c [i] are arranged in the order of i = 0, 1, 2,..., N−1, a cumulative histogram asymptotic to 1 is obtained as shown in FIG.

こうして累積ヒストグラムが得られると、ある値p ∈ [0,1]が与えられたとき、
c[i] <= p < c[i+1]を満たすiを求め、ε = i * Δで、閾値εを決定する。但し、p < c[0]である場合は、ε = 0とする。もちろん、このような計算は、メモリ上の累積ヒストグラムを参照して、コンピュータにより、自動的に計算される。
Thus, when a cumulative histogram is obtained, given a value p ∈ [0,1],
i satisfying c [i] <= p <c [i + 1] is obtained, and threshold ε is determined by ε = i * Δ. However, if p <c [0], ε = 0. Of course, such calculation is automatically calculated by a computer with reference to a cumulative histogram on a memory.

図11に示すように、このような正規化された累積ヒストグラムは、ECU#1、ECU#2、・・・ECU#n毎に個別に記録されて計算され、保存されている。見て取れるように、ECU毎に実際の入力と、予測して投機実行したときの入力の誤差の特性が異なるので、累積ヒストグラムの曲線も、ECU毎に異なる。従って、ECU#1、ECU#2、・・・ECU#nの各々の累積ヒストグラムは、同一のpに対して、異なる閾値ε1、ε2、・・・εnを返す。 As shown in FIG. 11, such a normalized cumulative histogram is individually recorded and calculated for each ECU # 1, ECU # 2,..., ECU #n, and stored. As can be seen, since the actual input and the error characteristics of the input when speculatively executed are different for each ECU, the cumulative histogram curve is also different for each ECU. Therefore, the cumulative histogram of each of ECU # 1, ECU # 2,..., ECU #n returns different threshold values ε 1 , ε 2 ,.

図12は、オペレータが閾値を設定するための、グラフィック・ユーザ・インターフェース(GUI)を示す図である。このGUIにおいて、目盛り1202は、0から100までのスケールをもち、マウス512(図5)のドラッグによって、スライダ1204をずらすことによって、0と100の間の数を、精度として設定する。設定した精度は、表示領域1206に表示される。なお、ここに表示したGUIは、閾値設定のための一例に過ぎず、単にテキスト・フィールドに数字を打ち込んだり、周知のアップダウンコントローラのインターフェースを使用するなど、当業者が適当と判断する任意のインターフェースを使用できることを理解されたい。なお、このようなGUIの作成は、Windows(R)においては、適当なWin32 APIを用いて実現できることが、この分野の当業者に明らかであろう。他のオペレーティング・システムでも同様であって、この発明の特徴ではないので、これ以上の説明は省略する。   FIG. 12 is a diagram showing a graphic user interface (GUI) for an operator to set a threshold value. In this GUI, the scale 1202 has a scale from 0 to 100, and the number between 0 and 100 is set as accuracy by shifting the slider 1204 by dragging the mouse 512 (FIG. 5). The set accuracy is displayed in the display area 1206. The GUI displayed here is only an example for setting a threshold value. Any GUI that is determined to be appropriate by those skilled in the art, such as simply typing a number in a text field or using a well-known up / down controller interface, is used. It should be understood that the interface can be used. It will be apparent to those skilled in the art that such a GUI can be created using an appropriate Win32 API in Windows®. The same applies to other operating systems and is not a feature of the present invention.

さて、ここに設定した数字をPとすると、p = P/100 として計算された値pが、図13に示すように、閾値を決める共通のパラメータとして、ECU#1 604a、ECU#2 604b、・・・ECU#n 604nの閾値ブロック712(図7)に提供される。パラメータを提供する方法としては、共通メモリ602の所定の領域に置いて、ECUエミュレータにアクセスさせる方法、あるいは、後述するグローバル・スケジューラ608によって、同報メッセージとして通信させる方法などがある。なお、ここに記したGUIでの数値パラメータの与え方は、ほんの一例であって、この分野の当業者であるなら、その他の変形例を思いつくであろう。例えば、目盛1202とスライダ1204で、直接、pの値である、0.0から、1.0までの間の値を指定するようにしてもよい。   Now, assuming that the number set here is P, the value p calculated as p = P / 100, as shown in FIG. 13, is the ECU # 1 604a, ECU # 2 604b, ... provided to threshold block 712 (FIG. 7) of ECU #n 604n. As a method of providing parameters, there are a method of placing an ECU emulator in a predetermined area of the common memory 602 and a method of communicating as a broadcast message by a global scheduler 608 described later. It should be noted that the method of giving numerical parameters in the GUI described here is only an example, and other variations will occur to those skilled in the art. For example, the value between 0.0 and 1.0, which is the value of p, may be directly specified by the scale 1202 and the slider 1204.

図14は、閾値設定処理のフローチャートである。ステップ1402では、図12に示すスライダ1204が移動されたかどうかのイベントが待機され、もしマウス操作などで、スライダ1204が移動されると、ステップ1404では、そのスライダ1204が示す位置の値が読み取られる。スライダ1204を移動している間は設定値が定まらないので、スライダ1204が移動された後一定時間スライダ1204が移動されない、というイベントに応答して位置を値を読み取るようにしてもよい。   FIG. 14 is a flowchart of the threshold setting process. In step 1402, an event indicating whether or not the slider 1204 shown in FIG. 12 has been moved is waited. If the slider 1204 is moved by a mouse operation or the like, the value of the position indicated by the slider 1204 is read in step 1404. . Since the set value is not determined while the slider 1204 is moved, the position value may be read in response to an event that the slider 1204 is not moved for a certain time after the slider 1204 is moved.

ステップ1406では、設定した値 pの値が、各ECUエミュレータに送られる。   In step 1406, the set value p is sent to each ECU emulator.

ステップ1408では、各ECUエミュレータで、送信された値pから、各ECUエミュレータに保持されている累積ヒストグラムが参照され、図11でε1、ε2、・・・εnなどと示されている、誤差εが決定される。 In step 1408, each ECU emulator from the transmitted value p, is referred to the cumulative histogram stored in the ECU emulators, epsilon 1 in FIG. 11, epsilon 2, is shown such as · · · epsilon n , The error ε is determined.

ステップ1408ではさらに、このように設定された誤差εが、閾値ブロック712(図7)に設定されて、その後のシミュレーション処理に使用される。   Further, in step 1408, the error ε set in this way is set in the threshold block 712 (FIG. 7) and used for the subsequent simulation processing.

次に、図15のフローチャートを参照して、ECUエミュレータの処理について処理を説明する。ここでの処理の大部分は、図7に示すローカル・スケジューラ706によって、主に行われる。まず、図15のステップ1502では、キューに、他の論理プロセスからイベントが到来しているかどうかが判断される。もしキューにイベントがあると、ステップ1504では、最も古いイベントeが取り出される。このイベントeのタイム・スタンプをtとする。   Next, the process of the ECU emulator will be described with reference to the flowchart of FIG. Most of the processing here is mainly performed by the local scheduler 706 shown in FIG. First, in step 1502 of FIG. 15, it is determined whether an event has arrived in the queue from another logical process. If there is an event in the queue, in step 1504 the oldest event e is retrieved. Let t be the time stamp of this event e.

ステップ1506では、t = tkをもつエントリが、ロールバック表中にあるかどうかが判断される。ロールバック表とは、図16に示すように、タイム・スタンプ、入力イベント、出力イベント、内部状態、及び確定フラグからなり、後述する処理により、好適にはそのECUエミュレータに割り当てられた、メイン・メモリ506中の領域に書かれる。メイン・メモリ506ではなく、ハードディスク・ドライブ516に書かれてもよい。 In step 1506, it is determined whether an entry with t = t k is in the rollback table. As shown in FIG. 16, the rollback table is composed of a time stamp, an input event, an output event, an internal state, and a confirmation flag. It is written in an area in the memory 506. It may be written to the hard disk drive 516 instead of the main memory 506.

また、図16から見て取れるように、ロールバック表は、2通りのエントリをもつ。1つは、入力イベントのエントリであり、タイム・スタンプの欄と、入力イベントの欄のみが有効である。   As can be seen from FIG. 16, the rollback table has two entries. One is an entry for an input event, and only the time stamp column and the input event column are valid.

もう1つは、出力イベントのエントリであり、出力のタイム・スタンプの欄と、出力イベント、そのときの内部状態、及び確定フラグである。ロールバック表に内部状態を保持することは、途中から計算を再開するために有利である。なお、前述したラッパ・コードの技法により、もともと内部状態を暗にもつエミュレータの論理を、内部状態を状態変数として外部に取り出した論理に変更することができる。   The other is an output event entry, which is an output time stamp column, an output event, an internal state at that time, and a confirmation flag. Keeping the internal state in the rollback table is advantageous for restarting the calculation from the middle. It should be noted that the logic of the emulator that originally had the internal state implicitly can be changed to the logic that is extracted outside as the state variable by the wrapper code technique described above.

ロールバック表中に、t = tkをもつエントリがあると、そのエントリをekとすると、e = ekであるかどうかが、ステップ1508で判断される。この比較は、図7に示す判断ブロック710によって、閾値ブロック712に設定された許容誤差値εを参照して行われる。e = ekという判断は、
|e - ek| < εであるなら、判断ブロック1508の判断が肯定的であるように、処理が行われる。ステップ1508での判断が肯定的である、ということは、先の投機的実行が成功であった、とシステムが見做すことを意味をする。そこで、処理は、最初のステップ1502に戻る。許容誤差値εを考慮してもe = ekでないなら、すなわち、
|e - ek| >= εであるなら、処理は、ステップ1510に進む。
If there is an entry having t = t k in the rollback table, if the entry is e k , whether or not e = e k is determined in step 1508. This comparison is performed by referring to the allowable error value ε set in the threshold block 712 by the decision block 710 shown in FIG. The decision that e = e k is
If | e−e k | <ε, processing is performed so that the decision at decision block 1508 is affirmative. A positive determination at step 1508 means that the system assumes that the previous speculative execution was successful. Therefore, the processing returns to the first step 1502. If e = e k is not considered even if the allowable error value ε is considered, that is,
If | e−e k |> = ε, the process proceeds to Step 1510.

ステップ1506で、t = tkをもつエントリが、ロールバック表中にないと判断されると、ステップ1510で、確定時間Tに戻って、それ以降の時間をもつロールバック表中のエントリが削除される。図16では、点線以下のエントリである。尚、確定時間Tは、後述するグローバル・スケジューラ608の処理によって通知されたものである。 If it is determined in step 1506 that the entry having t = t k is not in the rollback table, the process returns to the fixed time T in step 1510, and the entry in the rollback table having a later time is deleted. Is done. In FIG. 16, the entry is below the dotted line. The fixed time T is notified by the processing of the global scheduler 608 described later.

ステップ1512では、時刻tとイベントeから、新しいエントリが作成され、それがロールバック表中に挿入される。   In step 1512, a new entry is created from time t and event e and inserted into the rollback table.

ステップ1514では、確定エントリの内部状態を使って、制御ロジック・モジュール702によって、新たなイベント処理が行われる。ここでいう内部状態とは、図4に、状態変数として示されているものである。   In step 1514, a new event process is performed by the control logic module 702 using the internal state of the confirmed entry. The internal state here is shown as a state variable in FIG.

ステップ1516では、そのイベント処理の結果として生成された出力イベントが、ロールバック表に挿入される。ステップ1518では、その出力イベントが、通信インターフェース・モジュール708を介して、それは、所定の物理装置シミュレータに送られる。この送り方であるが、共有メモリ方式ならば、特定のメモリのアドレスに書いてシグナルされるし、CANエミュレータ方式の場合、送り出すメッセージに、所定の宛先を含むヘッダを付けることになる。このような処理は、図7に示す通信インターフェース・モジュール708によって、行われる。そうして処理は、ステップ1502に戻る。   In step 1516, the output event generated as a result of the event processing is inserted into the rollback table. In step 1518, the output event is sent via the communication interface module 708 to a predetermined physical device simulator. As for this sending method, in the case of the shared memory system, a signal is written at a specific memory address, and in the CAN emulator system, a header including a predetermined destination is added to the message to be sent. Such processing is performed by the communication interface module 708 shown in FIG. Then, the process returns to step 1502.

ステップ1502で、キューにイベントがないと判断されると、ステップ1520では、図7の予測ブロック714によって、新しい入力イベントが予測される。例えば、エンジン・シミュレータ用のECUエミュレータの場合、ほぼ周期的にイベントが入来すると予測されるので、その予測に従って、ステップ1522で、その予測された新しいイベントをキューに入れ、処理がステップ1502に戻る。   If it is determined in step 1502 that there are no events in the queue, then in step 1520 a new input event is predicted by the prediction block 714 of FIG. For example, in the case of an ECU emulator for an engine simulator, it is predicted that an event will arrive almost periodically. In accordance with the prediction, in step 1522 the predicted new event is queued, and the process proceeds to step 1502. Return.

尚、キューにイベントが到着しない間に、連続して予測に基づく処理を進めると、確定しないエントリがロールバック表を占めて、そのサイズが巨大になることがある。それを防止するために、ロールバック表中の未確定のエントリの数に上限を設けて、それを超えないようにシステム的に調節する。また、確定したエントリは、最後の一つを除いて破棄することにより、不要なエントリが、ロールバック表のサイズを圧迫することがないようにする。   If processing based on prediction is continuously performed while no event arrives in the queue, entries that are not determined may occupy the rollback table, and the size thereof may become huge. To prevent this, an upper limit is set on the number of indoubt entries in the rollback table, and the system is adjusted so as not to exceed the upper limit. Also, the confirmed entries are discarded except for the last one so that unnecessary entries do not press the rollback table size.

図17に示すように、グローバル・スケジューラ608は、論理プロセスLP#1〜LP#N毎にキューQ1〜Qnをもつ。論理プロセスとは各々、図7に示すECUエミュレータ#1〜#n、物理装置シミュレータ#1〜#m、のどれかである。   As shown in FIG. 17, the global scheduler 608 has queues Q1 to Qn for each of the logical processes LP # 1 to LP # N. Each of the logical processes is any of ECU emulators # 1 to #n and physical device simulators # 1 to #m shown in FIG.

キューQ1〜Qnには、対応する論理プロセスLP#1〜LP#Nから、随時にイベントが入来し、入来したイベントは、キューに一旦格納される。グローバル・スケジューラ608は、キューQ1〜Qnに格納されているイベントに基づき、確定イベントと、確定時間を出力する。   In the queues Q1 to Qn, events come from the corresponding logical processes LP # 1 to LP # N as needed, and the incoming events are temporarily stored in the queue. The global scheduler 608 outputs a fixed event and a fixed time based on the events stored in the queues Q1 to Qn.

図18は、そのためのグローバル・スケジューラ608の処理を示すフローチャートである。ステップ1802で、グローバル・スケジューラ608は、どれかのキューQ1〜Qn(図17)に、新しいイベントが到来するのを待つ。   FIG. 18 is a flowchart showing the process of the global scheduler 608 for that purpose. In step 1802, the global scheduler 608 waits for a new event to arrive in any of the queues Q1-Qn (FIG. 17).

ステップ1804では、空のキューにイベントが届いたかどうかが判断され、そうでなければ、処理は、ステップ1802に戻る。   In step 1804, it is determined whether an event has arrived in an empty queue, otherwise processing returns to step 1802.

ステップ1804で、空のキューにイベントが届いたと判断されると、ステップ1806に行って、そこで、すべてのキューQ1〜Qnが少なくとも1つのイベントをもつかどうかが判断される。そうでなければ、やはり処理は、ステップ1802に戻る。   If it is determined in step 1804 that an event has arrived in an empty queue, the process goes to step 1806 where it is determined whether all queues Q1-Qn have at least one event. Otherwise, the process returns to step 1802.

ステップ1806で、すべてのキューQ1〜Qnが少なくとも1つのイベントをもつと判断されると、ステップ1808では、すべてのキューQ1〜Qnの中で、最も古いイベントが見出される。このことは、すべてのイベントには、タイム・スタンプがつけられていることにより可能である。   If it is determined in step 1806 that all queues Q1-Qn have at least one event, in step 1808, the oldest event is found in all queues Q1-Qn. This is possible because all events are time stamped.

ステップ1810では、見つけられた最も古いイベントが、確定イベントとされ、論理プロセスLP#1〜LP#Nに通知される。   In step 1810, the oldest event found is determined as a confirmed event, and is notified to the logical processes LP # 1 to LP # N.

ステップ1812では、確定イベントがキューから取り除かれる。そして、ステップ1802に戻り、グローバル・スケジューラ608は、次のイベントの到着を待つ。   In step 1812, the confirmed event is removed from the queue. Then, returning to step 1802, the global scheduler 608 waits for the arrival of the next event.

本実施例のシステムによるシミュレーションのシナリオは、次のとおりである。初期段階では、図11に示すような誤差のヒストグラムのデータは、全くないとする。すると、最初は、許容誤差0で、シミュレーションが行われる。シミュレーションを行いつつ、図15のステップ1508の比較のところで、受信する実際の入力と、予測して投機実行したときの入力の差が計算されるので、これを記録することによって、誤差ヒストグラムのデータが蓄積されていく。   A simulation scenario by the system of this embodiment is as follows. It is assumed that there is no error histogram data as shown in FIG. 11 at the initial stage. Then, at first, the simulation is performed with the tolerance 0. While performing the simulation, the difference between the actual input to be received and the input when the speculative execution is predicted is calculated at the comparison in step 1508 in FIG. 15. By recording this, the error histogram data is recorded. Will accumulate.

最初は、許容誤差0なので、ある一定数のサンプル(例えば、100個)が集まった段階で、各ECUエミュレータで、図10に示すように、誤差ヒストグラムを、累積ヒストグラムに変換する処理が行われる。このことは、好適には、コンピュータの処理により自動的に行われる。   Initially, since the allowable error is 0, when a certain number of samples (for example, 100) are gathered, each ECU emulator performs processing for converting the error histogram into a cumulative histogram as shown in FIG. . This is preferably done automatically by computer processing.

一旦図11に示すように各ECUエミュレータに、累積ヒストグラムが構成されると、図12に示すGUIによって、許容誤差を設定することができる。   Once the cumulative histogram is configured in each ECU emulator as shown in FIG. 11, the allowable error can be set by the GUI shown in FIG.

オペレータは、許容誤差0で、シミュレーションを開始する。すると、図15のステップ1508の判断がNOになる可能性が比較的高くなるので、ステップ1510以下でロールバックが起きて、シミュレーション速度は低下する。   The operator starts the simulation with zero tolerance. Then, since there is a relatively high possibility that the determination in step 1508 of FIG. 15 will be NO, rollback occurs in step 1510 and subsequent steps, and the simulation speed decreases.

そこから、オペレータが、図12に示すGUIによって、許容誤差0から次第に許容度を高めていくと(これは、図12では、スライダ1204を、目盛0から次第に右にずらしていくことを意味する)、許容誤差εが増え、図15のステップ1508の判断がYESになる可能性が次第に上がってきて、すると、ステップ1510以下でロールバックに進む頻度が減るので、結果的に、シミュレーション速度は向上する。   From there, when the operator gradually increases the tolerance from the tolerance 0 by the GUI shown in FIG. 12 (this means that in FIG. 12, the slider 1204 is gradually shifted from the scale 0 to the right. ), The allowable error ε increases, and the possibility of the determination in step 1508 of FIG. 15 becoming YES gradually increases. Then, since the frequency of proceeding to rollback is reduced after step 1510, the simulation speed is improved as a result. To do.

こうして、許容誤差を増やしていくと、ある許容誤差の値で、シミュレーション結果が急変する現象が観察される。それは、必要なロールバックが行われなくなったことを推定させる。すると、最早正しいシミュレーション結果が得られなくなるので、許容誤差の値を減らす必要があることを意味する。   Thus, when the allowable error is increased, a phenomenon is observed in which the simulation result changes suddenly at a certain allowable error value. It makes an assumption that the necessary rollback has not occurred. Then, since the correct simulation result can no longer be obtained, it means that the tolerance value needs to be reduced.

このような処理によって、オペレータは、シミュレーション速度と、シミュレーションの正確さの両方の観点で、最適な許容誤差を選んで設定することが可能となる。   By such processing, the operator can select and set an optimum tolerance in terms of both simulation speed and simulation accuracy.

なお、上記実施例では、各ECUエミュレータについて、一旦、実際の入力と、予測して投機実行したときの入力の誤差に関する、正規化された累積ヒストグラムを作成し、これに対する共通の百分率に対応する許容誤差値で、シミュレーションを行うようにしているが、シミュレーションの性質によっては、個々のECUエミュレータに対して、直接、個別に、許容誤差値を設定するようにしてもよい。   In the above embodiment, for each ECU emulator, a normalized cumulative histogram is created for the error between the actual input and the input when predicted and speculatively executed, and this corresponds to a common percentage for this. Although the simulation is performed with the allowable error value, depending on the nature of the simulation, the allowable error value may be set directly and individually for each ECU emulator.

しかし、最近のように、一台の自動車に、30個乃至50個のECUが搭載されるようなシステムにおいて、個々のECUエミュレータに、オペレータの判断により、個別に最適な許容誤差値を設定するのは、相当困難困難であると想定される。なぜなら、オペレータには、個々のECUエミュレータの特性は、分からないからである。   However, as in recent years, in a system in which 30 to 50 ECUs are mounted on a single automobile, optimum tolerance values are individually set for individual ECU emulators at the discretion of the operator. Is assumed to be quite difficult and difficult. This is because the operator does not know the characteristics of each ECU emulator.

従って、上記実施例のような、正規化された累積ヒストグラムを、個々のECUエミュレータを作成することは、個々のECUエミュレータの特性の違いを吸収して、単一の共通の百分率のパラメータで、個々に許容誤差値を設定することを可能ならしめる点で、有利である。   Therefore, creating individual ECU emulators with normalized cumulative histograms as in the above embodiment absorbs differences in the characteristics of individual ECU emulators, with a single common percentage parameter, This is advantageous in that it makes it possible to set the tolerance values individually.

以上、自動車用の複数のECUエミュレータを含むテスト・システムに関連して、本発明の特定の実施例を説明してきたが、本発明はこのような特定の実施例に限定されず、飛行機用のECUエミュレータを含むテスト・システムなど、一般的な電子機械制御系システムのテスト・システムに適用可能であることを、この分野の当業者であるなら、理解するであろう。   Although specific embodiments of the present invention have been described above in connection with a test system including a plurality of ECU emulators for automobiles, the present invention is not limited to such specific embodiments, and is not limited to airplanes. Those skilled in the art will understand that the present invention can be applied to a general electromechanical control system test system, such as a test system including an ECU emulator.

ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。It is a figure which shows the example of the feedback closed loop system which is typical control of ECU. フィードバック閉ループ系の、応答関数による記述の例である。It is an example of the description by a response function of a feedback closed loop system. ECUソフトウェア・エミュレータのクロック応答の時間推移を示す図である。It is a figure which shows the time transition of the clock response of ECU software emulator. 内部変数を取り出すことができるようになった後のECUのソフトウェア・エミュレータのブロック図である。It is a block diagram of the software emulator of ECU after it became possible to take out an internal variable. 本発明を実施するために使用されるコンピュータのハードウェアのブロック図である。FIG. 2 is a block diagram of computer hardware used to implement the present invention. 本発明のシミュレーション・システムの機能論理ブロック図である。It is a functional logic block diagram of the simulation system of this invention. ECUエミュレータ・プログラムの内部の、より詳細な論理ブロック図である。It is a more detailed logic block diagram inside the ECU emulator program. 指数分布を示す図である。It is a figure which shows an exponential distribution. 指数分布の累積分布を示す図である。It is a figure which shows the cumulative distribution of exponential distribution. 誤差の頻度ヒストグラム、及びその累積ヒストグラムを示す図である。It is a figure which shows the frequency histogram of an error, and its accumulation histogram. 各ECU毎の累積ヒストグラムを示す図である。It is a figure which shows the accumulation histogram for every ECU. 精度設定のGUIを示す図である。It is a figure which shows GUI of a precision setting. 各ECUエミュレータに対する精度パラメータ設定の様子を示す図である。It is a figure which shows the mode of the precision parameter setting with respect to each ECU emulator. 精度設定処理のフローチャートを示す図である。It is a figure which shows the flowchart of an accuracy setting process. ECUエミュレータの処理のフローチャートを示す図である。It is a figure which shows the flowchart of a process of ECU emulator. ECUエミュレータのロールバック表のエントリを示す図である。It is a figure which shows the entry of the rollback table | surface of ECU emulator. グローバル・スケジューラのキューを示す図である。It is a figure which shows the queue of a global scheduler. グローバル・スケジューラの処理のフローチャートである。It is a flowchart of a process of a global scheduler.

Claims (20)

複数の電子制御ユニットによって制御される物理装置システムをシミュレートするためのシステムであって、
物理装置システム・シミュレータと、
時刻付きの入力イベントを受け取り、前記物理装置システム・シミュレータに入力される、時刻付きの出力イベントを与えるように複数の電子制御ユニットの各々を電子的にエミュレートする、複数の電子制御ユニット・エミュレータとを有し、
前記電子制御ユニット・エミュレータは、前記入力イベントを格納するためのキューをもち、
前記電子制御ユニット・エミュレータの前記入力イベント、そのタイム・スタンプ及び前記出力イベントを順次ロールバック表として記録する手段と、
前記キューから入力イベントを取り出し、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあるかどうかを判断し、あることに応答して、該取り出された入力イベントと、前記ロールバック表にある前記タイム・スタンプをもつ入力イベントとを、所定の許容誤差値の範囲で比較し、一致しているとの判断に応答して、エントリを遡ることなくシミュレーション処理を進め、ないことに応答して、前記ロールバック表の確定されたとみなされているエントリまで遡って、該遡ったエントリの入力イベントに基づき、前記電子制御ユニット・エミュレータが計算した出力イベントを出力する手段と、
前記所定の許容誤差値を変更するための手段とを有する、
シミュレーション・システム。
A system for simulating a physical device system controlled by a plurality of electronic control units,
A physical system simulator
A plurality of electronic control unit emulators that emulate each of a plurality of electronic control units to receive a timed input event and provide a timed output event input to the physical device system simulator And
The electronic control unit emulator has a queue for storing the input event,
Means for sequentially recording the input event of the electronic control unit emulator, its time stamp and the output event as a rollback table;
Retrieving an input event from the queue, determining whether there is an entry in the rollback table that matches the time stamp of the input event, and in response, in response to the retrieved input event and the rollback The input event having the time stamp in the table is compared within a range of a predetermined allowable error value, and in response to the determination that they match, the simulation process does not proceed without going back to the entry. In response, means for outputting an output event calculated by the electronic control unit emulator based on an input event of the traced entry, going back to the entry regarded as confirmed in the rollback table;
Means for changing the predetermined tolerance value,
Simulation system.
前記所定の許容誤差値を変更するための手段は、前記キューから取り出された入力イベントと、前記ロールバック表にある対応する入力イベントとの誤差の正規化した累積ヒストグラムに対して、百分率の値を適用することによって、許容誤差値を得る、請求項1のシミュレーション・システム。   The means for changing the predetermined tolerance value is a percentage value relative to a normalized cumulative histogram of errors between the input events retrieved from the queue and the corresponding input events in the rollback table. The simulation system of claim 1, wherein the tolerance value is obtained by applying 前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知する、グローバル・スケジューラをさらに有する、請求項1に記載のシミュレーション・システム。   The output from the electronic control unit emulator and the output from the physical device simulator are held, and the oldest output time is notified to the electronic control unit emulator and the physical device simulator as a fixed time. The simulation system of claim 1, further comprising a global scheduler. 前記ロールバック表における確定されたとみなされているエントリは、前記グローバル・スケジューラによる、前記確定時刻の通知により決定される、請求項3に記載のシミュレーション・システム。   The simulation system according to claim 3, wherein an entry considered to be confirmed in the rollback table is determined by notification of the confirmed time by the global scheduler. 前記電子制御ユニット・エミュレータ及び前記物理装置シミュレータと、前記グローバル・スケジューラは、共通メモリで接続されている、請求項1に記載のシミュレーション・システム。   The simulation system according to claim 1, wherein the electronic control unit emulator, the physical device simulator, and the global scheduler are connected by a common memory. 前記電子制御ユニット・エミュレータ及び前記物理装置シミュレータと、前記グローバル・スケジューラは、CANエミュレータで接続されている、請求項1に記載のシミュレーション・システム。   The simulation system according to claim 1, wherein the electronic control unit emulator, the physical device simulator, and the global scheduler are connected by a CAN emulator. 複数の電子制御ユニットによって制御される物理装置システムをコンピュータによって、シミュレートするための方法であって、
物理装置システム・シミュレータを前記コンピュータによって実行可能にロードするステップと、
時刻付きの入力イベントを受け取り、前記入力イベントを格納するためのキューをもち、前記物理装置システム・シミュレータに入力される、時刻付きの出力イベントを与えるように複数の電子制御ユニットの各々を電子的にエミュレートする、複数の電子制御ユニット・エミュレータを前記コンピュータによって実行可能にロードするステップと
前記電子制御ユニット・エミュレータの前記入力イベント、そのタイプ・スタンプ及び前記出力イベントを順次ロールバック表として記録するステップと、
前記キューから入力イベントを取り出し、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあるかどうかを判断し、あることに応答して、該取り出された入力イベントと、前記ロールバック表にある前記タイム・スタンプをもつ入力イベントとを、所定の許容誤差値の範囲で比較し、一致しているとの判断に応答して、エントリを遡ることなくシミュレーション処理を進め、ないことに応答して、前記ロールバック表の確定されたとみなされているエントリまで遡って、該遡ったエントリの入力イベントに基づき、前記電子制御ユニット・エミュレータが計算した出力イベントを出力するステップと、
オペレータの操作に応答して、前記所定の許容誤差値を変更するステップを有する、
シミュレーション方法。
A method for simulating by a computer a physical device system controlled by a plurality of electronic control units, comprising:
Loading a physical device system simulator executable by the computer;
Each of the plurality of electronic control units is electronically configured to receive an input event with a time, have a queue for storing the input event, and provide an output event with a time that is input to the physical device system simulator. A step of loading a plurality of electronic control unit emulators to be executable by the computer, and sequentially recording the input events of the electronic control unit emulators, their type stamps and the output events as a rollback table. Steps,
Retrieving an input event from the queue, determining whether there is an entry in the rollback table that matches the time stamp of the input event, and in response, in response to the retrieved input event and the rollback The input event having the time stamp in the table is compared within a range of a predetermined allowable error value, and in response to the determination that they match, the simulation process does not proceed without going back to the entry. In response, outputting the output event calculated by the electronic control unit emulator based on the input event of the traced entry, going back to the entry regarded as confirmed in the rollback table;
Changing the predetermined tolerance value in response to an operator operation;
Simulation method.
前記所定の許容誤差値を変更するステップは、前記キューから取り出された入力イベントと、前記ロールバック表にある対応する入力イベントとの誤差の正規化した累積ヒストグラムに対して、百分率の値を適用することによって、許容誤差値を得る、請求項7のシミュレーション方法。   The step of changing the predetermined tolerance value applies a percentage value to the normalized cumulative histogram of the error between the input event taken from the queue and the corresponding input event in the rollback table. The simulation method according to claim 7, wherein an allowable error value is obtained. 前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知するステップをさらに有する、請求項7に記載のシミュレーション方法。   The output from the electronic control unit emulator and the output from the physical device simulator are held, and the oldest output time is notified to the electronic control unit emulator and the physical device simulator as a fixed time. The simulation method according to claim 7, further comprising a step. 前記ロールバック表における確定されたとみなされているエントリは、前記確定時刻の通知により決定される、請求項9に記載のシミュレーション方法。   The simulation method according to claim 9, wherein an entry considered to be confirmed in the rollback table is determined by notification of the confirmation time. 前記キューに入力イベントがあり、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあることに応答して、前記キューに入力イベントがあるかどうか判断するステップに戻るステップをさらに有する、請求項7に記載のシミュレーション方法。   In response to the presence of an input event in the queue and an entry in the rollback table that matches the input event time stamp, the method further includes the step of determining whether there is an input event in the queue. The simulation method according to claim 7. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、共通メモリで接続されている、請求項7に記載のシミュレーション方法。   The simulation method according to claim 7, wherein the electronic control unit emulator and the physical device simulator are connected by a common memory. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、CANエミュレータで接続されている、請求項7のシミュレーション方法。   The simulation method according to claim 7, wherein the electronic control unit emulator and the physical device simulator are connected by a CAN emulator. 複数の電子制御ユニットによって制御される物理装置システムをコンピュータによって、シミュレートするためのプログラムであって、
前記コンピュータをして、
物理装置システム・シミュレータを前記コンピュータによって実行可能にロードするステップと、
時刻付きの入力イベントを受け取り、前記入力イベントを格納するためのキューをもち、前記物理装置システム・シミュレータに入力される、時刻付きの出力イベントを与えるように複数の電子制御ユニットの各々を電子的にエミュレートする、複数の電子制御ユニット・エミュレータを前記コンピュータによって実行可能にロードするステップと
前記電子制御ユニット・エミュレータの前記入力イベント、そのタイプ・スタンプ及び前記出力イベントを順次ロールバック表として記録するステップと、
前記キューから入力イベントを取り出し、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあるかどうかを判断し、あることに応答して、該取り出された入力イベントと、前記ロールバック表にある前記タイム・スタンプをもつ入力イベントとを、所定の許容誤差値の範囲で比較し、一致しているとの判断に応答して、エントリを遡ることなくシミュレーション処理を進め、ないことに応答して、前記ロールバック表の確定されたとみなされているエントリまで遡って、該遡ったエントリの入力イベントに基づき、前記電子制御ユニット・エミュレータが計算した出力イベントを出力するステップと、
オペレータの操作に応答して、前記所定の許容誤差値を変更するステップを実行させる、
シミュレーション・プログラム。
A program for simulating by a computer a physical device system controlled by a plurality of electronic control units,
The computer,
Loading a physical device system simulator executable by the computer;
Each of the plurality of electronic control units is electronically configured to receive an input event with a time, have a queue for storing the input event, and provide an output event with a time that is input to the physical device system simulator. A step of loading a plurality of electronic control unit emulators to be executable by the computer, and sequentially recording the input events of the electronic control unit emulators, their type stamps and the output events as a rollback table. Steps,
Retrieving an input event from the queue, determining whether there is an entry in the rollback table that matches the time stamp of the input event, and in response, in response to the retrieved input event and the rollback The input event having the time stamp in the table is compared within a range of a predetermined allowable error value, and in response to the determination that they match, the simulation process does not proceed without going back to the entry. In response, outputting the output event calculated by the electronic control unit emulator based on the input event of the traced entry, going back to the entry regarded as confirmed in the rollback table;
In response to an operation by an operator, the step of changing the predetermined tolerance value is executed.
Simulation program.
前記所定の許容誤差値を変更するステップは、前記キューから取り出された入力イベントと、前記ロールバック表にある対応する入力イベントとの誤差の正規化した累積ヒストグラムに対して、百分率の値を適用することによって、許容誤差値を得る、請求項14のシミュレーション・プログラム。   The step of changing the predetermined tolerance value applies a percentage value to the normalized cumulative histogram of the error between the input event taken from the queue and the corresponding input event in the rollback table. The simulation program according to claim 14, wherein an allowable error value is obtained. 前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知するステップをさらに有する、請求項14のシミュレーション・プログラム。   The output from the electronic control unit emulator and the output from the physical device simulator are held, and the oldest output time is notified to the electronic control unit emulator and the physical device simulator as a fixed time. The simulation program according to claim 14, further comprising a step. 前記ロールバック表における確定されたとみなされているエントリは、前記確定時刻の通知により決定される、請求項16に記載のシミュレーション・プログラム。   The simulation program according to claim 16, wherein an entry considered to be confirmed in the rollback table is determined by notification of the confirmed time. 前記キューに入力イベントがあり、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあることに応答して、前記キューに入力イベントがあるかどうか判断するステップに戻るステップをさらに前記コンピュータに実行させる、請求項14に記載のシミュレーション・プログラム。   In response to the presence of an input event in the queue and an entry in the rollback table that matches the time stamp of the input event, the method further includes the step of returning to determining whether there is an input event in the queue. The simulation program according to claim 14, which is executed by a computer. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、共通メモリで接続されている、請求項14のシミュレーション・プログラム。   15. The simulation program according to claim 14, wherein the electronic control unit emulator and the physical device simulator are connected by a common memory. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、CANエミュレータで接続されている、請求項14のシミュレーション・プログラム。   15. The simulation program according to claim 14, wherein the electronic control unit emulator and the physical device simulator are connected by a CAN emulator.
JP2008191731A 2008-07-25 2008-07-25 Simulation method, system and program Expired - Fee Related JP5224957B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008191731A JP5224957B2 (en) 2008-07-25 2008-07-25 Simulation method, system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008191731A JP5224957B2 (en) 2008-07-25 2008-07-25 Simulation method, system and program

Publications (2)

Publication Number Publication Date
JP2010033130A true JP2010033130A (en) 2010-02-12
JP5224957B2 JP5224957B2 (en) 2013-07-03

Family

ID=41737569

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008191731A Expired - Fee Related JP5224957B2 (en) 2008-07-25 2008-07-25 Simulation method, system and program

Country Status (1)

Country Link
JP (1) JP5224957B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013099438A1 (en) * 2011-12-28 2013-07-04 日立オートモティブシステムズ株式会社 Computer system for cooperative simulation, embedded-system authentication method and program
JP2014029639A (en) * 2012-07-31 2014-02-13 Canon Inc Information processing apparatus and information processing method
JP2015106179A (en) * 2013-11-28 2015-06-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Simulation device, simulation method and program
KR101690280B1 (en) * 2015-07-03 2017-01-09 국민대학교산학협력단 Running performance test server, test system having the same, testing method using the same
KR101742536B1 (en) * 2015-07-03 2017-06-15 국민대학교산학협력단 Running performance test server, test system having the same, testing method using the same
CN110188490A (en) * 2019-06-03 2019-08-30 珠海格力电器股份有限公司 Improve method and device, storage medium and the electronic device of data simulation efficiency
CN113569333A (en) * 2021-06-24 2021-10-29 中国人民解放军63620部队 Parallel development and maintenance method for multiple aircraft simulation models based on precompiled instructions

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05101015A (en) * 1991-10-07 1993-04-23 Mitsubishi Electric Corp Device and method for simulation
JPH10260954A (en) * 1997-03-19 1998-09-29 Fujitsu Ltd Circuit simulation parallel method and medium recording circuit simulation parallel program
JP2008027225A (en) * 2006-07-21 2008-02-07 Fujitsu Ten Ltd Simulation device
WO2008047555A1 (en) * 2006-09-27 2008-04-24 Fujitsu Ten Limited Simulation device, simulation model, and simulation model forming device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05101015A (en) * 1991-10-07 1993-04-23 Mitsubishi Electric Corp Device and method for simulation
JPH10260954A (en) * 1997-03-19 1998-09-29 Fujitsu Ltd Circuit simulation parallel method and medium recording circuit simulation parallel program
JP2008027225A (en) * 2006-07-21 2008-02-07 Fujitsu Ten Ltd Simulation device
WO2008047555A1 (en) * 2006-09-27 2008-04-24 Fujitsu Ten Limited Simulation device, simulation model, and simulation model forming device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013099438A1 (en) * 2011-12-28 2013-07-04 日立オートモティブシステムズ株式会社 Computer system for cooperative simulation, embedded-system authentication method and program
JP2014029639A (en) * 2012-07-31 2014-02-13 Canon Inc Information processing apparatus and information processing method
JP2015106179A (en) * 2013-11-28 2015-06-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Simulation device, simulation method and program
US9563471B2 (en) 2013-11-28 2017-02-07 International Business Machines Corporation Simulation apparatus, simulation method, and program
KR101690280B1 (en) * 2015-07-03 2017-01-09 국민대학교산학협력단 Running performance test server, test system having the same, testing method using the same
KR101742536B1 (en) * 2015-07-03 2017-06-15 국민대학교산학협력단 Running performance test server, test system having the same, testing method using the same
CN110188490A (en) * 2019-06-03 2019-08-30 珠海格力电器股份有限公司 Improve method and device, storage medium and the electronic device of data simulation efficiency
CN113569333A (en) * 2021-06-24 2021-10-29 中国人民解放军63620部队 Parallel development and maintenance method for multiple aircraft simulation models based on precompiled instructions
CN113569333B (en) * 2021-06-24 2023-02-17 中国人民解放军63620部队 Method for developing and maintaining multiple aircraft simulation models in parallel based on precompiled instructions

Also Published As

Publication number Publication date
JP5224957B2 (en) 2013-07-03

Similar Documents

Publication Publication Date Title
JP5153465B2 (en) Simulation method, system and program
JP5179249B2 (en) Control device simulation method, system, and program
JP5224957B2 (en) Simulation method, system and program
JP5065344B2 (en) Simulation method, system and program
US9147016B2 (en) Multi-ECU simulation by using 2-layer peripherals with look-ahead time
JP5295355B2 (en) Simulation method, system and program
EP1703391B1 (en) Vehicle control software and vehicle control apparatus
JP5528294B2 (en) Simulation control method, system and program
JP5186290B2 (en) Simulation method, system and program
WO2011046089A1 (en) Simulation method, system, and program
JP5460010B2 (en) Simulation method, system and program
JP4852629B2 (en) Simulation system, method and program
JP5186307B2 (en) Simulation method, system and program
Latif et al. Design space exploration for complex automotive applications: An engine control system case study
JP5500820B2 (en) Simulation method, system and program
Gu et al. Integrated modeling and analysis of automotive embedded control systems with real-time scheduling
JP2011238297A (en) Software creation method of automobile controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110704

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130122

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: 20130219

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130312

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160322

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees