Simulation Testbench

CustomLogic is delivered with a simulation testbench capable to stimulate all CustomLogic interfaces. It also captures data at backend side from the Data Stream, Metadata, and Memento Event interfaces. The results (captured data) are stored in files with extension ‘.dat’ in the folder: <variant short-name>/07_vivado_project/CustomLogic.sim/sim_1/behave/xsim

The testbench is integrated in the Vivado project created by the script ‘create_vivado_project.tcl’. To start the simulation, enter the command ‘launch_simulation’ into Vivado’s Tcl Console.

The file ‘SimulationCtrl_tb.vhd’ allows the user to control the testbench. This file contains a process called ‘Simulation’ where is possible to create a sequence of actions for the testbench via a set of commands as in the following example:

Simulation : process
Begin
	-- Enable Data Stream at channel 0
	EnableDataStream	(clk,status,ctrl, 0);
	
	-- Request 5 frames (256x10 Mono8) at channel 0. 
	FrameRequest		(clk,status,ctrl, 0, 5, 256, 10, Mono8);
	
	-- Disable Data Stream at channel 0
	DisableDataStream	(clk,status,ctrl, 0);

	-- End simulation
	std.env.finish;
end process;

A description of all available commands can be found in the file ‘SimulationCtrl_tb.vhd’ located in the folder: <variant short-name>/04_ref_design/sim

Regarding the ‘On-Board Memory Interface’, the storage size of the test bench model is limited to 2 MB.