- A Logic Circuit Simulation Library in C++ |
#include <jkflipflop.h>
Inheritance diagram for lcs::JKFlipFlop< type, delay >:
Public Member Functions | |
JKFlipFlop (const Bus< 1 > &QBus, const InputBus< 1 > &JBus, const InputBus< 1 > &KBus, const InputBus< 1 > &clock) | |
virtual | ~JKFlipFlop (void) |
virtual void | onPosEdge (int portId) |
virtual void | onNegEdge (int portId) |
Static Public Attributes | |
static const int | J = 0 |
static const int | K = 1 |
static const int | CLK = 3 |
static const int | Q = 2 |
static const int | RST = 4 |
lcs::JKFlipFlop< type, delay >::JKFlipFlop | ( | const Bus< 1 > & | QBus, | |
const InputBus< 1 > & | JBus, | |||
const InputBus< 1 > & | KBus, | |||
const InputBus< 1 > & | clock | |||
) |
The only explicit constructor.The other constructors, if synthesized by the compiler, are practically useless and hence their use should be avoided.
QBus | The single line output bus of the flipflip. | |
JBus | The single line J input bus of the flipflop. | |
KBus | The single line K input bus of the flipflop. | |
clock | The clock input to the flipflop. |
lcs::JKFlipFlop< type, delay >::~JKFlipFlop | ( | void | ) | [virtual] |
Destructor.
virtual void lcs::JKFlipFlop< type, delay >::onNegEdge | ( | int | portId | ) | [inline, virtual] |
The function which is triggered by the clock input in case of a negetive edge triggered flipflop. User of the class lcs::JKFlipFlop
will never need to call this function under normal circumstances.
Reimplemented from lcs::Module.
virtual void lcs::JKFlipFlop< type, delay >::onPosEdge | ( | int | portId | ) | [inline, virtual] |
The function which is triggered by the clock input in case of a positive edge triggered flipflop. User of the class lcs::JKFlipFlop
will never need to call this function under normal circumstances.
Reimplemented from lcs::Module.
const int lcs::JKFlipFlop< type, delay >::CLK = 3 [static] |
A static integer id which denotes the port corresponding to the clock input.
const int lcs::JKFlipFlop< type, delay >::J = 0 [static] |
A static integer id which denotes the port corresponding to the J input.
const int lcs::JKFlipFlop< type, delay >::K = 1 [static] |
A static integer id which denotes the port corresponding to the K input.
const int lcs::JKFlipFlop< type, delay >::Q = 2 [static] |
A static integer id which denotes the port corresponding to the output of the flipflop.
const int lcs::JKFlipFlop< type, delay >::RST = 4 [static] |
A static integer id which denotes the port corresponding to the reset input.