lcs::Nand< width > Class Template Reference

#include <nand.h>

Inheritance diagram for lcs::Nand< width >:

lcs::Module List of all members.

Detailed Description

template<int width = 1>
class lcs::Nand< width >

A template class which encapsulates a logical NAND gate. The template parameter width denotes the number of lines in the input data bus. In other words, the template parameter width denotes the number of inputs to the NAND gate. Hence, one can instantiate an N-input NAND gate by setting the template parameter value to N.


Public Member Functions

 Nand (const Bus< 1 > &output, const InputBus< width > &input)
virtual ~Nand ()
virtual void propogate (void)


Constructor & Destructor Documentation

template<int width>
lcs::Nand< width >::Nand ( const Bus< 1 > &  output,
const InputBus< width > &  input 
)

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:
output The single line output bus of the gate.
input The multiline input bus to the gate.
width The number of lines in the input bus.

template<int width>
lcs::Nand< width >::~Nand (  )  [virtual]

Destructor.


Member Function Documentation

template<int width>
void lcs::Nand< width >::propogate ( void   )  [virtual]

Propogates the input data line states to the output. Here, a NAND operation is performed on the line states of the data lines of the input bus, and the result is propogated to the single line output bus.

Reimplemented from lcs::Module.


Generated on Sat Oct 14 11:23:40 2006 for libLCS by  doxygen 1.4.7