Distributed and Complex Systems Group : Homepage

:Vérimag Distributed and Complex Systems Group

BIP -- Incremental Component-based Construction of Real-time Systems

Synchronous Modulo-8 counter

Download BIP code


The application models a synchronous module-8 counter.  The modulo-8 counter is obtained by composition of three modulo-2 counters. The modulo-2 counter is an atomic component described schematically in the figure below. It has the variables X (treated as an input) and Y (treated as an output). The port flip corresponds to a singleton interaction, and the port tick is used for the global synchronous step.
s
The modulo-8 counter is a compound components consisting of three instances of modulo-2, namely bit0, bit1 and bit2, where bit0 represents the least significant bit. The Tick connector(green) connects all the tick ports and represents a strong synchronization. It's transfer function describes the data flow (as shown in black). We use priorities to specify that the Tick interaction has the lowest priority.


 

Steps to execute the application:


  To generate the C++ code for the application,
$ bipc -f synCounter.bip --genC-top SerialCounter   To compile the application,
$ make synCounter.bip.x   To run the execution,
$ synCounter.bip.x -quiet   Ctrl-C to terminate. 
Back to examples