From 5c7237fb407cfccaee205980d97e40ce10768c2a Mon Sep 17 00:00:00 2001 From: Andrew Moch Date: Thu, 19 Mar 2020 19:55:53 +0100 Subject: fpga: Fix errors found by linting with vsim --- .../lib/rfnoc/crossbar/crossbar_tb/chdr_traffic_source_sim.sv | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'fpga/usrp3/lib/rfnoc/crossbar') diff --git a/fpga/usrp3/lib/rfnoc/crossbar/crossbar_tb/chdr_traffic_source_sim.sv b/fpga/usrp3/lib/rfnoc/crossbar/crossbar_tb/chdr_traffic_source_sim.sv index 8c3d974c9..e6cb7c5d9 100644 --- a/fpga/usrp3/lib/rfnoc/crossbar/crossbar_tb/chdr_traffic_source_sim.sv +++ b/fpga/usrp3/lib/rfnoc/crossbar/crossbar_tb/chdr_traffic_source_sim.sv @@ -72,10 +72,12 @@ module chdr_traffic_source_sim #( input [7:0] traffic_patt; input [15:0] last_sid; + logic [31:0] rnum; + if (traffic_patt == TRAFFIC_PATT_UNIFORM) begin gen_dst_sid = $urandom_range('d0, NUM_NODES-'d1); end else if (traffic_patt == TRAFFIC_PATT_UNIFORM_OTHERS) begin - logic [31:0] rnum = $urandom_range('d0, NUM_NODES-'d2); + rnum = $urandom_range('d0, NUM_NODES-'d2); if (rnum < NODE_ID) gen_dst_sid = rnum[15:0]; else @@ -99,7 +101,9 @@ module chdr_traffic_source_sim #( // Generation loop. Push to m_chdr infinitely fast initial begin: gen_blk // Generate infinitely - $srandom(NODE_ID + NUM_NODES); + std::process p; + p = process::self(); + p.srandom(NODE_ID + NUM_NODES); m_chdr.reset(); while (1) begin // A generation session begins on the posedge of start_stb -- cgit v1.2.3