- A Logic Circuit Simulation Library in C++

The system time, and the class Clock

Starting with libLCS-0.0.3, a concept of system time has been incorporated. The units for this time will be reffered to as system time units.

Starting with libLCS-0.0.3 again, a singleton class lcs::Clock is provided. The object of this class acts as a pulse generator. The class lcs::Clock is inherited from the class lcs::InputBus. Its object generates a square pulse with a symmetric duty cycle. The clock object should be initialised using an assignment based copy constructor as follows.

lcs::Clock clk = lcs::Clock::getClock();

The default pulse width (or the high time) is 100 system time units. A user of libLCS can change the pulse width using the function lcs::Clock::setPulseWidth().

Copyright © 2006, 2007 Siva Chandra