DASM
|
HW implementation for 'SimpleTimer'. More...
Public Member Functions | |
Public Functions | |
retval | new (scalar proto, scalar object) |
Construct a new hardware device object. | |
retval | window () |
Return the size of of the implementation. | |
retval | read (scalar self, scalar offset, scalar exec) |
Read value. | |
retval | write (scalar self, scalar offset, scalar exec, scalar value) |
Write value. | |
retval | symbol (scalar self, scalar offset) |
Get the symbol name for an offset. |
HW implementation for 'SimpleTimer'.
A very simple timer measuring microseconds since the hardware was initialised. FIXME Allow this to be CPU start?
3 words are provided (little endian):
Offset | Name | Meaning |
---|---|---|
+0 | Low | low word (bits 0-15) |
+1 | Middle | middle word (bits 16-31) |
+2 | High | high word (bits 32-47) |
The middle and high words are latched by reading the low word.
Writing to any register has the effect of resetting the clock to 0.
Definition at line 48 of file SimpleTimer.pm.
retval DExecHW::SimpleTimer::new | ( | scalar | proto, |
scalar | object | ||
) |
Construct a new hardware device object.
[in] | $proto | This class object, or prototype to add to |
[in] | $object | The object to proxy for |
[in] | $offset | The offset this object is created for |
retval DExecHW::SimpleTimer::read | ( | scalar | self, |
scalar | offset, | ||
scalar | exec | ||
) |
Read value.
[in] | $self | Object |
[in] | $offset | Offset of register within window |
[in] | $exec | DExec object opon which this object is operating |
retval DExecHW::SimpleTimer::symbol | ( | scalar | self, |
scalar | offset | ||
) |
Get the symbol name for an offset.
[in] | $self | Object |
[in] | $offset | Offset of register within window |
undef | for a default symbol |
"" | for no symbol |
retval DExecHW::SimpleTimer::window | ( | ) |
Return the size of of the implementation.
[in] | $self | Object |
retval DExecHW::SimpleTimer::write | ( | scalar | self, |
scalar | offset, | ||
scalar | exec, | ||
scalar | value | ||
) |
Write value.
[in] | $self | Object |
[in] | $offset | Offset of register within window |
[in] | $exec | DExec object upon which this object is operating |
[in] | $value | Value to write |