- A Logic Circuit Simulation Library in C++

lcs::ChangeMonitor< width > Class Template Reference

#include <changeMonitor.h>

Inheritance diagram for lcs::ChangeMonitor< width >:

lcs::TickListener List of all members.

Detailed Description

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

This a class which can be used to monitor bus line states. A lcs::ChangeMonitor class should be created using the constructor which takes a bus object as one of its parameters. At every system time instance, the lcs::ChangeMonitor object records line states of the bus with which it was instanstiated. If line states at the current time instant differ from line states at the previous time instant, lcs::ChangeMonitor object displays the new bus line states onto the stdout device.

width The width of the bus whose lines should be monitored.

Public Member Functions

 ChangeMonitor (const InputBus< width > &b, const std::string &name, DumpOption opt=DUMP_OFF)
virtual ~ChangeMonitor ()
virtual void onTick (void)

Constructor & Destructor Documentation

template<int width>
lcs::ChangeMonitor< width >::ChangeMonitor ( const InputBus< width > &  b,
const std::string &  name,
DumpOption  opt = DUMP_OFF 

The only explicit constructor. Other constructors synthesized by the compiler are practically useless and should be avoided.

b The bus whose lines should be monitored for a change.
name The name with which the bus will be referred to in displaying the line states. If the values need to be dumped, then the name SHOULD NOT have spaces in it.
dumpon If this parameter is true, then the line states of the bus being monitored are dumped into a VCD file.

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


Member Function Documentation

template<int width>
void lcs::ChangeMonitor< width >::onTick ( void   )  [virtual]

A user of libLCS will never need to use this function. It is used by the system time keeper to notify a lcs::ChangeMonitor object about an occurance of a time step.

Implements lcs::TickListener.

Copyright © 2006, 2007 Siva Chandra