Simulated White Rabbit Timing

Simulated Timing allows a class configured for White Rabbit timing to trigger events at intervals specified in a local configuration file. A FESA class using simulated timing can run on a computer without a timing receiver and SAFTlib saftd process such as asl development cluster and virtual machines.

No change is required in the design or instance files.

Note that the saftlib libraries still need to be present or the FESA executable will complain of missing dynamic libraries.

Starting FESA software with Simulated Timing


for manual testing, give the deploy-unit start script the arguments:
-f -timsim
or
-f "-timsim filename.xml"
If no filename is specified the default "TimingSimulationConfig.xml" is used.

If the file does not exist a warning will be logged and the deploy-unit will run with no events generated.

Configuration File Format

The configuration file can contain multiple patterns of which only one is active at a time. Each pattern contains a series of events that are generated at the specified time (offset events will be generated later by the amount specified in the instance file). The pattern then repeats. The active pattern is an attribute of the root timing-simulation node.


Event Format

The attributes of an event are:
id (Event Number) or name (Event Name)
group (Timing Group)
s (sequence)
p (beam process)
c (beam production chain)
time (scheduled execution time)


All attributes that are valid timing messages are allowed (e.g. Beam Process may be 0-16384)

The scheduled time is relative to the start of the pattern.

When an event is generated, the event execution time in the payload is relative to the simulation start time.

The time is entered in seconds. The input may be scaled by appending an SI prefix n:nano,u:micro,m:milli. The software timer will not have nanosecond accuracy.

If the group is not specified, an event will be generated with the group taken from the instance file.


If the instance file uses more than one group this is ambiguous and an error is generated.

Example

<?xml version="1.0" encoding="UTF-8"?>
<timing-simulation pattern="slow">

  <pattern name="slow">
    <event name="CMD_BP_START" group="200" p="1" time="1"/>
    <event name="CMD_BEAM_ON" group="200" p="1" time="2"/>
    <event name="CMD_BEAM_OFF" group="200" p="1" time="2.5"/>
    <event name="CMD_GAP_START" group="200" p="1" time="3"/>
    <event name="CMD_GAP_END" group="200" p="1" time="4"/>    
  </pattern>

  <pattern name="fast">
    <event id="1" group="200" s="1" p="1" time="1"/>
    <event name="CMD_SEQ_START" group="200" s="3" p="3" time="2500m"/>
    <event id="1" group="200" s="2" p="2" time="3.5"/>
  </pattern>
</timing-simulation>

For this example the instance file contains the events used (CMD_BP_START etc.) in the event-mapping and a device in Timing Group 200.

CERN Timing

CERN Simulated Timing is deprecated.

The TimingSimulationConfig.xml file

To use a FESA3 equipment together with simulated timing, first you need a timing simulation configuration file. Within this file you can configure the event sequences which should be simulated.

Please download an existing TimingSimulationConfig.xml from SVN. The file should be moved in the same folder where your instance file is located.

You can modify the TimingSimulationConfig.xml according to your needs.

Usage

To enable simulation mode for your FESA3 equipment, add the application parameter -timsim <file> when starting your binary. <file> defines the path to your TimingSimulationConfig-file. If not provided, the default (./TimingSimulationConfig.xml) is used.

-- DominicDay - 06 Dec 2018

This topic: FESA > WebHome > Fesa3_501 > FESA3TimingSimulation502
Topic revision: 06 Dec 2018, DominicDay
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback