Simulating a Task

Top  Previous  Next

To make a stimulus model as reusable as possible, we recommend that you create a testbench in which you instantiate the task you wish to simulate and connect it to a 'Stimulus' component. You can then write code in the stimulus component that exercises the inputs and outputs of your task.

 

 

You should connect your task to the stimulus component using its channels. You are free to write code to drive the signals of these channels yourself, but you can also use VHDL functions and procedures available in the package diamond_pkg compiled in the library diamond. This package can be found in <3L>Diamond\edition\Lyrtech\Xilinx\common\Simulation


Function / Procedure

Description (refer to diamond_pkg.vhd for a complete description)


chan_out_init

Initializes an output channel.  Must be called before calling any other function using the channel


chan_in_init

Initializes an input channel.  Must be called before calling any other function using the channel


chan_in_message

Receives an array of data.


chan_in_word

Receives one word


chan_out_message

Sends an array of data


chan_out_word

Sends one word


clk_generate

Generates a clock