Splitter
If you need to replicate tokens from a single channel to multiple channels, you can use this splitter. While the function of this process is rather generic, this specific implementation is meant for the simulation library and should not be used for final designs. It contains logging functionality meant for testing and verification.
A possible use case for this would be a testing harness, where output from an already verified design unit shall be forwarded into the design under test as well a model. For simplicity, the rest of the testing harness is omitted:
defproc test () { pint D_WIDTH = 32; // the data source with single ended output some_generator source; // the design test_design dut; // model design_model mod; // splitter sim::splitter<D_WIDTH, 2, 0, true> split; // we split the output of the source split.I = source.O; // the output is connected to DUT, model buffer, and scoreboard buffer dut.I = split.O[0]; mod.I = split.O[1]; // here you would put a scoreboard construction to check the output }
Parameters
D_WIDTH
: The bit width of the data busOUT_CHANNELS
: The number of channels incoming tokens should be replicated toSPLITTER_ID
: ID of the splitter to be used in log outputLOG
: Toggles whether or not the splitter should post a log line whenever a token is replicated
Interface
I
: Token input channelO
: Token output channel; array of sizeOUT_CHANNELS
The available process is:
export template<pint D_WIDTH, OUT_CHANNELS, SPLITTER_ID; pbool LOG> defproc splitter (chan?(int<D_WIDTH>) I; chan?(int<D_WIDTH>) O[OUT_CHANNELS]);