This is an old revision of the document!


Namespace sim

The sim namespace contains a collection of process definitions that can be used to create simple test environments for simulation purposes.

export template<pint W, V> defproc source (chan!(int<W>) O);

This creates a data source that has bit-width W, and that repeatedly sends the constant value V on the output port O.

export template<pbool LOG; pint W> defproc sink(chan?(int<W>) I);

This process acts as a data sink; it repeatedly receives W-bit input on the input port I. If the LOG parameter is set to true, then it also displays the value received using the log() command.

export template<pint W; pbool REP; pint N; pint data[N]>
defproc source_seq(chan!(int<W>) O);