next up previous
Next: Modifying processing behaviour Up: Additional esoteric features Previous: More on runtime simulation

Process update frequency

It may be in some instances that a process is only required to update infrequently, and not every tick. For example, if a set of test-vectors is being tested at various thresholds, then the thresholds only need to update at a constant integral number of ticks. There are various ways of achieving this, but there is a method built into the modeling library to cope with this situation.


The method setUpdateFrequency of a ProcessElement changes the update behaviour on each tick. It can be set to any positive integer, but the default is one. It sets the frequency of updating as a multiple of ticks. By default, process is called every tick, but if the frequency is set to, say, 10, then updates will only occur on the 1st, 11th, 21st etc event. This behaviour is achieved through a private method in ProcessElement called processIfNeeded. Note that it relies on the event number as maintained by the Simulation object, in particular, it requires that the event number be zero at the start of the simulation to set the phase of the updating cycle. This may be a problem if the same Simulation object is used several times over, and the event number will have been incremented by a previous set of simulation cycles. In order to cope with this problem, the Simulation class has a reset method, which sets the event counter back to zero.


next up previous
Next: Modifying processing behaviour Up: Additional esoteric features Previous: More on runtime simulation
M.P.J.Landon 2003-05-15