- A Logic Circuit Simulation Library in C++





lcs::Tester< inBits > Class Template Reference

#include <tester.h>

Inheritance diagram for lcs::Tester< inBits >:

lcs::TickListener List of all members.

Detailed Description

template<int inBits>
class lcs::Tester< inBits >

This is a utility class to test a digital circuit. This class can be used to feed inputs to a bus at every clock pulse. When a simulation starts, the instantiated lcs::Tester object will feed a different input to a bus (the bus with which it was instantiated) at every clock pulse. The values it feeds range from 0 to 2w-1, where w is the width of the bus with which the lcs::Tester object was instantiated.

Parameters:
inBits The number of lines in the input bus.


Public Member Functions

 Tester (const Bus< inBits > &inBus)
 ~Tester ()
virtual void onTick (void)


Constructor & Destructor Documentation

template<int inBits>
lcs::Tester< inBits >::Tester ( const Bus< inBits > &  inBus  ) 

The only meaningfull constructor for the class. A default constructor is not explicitly provided. Moreover, the one synthesized by the compiler is practically useless.

Parameters:
inBus The input bus to the circuit to be tested.
inBits The number of lines in the input bus.

template<int inBits>
lcs::Tester< inBits >::~Tester (  ) 

Destructor.


Member Function Documentation

template<int inBits>
void lcs::Tester< inBits >::onTick ( void   )  [virtual]

The function which is used by the lcs::Clock object to notify a lcs::Tester object about an occurance of a clock pulse.

Implements lcs::TickListener.


Copyright © 2006, 2007 Siva Chandra