`timescale 100ps/100ps
module stimulus();
//===========================================================================================
// Instantiate the test bench and sim_services().
//===========================================================================================
import sim_services_package::*;
[B]reg sim_pim1_uclock0 = 1;//IEA Added
reg sim_pim1_uclock1 = 1;//IEA Added
reg sim_pim1_uclock2 = 1;//IEA Added
reg sim_pim1_uclock3 = 1;//IEA Added
always//IEA Added
#2500 sim_pim1_uclock0 = ~sim_pim1_uclock0; // 6.80 nS period 147.06 MHz NEW//IEA Added
always//IEA Added
#2500 sim_pim1_uclock1 = ~sim_pim1_uclock1; // 6.80 nS period 147.06 MHz NEW//IEA Added
always//IEA Added
#2500 sim_pim1_uclock2 = ~sim_pim1_uclock2; // 6.80 nS period 147.06 MHz NEW//IEA Added
always//IEA Added
#2500 sim_pim1_uclock3 = ~sim_pim1_uclock3; // 6.80 nS period 147.06 MHz NEW//IEA Added
//assign i_pim1_uclk_p = {sim_pim1_uclock3, sim_pim1_uclock2, sim_pim1_uclock1, sim_pim1_uclock0};
//assign i_pim1_uclk_n = ~i_pim1_uclk_p;
wire [3:0] pgm_user_clk_p = {sim_pim1_uclock3, sim_pim1_uclock2, sim_pim1_uclock1, sim_pim1_uclock0};
wire [3:0] pgm_user_clk_n = ~pgm_user_clk_p;
local_g1_test_bench u_local_g1_test_bench (
.o_pim_uclk_p ( pgm_user_clk_p ), // output [3:0] //
.o_pim_uclk_n ( pgm_user_clk_n ) // output [3:0] //
);[/B]
initial
begin
u_sim_services = new();
u_sim_services.set_test_name( "wtest_hotlink_pim1_rx_only_simple" );
u_sim_services.set_test_description( "Tb generates hotlink rx messages. Verify Aurora sdma TLPs.");
force u_local_g1_test_bench.failsafe_timeout_in_microseconds = 'd800;
// Tell the EBC bus model to get going.
u_local_g1_test_bench.EBC_GO = 1;
// Tell the Aurora RX transactor to get going.
wait( u_local_g1_test_bench.u_simulation_aurora_xactor_g1.u_xactor_core.o_aur_channel_up );
u_local_g1_test_bench.AURORA_RX_GO = 1;
// Enable the UUT to transmit BIT/Status messages
u_local_g1_test_bench.hotlink_sim_enable = 1;
#50000; // Delay 5uS = 5,000,000 ps/100ps
// Drive Timestamp_sync to TDF and transactors. For this simulation, align carefully so that
// timestamp values evenly divisible by 4 align with rising edges of REFCLK.
wait( u_local_g1_test_bench.u_g1_top.U_pim1_vhdl.U_g1_applic_top_vhdl.refclk_capt_tk );
repeat(4)
@(posedge u_local_g1_test_bench.u_g1_top.U_pim1_vhdl.i_clk);
u_local_g1_test_bench.timestamp_sync = 1;
// Wait for all transactors to finish
fork
// Wait for the aurora bus model to finish
wait( u_local_g1_test_bench.AURORA_RX_DONE );
// Now just wait for the signal from the ebc bus model.
wait( u_local_g1_test_bench.EBC_DONE );
wait( u_local_g1_test_bench.HOTLINK_DONE );
join
#10000; // Delay 1uS = 1,000,000 ps/100ps
u_sim_services.print_test_results;
$finish;
end
endmodule