Skip to content

Commit f20fef9

Browse files
Randomization: Added seed change option at block design creation and simulation seed status at start
Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
1 parent 3fde7c7 commit f20fef9

File tree

72 files changed

+505
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+505
-83
lines changed

testbenches/ip/axi_tdd/system_project.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ adi_sim_project_files [list \
2727
adi_sim_add_define "TEST_PROGRAM=test_program"
2828

2929
adi_sim_generate $project_name
30+
31+
# Use this only for debugging specific seeds that failed previously
32+
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]

testbenches/ip/axi_tdd/tests/test_program.sv

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,17 @@ program test_program;
8787
tdd_clk_per = tdd_clk_s2 - tdd_clk_s1;
8888
end
8989

90+
// process variables
91+
process current_process;
92+
string current_process_random_state;
93+
9094
initial begin
95+
96+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
97+
98+
current_process = process::self();
99+
current_process_random_state = current_process.get_randstate();
100+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
91101

92102
//creating environment
93103
base_env = new("Base Environment",
@@ -98,8 +108,6 @@ program test_program;
98108
`TH.`MNG_AXI.inst.IF,
99109
`TH.`DDR_AXI.inst.IF);
100110

101-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
102-
103111
base_env.start();
104112
start_clocks();
105113
base_env.sys_reset();

testbenches/ip/axis_sequencers/system_project.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ adi_sim_generate $project_name
3232
# Use this only for debugging specific seeds that failed previously
3333
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]
3434

35+
# Use this only for debugging specific seeds that failed previously
36+
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]
37+

testbenches/ip/axis_sequencers/tests/test_program.sv

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,18 @@ program test_program;
6060

6161
watchdog send_data_wd;
6262

63+
// process variables
64+
process current_process;
65+
string current_process_random_state;
66+
6367
initial begin
6468

69+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
70+
71+
current_process = process::self();
72+
current_process_random_state = current_process.get_randstate();
73+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
74+
6575
// create environment
6676
base_env = new("Base Environment",
6777
`TH.`SYS_CLK.inst.IF,
@@ -75,8 +85,6 @@ program test_program;
7585
`TH.`SRC_AXIS.inst.IF,
7686
`TH.`DST_AXIS.inst.IF);
7787

78-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
79-
8088
base_env.start();
8189
axis_seq_env.start();
8290

testbenches/ip/base/tests/test_program.sv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ program test_program;
5454
process current_process;
5555
string current_process_random_state;
5656

57-
5857
initial begin
5958

6059
setLoggerVerbosity(ADI_VERBOSITY_NONE);

testbenches/ip/data_offload/system_project.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ adi_sim_project_files [list \
3131
adi_sim_add_define "TEST_PROGRAM=test_program"
3232

3333
adi_sim_generate $project_name
34+
35+
# Use this only for debugging specific seeds that failed previously
36+
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]

testbenches/ip/data_offload/tests/test_program.sv

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,18 @@ program test_program;
6969
data_offload_api do_tx;
7070
data_offload_api do_rx;
7171

72+
// Process variables
73+
process current_process;
74+
string current_process_random_state;
75+
7276
initial begin
7377

78+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
79+
80+
current_process = process::self();
81+
current_process_random_state = current_process.get_randstate();
82+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
83+
7484
// create environment
7585
base_env = new("Base Environment",
7686
`TH.`SYS_CLK.inst.IF,
@@ -96,10 +106,6 @@ program test_program;
96106
// Setup generator/monitor stubs
97107
//=========================================================================
98108

99-
//=========================================================================
100-
101-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
102-
103109
base_env.start();
104110
scb_env.start();
105111

testbenches/ip/data_offload_2/system_project.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ adi_sim_project_files [list \
4242
adi_sim_add_define "TEST_PROGRAM=test_program"
4343

4444
adi_sim_generate $project_name
45+
46+
# Use this only for debugging specific seeds that failed previously
47+
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]

testbenches/ip/data_offload_2/tests/test_program.sv

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,18 @@ module test_program(
6767
`AGENT(test_harness, HBM_VIP, slv_mem_t) hbm_axi_agent;
6868
`endif
6969

70+
// Process variables
71+
process current_process;
72+
string current_process_random_state;
73+
7074
initial begin
75+
76+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
77+
78+
current_process = process::self();
79+
current_process_random_state = current_process.get_randstate();
80+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
81+
7182
//creating environment
7283
env = new(`TH.`MNG_AXI.inst.IF,
7384
`TH.`SRC_AXIS.inst.IF,
@@ -90,8 +101,6 @@ module test_program(
90101

91102
//=========================================================================
92103

93-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
94-
95104
env.scoreboard.set_oneshot(`OFFLOAD_ONESHOT);
96105
env.scoreboard.set_path_type(`OFFLOAD_PATH_TYPE);
97106

testbenches/ip/data_offload_2/tests/test_program_sync.sv

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,18 @@ module test_program_sync (
5959

6060
data_offload dut;
6161

62+
// Process variables
63+
process current_process;
64+
string current_process_random_state;
65+
6266
initial begin
67+
68+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
69+
70+
current_process = process::self();
71+
current_process_random_state = current_process.get_randstate();
72+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
73+
6374
//creating environment
6475
env = new(`TH.`MNG_AXI.inst.IF,
6576
`TH.`SRC_AXIS.inst.IF,
@@ -81,8 +92,6 @@ module test_program_sync (
8192

8293
//=========================================================================
8394

84-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
85-
8695
env.scoreboard.set_oneshot(1);
8796

8897
start_clocks();

0 commit comments

Comments
 (0)