- A Logic Circuit Simulation Library in C++





lcs::Buffer< lines, delay > Class Template Reference

#include <buffer.h>

Inheritance diagram for lcs::Buffer< lines, delay >:

lcs::Module List of all members.

Detailed Description

template<unsigned int lines = 1, unsigned int delay = 0>
class lcs::Buffer< lines, delay >

A template class which encapsulates a module representing a buffer. The first template parameter lines denotes the number of lines for which the module acts as a buffer. The second template parameter delay denotes the input to ourput propogation delay of the buffer.

This module can also be used as a delay element by specifying the desired amount of propogation delay.


Public Member Functions

 Buffer (const Bus< lines > &output, const InputBus< lines > &input)
 ~Buffer ()
virtual void onStateChange (int portId)


Constructor & Destructor Documentation

template<unsigned int lines, unsigned int delay>
lcs::Buffer< lines, delay >::Buffer ( const Bus< lines > &  output,
const InputBus< lines > &  input 
)

The only usefull constructor. The default constructor, if generated by the compiler, is of no practical use.

template<unsigned int lines, unsigned int delay>
lcs::Buffer< lines, delay >::~Buffer (  ) 

Destructor.


Member Function Documentation

template<unsigned int lines, unsigned int delay>
void lcs::Buffer< lines, delay >::onStateChange ( int  portId  )  [virtual]

This is the workhorse function of the module class. A user of libLCS will, under normal circumstances, never need to call this function explicitly.

Reimplemented from lcs::Module.


Copyright © 2006, 2007 Siva Chandra