US 11,989,535 B2
Simulation method and recording medium
Masafumi Shimozawa, Tokyo (JP); and Shin Saito, Tokyo (JP)
Assigned to HITACHI SOLUTIONS, LTD., Tokyo (JP)
Appl. No. 17/439,228
Filed by HITACHI SOLUTIONS, LTD., Tokyo (JP)
PCT Filed Jun. 24, 2020, PCT No. PCT/JP2020/024897
§ 371(c)(1), (2) Date Sep. 14, 2021,
PCT Pub. No. WO2021/049130, PCT Pub. Date Mar. 18, 2021.
Claims priority of application No. 2019-165886 (JP), filed on Sep. 12, 2019.
Prior Publication US 2022/0164166 A1, May 26, 2022
Int. Cl. G06F 9/44 (2018.01); G06F 8/20 (2018.01); G06F 8/35 (2018.01); G06F 8/41 (2018.01); G06F 9/54 (2006.01)
CPC G06F 8/35 (2013.01) [G06F 8/24 (2013.01); G06F 8/457 (2013.01); G06F 9/54 (2013.01)] 8 Claims
OG exemplary drawing
 
1. A method of simulating, by a processor, a plurality of codes that form a program configured to control a control target, the method comprising causing the processor to execute the following:
first setting processing for setting a first process of executing a software in a loop simulation of an operation of a code group excluding a specific code among the plurality of codes;
second setting processing for setting a second process of executing a model in a loop simulation of an operation of a specific model obtained by modeling the specific code;
first simulation processing for executing, in the first process, a first simulation of a code preceding the specific code in the code group;
second simulation processing for executing, in the second process, a second simulation of the specific model through use of an execution result of the first simulation by inter-process communication between the first process and the second process;
third simulation processing for executing, in the first process, a third simulation of a code succeeding the specific code through use of an execution result of the second simulation by the inter-process communication between the first process and the second process;
setting, by the processor, in the first setting processing, a first semaphore for managing exclusive control of the second process in the first process, and setting a shared storage area accessible to the second process so that the shared storage area is accessible to the first process;
setting, by the processor, in the second setting processing, a second semaphore for managing exclusive control of the first process in the second process, and setting the shared storage area so that the shared storage area is accessible to the second process;
storing, by the processor, in the first simulation processing, the execution result of the first simulation in the shared storage area, and releasing the first semaphore for the second process;
acquiring, by the processor, in the second simulation processing, the execution result of the first simulation, which is stored in the shared storage area, when the first semaphore is released, executing the simulation of the specific model in the second process, storing the execution result of the second simulation in the shared storage area, and releasing the second semaphore for the first process; and
acquiring, by the processor, in the third simulation processing, the execution result of the second simulation, which is stored in the shared storage area, when the second semaphore is released, and executing the third simulation of the code succeeding the specific code in the first process;
wherein exclusive control of the shared storage area is managed by the first and second semaphores.