Previous: The VHDL to C++ compiler Up: The VHDL to C++ compiler Next: Code generation

The Runtime Organisation

The runtime organisation defines the interface between the generated C++ code and the parallel kernel, and consists of a number of C++ class definitions. These classes serve to raise the semantic level of C++ to that of VHDL. In fact it is possible, although cumbersome, to write a VHDL-like description in C++, using the runtime environment. The advantages of the high level runtime organisation are that we are able to develop the VHDL compiler with a minimum of effort.

The three most important classes are called Value, Signal and Process. These are shown in more detail below.

Value
The Value class offers a single datatype to represent every possible VHDL type. This greatly simplifies the interface of the runtime environment. Reference counting is used to implement a garbage collector.

Signal
The Signal class is used to represent all VHDL signals. Scalar signals contain the current value as an object of type Value. Composite signals consist of an array of Signal.

Process
The Process class implements concurrent processes. Process are automatically suspended when they wait for signals, and they are resumed as soon as the signals are updated. Processes are implemented as light weight threads using a special library.

www@einstein