Stochastic simulation

Any tool-related questions, suggestions, problems, etc
Phil0031
Posts: 1
Joined: Tue Mar 27, 2018 3:22 pm

Stochastic simulation

Postby Phil0031 » Thu Jun 21, 2018 2:47 pm

Hello

I am performing small example to compute availability of a system by using stochastic simulation.
I have an exemple using Fonction sw_compute that fails when SDRAM fails only in ZONE1 (see code below).
The use of expectation on event seems not to be considered by the stochastic simulator.
Please confirm.
Thanks
Philippe

Code example
  1. System
  2.    observer Boolean systemOutput = sw_comp_1.Out == false;
  3.     assertion
  4.         sw_comp_1.In := true;
  5.         sw_comp_1.HwRes := SDRAM.ResSDRAM != ERR_ZONE1;sw_comp_1.HwRes := SDRAM.ResSDRAM != ERR_ZONE1; 
  6.  
  7. class sw_compute
  8.     SWOperation State_SwCompute(init =  NO_SW_ERROR);
  9.     Boolean Out, In, HwRes (reset = true);
  10.     assertion
  11.         Out := In and HwRes;
  12. end
  13.  
  14. class hw_SDRAM
  15.     SDRAMOperation State_HwSDRAM (init =  WORKING);
  16.     ErrZoneSDRAM ResSDRAM (reset = NO_ERR);
  17.     event evSEUZone1 (delay = exponential(1.0e-5), expectation = 1.0);
  18.     event evSEUZone2 (delay = exponential(1.0e-5), expectation = 0.0);
  19.     transition
  20.         //evSEU: State_HwSDRAM == WORKING -> State_HwSDRAM := FAILED;
  21.         evSEUZone1 : State_HwSDRAM == WORKING -> State_HwSDRAM := FAILED_ZONE1;
  22.         evSEUZone2 : State_HwSDRAM == WORKING -> State_HwSDRAM := FAILED_ZONE2;
  23.     assertion
  24.         ResSDRAM := switch
  25.             {
  26.                 case State_HwSDRAM == WORKING: NO_ERR
  27.                 case State_HwSDRAM == FAILED_ZONE1: ERR_ZONE1
  28.                 case State_HwSDRAM == FAILED_ZONE2: ERR_ZONE2
  29.                 default: UNKNOWN
  30.             };                 
  31. end

Return to “OpenAltaRica Platform”

Who is online

Users browsing this forum: No registered users and 2 guests