- A Logic Circuit Simulation Library in C++ |
#include <counter.h>
Inheritance diagram for lcs::Counter< bits, event >:
bits | The bit-width of the counter | |
event | The event on the input bus which triggers the counter |
Public Member Functions | |
Counter (const Bus< bits > &output, const InputBus< 1 > &clk) | |
virtual | ~Counter () |
virtual void | onPosEdge (int portId) |
virtual void | onNegEdge (int portId) |
virtual void | onStateChange (int portId) |
lcs::Counter< bits, event >::Counter | ( | const Bus< bits > & | output, | |
const InputBus< 1 > & | clk | |||
) |
Constructor
output | The output bus of the counter | |
clk | The input bus of the counter. |
lcs::Counter< bits, event >::~Counter | ( | ) | [virtual] |
Destructor
virtual void lcs::Counter< bits, event >::onNegEdge | ( | int | portId | ) | [inline, virtual] |
A subclass of the class Module should override this function so that it can be notified of a negetive edge on its input busses. If a lcs::LINE_NEG_EDGE event occurs on an input bus, the bus will call this function on the corresponding module object as a notification of the occurance of the event.
Reimplemented from lcs::Module.
virtual void lcs::Counter< bits, event >::onPosEdge | ( | int | portId | ) | [inline, virtual] |
A subclass of the class Module should override this function so that it can be notified of a positive edge on its input busses. If a lcs::LINE_POS_EDGE event occurs on an input bus, the bus will call this function on the corresponding module object as a notification of the occurance of the event.
Reimplemented from lcs::Module.
virtual void lcs::Counter< bits, event >::onStateChange | ( | int | portId | ) | [inline, virtual] |
A subclass of the class Module should override this function so that it can be notified of a state change on its input busses. If a lcs::LINE_STATE_CHANGE event occurs on an input bus, the bus will call this function on the corresponding module object as a notification of the occurance of the event.
Reimplemented from lcs::Module.