- A Logic Circuit Simulation Library in C++ |
#include <vcdman.h>
lcs::ChangeMonitor
and the static members of the class lcs::Simulation
.ADVICE: DO NOT use this class and its members unless you are sure of what you are doing!
Static Public Member Functions | |
template<typename T> | |
static void | registerChangeReporter (const std::string &varName, const T &var) |
template<typename T> | |
static void | noteChange (const std::string &varName, const T &var) |
Static Private Member Functions | |
static void | setDumpFileName (const std::string &filename) |
static void | setTimeUnit (const TimeUnit &timeunit) |
static void | init (void) |
static void | terminate (void) |
Friends | |
class | Simulation |
static void lcs::VCDManager::init | ( | void | ) | [static, private] |
Initialises the manager.
void lcs::VCDManager::noteChange | ( | const std::string & | varName, | |
const T & | var | |||
) | [static] |
This function should be used to notify the value change of a variable which has been registered with the manager. When this function is called, the value of the variable is dumped into the VCD file. Value changes of only those variables which have been registered previously should be notified. Notifying without previous registertion (using the function lcs::VCDManager::registerChangeReporter
) will lead to errors in the VCD file.
varName | The name of the variable which has changed. This name should exactly be the same as that which was used while registering. | |
var | The variable whose value has changed. |
void lcs::VCDManager::registerChangeReporter | ( | const std::string & | varName, | |
const T & | var | |||
) | [static] |
This function should be used to notify the manager about a variable which has to be dumped. If a variable is not registered with the manager, then the VCD file generated will contain errors.
varName | The name of the variable. It should not have any spaces. Spaces will lead to errors in the VCD file! | |
var | The variable which has to be registered. |
static void lcs::VCDManager::setDumpFileName | ( | const std::string & | filename | ) | [inline, static, private] |
Sets the name of the VCD file. It is private, and hence cannot be used directly. A user will have to use lcs::Simulation::setDumpFileName
instead.
static void lcs::VCDManager::setTimeUnit | ( | const TimeUnit & | timeunit | ) | [inline, static, private] |
Sets the time unit for the system time unit. It is private, and hence cannot be used directly. A user will have to use lcs::Simulation::setTimeUnit
instead.
static void lcs::VCDManager::terminate | ( | void | ) | [static, private] |
Terminates the manager.
friend class Simulation [friend] |
The class lcs::Simulation
is a friend.