- A Logic Circuit Simulation Library in C++ |
Starting with version 0.0.40, libLCS facilitates continuous assignments. A continuous assignment can be made to an object of type lcs::Bus
through the function lcs::Bus::cass
. This is a template function for which a single template parameter, which indicates the assignment delay, has to be explicitly specified. The argument to this function should be an expression of bitwise operations on objects of class lcs::InputBus
(since lcs::Bus
is publicly derived from lcs::InputBus
, the expression can have lcs::Bus
objects also). Detailed examples of using continuous assignments can be found in the examples section.
Inorder to incorporate only a part of a bus into a continuous assignment expression, one should use lcs::InputBus::partBus
or lcs::Bus::partBus
functions. These functions return busses which are formed using a range of lines from the original busses.
NOTE: As of release 0.0.45, one cannot use bitshift operators in continuous assignment expressions. Only &, |, ^ and ~ are supported.