
The new module class, Or1ksimSyncSC is derived
from the existing Or1ksimExtSC module
class. The header of the base class,
Or1ksimExtSC is included and the new class
derived from that base class.
#include "Or1ksimExtSC.h"
class Or1ksimSyncSC
: public Or1ksimExtSC
{
A custom constructor must be defined, but has the same arguments as the base class constructor, to which it will pass its arguments.
The new Or1ksim library call to give the clock rate is wrapped by a public function[7].
unsigned long int getClockRate();
The virtual function, doTrans function is
reimplemented—it will replace the call to
doTrans in the base class to add timing
synchronization.
The definition of the Or1ksim ISS wrapper module class with
synchronized timing, Or1ksimSyncSC may be
found in sys-models/sync-soc/Or1ksimSyncSC.h in
the distribution.
[7] The use of unsigned long int reflects the usage in the Or1ksim ISS. The designers do not anticipate usage to model designs in excess of 4GHz!
