Hard Processor System Component Reference Manual: Agilex™ 5 SoCs

ID 813752
Date 8/15/2025
Public
Document Table of Contents

4.3.1. my_simple_tb.sv

  1. Locate simple_tb.v and copy it to your own file.
    1. cd <project directory>/simple_tb/simple_tb/sim/
    2. cp simple_tb.v my_simple_tb.sv
  2. Edit the newly created mysimple_tb.sv file and add the function calls highlighted below, as well as the optional delay code afterward. These function calls test each bridge and details are provided in the later section.
    // my_simple_tb.v
    
    `timescale 1 ps / 1 ps
    module simple_tb (
    	);
    
    	wire    simple_inst_clk_bfm_clk_clk;       // simple_inst_clk_bfm:clk -> [simple_inst:clk_clk, simple_inst_reset_bfm:clk]
    	wire    simple_inst_reset_bfm_reset_reset; // simple_inst_reset_bfm:reset -> simple_inst:reset_reset
    
    	simple_inst_clk_bfm_ip simple_inst_clk_bfm (
    		.clk (simple_inst_clk_bfm_clk_clk)  //  output,  width = 1, clk.clk
    	);
    
    	simple_inst_reset_bfm_ip simple_inst_reset_bfm (
    		.reset (simple_inst_reset_bfm_reset_reset), //  output,  width = 1, reset.reset
    		.clk   (simple_inst_clk_bfm_clk_clk)        //   input,  width = 1,   clk.clk
    	);
    
    	simple simple_inst (
    		.clk_clk     (simple_inst_clk_bfm_clk_clk),       //   input,  width = 1,   clk.clk
    		.reset_reset (simple_inst_reset_bfm_reset_reset)  //   input,  width = 1, reset.reset
    	);
    
    
    // call the functions which test the bridges
    test_lwh2f		lwh2f_test_m ();	// <module>  <define>
    test_h2f		h2f_test_m ();
    test_f2sdram	f2sdram_test_m ();
    test_f2h		f2h_test_m ();
    
    initial begin 
       $display ("\n>>>>>>>> -----   BEGIN my_simple_tb   -------- >>>>>>>>>>>  \n\n");
       #20000000   // optional delay - if timescale is 1ps/1ps, then  20000000ps = 20us
       $display ("\n\n>>>>>> -----   END   my_simple_tb   -------- >>>>>>>>>>>>>  \n");   
       $finish;
    end
    
    endmodule