#include <fa.h>
Inheritance diagram for lcs::FullAdder:
Public Member Functions | |
FullAdder (const Bus< 1 > &S, const Bus< 1 > Cout, const InputBus< 1 > &A, const InputBus< 1 > &B, const InputBus< 1 > &Cin) | |
~FullAdder () | |
virtual void | propogate () |
lcs::FullAdder::FullAdder | ( | const Bus< 1 > & | S, | |
const Bus< 1 > | Cout, | |||
const InputBus< 1 > & | A, | |||
const InputBus< 1 > & | B, | |||
const InputBus< 1 > & | Cin | |||
) |
The only meaningfull constructor for the class. A default constructor is not explicitly provided. Moreover, the one synthesized by the compiler is practically useless.
S | The single line output Bus which carries the sum. | |
Cout | The single line output Bus which carries the carry output. | |
A | The single line InputBus object which carries one of the data lines. | |
B | The single line InputBus object which carries the other data line. | |
Cin | The single line InputBus object which carries the carry input to the full-adder. |
lcs::FullAdder::~FullAdder | ( | ) |
Destructor.
virtual void lcs::FullAdder::propogate | ( | ) | [virtual] |
Propogates the input data line states to the output. Here, binary 1-bit addition is performed on the line states of input busses and the result is propogated to the output busses.
Reimplemented from lcs::Module.