WO2010104135A1 - シミュレーション方法、システム及びプログラム - Google Patents

シミュレーション方法、システム及びプログラム Download PDF

Info

Publication number
WO2010104135A1
WO2010104135A1 PCT/JP2010/054056 JP2010054056W WO2010104135A1 WO 2010104135 A1 WO2010104135 A1 WO 2010104135A1 JP 2010054056 W JP2010054056 W JP 2010054056W WO 2010104135 A1 WO2010104135 A1 WO 2010104135A1
Authority
WO
WIPO (PCT)
Prior art keywords
simulator
simulation
continuous
discrete
peripheral means
Prior art date
Application number
PCT/JP2010/054056
Other languages
English (en)
French (fr)
Inventor
周一 清水
史朋 大澤
小松 秀昭
Original Assignee
インターナショナル・ビジネス・マシーンズ・コーポレーション
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 インターナショナル・ビジネス・マシーンズ・コーポレーション filed Critical インターナショナル・ビジネス・マシーンズ・コーポレーション
Priority to US13/255,938 priority Critical patent/US8670967B2/en
Priority to CN201080010432.0A priority patent/CN102341787B/zh
Priority to EP10750888.9A priority patent/EP2407886A4/en
Priority to JP2011503850A priority patent/JP5295355B2/ja
Publication of WO2010104135A1 publication Critical patent/WO2010104135A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/15Vehicle, aircraft or watercraft design

Definitions

  • the present invention relates to a simulation of a physical system such as an automobile, and more particularly to a software-based simulation system.
  • 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.
  • a / D conversion for example, an input interface from a sensor
  • microcomputer logical operation unit
  • ABS Anti-lock Breaking System
  • ESC Electronic Stability Control
  • power steering wiper control and security monitoring system
  • mechanical parts 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.
  • Electronic control is performed by arranging a plurality of ECUs.
  • the ECUs are connected to each other via an in-vehicle network, for example, Controller Area Network (CAN).
  • CAN Controller Area Network
  • an engine, a transmission, or the like, which is a control target, is directly connected by a wire from each ECU.
  • the ECU is a small computer that operates in response to an interrupt from a sensor input.
  • 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.
  • the software that supports this is becoming increasingly complex, and there is a demand for the realization of a mechanism for not only verifying the operation of the ECU alone but also verifying a plurality of them simultaneously.
  • 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.
  • HILS Hardware In-the-Loop Simulation
  • a whole vehicle HILS Whole Vehicle Hardware In the Loop Simulation
  • 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 requires a dedicated hardware device, and it must be physically wired between it and the real ECU, so preparation is difficult.
  • the test after replacing with another ECU also takes time since it must be physically reconnected.
  • real time is required for the test. Therefore, testing many scenarios takes a huge amount of time.
  • a hardware device for HILS emulation is generally very expensive.
  • SILS Software In the Loop Simulation
  • the automobile simulation system has a continuous system simulator and a discrete system simulator.
  • An example of a continuous system simulator is a simulator that simulates the mechanical part of an engine.
  • an ECU simulator that operates at the timing of engine rotation pulses and controls the timing of fuel injection and ignition.
  • a simulator that repeatedly calculates the operation of a car from torque distribution to each tire as an example of a continuous system simulator, and a periodic pulse signal every 10 milliseconds as an example of a discrete event system simulator.
  • a simulator that simulates an ECU that operates on the vehicle and determines the torque distribution to each tire from the sensor input such as the yaw rate of the car.
  • the discrete simulator reads and writes data through the I / O port in addition to the pulse signal input, asynchronously with the time slice of the continuous simulator. Typically, data from the sensor is read and updated.
  • FIG. 1 shows a block diagram of a conventional typical discrete / continuous system simulation system.
  • the discrete system simulator of this system includes ECU emulators 102, 104 and 106. In practice, it has a larger number of ECU emulators, but here only three are shown by way of example.
  • the ECU emulator 102 includes a CPU emulator 102a and a peripheral emulator 102b.
  • the CPU emulator 102a is a module that emulates the logic function of the original ECU.
  • the peripheral emulator 102b receives a continuous pulse signal from the plant simulator 108 which is a continuous system simulator such as an engine simulator, converts it into an interrupt event signal, and passes it to the discrete CPU emulator 102a, or the CPU emulator 102a.
  • the interrupt event signal received from is converted into a continuous pulse signal.
  • each thread of the simulation program is enclosed by a dotted rectangular block.
  • individual threads are assigned to individual cores or processors.
  • FIG. 2 shows a timing chart of communication between the ECU emulators 102, 104 and 106 and the plant simulator 108.
  • the ECU emulator as the discrete system and the plant simulator as the continuous system are synchronized with each clock.
  • Japanese Patent Laid-Open No. 2001-290860 aims to provide a hardware / software co-simulator that seeks unnecessary synchronization processing between simulators with a simulator and reduces the synchronization processing, thereby improving the simulation speed.
  • a simulation cooperation unit that synchronizes the CPU simulation unit and the peripheral circuit simulation unit, and a determination unit that determines whether or not to suppress synchronization in the simulation cooperation unit, and the simulation cooperation based on the determination unit It is disclosed to suppress synchronization in the means.
  • Japanese Patent Laid-Open No. 8-227367 aims to obtain a debugger that increases the debugging speed using a high-speed simulator that ignores all system operations except system operations in which a design error is expected,
  • a bus simulator for providing a signal corresponding to a bus cycle for interconnecting each simulator and means for omitting a bus cycle unnecessary for simulation, omitting a CPU bus cycle unrelated to simulation, or Disclosed is to generate only a clock signal schedule without explicitly simulating a periodic clock signal.
  • Japanese Patent Application Laid-Open No. 2004-30228 includes a CPU simulator, one or more peripheral macro simulators, and a synchronous execution control processing unit that controls the synchronous execution of these peripheral macro simulators based on simulations by the CPU simulator.
  • a simulation based on the terminal signal is executed, and the peripheral macro simulator detects the change of the input terminal signal and registers the changed terminal signal in the terminal signal list 22. , It is disclosed that the simulation is executed only for the registered terminal signal.
  • Japanese Patent Application Laid-Open No. 2006-65758 discloses a circuit simulation technique in which a response function is given to a first discrete time model created from circuit data to generate a second discrete time model, and clock edge timing and a clock at this timing are generated. Disclosed is to calculate an effective signal value of a signal inputted to and outputted from a synchronous circuit using a second discrete model, and thereby to execute a simulation.
  • the above-mentioned prior art aims to reduce the communication cost between simulators by a technique such as conditionally synchronizing the simulator or picking up the clock edge timing.
  • the continuous system and the discrete system It does not sufficiently solve the problem of inter-thread communication or inter-processor communication.
  • an object of the present invention is to reduce the communication cost between a continuous system and a discrete system in a simulation system.
  • Another object of the present invention is to provide a simulation system in which a continuous system and a discrete system operate appropriately only by rough synchronization.
  • the inventors of the present invention have repeated research and focused on the peripheral part of a discrete simulator such as an ECU emulator. That is, the ECU emulator includes a CPU emulator part and a peripheral part as shown in FIG. I thought there was a bottleneck in communication costs.
  • the present inventor has come up with the idea that at least a part of the peripheral of the ECU emulator is operated in the same thread as the thread of the continuous system. With such a configuration, a continuous system and a part of the peripheral operate in the same thread, so the communication cost is low there.
  • the continuous system and the discrete system operate appropriately only by taking coarse synchronization. That is, according to the first embodiment of the present invention, the discrete system operates independently regardless of the clock of the continuous system.
  • the discrete system can access the clock module of the continuous system, and accesses the clock module only when the time is required, so that it is hardly a burden in terms of communication cost.
  • the discrete system clock is synchronized with a clock (eg, 1/1000) thinned out of the clocks of the continuous system. • Access to the module is accessible.
  • the second embodiment is employed when a software timer (time calculation) is used in a discrete system.
  • the operation of the software timer is ensured by synchronizing with a period smaller than the minimum granularity of the timer.
  • the peripherals of the discrete system is incorporated in the continuous system side so that the peripheral system operates on the same thread as that of the continuous system.
  • the frequency of intercommunication is greatly reduced.
  • the operating speed of the simulation system can be significantly improved by greatly reducing the cost of inter-thread communication.
  • FIG. 2 is a block diagram of computer hardware used to implement the present invention. It is a figure which shows the functional block diagram of the simulation system which concerns on the Example of this invention. It is a figure which shows the timing chart of the simulation system of FIG. It is a figure which shows the more detailed functional block diagram of the simulation system which concerns on the Example of this invention.
  • 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.
  • a / D conversion for example, an input interface from a sensor
  • a logical operation unit microcomputer
  • an output interface for converting into an operation signal.
  • 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. .
  • the ECU detects the surrounding and environmental conditions, the state of the driving mechanism such as the engine, and the content of the instruction operation by a human by 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.
  • 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.
  • FIG. 3 is a diagram showing an example of a feedback closed loop system, which is a typical control of the ECU. That is, in FIG. 3, a target signal is input to a controller 302 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 304 is fed back to the input of the controller 102 via the sensor 306.
  • 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.
  • feedback as a sensor signal 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. .
  • the object controlled by the ECU may be 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.
  • FIG. 4 is an example of such a response function description. 4 corresponds to the controller 302 in FIG. 3, the portion surrounded by the broken line 404 corresponds to the control target model 304 in FIG. 3, and the sensor 306 corresponds to the block 406. Note that FIG. 4 is an example of expression by a response function, and it should be understood that the present invention is not particularly limited.
  • the host bus 502 is connected with a plurality of CPU0 504a, CPU1 504b, CPU2 504c, and CPU3 504d. Further connected to the host bus 502 is a main memory 506 for arithmetic processing of the CPU 0 504a, CPU 1 504b, CPU 2 504c, and CPU 3 504d.
  • 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 menu for operating a program according to the present invention, which will be described later, using a GUI as necessary.
  • CPU0 504a, CPU1 504b, CPU2 504c, 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.
  • the number of CPUs shown here is four, but the number of CPUs is not limited to this, and may be a single processor system, or an arbitrary number of multicore or multiprocessor systems. Good.
  • the hardware of the computer system that can be used for carrying out the present invention is not limited to IBM (R) System X, and any hardware can be used as long as it can run the simulation program of the present invention.
  • a computer 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.
  • a computer system such as IBM (R) System P, which is based on POWER (trademark) 6 and operating system is AIX (trademark). May be used.
  • the hard disk drive 516 further stores a plurality of logical processes such as an ECU emulator and a plant simulator, and a program for operating the plurality of logical processes in cooperation with each other, and can be activated by a keyboard 510 and a mouse 512. It is.
  • emulator programs for all ECUs used in one vehicle are stored in the hard disk drive 516.
  • the hard disk drive 516 further includes a scheduler for an ECU emulator program to be described later, a plant simulator program such as an engine, transmission, steering, and wiper, and a global time for managing the time of the entire system.
  • a manager and a scenario generator program that stores various test scenarios such as climbing slopes, highways, and zigzag roads are also stored.
  • 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.
  • the discrete system simulator of this system includes ECU emulators 602, 604, and 606. In practice, it has a larger number of ECU emulators, but here only three are shown by way of example.
  • the program module of the system shown in FIG. 6 is stored in the hard disk drive 516 and is loaded from the hard disk drive 516 to the main memory 506 and operates by the operation of the operating system when the simulation system is started.
  • the ECU emulator 602 includes a CPU emulator 602a and a hybrid peripheral 602b.
  • the bridges 608, 610, and 612 are logic blocks that execute the function of the data input / output portion in a plant simulator such as an engine simulator.
  • the hybrid peripherals 602b, 604b, and 606b, Communication is performed at every clock interval ⁇ t of the simulator.
  • the dotted rectangular blocks indicate individual threads of the simulation program.
  • individual threads are assigned to individual cores or processors.
  • the hybrid peripherals 602b, 604b and 606b are functionally connected to the CPU emulators 602a, 604a and 606a, and bridges 608, 610 and 612, respectively, for the ECU emulators 602, 604 and 606.
  • it plays a role of interfacing with each other, in a modular manner, it operates across the thread in which the plant simulator in which the bridges 608, 610 and 612 exist and the thread in which the ECU emulators 602, 604 and 606 operate. Be controlled.
  • the name “hybrid” of the hybrid peripheral is derived from such a mixed existence. That is, a part of the hybrid peripheral is in the same thread as the ECU emulators 602, 604, and 606, and another part of the hybrid peripheral is in the same thread as the plant simulator.
  • the hybrid peripherals 602b, 604b and 606b have shared memories 602c, 604c and 606c for reading and writing data, respectively. These memories 602c, 604c and 606c are preferably part of the main memory 506. Data can be read from and written to the memory by the component block of the hybrid peripheral and the ECU emulator.
  • FIG. 7 is a diagram showing an outline of a timing chart of the simulation system shown in the functional block diagram of FIG.
  • a continuous simulator such as a plant simulator and a hybrid peripheral
  • the communication is dense.
  • part of the plant simulator and the hybrid peripheral are in the same thread, so inter-thread communication is not caused between them, and excessive communication costs are not caused.
  • communication between the hybrid peripheral and the ECU emulator which is a discrete system simulator, occurs only at the timing when an interrupt occurs in the discrete system simulator or at a scheduled sparse timing.
  • Communication from the hybrid peripheral to the ECU emulator is performed by sending an event signal.
  • FIG. 8 shows a more detailed functional block diagram of the functional block diagram.
  • the ECU emulator 602 and the bridge 608 are shown here, but it should be understood that the ECU emulators 604 and 606 and the bridges 610 and 612 are the same.
  • a ROM 802 and a RAM 804 are connected to the CPU emulator 602a. Since the simulation system described here is basically SILS, all functional blocks are realized by software modules. Thus, the ROM 802 is simply a collection of constant declarations, and the RAM 804 is a memory partition assigned to the main memory 506.
  • the operation of the CPU emulator 602a may be executed by executing a binary obtained by reassembling the code obtained by disassembling the binary of the original emulator program, or executing the binary instruction of the emulator program while sequentially converting the binary instructions of the emulator program. But you can.
  • the hybrid peripheral 602b includes an interrupt controller (INT-C) 806, an advanced timer unit (ATU) 808, a pin function controller (PFC) 810, and a watch dog timer. (WDT) 812.
  • INT-C interrupt controller
  • ATU advanced timer unit
  • PFC pin function controller
  • WDT watch dog timer.
  • the configuration including the INT-C 806, the ATU 808, the PFC 810, and the WDT 812 is an example of the configuration of the hybrid peripheral 602b and is not limited thereto.
  • the bridge 608 converts the input signal to the bridge 608 into a value provided to a pin of the PFC 810 by a variable mapping function.
  • NE_PULSE is a pulse representing the rotation of the engine, and is generated 24 times per one rotation of the crankshaft in an example of an actual vehicle.
  • A_F is air fuel consumption, which is the ratio of the amount of air entering the cylinder to the fuel. It should be understood that these are given by way of example only and that there are actually many other signals.
  • the PFC 810 has a function of multiplexing data given as a variable corresponding to a pin from the bridge 608 by a variable mapping function and providing the multiplexed data to the INT-C 806 or the ATU 808.
  • the INT-C 806 sends an event to the CPU emulator 602a in response to a change in the value or state given to the PFC 810 for each clock.
  • the event includes a parameter value provided from the PFC 810.
  • the ATU 808 is updated with the signal from the bridge.
  • the CPU emulator 602a sets the start timing and duration in the ATU 808 based on the calculation result.
  • the ATU 808 generates a pulse based on the received start timing and duration, and sends it to the continuous system according to the time slice. Examples of such calculation include the start timing and duration of fuel injection.
  • the WDT 812 is a timer that constantly counts up and clears the count value in response to a signal from the CPU emulator 602a, and the count value exceeds a threshold value when no signal is received from the CPU emulator 602a for a certain period of time. Thus, a signal indicating that the operation of the CPU emulator 602a is not normal is output.
  • FIG. 9 is a process flowchart showing the operations of the hybrid peripheral 602b and the CPU emulator 602a. It should be understood that the operations of the hybrid peripheral 604b and the CPU emulator 604a are substantially the same. Here, the hybrid peripheral 602b and the CPU emulator 602a will be described representatively.
  • This process is called for each time slice ⁇ t.
  • This process can be said to be an asynchronous process in the sense that the discrete system simulator is not synchronized with the pulse of the continuous system simulator.
  • step 902 and step 908 processing specific to the configuration block is performed in the order of the configuration blocks of the ordered peripherals.
  • the constituent blocks here are INT-C 806, ATU 808, PFC 810, and WDT 812, and this predetermined order is determined according to an order list 1002 as shown in FIG.
  • This list is preferably placed at a predetermined location in the main memory 506.
  • This list indicates the order of PFC ⁇ ATU ⁇ WDT ⁇ INT-C.
  • FIG. 10 also shows that processing should be performed in the order of this list from continuous input to output.
  • step 902 the process of reading data as the output of the CPU emulator 602a from the shared memory 602c of the hybrid peripheral 602b in step 904, and the input of the CPU emulator 602a to the shared memory 602c of the hybrid peripheral 602b in step 906 As a result, the data is overwritten and written.
  • the CPU emulator 602a executes up to access to the I / O in step 910, and in step 912 performs I / O access to the shared memory 602c of the hybrid peripheral 602b. At this time, during the access to the shared memory 602c, exclusive control is performed so that other processing blocks do not rewrite the value of the shared memory 602c.
  • FIG. 11 is a diagram showing a flowchart of the processing of the INT-C 806 of the hybrid peripheral 602b. This is a process unique to the INT-C 806 in the processing step 910 unique to the peripheral component block in FIG.
  • INT-C takes input data from the PFC 810.
  • INT-C determines whether to convert the input data into an interrupt. This determination is made, for example, by holding a previous value of a certain value and determining whether the value has changed from the previous time. Typically, it is the detection of the falling edge of a pulse.
  • the INT-C sends an interrupt event message to the CPU emulator in step 1106, and the process ends.
  • FIG. 12 is a diagram showing an ATU808 flowchart of the hybrid peripheral 602b. This is processing unique to the ATU 808 in the processing step 910 specific to the peripheral component block in FIG. In FIG. 12, in step 1202, the ATU fetches input data from the PFC.
  • step 1204 the ATU determines whether the timer is hit, that is, whether the timer value has reached a predetermined value. If so, at step 1206, the ATU changes the status of the output. Otherwise, go directly to step 1208.
  • step 1208 the ATU writes the output data to the PFC, and the process ends.
  • the start time and period can be set in the ATU 808 from the CPU emulator 602a, and the timer hit in step 1204 means that the start time is within the period.
  • the function of the ATU 808 is, for example, to output a logic 1 through the PFC during the period from the start time, and to output a logic 0 otherwise.
  • FIG. 13 is a diagram showing a flowchart of processing of another embodiment relating to processing operation between the peripheral and the ECU emulator. Unlike the processing of FIG. 9, in this embodiment, synchronization processing is performed for each designated cycle. The process of the flowchart of FIG. 13 is also called for each time slice ⁇ t.
  • This embodiment is employed when a software timer (time calculation) is used in a discrete system. Here, the operation of the software timer is ensured by synchronizing with a period smaller than the minimum granularity of the timer.
  • steps 1302 and 1308 the processing specific to the configuration block is performed in the order of the configuration blocks of the ordered peripherals.
  • the constituent blocks here are INT-C 806, ATU 808, PFC 810, and WDT 812 in the example of FIG. 8, and this predetermined order is determined according to an order list 1002 as shown in FIG.
  • This list is preferably placed at a predetermined location in the main memory 506.
  • This list indicates the order of PFC ⁇ ATU ⁇ WDT ⁇ INT-C.
  • FIG. 10 also shows that processing should be performed in the order of this list from continuous input to output.
  • step 1302 the process of reading data as the output of the CPU emulator 602a from the shared memory 602c of the hybrid peripheral 602b in step 1304 and the input of the CPU emulator 602a to the shared memory 602c of the hybrid peripheral 602b in step 1306 As a result, the data is overwritten and written.
  • t represents the current time in the continuous simulator
  • ⁇ t represents the time slice size
  • T represents the synchronization time of the CPU emulator.
  • the CPU emulator 602a executes up to access to the I / O in step 1316, and in step 1318 performs I / O access to the shared memory 602c of the hybrid peripheral 602b. At this time, during the access to the shared memory 602c, exclusive control is performed so that other processing blocks do not rewrite the value of the shared memory 602c.
  • step 1320 it is determined whether or not the designated cycle is finished. If not, the process returns to step 1316.
  • step 1322 the CPU emulator 602a notifies the hybrid peripheral 602b that it has been completed. This notification is a notification from the CPU emulator 602a in step 1312.
  • step 1324 the CPU emulator 602a waits for designation of the next cycle. Waiting here is a notification from step 1314. Processing then returns to step 1316.
  • the peripheral part of the ECU emulator and the continuous system are in the same thread.
  • the unit is not limited to a thread and can be assigned to a single processor or core. It may be a broader unit of process.

Abstract

 シミュレーション・システムにおいて、連続系システムと離散系システムの間の通信コストを低減することによって、シミュレーション・システムの動作速度を向上させること。 本発明によれば、離散系システムである、ECUエミュレータのペリフェラルの少なくとも一部を分離して、連続系システムのスレッドで動作するようになされる。また、連続系システムとペリフェラルとは、緩い同期をとるため、疎に通信される。このような構成をとると、連続系システムと離散系システムからなるシミュレーション・システムで、連続的クロックに応答しての連続系システムと離散系システムの間のスレッド間通信の頻度が著しく減り、通信コストが下がる。これによって、シミュレーション・システムの動作速度を向上させることが可能となる。

Description

シミュレーション方法、システム及びプログラム
 本発明は、自動車などの物理システムのシミュレーションに関し、より詳しくは、ソフトウェア・ベースでのシミュレーション・システムに関するものである。
 自動車は、その初期の時代の20世紀初頭は、動力としてのエンジンと、ブレーキ、アクセル、ハンドル、トランスミッション、サスペンジョンを含む、機構部品からなっていたが、エンジンのプラグの点火、ヘッドライト以外は、電気的な仕組みはほとんど利用していなかった。
 ところが、1970年代頃から、大気汚染、石油危機などに備えて、エンジンを効率的に制御する必要性が生じ、このためエンジンの制御に、ECUが使用されるようになってきた。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成される。
 いまや、エンジンやトランスミッションなどの制御システム、Anti-lock Breaking System (ABS)、Electronic Stability Control (ESC)、パワーステアリングだけでなく、ワイパー制御やセキュリティ・モニタリング・システムなどに至るまで、最近の自動車では、機構部品だけでなく、エレクトロニクス部品やソフトウエアが重要な比率を占める。後者に関する開発費は全体の25%とも40%とも言われ、ハイブリッド型の自動車では70%を占める。
 電子制御は、ECUを複数、配置して行われる。ECU間は車載ネットワーク、例えば、Controller Area Network (CAN) で相互に接続される。また、制御の対象である、エンジンやトランスミッションなどには、それぞれのECUから直接ワイヤ接続する。
 ECUは、小さなコンピュータであり、センサ入力などからの割り込みに応じて動作する。一方、エンジンなどは連続的に機械的動作を行っている。すなわち、コンピュータ系のディジタル・システムと、機械系の物理システムが、自動車という単一システムにおいて、並列に協調動作を行っている。当然、これを支えるソフトウエアは複雑さがますます増大しており、ECU単体で動作を検証するだけでなく、複数を同時に検証する仕組みの実現が要望されている。
 一方、ECUの出力信号によって駆動されるアクチュエータには、電磁ソレノイド及びモータ等がある。ソレノイドは例えば、エンジンのインジェクタ、トランスミッションのシフト・コントロール、ブレーキのバルブ制御、ドアロックなどに使用される。
 このようなテストにために従来行われている技法として、HILS(Hardware In the Loop Simulation)がある。特に、自動車全体のECUをテストする環境は、ホールビークルHILS(Whole Vehicle Hardware In the Loop Simulation)と呼ばれる。ホールビークルHILSにおいては、実験室内で、本物のECUが、エンジン、トランスミッション機構などをエミュレーションする専用のハードウェア装置に接続され、所定のシナリオに従って、テストが行われる。ECUからの出力は、監視用のコンピュータに入力され、さらにはディスプレイに表示されて、テスト担当者がディスプレイを眺めながら、異常動作がないかどうか、チェックする。
 しかし、HILSは、専用のハードウェア装置を使い、それと本物のECUの間を物理的に配線しなくてはならないので、準備が大変である。また、別のECUに取り替えてのテストも、物理的に接続し直さなくてはならないので、手間がかかる。さらに、本物のECUを用いたテストであるため、テストに実時間を要する。従って、多くのシナリオをテストすると、膨大な時間がかかる。また、HILSのエミュレーション用のハードウェア装置は、一般に、非常に高価である。
 そこで近年、高価なエミュレーション用ハードウェア装置を使うことなく、ソフトウェアで構成する手法が存在する。この手法は、SILS(Software In the Loop Simulation)と呼ばれ、ECUに搭載されるマイクロコンピュータ、入出力回路、制御のシナリオなどを全て、ソフトウェア・シミュレータで構成する技法である。これによれば、ECUのハードウェアが存在しなくても、テストを実行可能である。
 ところで、自動車用シミュレーション・システムは、連続系シミュレータと、離散系シミュレータを有する。連続系シミュレータの例として、エンジンの機械系部分をシミュレートするシミュレータがある。離散イベント系シミュレータの例として、エンジン回転のパルスのタイミングで動作し、燃料噴射や点火のタイミングを制御するECUのシミュレータがある。
 4WDのシミュレーションをする場合においては、連続系シミュレータの例として、各タイヤへのトルク配分から車の動作を繰り返し計算するシミュレータがあり、離散イベント系シミュレータの例として、10ミリ秒ごとの定期パルス信号で動作し、車のヨーレートなどのセンサ入力から各タイヤへのトルク配分を決定するECUをシミュレートするシミュレータがある。
 さらに、離散系シミュレータは、連続系シミュレータのタイムスライスとは非同期に、パルス信号入力以外に、I/Oポートを通じてデータの読み書きを行う。典型的には、センサからのデータを読み込み、更新する。
 図1に、従来の典型的な、離散系/連続系シミュレーション・システムな構成のブロック図を示す。このシステムの離散系シミュレータは、ECUエミュレータ102、104及び106からなる。実際は、より多数のECUエミュレータを有するが、ここでは例示的に3個だけ示す。
 ECUエミュレータ102、104及び106は、機能的には、ほぼ同一なので、代表的に、ECUエミュレータ102だけについて説明すると、ECUエミュレータ102は、CPUエミュレータ102aと、ペリフェラル・エミュレータ102bとからなる。CPUエミュレータ102aは、元のECUの論理機能をエミュレーションするモジュールである。
 ペリフェラル・エミュレータ102bは、エンジン・シミュレータなどの連続系シミュレータであるプラント・シミュレータ108からの連続パルス信号を受け取り、割込みイベント信号に変換して、離散系のCPUエミュレータ102aに渡し、あるいは、CPUエミュレータ102aから受け取った割込みイベント信号を、連続パルス信号に変換する。
 尚、図1で点線矩形ブロックで囲ったのが、シミュレーション・プログラムの個別のスレッドである。マルチ・コアまたはマルチ・プロセッサ環境において、好適には、個々のスレッドは、個別のコアまたはプロセッサに割り当てられる。
 図2に、ECUエミュレータ102、104及び106と、プラント・シミュレータ108の間の通信のタイミング・チャートを示す。この図から見て取れるように、図1の構成では、離散系システムとしてのECUエミュレータと、連続系システムとしてのプラント・シミュレータが、個々のクロック毎に同期している。
 ところが、図1の点線ブロックで見て取れるように、プラント・シミュレータ108と、ECUエミュレータ102、104及び106とは別スレッドで実行されているので、個々のクロック毎に、スレッド間通信が生じてしまう。並列実行のために各スレッドが個別のコアまたはプロセッサにアサインされている場合には、プロセッサ間通信となって、いずれにしても、このようなスレッド間通信またはプロセッサ間通信が個々のクロック毎に発生することは非常に大きいコストであって、このことは、シミュレーション・システムの動作速度の向上を妨げる。
 特開2001-290860号公報は、シミュレータ間の不要な同期処理をシミュレータで求め、その同期処理を削減することにより、シミュレーション速度の向上を図ったハードウエア/ソフトウエア協調シミュレータを提供することを目的とするものであって、CPUシミュレーション手段と周辺回路シミュレーション手段を同期させるシミュレーション協調手段と、シミュレーション協調手段での同期を抑制するかどうかを決定する判断手段を備え、判断手段に基づいて前記シミュレーション協調手段での同期を抑制することを開示する。
 特開平8-227367号公報は、設計エラーが予期されるシステム動作を除く全てのシステム動作を無視する高速シミュレータを使用してデバッグ速度を増加させるデバッガを得ることを目的とするものであって、各シミュレータを相互接続するための、バスサイクルに対応する信号を提供するバスのバスシミュレータとシミュレーションに不必要なバスサイクルを省略する手段を備え、シミュレーションに無関係なCPUバスサイクルを省略し、または、周期的クロック信号を明示的にシミュレートしないでクロック信号のスケジュールのみを発生するようにすることを開示する。
 特開2004-30228号公報は、CPUシミュレータと、1以上の周辺マクロシミュレータと、これらの同期実行を制御する同期実行制御処理部とを備え、周辺マクロシミュレータが、CPUシミュレータでのシミュレーションに基づいて端子に入力される信号が変化したときに当該端子信号に基づくシミュレーションを実行すし、さらに周辺マクロシミュレータは、入力された端子信号の変化を検出し、変化した端子信号を端子信号リスト22に登録し、登録された端子信号についてのみシミュレーションを実行するようにすることを開示する。
 特開2006-65758号公報は、回路シミュレーション手法において、回路データから作成された第1離散時間モデルに応答関数を与えて第2離散時間モデルを生成し、クロックのエッジタイミングおよびこのタイミングでのクロック同期回路に入出力される信号の実効的信号値を、第2離散モデルを用いて計算し、これによってシミュレーションを実行することを開示する。
特開2001-290860号公報 特開平8-227367号公報 特開2004-30228号公報 特開2006-65758号公報
 上記従来技術は、条件的にシミュレータを同期させたり、クロックのエッジタイミングを拾うなどの技法で、シミュレータ間の通信コストを図るものであるが、シミュレーション・システムにおける、連続系システムと離散系システムとの間のスレッド間通信あるいはプロセッサ間通信のコストの問題を十分に解決するものではない。
 従って、この発明の目的は、シミュレーション・システムにおいて、連続系システムと離散系システムの間の通信コストを低減することにある。
 この発明の他の目的は、連続系システムと離散系システムが、粗い同期をとるだけで適切に動作するシミュレーション・システムを提供することにある。
 上記課題を解決するために研究を重ね、本願発明者は、ECUエミュレータなどの離散系シミュレータのペリフェラル部分に着目した。すなわち、ECUエミュレータは、図1にも示すように、CPUエミュレータ部分と、ペリフェラル部分からなっている。ここに、通信コストのボトルネックがあるらしいと考えた。
 そして本願発明者は、研究の末、ECUエミュレータのペリフェラルの少なくとも一部分を敢えて、連続系システムのスレッドと同一のスレッド内で動作させる、という着想に想到した。このような構成をとると、連続系システムとペリフェラルの一部が同一スレッド内で動作するので、そこで通信コストは低い。
 それでも、ペリフェラルとECUエミュレータの間のスレッド間通信は、依然として必要であるが、そのような通信は、割込みイベント、あるいは長い期間毎の周期的なアクセスのようなまばらなタイミングで生じるだけなので、通信コスト的にあまり負荷にならない。
 本発明の別の特徴によれば、連続系システムと離散系システムは、粗い同期をとるだけで適切に動作する。すなわち、本発明の第1の実施例によれば、離散系システムは、連続系システムのクロックに関係なく、独立に動作する。離散系システムは、連続系システムのクロック・モジュールにアクセス可能であり、その時刻が必要であるときのみ、クロック・モジュールにアクセスするので、通信コスト的には、ほとんど負荷にならない。
 本発明の第2の実施例によれば、離散系システムは、連続系システムのクロックのうちの間引かれたあるクロック(例えば、1/1000)で、同期をとるため、連続系システムのクロック・モジュールにアクセスにアクセス可能である。第2の実施例は、離散系システムにおいて、ソフトウエアによるタイマー(時間計算)が使用される場合に採用される。ここで、タイマーの最小粒度より小さな周期で同期を取ることにより、ソフトウエア・タイマーの動作が保証される。
 この発明によれば、離散系システムのペリフェラルの少なくとも一部が、連続系システムと同一のスレッドで動作するように、連続系システム側に組み込むことによって、離散系システムと連続系システムの間のスレッド間通信の頻度が大幅に低減される。これにより、スレッド間通信のコストを大幅に削減することによって、シミュレーション・システムの動作速度を著しく向上させることが可能となる。
離散系と連続系を有する、従来の典型的なシミュレーション・システムの機能ブロック図を示す図である。 図1のシミュレーション・システムの、タイミング・チャートを示す図である。 ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。 フィードバック閉ループ系の、応答関数による記述の例である。 本発明を実施するために使用されるコンピュータのハードウェアのブロック図である。 本発明の実施例に係るシミュレーション・システムの機能ブロック図を示す図である。 図6のシミュレーション・システムの、タイミング・チャートを示す図である。 本発明の実施例に係るシミュレーション・システムの、より詳細な機能ブロック図を示す図である。 連続系とハイブリッド・ペリフェラルの動作の処理のフローチャートを示す図である。 ハイブリッド・ペリフェラルの構成要素の順序リストを示す図である。 割込みコントローラの動作の処理のフローチャートを示す図である。 アドバンスド・タイマ・ユニットの動作の処理のフローチャートを示す図である。 別の実施例における、連続系とハイブリッド・ペリフェラルの動作の処理のフローチャートを示す図である。
602、604、606・・・ECUエミュレータ
602b、604b、606b・・・ハイブリッド・ペリフェラル
 以下、図面を参照して、本発明の一実施例の構成及び処理を説明する。以下の記述では、特に断わらない限り、図面に亘って、同一の要素は同一の符号で参照されるものとする。なお、ここで説明する構成と処理は、一実施例として説明するものであり、本発明の技術的範囲をこの実施例に限定して解釈する意図はないことを理解されたい。
 本発明を実現するための構成を説明する前に、その前提として、ECUについて説明する。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成されるものである。
 この発明は、説明の便宜上、以下では、自動車のECUに関連して説明するが、それには限定されず、航空機、ロボットなどその他のECUをもつメカトロニクス機構全般に適用可能であることを理解されたい。
 ECUは、周辺や環境状態、エンジンなどの駆動機構の状態、及び人間による指示操作の内容をセンサで検出して、信号として入力する。具体的には、水温センサ、吸気温センサ、過給圧センサ、ポンプ角センサ、クランク角センサ、車速センサ、アクセル位置センサ、A/Tシフト・ポジション、スタータ・スイッチ、エアコンECUなどからの信号がある。
 ECUは、これらの信号を入力して、電磁スピル弁、フュエル・カット・ソレノイド、タイミング・コントロール・バルブ、吸気絞りVSV、グロー・プラグ・リレー、タコメータ及びエアコン・リレーなどを駆動する信号を出力しする。
 1つのECUが複数の異なる機構を制御するための駆動信号を出力するようにすることは不可能ではないが、例えば、エンジンとエアコンのように、応答性やその制御の厳密性が異なるものを単一のECUで制御することは合理的でなく、従って、一般的に自動車にECUは複数個設けられる。
 図3は、ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。すなわち、図3において、ある目標の信号が、ECUであるコントローラ302に入力され、ECUは、目標の信号を内部処理することによって、駆動信号を出力し、制御対象モデルである、エンジンなどのプラント304を駆動し、プラント304の出力は、センサ306を介して、コントローラ102の入力にフィードバックされる。
 ここで目標信号として与えられるのは、例えば、スロットル開度、アイドル・コントロール、ブレーキ力、シフト、スタータON・OFF、バッテリ電圧、インジェクション通電時間、インジェクション通電回数、デポジット、ドウェル角、進角値、吸気完了フラグ、点火完了フラグ、大気圧、車両重量、転がり抵抗係数、道路勾配、粘着係数、吸気温、などのパラメータである。
 また、センサ信号としてフィードバックされるのは、スロットル開度、吸気圧力、吸入空気量、シフト、エンジン回転数、車速、排気温、O、冷却水温、空燃比、ノック、点火異常、などである。
 ECUが制御する対象は、ニュートンの力学方程式で解かれる、機構系システムであったり、電気回路の応答方程式で解かれる、電気駆動回路であったり、それらの組み合わせであったりする。これらは、基本的に微分方程式であり、制御工学によれば、ラプラス変換によって応答関数に変換されて、記述することができる。
 図4は、そのような応答関数による記述の例である。図4で破線402で囲った箇所が、図3のコントローラ302に対応し、破線404で囲った箇所が、図3の制御対象モデル304に対応し、センサ306が、ブロック406に対応する。なお、図4は、応答関数による表現の一例であって、特に本発明を限定する意図はないことを理解されたい。
 次に、図5を参照して、本発明を実施するために使用されるコンピュータのハードウェアについて説明する。図5において、ホスト・バス502には、複数のCPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dが接続されている。ホスト・バス502にはさらに、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dの演算処理のためのメイン・メモリ506が接続されている。
 一方、I/Oバス508には、キーボード510、マウス512、ディスプレイ514及びハードティスク・ドライブ516が接続されている。I/Oバス508は、I/Oブリッジ518を介して、ホスト・バス502に接続されている。キーボード510及びマウス512は、オペレータが、コマンドを打ち込んだり、メニューをクリックするなどして、操作するために使用される。ディスプレイ514は、必要に応じて、後述する本発明に係るプログラムをGUIで操作するためのメニューを表示するために使用される。
 この目的のために使用される好適なコンピュータ・システムのハードウェアとして、IBM(R)System Xがある。その際、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dは、例えば、インテル(R)Core 2 DUOであり、オペレーティング・システムは、Windows(商標)Server 2003である。オペレーティング・システムは、ハードティスク・ドライブ516に格納され、コンピュータ・システムの起動時に、ハードティスク・ドライブ516からメイン・メモリ506に読み込まれる。
 ここで図示されているCPUの個数は4個であるが、これに限定されず、シングル・プロセッサのシステムであってもよく、あるいは、任意の個数のマルチコア、またはマルチプロセッサのシステムであってもよい。
 なお、本発明を実施するために使用可能なコンピュータ・システムのハードウェアは、IBM(R)System Xに限定されず、本発明のシミュレーション・プログラムを走らせることができるものであれば、任意のコンピュータ・システムを使用することができる。オペレーティング・システムも、Windows(R)に限定されず、Linux(R)、Mac OS(R)など、任意のオペレーティング・システムを使用することができる。さらに、ECUエミュレータ・プログラム、プラント・シミュレータなどの論理プロセスを高速で動作させるために、POWER(商標)6ベースで、オペレーティング・システムがAIX(商標)のIBM(R)System Pなどのコンピュータ・システムを使用してもよい。
 ハードディスク・ドライブ516にはさらに、ECUエミュレータ、プラント・シミュレータなどの複数の論理プロセス、及び、複数の論理プロセスを協働して動作させるためのプログラムが格納され、キーボード510及びマウス512によって起動操作可能である。
 好適には、フルビークルSILSを実現するために、1台の自動車で使われるすべてのECUのエミュレータ・プログラムが、ハードティスク・ドライブ516に保存されている。
 ハードティスク・ドライブ516にはさらに、後述するECUエミュレータ・プログラムのためのスケジューラ、エンジン、トランスミッション、ステアリング、ワイパなどのプラント・シミュレータ・プログラム、全体のシステムの時刻を管理するためのグローバル・タイム・マネジャ及び、登り坂道、高速道路、つづら折道などの様々な、テストのためのシナリオを格納したシナリオ・ジェネレータのプログラムも格納されている。
 なお、ここでの「エミュレータ」と、「シミュレータ」の用語の使い分けであるが、もともとの、別のプロセッサで動くことを想定して書かれていたECUのコードを、CPU0~CPU3などをターゲットとして動くようにすることを、エミュレーションと呼び、それを行うプログラムを、エミュレータと呼ぶ。一方、エンジンなどの物理的システムの動作を仮想計算するシステムを、シミュレータと呼ぶ。
 次に、図6を参照して、離散系システムと連続系システムからなる、本発明のシミュレーション・システムの機能論理ブロック図を説明する。このシステムの離散系シミュレータは、ECUエミュレータ602、604及び606からなる。実際は、より多数のECUエミュレータを有するが、ここでは例示的に3個だけ示す。
 図6に示すシステムのプログラム・モジュールは、ハードディスク・ドライブ516に保存され、シミュレーション・システムの起動時に、オペレーティング・システムの働きにより、ハードディスク・ドライブ516からメイン・メモリ506にロードされて動作する。
 ECUエミュレータ602、604及び606は、機能的には、ほぼ同一なので、代表的に、ECUエミュレータ602だけについて説明すると、ECUエミュレータ602は、CPUエミュレータ602aと、ハイブリッド・ペリフェラル602bとからなる。
 ブリッジ608、610及び612は、エンジン・シミュレータなどのプラント・シミュレータにおける、データの入出力部分の機能を実行する論理ブロックであり、それぞれ、ハイブリッド・ペリフェラル602b、604b及び606bと、連続系のプラント・シミュレータのクロックの間隔Δt毎に通信する。
 図6において、点線の矩形ブロックは、シミュレーション・プログラムの個別のスレッドを示す。マルチ・コアまたはマルチ・プロセッサ環境において、好適には、個々のスレッドは、個別のコアまたはプロセッサに割り当てられる。
 図6に示されるように、ハイブリッド・ペリフェラル602b、604b及び606bはそれぞれ、機能的にはECUエミュレータ602、604及び606のために、CPUエミュレータ602a、604a及び606aと、ブリッジ608、610及び612と間をインターフェースする役割を果たすが、モジュール的には、ブリッジ608、610及び612が存在するプラント・シミュレータが動作するスレッドと、ECUエミュレータ602、604及び606が動作するスレッドに跨って動作するように制御される。ハイブリッド・ペリフェラルの「ハイブリッド」という名前は、このような混在的な存在であることに由来する。すなわち、ハイブリッド・ペリフェラルのある部分はECUエミュレータ602、604及び606と同一のスレッドにあり、ハイブリッド・ペリフェラルの別の部分はプラント・シミュレータと同一のスレッドにある。
 更に図示するように、ハイブリッド・ペリフェラル602b、604b及び606bはそれぞれ、データを読み書きするための共有メモリ602c、604c及び606cを有する。これらのメモリ602c、604c及び606cは、好適には、メイン・メモリ506の一部である。メモリは、ハイブリッド・ペリフェラルの構成ブロック、及びECUエミュレータによって、データを読み書き可能である。
 図7は、図6の機能ブロック図で示すシミュレーション・システムのタイミング・チャートの概要を示す図である。図示されているように、プラント・シミュレータなどの連続系シミュレータと、ハイブリッド・ペリフェラルの間は、クロックの間隔Δt毎に通信が行なわれるので、密な通信となる。しかし、本発明によれば、プラント・シミュレータとハイブリッド・ペリフェラルの一部は、同一スレッド内にあるので、その間でスレッド間通信を引き起こさず、過大な通信コストをもたらさない。
 一方、ハイブリッド・ペリフェラルと、離散系シミュレータであるECUエミュレータの間の通信は、離散系シミュレータに割込みが発生するタイミング、あるいはスケジュールされた疎なタイミングでのみ生じる。なお、ハイブリッド・ペリフェラルからECUエミュレータに対する通信は、イベント信号を送ることによって、行なわれる。
 図8は、機能ブロック図の、より詳細な機能ブロック図を示すものである。ここでは特に、ECUエミュレータ602及びブリッジ608について示すが、ECUエミュレータ604、606及びブリッジ610、612についても同様であることを理解されたい。
 図8において、CPUエミュレータ602aには、ROM802と、RAM804が接続されている。なお、ここで説明するシミュレーション・システムは、基本的にSILSであるため、すべての機能ブロックがソフトウェア・モジュールで実現されている。よって、ROM802は単に、定数の宣言の集まりであり、RAM804は、メイン・メモリ506に割り当てられたメモリ区画である。
 CPUエミュレータ602aの動作は、元のエミュレータ・プログラムのバイナリを逆アセンブルしたコードを再アセンブルしたバイナリを実行するものでもよいし、エミュレータ・プログラムのバイナリ命令を、順次ステップ的に変換しながら実行するのでもよい。
 図8に示すように、ハイブリッド・ペリフェラル602bは、割込みコントローラ(INT-C)806と、アドバンスト・タイマー・ユニット(ATU)808と、ピン・ファンクション・コントローラ(PFC)810と、ウォッチ・ドッグ・タイマ(WDT)812からなる。
 なお、INT-C806と、ATU808と、PFC810と、WDT812からなる構成は、ハイブリッド・ペリフェラル602bの構成の一例であって、これには限定されないことを理解されたい。
 ブリッジ608は、変数マッピングの機能によって、ブリッジ608への入力信号を、PFC810のピンに提供される値に変換する。それは、C言語的な擬似コードであらわすと、例えば下記のとおりである。
switch (link_type) {
 case NE_PULSE:
   data.pi0 = link_value;
   break;
 case A_F:
   data.pe23 = link_value;
   break;
...
}
 すなわち、link_typeに与えられる値によって、dataという構造体の異なる要素に、値が提供される。ここでNE_PULSEとは、エンジンの回転を表すパルスで、実車の一例では、クランクシャフトの1回転あたり24回発生する。A_Fとは空燃費であり、シリンダに入る空気量と燃料の比である。これらは、一例としてのみ示すもので、実際は他にも多数の信号があることを理解されたい。
 PFC810は、変数マッピングの機能によってブリッジ608からピンに対応する変数として与えられたデータをマルチプレクスして、INT-C806あるいは、ATU808に提供する機能を有する。
 INT-C806は、PFC810に与えられる値または状態のクロック毎の変化に応答して、CPUエミュレータ602aに、イベントを送る。そのイベントには、PFC810から提供されるパラメータ値が含まれる。
 ATU808は、ブリッジからの信号により、その時刻を更新される。一方、CPUエミュレータ602aは、その計算結果に基づき、開始タイミングと継続時間を、ATU808にセットする。そして、ATU808は、受け取った開始タイミングと継続時間に基づき、パルスを生成して、タイムスライスに合わせて、連続系システムに送り出す。このように計算される例として、燃料噴射の開始タイミングと継続時間がある。
 WDT812は、常時カウント・アップし、CPUエミュレータ602aからの信号に応答して、カウント値をクリアされるタイマであり、一定期間以上CPUエミュレータ602aから信号が来ないことによってカウント値が閾値を超えたことで、CPUエミュレータ602aの動作が正常でないことを示す信号を出力する。
 図9は、ハイブリッド・ペリフェラル602bと、CPUエミュレータ602aの動作を示す処理のフローチャートである。なお、ハイブリッド・ペリフェラル604bと、CPUエミュレータ604aの動作等も実質的に同じであると理解されたい。ここでは代表的に、ハイブリッド・ペリフェラル602bと、CPUエミュレータ602aについて説明する。
 この処理は、タイムスライスΔt毎に呼び出される。この処理は、連続系シミュレータのパルスに、離散系シミュレータが同期する訳ではない、という意味で、非同期プロセスであると言える。
 図9において、ステップ902及びステップ908では、順序付けられたペリフェラルの構成ブロックの順に、構成ブロックの固有の処理が行なわれる。ここでいう構成ブロックとは、図8の例では、INT-C806、ATU808、PFC810及びWDT812であり、この所定の順序は、図10に示すような順序リスト1002に従い決められる。このリストは、好適には、メイン・メモリ506の所定箇所に配置される。このリストは、PFC→ATU→WDT→INT-Cの順序であることを示す。図10はまた、連続系の入力から出力にかけて、このリストの順に処理が行なわれるべきことを示す。
 特にステップ902では、ステップ904の、ハイブリッド・ペリフェラル602bの共有メモリ602cから、CPUエミュレータ602aの出力としてデータを読み出す処理と、ステップ906の、ハイブリッド・ペリフェラル602bの共有メモリ602cへ、CPUエミュレータ602aの入力としてデータを上書きで書き込む処理とが行われる。
 こうして、全ての構成ブロックの処理が完了すると、ハイブリッド・ペリフェラル602bの処理(特に、連続系の部分)は、終了する。
 一方、CPUエミュレータ602aの側では、CPUエミュレータ602aがステップ910で、I/Oへのアクセスまで実行し、ステップ912で、ハイブリッド・ペリフェラル602bの共有メモリ602cへのI/Oアクセスを行う。このとき、共有メモリ602cへのアクセスの間は、他の処理ブロックが共有メモリ602cの値を書き換えないように、排他制御が行われる。
 図11は、ハイブリッド・ペリフェラル602bのINT-C806の処理のフローチャートを示す図である。これは、図9のペリフェラル構成ブロック固有の処理ステップ910における、INT-C806の固有の処理である。図11において、ステップ1102では、INT-Cが入力データをPFC810から取り込む。ステップ1104では、INT-Cが、入力データを割込みに変換するかどうか判断する。この判断は例えば、ある値の前回の値を保持しておいて、その値が前回から変わったかどうかで判断される。典型的には、パルスの立下りの検出である。
 入力データを割込みに変換すると判断すると、INT-Cは、ステップ1106で、CPUエミュレータに割込みイベント・メッセージを送り、処理は終わる。
 図12は、ハイブリッド・ペリフェラル602bのATU808フローチャートを示す図である。これは、図9のペリフェラル構成ブロック固有の処理ステップ910における、ATU808の固有の処理である。図12において、ステップ1202では、ATUが入力データをPFCから取り込む。
 ステップ1204では、ATUが、タイマがヒット、すなわちタイマの値が設定した所定の値に達したかどうかを判断する。もしそうなら、ステップ1206で、ATUは、出力のステータスを変更する。そうでなければ、直ちにステップ1208に進む。
 次にステップ1208では、ATUが、出力データをPFCに書き込み、処理は終わる。
 より具体的に述べると、ATU808には、CPUエミュレータ602aから、開始時刻と期間を設定可能であり、すると、ステップ1204でのタイマヒットとは、その開始時刻から期間内であることを意味する。すると、ATU808の働きは例えば、開始時刻から期間内は、PFCを通じて、論理1を出力し、それ以外は、論理0を出力することになる。
 図13は、ペリフェラルとECUエミュレータの間の処理動作に関する別の実施例の処理のフローチャートを示す図である。図9の処理とは異なり、この実施例では、指定されたサイクル毎に同期処理が行われる。図13のフローチャートの処理も、タイムスライスΔt毎に呼び出される。この実施例は、離散系システムにおいて、ソフトウエアによるタイマー(時間計算)が使用される場合に採用される。ここで、タイマーの最小粒度より小さな周期で同期を取ることにより、ソフトウエア・タイマーの動作が保証される。
 図13において、ステップ1302及びステップ1308では、順序付けられたペリフェラルの構成ブロックの順に、構成ブロックの固有の処理が行なわれる。ここでいう構成ブロックとは、図8の例における、INT-C806、ATU808、PFC810及びWDT812であり、この所定の順序は、図10に示すような順序リスト1002に従い決められる。このリストは、好適には、メイン・メモリ506の所定箇所に配置される。このリストは、PFC→ATU→WDT→INT-Cの順序であることを示す。図10はまた、連続系の入力から出力にかけて、このリストの順に処理が行なわれるべきことを示す。
 INT-C806及びATU808の固有の処理は、図11及び図12に関連して、それぞれ既に説明したとおりである。
 特にステップ1302では、ステップ1304の、ハイブリッド・ペリフェラル602bの共有メモリ602cから、CPUエミュレータ602aの出力としてデータを読み出す処理と、ステップ1306の、ハイブリッド・ペリフェラル602bの共有メモリ602cへ、CPUエミュレータ602aの入力としてデータを上書きで書き込む処理とが行われる。
 こうして、全ての構成ブロックの処理が完了すると、ハイブリッド・ペリフェラル602bの処理は、ステップ1310に進み、そこで、t <= T < t + Δtかどうかが判断される。そうでなければ、処理は直ちに終わる。ここで、tは、連続系シミュレータにおける現在の時刻、Δtはタイムスライスの大きさ、TはCPUエミュレータの同期時刻をあらわす。
 ステップ1310で、t <= T < t + Δtと判断されると、ステップ1312で、ハイブリッド・ペリフェラル602bは、CPUエミュレータ602aからの通知を待ち、通知があると、ステップ1314でTを更新して、CPUエミュレータ602aに通知する。
 一方、CPUエミュレータ602aの側では、CPUエミュレータ602aがステップ1316で、I/Oへのアクセスまで実行し、ステップ1318で、ハイブリッド・ペリフェラル602bの共有メモリ602cへのI/Oアクセスを行う。このとき、共有メモリ602cへのアクセスの間は、他の処理ブロックが共有メモリ602cの値を書き換えないように、排他制御が行われる。
 ステップ1320では、指定されたサイクルを終えたかどうかが判断され、もしそうでないなら、処理は、ステップ1316に戻る。
 ステップ1320で、指定されたサイクルを終えたと判断されると、ステップ1322で、CPUエミュレータ602aは、終了したことを、ハイブリッド・ペリフェラル602b側に通知する。この通知は、上記ステップ1312におけるCPUエミュレータ602aからの通知である。
 ステップ1324では、CPUエミュレータ602aが、次のサイクルの指定を待つ。ここで待つのは、上記ステップ1314からの通知である。次に処理は、ステップ1316に戻る。
 以上、自動車用の複数のシミュレーション・システムに関連して、本発明の特定の実施例を説明してきたが、本発明はこのような特定の実施例に限定されず、飛行機用のシミュレーション・システムなど、一般的な電子機械制御系システムのシミュレーション・システムに適用可能であることを、この分野の当業者であるなら、理解するであろう。
 上記実施例では、ECUエミュレータのペリフェラル部分と、連続系システムが同一スレッド内にある、と説明してきたが、スレッドに限らず、単一プロセッサまたはコアに割り当てることができるような単位であるなら、より広く、プロセスという単位でもよい。

Claims (19)

  1.  コンピュータの処理により、シミュレーションを行なうシミュレーション・システムにおいて、
     連続パルスによって動作する連続系シミュレータと、
     離散イベント・メッセージにより動作する離散系シミュレータと、
     前記連続系シミュレータからの連続パルス信号を、イベント・メッセージに変換して前記離散系シミュレータに送出するするためのペリフェラル手段とを有し、
     前記連続系シミュレータと前記ペリフェラル手段の少なくとも一部は、同一プロセスまたは同一スレッド内で動作するように制御される、
     シミュレーション・システム。
  2.  前記ペリフェラル手段は、離散系シミュレータからのイベント・メッセージ信号を連続クロックの信号に変換して前記連続系シミュレータに送出する機能をさらに有する、請求項1のシミュレーション・システム。
  3.  前記離散系シミュレータのイベントが、割込みである、請求項1のシミュレーション・システム。
  4.  前記ペリフェラル手段と、離散系シミュレータは、非同期で通信する、請求項1のシミュレーション・システム。
  5.  前記ペリフェラル手段が、データを読み書き可能なメモリを有し、前記ペリフェラル手段と、離散系シミュレータは、該メモリへの読み書きによりデータを交換する、請求項4のシミュレーション・システム。
  6.  前記ペリフェラル手段が、前記連続クロック信号の周期よりも長い指定サイクル毎の同期で通信する、請求項1のシミュレーション・システム。
  7.  前記シミュレーション・システムが自動車のシミュレーション・システムであり、前記連続系シミュレータがエンジン・シミュレータを含み、前記離散系シミュレータが、該エンジン・シミュレータを制御するためのECUエミュレータを含む、請求項1のシミュレーション・システム。
  8.  コンピュータの処理により、シミュレーションを行なうシミュレーション方法において、
     連続パルスによって動作する連続系シミュレータを動作させるステップと、
     離散イベント・メッセージにより動作する離散系シミュレータを動作させるステップと、
     前記連続系シミュレータからの連続パルス信号を、イベント・メッセージに変換して前記離散系シミュレータに送出するするためのペリフェラル手段を動作させるステップを有し、
     前記連続系シミュレータと前記ペリフェラル手段は、同一プロセスまたは同一スレッド内で動作するように制御される、
     シミュレーション方法。
  9.  前記ペリフェラル手段は、離散系シミュレータからのイベント・メッセージ信号を連続クロックの信号に変換して前記連続系シミュレータに送出する機能をさらに有する、請求項8のシミュレーション方法。
  10.  前記離散系シミュレータのイベントが、割込みである、請求項8のシミュレーション方法。
  11.  前記ペリフェラル手段と、離散系シミュレータは、非同期で通信する、請求項8のシミュレーション方法。
  12.  前記ペリフェラル手段が、前記連続クロック信号の周期よりも長い指定サイクル毎の同期で通信する、請求項8のシミュレーション方法。
  13.  前記シミュレーション方法が自動車のシミュレーション方法であり、前記連続系シミュレータがエンジン・シミュレータを含み、前記離散系シミュレータが、該エンジン・シミュレータを制御するためのECUエミュレータを含む、請求項8のシミュレーション方法。
  14.  コンピュータの処理により、シミュレーションを行なうシミュレーション・プログラムであって、
     前記コンピュータをして、
     連続パルスによって動作する連続系シミュレータを動作させるステップと、
     離散イベント・メッセージにより動作する離散系シミュレータを動作させるステップと、
     前記連続系シミュレータからの連続パルス信号を、イベント・メッセージに変換して前記離散系シミュレータに送出するするためのペリフェラル手段を動作させるステップを実行させる、
     前記連続系シミュレータと前記ペリフェラル手段は、同一プロセスまたは同一スレッド内で動作するように制御される、
     シミュレーション・プログラム。
  15.  前記ペリフェラル手段は、離散系シミュレータからのイベント・メッセージ信号を連続クロックの信号に変換して前記連続系シミュレータに送出する機能をさらに有する、請求項14のシミュレーション・プログラム。
  16.  前記ペリフェラル手段と、離散系シミュレータは、非同期で通信する、請求項14のシミュレーション・プログラム。
  17.  前記離散系シミュレータのイベントが、割込みである、請求項14のシミュレーション・プログラム。
  18.  前記ペリフェラル手段が、前記連続クロック信号の周期よりも長い指定サイクル毎の同期で通信する、請求項14のシミュレーション・プログラム。
  19.  前記シミュレーション・プログラムが自動車のシミュレーション・プログラムであり、前記連続系シミュレータがエンジン・シミュレータを含み、前記離散系シミュレータが、該エンジン・シミュレータを制御するためのECUエミュレータを含む、請求項14のシミュレーション・プログラム。
PCT/JP2010/054056 2009-03-12 2010-03-10 シミュレーション方法、システム及びプログラム WO2010104135A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US13/255,938 US8670967B2 (en) 2009-03-12 2010-03-10 Simulation method, system and article of manufacture
CN201080010432.0A CN102341787B (zh) 2009-03-12 2010-03-10 模拟方法、系统
EP10750888.9A EP2407886A4 (en) 2009-03-12 2010-03-10 SIMULATION PROCESS, SYSTEM AND PROGRAM
JP2011503850A JP5295355B2 (ja) 2009-03-12 2010-03-10 シミュレーション方法、システム及びプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009059790 2009-03-12
JP2009-059790 2009-03-12

Publications (1)

Publication Number Publication Date
WO2010104135A1 true WO2010104135A1 (ja) 2010-09-16

Family

ID=42728423

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/054056 WO2010104135A1 (ja) 2009-03-12 2010-03-10 シミュレーション方法、システム及びプログラム

Country Status (5)

Country Link
US (1) US8670967B2 (ja)
EP (1) EP2407886A4 (ja)
JP (1) JP5295355B2 (ja)
CN (1) CN102341787B (ja)
WO (1) WO2010104135A1 (ja)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102011105141A1 (de) * 2011-06-09 2012-12-13 Dmg Electronics Gmbh Verfahren und system zur simulation eines arbeitsprozesses an einer werkzeugmaschine
JP2013084163A (ja) * 2011-10-12 2013-05-09 Hitachi Ltd 協調シミュレーション装置及び協調シミュレーション方法
US9251308B2 (en) * 2012-07-23 2016-02-02 International Business Machines Corporation Simulation method, system, and program
US9442716B2 (en) * 2013-09-24 2016-09-13 GM Global Technology Operations LLC Methods and apparatus for adjusting a variable rate of requesting software data from a vehicle
JP6462329B2 (ja) * 2014-11-19 2019-01-30 日立オートモティブシステムズ株式会社 故障シミュレーションシステム
JP6831193B2 (ja) * 2016-08-26 2021-02-17 トヨタ自動車株式会社 ハイブリッド車両の制御装置
US20180189896A1 (en) * 2016-12-30 2018-07-05 Paccar Inc Systems and methods for improving electronic component quality during the manufacture of vehicles
US10652256B2 (en) * 2017-06-20 2020-05-12 International Business Machines Corporation Real-time active threat validation mechanism for vehicle computer systems
JP6770935B2 (ja) * 2017-07-03 2020-10-21 日立オートモティブシステムズ株式会社 車両制御装置用の検証装置
WO2019214802A1 (en) * 2018-05-07 2019-11-14 Siemens Industry Software Nv Method for simulating the operation of an electronic control unit

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08227367A (ja) 1994-10-25 1996-09-03 Mitsubishi Electric Res Lab Inc ハードウエア−ソフトウエアデバッガ
JP2001290860A (ja) 2000-04-10 2001-10-19 Matsushita Electric Ind Co Ltd ハードウエア/ソフトウエア協調シミュレータ
JP2003228496A (ja) * 2002-02-05 2003-08-15 Fujitsu Ltd 制御プログラム開発支援装置
JP2004030228A (ja) 2002-06-26 2004-01-29 Nec Electronics Corp Lsiシミュレータ及びシミュレーション方法
JP2006065758A (ja) 2004-08-30 2006-03-09 Fujitsu Ltd 回路解析方法および回路解析装置
JP2008065640A (ja) * 2006-09-07 2008-03-21 Toshiba Corp シミュレーション装置およびそのシミュレーション制御方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6425762B1 (en) * 1998-02-24 2002-07-30 Wind River Systems, Inc. System and method for cosimulation of heterogeneous systems
JP3638255B2 (ja) * 2001-03-26 2005-04-13 富士通テン株式会社 通信シミュレーション装置および方法
JP4749414B2 (ja) * 2004-03-10 2011-08-17 ルノー・エス・アー・エス 組み込まれたシステムの実証方法
JP4259398B2 (ja) * 2004-05-27 2009-04-30 日産自動車株式会社 車両走行制御システムの悪路走行シミュレーション装置、および、車両走行制御システム作動感度評価装置
CN100347621C (zh) * 2005-01-07 2007-11-07 清华大学 一种整车控制器仿真测试系统
JP4906286B2 (ja) 2005-08-17 2012-03-28 富士通テン株式会社 ソフトウェア開発環境システム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08227367A (ja) 1994-10-25 1996-09-03 Mitsubishi Electric Res Lab Inc ハードウエア−ソフトウエアデバッガ
JP2001290860A (ja) 2000-04-10 2001-10-19 Matsushita Electric Ind Co Ltd ハードウエア/ソフトウエア協調シミュレータ
JP2003228496A (ja) * 2002-02-05 2003-08-15 Fujitsu Ltd 制御プログラム開発支援装置
JP2004030228A (ja) 2002-06-26 2004-01-29 Nec Electronics Corp Lsiシミュレータ及びシミュレーション方法
JP2006065758A (ja) 2004-08-30 2006-03-09 Fujitsu Ltd 回路解析方法および回路解析装置
JP2008065640A (ja) * 2006-09-07 2008-03-21 Toshiba Corp シミュレーション装置およびそのシミュレーション制御方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KAZUO TAKI, DAIKIBO HAN'YO HEIRETSU SHORI NO JITSUGEN NI MUKETE, vol. 23, no. 2, 1 February 1991 (1991-02-01), pages 45 *
See also references of EP2407886A4 *
SHUN'ICHI NAKAYAMA: "System ASIC Shijo Kakudai o Mikomi/Kensho Tool ga Zokuzoku Tojo suru", NIKKEI ELECTRONICS, 1 September 1997 (1997-09-01), pages 82, XP008166802 *

Also Published As

Publication number Publication date
US8670967B2 (en) 2014-03-11
US20120029893A1 (en) 2012-02-02
CN102341787A (zh) 2012-02-01
JPWO2010104135A1 (ja) 2012-09-13
EP2407886A1 (en) 2012-01-18
EP2407886A4 (en) 2014-04-02
CN102341787B (zh) 2015-06-17
JP5295355B2 (ja) 2013-09-18

Similar Documents

Publication Publication Date Title
JP5295355B2 (ja) シミュレーション方法、システム及びプログラム
JP5153465B2 (ja) シミュレーション方法、システム及びプログラム
JP5065344B2 (ja) シミュレーション方法、システム及びプログラム
JP5179249B2 (ja) 制御装置シミュレーション方法、システム及びプログラム
KR101522477B1 (ko) 시뮬레이션 방법, 시스템 및 프로그램
EP2318922B1 (en) Controlling real time clock during embedded system development
JP5224957B2 (ja) シミュレーション方法、システム及びプログラム
JP5186290B2 (ja) シミュレーション方法、システム及びプログラム
JP5460010B2 (ja) シミュレーション方法、システム及びプログラム
JP4852629B2 (ja) シミュレーション・システム、方法及びプログラム
Dziurzanski et al. Benchmarking, system design and case-studies for multi-core based embedded automotive systems
JP2007233675A (ja) シミュレーション装置
JP5500820B2 (ja) シミュレーション方法、システム及びプログラム
Ishikawa et al. CPU model-based hardware/software co-design for real-time embedded control systems
JP5186307B2 (ja) シミュレーション方法、システム及びプログラム
JP2008165544A (ja) シミュレーションシステム及びシミュレーション方法
JP5156440B2 (ja) マイクロコンピュータの模擬装置
Oho et al. Model-based implementation design of automotive controllers
Oho CPU Model-based Hardware/Software Co-design for Real-Time Embedded Control Systems

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080010432.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10750888

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011503850

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2010750888

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 13255938

Country of ref document: US