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

Simulation method, system, and program Download PDF

Info

Publication number
JP2010002968A
JP2010002968A JP2008158995A JP2008158995A JP2010002968A JP 2010002968 A JP2010002968 A JP 2010002968A JP 2008158995 A JP2008158995 A JP 2008158995A JP 2008158995 A JP2008158995 A JP 2008158995A JP 2010002968 A JP2010002968 A JP 2010002968A
Authority
JP
Japan
Prior art keywords
input event
electronic control
control unit
emulator
event
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
JP2008158995A
Other languages
Japanese (ja)
Other versions
JP5186290B2 (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 JP2008158995A priority Critical patent/JP5186290B2/en
Publication of JP2010002968A publication Critical patent/JP2010002968A/en
Application granted granted Critical
Publication of JP5186290B2 publication Critical patent/JP5186290B2/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 different types of ECU by software. <P>SOLUTION: Each ECU emulator is speculatively emulated. That is, when the ECU emulator or each physical device simulator is called as a logical process, any critical path is not created, and each logical process is executed in parallel as much as possible, and even when any input event is not delivered in each logical process, the input is predicted, and the processing is advanced. This speculative execution makes it possible to previously execute processing without waiting for the output of another logical process so that the parallelism of processing can be increased. When the actual input to be received with delay is not matched with the predicted and speculatively executed input, it is determined that the speculative execution fails, and the status is returned to the previous time, and the processing is re-executed based on the actual input. <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.

しかし、これらの文献には、論理プロセス間で同期をとる技術には言及はない。   However, these documents do not mention a technique for synchronizing logical processes.

特開平6−161987号公報JP-A-6-161987 特開平11−14507号公報Japanese Patent Laid-Open No. 11-14507

以上のように、上記従来技術を組みあわせても、フルビークルSILSで、動作の直列性に拘束されて、高速にシミュレーションを行うことは困難である。   As described above, even when the above-described conventional techniques are combined, it is difficult to perform a high-speed simulation with the full vehicle SILS, being constrained by the series of operations.

従って、この発明の目的は、フルビークルSILSなどのシミュレーション・システムを高速化することにある。   Accordingly, an object of the present invention is to speed up a simulation system such as a full vehicle SILS.

この発明の別の目的は、フルビークルSILSなどのシミュレーション・システムで、マルチプロセッサ・システムなどの高性能のコンピュータの能力を効率的に利用することを可能ならしめることにある。   Another object of the present invention is to enable a simulation system such as a full vehicle SILS to efficiently utilize the capabilities of a high performance computer such as a multiprocessor system.

本発明によれば、必須ではないが、好適にはマルチCPUのワークステーションが用意される。また、各ECUのソフトウェア・エミュレータが用意される。一般的には、ECUのソフトウェア・エミュレータは、そのECUのメーカから入手可能である。   According to the present invention, although not essential, a multi-CPU workstation is preferably prepared. 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のイベントが来ると予測して、その処理を先行投機的に実行する。 According to 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. 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.

尚、このような投機実行は、入力の予測が容易である、自動車などの離散イベント・シミュレーションに特に有効である。   Such speculative execution is particularly effective for a discrete event simulation of an automobile or the like in which input prediction is easy.

この発明によれば、投機的シミュレーションの技法により、特に自動車などの離散イベント・シミュレーションを高速化できる、という効果が得られる。   According to the present invention, it is possible to obtain an effect that it is possible to speed up a discrete event simulation such as an automobile by the speculative simulation technique.

以下、図面を参照して、本発明の一実施例の構成及び処理を説明する。以下の記述では、特に断わらない限り、図面に亘って、同一の要素は同一の符号で参照されるものとする。なお、ここで説明する構成と処理は、一実施例として説明するものであり、本発明の技術的範囲をこの実施例に限定して解釈する意図はないことを理解されたい。   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 electromagnetic spill valves, fuel cut solenoids, timing control valves, intake throttle VSV, glow plug relays, tachometers, air conditioner relays, etc. To do.

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 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のソフトウェア・エミュレータ502は、内部ロジック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 therein, the ECU's software emulator 502 is conveniently separated into a portion representing the internal logic f and an internal state or state variable x.

すると、内部ロジックfを用いて、出力y = f(t,x,u, ...) と記述することができる。ここでtは、時間である。また、状態変数xに係るコードが分離されたことによって、任意の時点、すなわち典型的には出力がなされるタイミングで、状態変数xと、好ましくは入力uも、状態リポジトリ504として、ハードディスクドライブに書き出すことができる。   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 504 at an arbitrary time point, that is, typically at the timing of output. Can be exported.

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

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

一方、I/Oバス608には、キーボード610、マウス612、ディスプレイ614及びハードティスク・ドライブ616が接続されている。I/Oバス608は、I/Oブリッジ618を介して、ホスト・バス602に接続されている。キーボード610及びマウス612は、オペレータが、コマンドを打ち込んだり、メニューをクリックするなどして、操作するために使用される。ディスプレイ614は、後述する本発明に係るプログラムをGUIで操作するための画面イメージを表示するために使用される。   On the other hand, a keyboard 610, a mouse 612, a display 614, and a hard disk drive 616 are connected to the I / O bus 608. The I / O bus 608 is connected to the host bus 602 via the I / O bridge 618. The keyboard 610 and the mouse 612 are used by an operator to input commands or click menus to perform operations. The display 614 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 604a、CPU1 604b、CPU2 604c、CPU3 604dは、例えば、インテル(R)Core 2 DUOであり、オペレーティング・システムは、Windows(商標)Server 2003である。オペレーティング・システムは、ハードティスク・ドライブ616に格納され、コンピュータ・システムの起動時に、ハードティスク・ドライブ616からメイン・メモリ606に読み込まれる。   IBM (R) System X is the preferred computer system hardware used for this purpose. At that time, CPU0 604a, CPU1 604b, CPU2 604c, and CPU3 604d 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 616 and is read from the hard disk drive 616 into the main memory 606 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.

ハードディスク・ドライブ616にはさらに、テストするための複数のECUエミュレータ・プログラム、及び、それら複数のECUエミュレータ・プログラムを協働させてテストするための、本発明に係るプログラムが格納され、キーボード610及びマウス612によって起動操作可能である。   The hard disk drive 616 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 612 can be activated.

好適には、フルビークルSILSを実現するために、1台の自動車で使われるすべてのECUのエミュレータ・プログラムが、ハードティスク・ドライブ616に保存されている。そのECUのエミュレータ・プログラムが、そのままでは内部の状態変数を取り出せないものてある場合は、上述したラッパコードを被せることにより、予め、状態変数をセット及び取り出し可能としておくものとする。   Preferably, the emulator program of all ECUs used in one automobile is stored in the hard disk drive 616 in order to realize the full vehicle SILS. 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.

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

なお、ここでの「エミュレータ」と、「シミュレータ」の用語の使い分けであるが、もともとの、別のプロセッサで動くことを想定して書かれていた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において、共有メモリ702は、実際は、図5に示すメイン・メモリ606の一部であってよい。共有メモリ702には、ECUエミュレータ・プログラム704a、704b、・・・704nと、スケジューラ706と、物理装置シミュレータ・プログラム706a、・・・706mが論理的に結合されている。   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 702 may actually be a part of the main memory 606 shown in FIG. In the shared memory 702, ECU emulator programs 704a, 704b,... 704n, a scheduler 706, and physical device simulator programs 706a,.

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

ECUのエミュレータ・プログラム704a、704b、・・・704nは、それぞれ、エンジン、ブレーキ、トランスミッション、ステアリングなど、車の異なる部分の制御に対応するもので、それぞれが異なる速度のクロックで動作するので、対応するECUのエミュレータ・プログラムも、それに比例するクロック比で動作するものとする。   The ECU emulator programs 704a, 704b,... 704n correspond to the control of different parts of the car, such as the engine, brake, transmission, steering, etc., and each operates with different speed clocks. 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〜CPU1のどれかに割り当てられるが、それはオペレーティング・システムに任され、エミュレータ・プログラムにとっては、透過的である。
このような割り当て処理は、ECUエミュレータ・プログラム704a、704b、・・・704n各々に個別に行われる。
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 CPU1, 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 704a, 704b,.

なお、図6に示した論理構成では、ECUエミュレータ・プログラム704a、704b、・・・704n、物理装置シミュレータ・プログラム706a、・・・706m及びグローバル・スケジューラ708は、共有メモリ702を使用してデータを交換するが、代わりに、CAN(controller area network)エミュレータを使用してもよい。   6, the ECU emulator programs 704a, 704b,... 704n, the physical device simulator programs 706a,... 706m, and the global scheduler 708 use the shared memory 702 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エミュレータ・プログラム704の内部の、より詳細な論理ブロック図を示す。ここでは、ECUエミュレータ・プログラム704a、704b、・・・704nなどを、総称的に、ECUエミュレータ・プログラム704として説明する。   FIG. 7 shows a more detailed logic block diagram inside the ECU emulator program 704. Here, the ECU emulator programs 704a, 704b,... 704n, etc. will be generically described as the ECU emulator program 704.

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

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

ローカル・スケジューラ806は、論理状態リポジトリ804に保存されている内部状態変数を、制御ロジック・モジュール802に書き戻すことにより、ECUエミュレータ・プログラム704を所望の状態に戻す機能を持つ。論理状態リポジトリ804及びローカル・スケジューラ806は、前述した、ECUエミュレータに付加されたラッパコード中に含ませることができる。   The local scheduler 806 has a function of returning the ECU emulator program 704 to a desired state by writing the internal state variable stored in the logical state repository 804 back to the control logic module 802. The logical state repository 804 and the local scheduler 806 can be included in the wrapper code added to the ECU emulator described above.

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

図示しないが、図7のECUエミュレータ704は、入力イベントを一旦格納するためのキューをもつ。キューは、制御ロジック・モジュール802内に設けてもよいし、メイン・メモリ606内の専用のプライベート・メモリ領域内に設けてもよい。   Although not shown, the ECU emulator 704 in FIG. 7 has a queue for temporarily storing an input event. The queue may be provided in the control logic module 802 or may be provided in a dedicated private memory area in the main memory 606.

例えば、エアコン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.

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

次に、図8のフローチャートを参照して、ECUエミュレータの処理について処理を説明する。ここでの処理の大部分は、図7に示すローカル・スケジューラ806によって、主に行われる。図8のステップ902では、キューに、他の論理プロセスからイベントが到来しているかどうかが判断される。もしキューにイベントがあると、ステップ904では、最も古いイベント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 806 shown in FIG. In step 902 of FIG. 8, 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 904, the oldest event e is retrieved. Let t be the time stamp of this event e.

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

また、図9から見て取れるように、ロールバック表は、2通りのエントリをもつ。1つは、入力イベントのエントリであり、タイム・スタンプの欄と、入力イベントの欄のみが有効である。   As can be seen from FIG. 9, 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であるかどうかが、ステップ908で判断される。この比較は、eやekが浮動小数点数であるとすると、ある桁以下を切り捨てて、概数で比較するようにしてもよい。ステップ908での判断が肯定的である、ということは、先の投機的実行が成功であった、ということを意味をする。そこで、処理は、最初のステップ902に戻る。 If there is an entry having t = t k in the rollback table, if it is assumed that the entry is e k , it is determined in step 908 whether e = e k . In this comparison, if e and e k are floating-point numbers, a certain number of digits may be rounded down, and comparison may be made with approximate numbers. A positive determination at step 908 means that the previous speculative execution was successful. Therefore, the process returns to the first step 902.

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

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

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

ステップ916では、そのイベント処理の結果として生成された出力イベントが、ロールバック表に挿入される。ステップ918では、その出力イベントが、通信インターフェース・モジュール808を介して、それは、所定の物理装置シミュレータに送られる。この送り方であるが、共有メモリ方式ならば、特定のメモリのアドレスに書いてシグナルされるし、CANエミュレータ方式の場合、送り出すメッセージに、所定の宛先を含むヘッダを付けることになる。このような処理は、図7に示す通信インターフェース・モジュール808によって、行われる。そうして処理は、ステップ902に戻る。   In step 916, the output event generated as a result of the event processing is inserted into the rollback table. In step 918, the output event is sent via the communication interface module 808 to the 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 808 shown in FIG. The process then returns to step 902.

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

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

キューQ1〜Qnには、対応する論理プロセスLP#1〜LP#Nから、随時にイベントが入来し、入来したイベントは、キューに一旦格納される。グローバル・スケジューラ708は、キュー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 708 outputs a fixed event and a fixed time based on the events stored in the queues Q1 to Qn.

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

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

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

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

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

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

以上、自動車用の複数の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. 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 (17)

複数の電子制御ユニットによって制御される物理装置システムをシミュレートするためのシステムであって、
物理装置システム・シミュレータと、
時刻付きの入力イベントを受け取り、前記物理装置システム・シミュレータに入力される、時刻付きの出力イベントを与えるように複数の電子制御ユニットの各々を電子的にエミュレートする、複数の電子制御ユニット・エミュレータとを有し、
前記電子制御ユニット・エミュレータは、前記入力イベントを格納するためのキューをもち、
前記電子制御ユニット・エミュレータの前記入力イベント、そのタイプ・スタンプ及び前記出力イベントを順次ロールバック表として記録する手段と、
前記キューに入力イベントがあるかどうか判断し、入力イベントがないことに応答して、予測された入力イベントを生成して、前記キューに入れ、入力イベントがあることに応答して該入力イベントを取り出し、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあるかどうかを判断し、ないことに応答して、前記ロールバック表の確定されたとみなされているエントリまで遡って、該遡ったエントリの入力イベントに基づき、前記電子制御ユニット・エミュレータが計算した出力イベントを出力する手段を有する、
シミュレーション・システム。
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 type stamp and the output event as a rollback table;
Determine if there is an input event in the queue, and in response to no input event, generate a predicted input event, place it in the queue, and select the input event in response to the input event. Retrieve, determine if there is an entry in the rollback table that matches the time stamp of the input event, and in response to not, go back to the entry deemed to be confirmed in the rollback table; A means for outputting an output event calculated by the electronic control unit emulator based on an input event of the retroactive entry;
Simulation system.
前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知する、グローバル・スケジューラをさらに有する、請求項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. 前記ロールバック表における確定されたとみなされているエントリは、前記グローバル・スケジューラによる、前記確定時刻の通知により決定される、請求項2に記載のシミュレーション・システム。   The simulation system according to claim 2, 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,
Determine if there is an input event in the queue, and in response to no input event, generate a predicted input event, place it in the queue, and select the input event in response to the input event. Retrieve and determine if there is an entry in the rollback table that matches the time stamp of the input event, and in response to not, go back to the entry deemed to be confirmed in the rollback table; A step of outputting an output event calculated by the electronic control unit emulator based on an input event of the retroactive entry;
Simulation method.
前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知するステップをさらに有する、請求項6に記載のシミュレーション方法。   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 6, further comprising a step. 前記ロールバック表における確定されたとみなされているエントリは、前記確定時刻の通知により決定される、請求項7に記載のシミュレーション方法。   The simulation method according to claim 7, wherein an entry considered to be confirmed in the rollback table is determined by notification of the confirmation time. 前記キューに入力イベントがあり、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあることに応答して、前記キューに入力イベントがあるかどうか判断するステップに戻るステップをさらに有する、請求項6に記載のシミュレーション方法。   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 6. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、共通メモリで接続されている、請求項6に記載のシミュレーション方法。   The simulation method according to claim 6, wherein the electronic control unit emulator and the physical device simulator are connected by a common memory. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、CANエミュレータで接続されている、請求項6のシミュレーション方法。   The simulation method according to claim 6, 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 a timed input event, have a queue for storing the input event, and provide a timed output event 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,
Determine if there is an input event in the queue, and in response to no input event, generate a predicted input event, place it in the queue, and select the input event in response to the input event. Retrieve, determine if there is an entry in the rollback table that matches the time stamp of the input event, and in response to not, go back to the entry deemed to be confirmed in the rollback table; A step of executing a step of outputting an output event calculated by the electronic control unit emulator based on an input event of the retroactive entry;
Simulation program.
前記電子制御ユニット・エミュレータからの出力と、前記物理装置シミュレータからの出力を保持し、そのうちの最も古い出力の時刻を、確定時刻として、前記電子制御ユニット・エミュレータと、前記物理装置シミュレータに通知するステップをさらに有する、請求項12のシミュレーション・プログラム。   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 of claim 12, further comprising a step. 前記ロールバック表における確定されたとみなされているエントリは、前記確定時刻の通知により決定される、請求項13に記載のシミュレーション・プログラム。   The simulation program according to claim 13, wherein an entry considered to be confirmed in the rollback table is determined by notification of the confirmed time. 前記キューに入力イベントがあり、該入力イベントのタイム・スタンプに一致するエントリが前記ロールバック表にあることに応答して、前記キューに入力イベントがあるかどうか判断するステップに戻るステップをさらに前記コンピュータに実行させる、請求項12に記載のシミュレーション・プログラム。   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 12, which is executed by a computer. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、共通メモリで接続されている、請求項12のシミュレーション・プログラム。   13. The simulation program according to claim 12, wherein the electronic control unit emulator and the physical device simulator are connected by a common memory. 前記電子制御ユニット・エミュレータと前記物理装置シミュレータは、CANエミュレータで接続されている、請求項12のシミュレーション・プログラム。   13. The simulation program according to claim 12, wherein the electronic control unit emulator and the physical device simulator are connected by a CAN emulator.
JP2008158995A 2008-06-18 2008-06-18 Simulation method, system and program Expired - Fee Related JP5186290B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008158995A JP5186290B2 (en) 2008-06-18 2008-06-18 Simulation method, system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008158995A JP5186290B2 (en) 2008-06-18 2008-06-18 Simulation method, system and program

Publications (2)

Publication Number Publication Date
JP2010002968A true JP2010002968A (en) 2010-01-07
JP5186290B2 JP5186290B2 (en) 2013-04-17

Family

ID=41584679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008158995A Expired - Fee Related JP5186290B2 (en) 2008-06-18 2008-06-18 Simulation method, system and program

Country Status (1)

Country Link
JP (1) JP5186290B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012023397A1 (en) * 2010-08-20 2012-02-23 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation method, system and program
US8423741B2 (en) 2010-07-27 2013-04-16 Hitachi, Ltd. Storage control device and data processing system
WO2013084654A1 (en) * 2011-12-05 2013-06-13 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation execution method, program and system
JP2015106179A (en) * 2013-11-28 2015-06-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Simulation device, simulation method and program
CN115987964A (en) * 2022-11-28 2023-04-18 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10260954A (en) * 1997-03-19 1998-09-29 Fujitsu Ltd Circuit simulation parallel method and medium recording circuit simulation parallel program
WO2008003930A2 (en) * 2006-07-04 2008-01-10 Iti Scotland Limited Techniques for program execution
JP2008027225A (en) * 2006-07-21 2008-02-07 Fujitsu Ten Ltd Simulation device
JP2008090489A (en) * 2006-09-29 2008-04-17 Fujitsu Ten Ltd Simulation system
WO2008047555A1 (en) * 2006-09-27 2008-04-24 Fujitsu Ten Limited Simulation device, simulation model, and simulation model forming device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10260954A (en) * 1997-03-19 1998-09-29 Fujitsu Ltd Circuit simulation parallel method and medium recording circuit simulation parallel program
WO2008003930A2 (en) * 2006-07-04 2008-01-10 Iti Scotland Limited Techniques for program execution
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
JP2008090489A (en) * 2006-09-29 2008-04-17 Fujitsu Ten Ltd Simulation system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8423741B2 (en) 2010-07-27 2013-04-16 Hitachi, Ltd. Storage control device and data processing system
KR101522477B1 (en) * 2010-08-20 2015-05-21 인터내셔널 비지네스 머신즈 코포레이션 Simulation method, system and program
CN103098032A (en) * 2010-08-20 2013-05-08 国际商业机器公司 Simulation method, system and program
WO2012023397A1 (en) * 2010-08-20 2012-02-23 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation method, system and program
EP2608040A4 (en) * 2010-08-20 2018-02-07 International Business Machines Corporation Simulation method, system and program
JP5583773B2 (en) * 2010-08-20 2014-09-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation method, system and program
US9147016B2 (en) 2010-08-20 2015-09-29 International Business Machines Corporation Multi-ECU simulation by using 2-layer peripherals with look-ahead time
WO2013084654A1 (en) * 2011-12-05 2013-06-13 インターナショナル・ビジネス・マシーンズ・コーポレーション Simulation execution method, program and system
GB2508769B (en) * 2011-12-05 2014-10-22 Ibm Simulation execution method, program and system
GB2508769A (en) * 2011-12-05 2014-06-11 Ibm Simulation execution method, program and system
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
CN115987964A (en) * 2022-11-28 2023-04-18 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method
CN115987964B (en) * 2022-11-28 2024-01-23 镁佳(北京)科技有限公司 Whole vehicle FOTA upgrading system and method

Also Published As

Publication number Publication date
JP5186290B2 (en) 2013-04-17

Similar Documents

Publication Publication Date Title
US8676560B2 (en) Simulation method, system and program for simulating physical unit controlled by electronic control unit
JP5179249B2 (en) Control device simulation method, system, and program
JP5065344B2 (en) Simulation method, system and program
JP5295355B2 (en) Simulation method, system and program
JP5224957B2 (en) Simulation method, system and program
KR101522477B1 (en) Simulation method, system and program
JP5186290B2 (en) Simulation method, system and program
JP5379862B2 (en) Simulation method, system and program
Pop et al. Analysis and synthesis of distributed real-time embedded systems
WO2013099438A1 (en) Computer system for cooperative simulation, embedded-system authentication method 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
Resmerita et al. Verification of embedded control systems by simulation and program execution control
Gaglio Design and realization of an open-loop simulator for ICE control unit, developing the crankshaft and camshaft sensors simulation
CN114816653A (en) Electronic control unit timing simulation

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130121

R150 Certificate of patent or registration of utility model

Ref document number: 5186290

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160125

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees