WOLFRAM SYSTEM MODELER
CounterGeneric N Bit Counter Example |
SystemModel["Modelica.Electrical.Digital.Examples.Counter"]
This information is part of the Modelica Standard Library maintained by the Modelica Association.
The counter example is built up by components of the Utilities package which uses components of the Gates library. It demonstrates the generic counter model. The parameter n is the number of counting bits. In this example it is set to 4.
The counter counts the high-low slopes of the clock signal, if the enable signal is set to be true. Otherwise if it is set to zero the counter is not counting.
Plot Counter.count (clock signal), and Counter.enable, and the output bit signals Counter.q[0], Counter.q[1], Counter.q[2], and Counter.q[3]
Enable |
Type: Step Description: Digital Step Source |
|
---|---|---|
clock |
Type: DigitalClock Description: Digital Clock Source |
|
Counter |
Type: Counter Description: Generic N Bit Counter |
|
Q0 |
Type: LogicToReal Description: Logic to Real converter |
|
Q1 |
Type: LogicToReal Description: Logic to Real converter |
|
Q2 |
Type: LogicToReal Description: Logic to Real converter |
|
Q3 |
Type: LogicToReal Description: Logic to Real converter |