| |||
| Home > The Cycle Accurate Simulation Interface > The CASIModule class > CASIModule::casi_clocked() |
This function is provided for clocking the component to the default clock master.
By default, calling this function ensures that the model clock
slave is registered with the default clock master of the model during
the interconnect stage. Using this function requires that the function CASIModule::interconnect() is
called for the model.
The longer version of the casi_clocked() function
is provided for conditionally clocking the component.
virtual void casi_clocked(void)
virtual void casi_clocked(CASIPhase _phases, uint32_t _numOfTimes=0,
uint32_t _ratio=1, uint32_t _offset=0)
where:
phasesspecifies the phase to register the slave for:
CASI_PHASE_BOTH
CASI_PHASE_COMMUNICATE
CASI_PHASE_UPDATE
numOfTimesspecifies the number of times the component is to be called. 0 means the component will be called indefinitely.
This parameter has been deprecated and must not be used in new code.
ratiospecifies
the clock ratio between the master clock and the local clock to be
used. A ratio of n means that the component will
be called once every n cycles. It must be greater
than 0.
This parameter has been deprecated and must not be used in new code.
offsetdenotes the number of master clock cycles to elapse before the component is called for the first time. Default is 0.
This parameter has been deprecated and must not be used in new code.
Conditional registration requires a more complex scheduling mechanism that can impact performance.
Conditional registration is only recommended for components that are only called occasionally. In this case, the simulation performance benefits.