The Clock entity accepts registration from any entity during the startup phase.
Then it sends events to each registered entity at regular simulation_time
intervals.
- Parameters:
- float period - period of the clock, expressed in the simulation time unit.
- read_only int cycle - number of ticks
which have actually been sent to the registered entities. It is just for
information, there is no point modifying this parameter (read_only).
- Behaviour:
- The Clock entity operates in two phases:
- Send a tick signal to any registered entity. The tick signal contains an
integer value which represents the tick number.
- Wait for completion signals from any of the registered entities. If the period
time is reached and some entities have not sent the completion signal, then an
error message is printed to inform the user that the Clock is to slow
(Clock.period is too small).
An integer value should be attached to the completion signal. If this value is
negative, then the clock stops its behaviour assuming an error has occurred.
Otherwise, the cycle starts again to phase1.
|
EDL declaration of the Clock Entity
|
ENTITY Clock fm (
DESCRIPTION ("clock")
PARAMS (
read_only RINT(cycle, 0)
RFLOAT(period, 10)
)
)
|
|