Skip to content

Commit 9a5492f

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 46b53bb commit 9a5492f

File tree

69 files changed

+472
-80
lines changed

Some content is hidden

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

69 files changed

+472
-80
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
@@ -84,7 +84,17 @@ program test_program;
8484
tdd_clk_per = tdd_clk_s2 - tdd_clk_s1;
8585
end
8686

87+
// process variables
88+
process current_process;
89+
string current_process_random_state;
90+
8791
initial begin
92+
93+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
94+
95+
current_process = process::self();
96+
current_process_random_state = current_process.get_randstate();
97+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
8898

8999
//creating environment
90100
base_env = new("Base Environment",
@@ -95,8 +105,6 @@ program test_program;
95105
`TH.`MNG_AXI.inst.IF,
96106
`TH.`DDR_AXI.inst.IF);
97107

98-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
99-
100108
base_env.start();
101109
start_clocks();
102110
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
@@ -57,8 +57,18 @@ program test_program;
5757

5858
watchdog send_data_wd;
5959

60+
// process variables
61+
process current_process;
62+
string current_process_random_state;
63+
6064
initial begin
6165

66+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
67+
68+
current_process = process::self();
69+
current_process_random_state = current_process.get_randstate();
70+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
71+
6272
// create environment
6373
base_env = new("Base Environment",
6474
`TH.`SYS_CLK.inst.IF,
@@ -71,8 +81,6 @@ program test_program;
7181
axis_seq_env = new("Axis Sequencers Environment",
7282
`TH.`SRC_AXIS.inst.IF,
7383
`TH.`DST_AXIS.inst.IF);
74-
75-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
7684

7785
base_env.start();
7886
axis_seq_env.start();

testbenches/ip/base/system_project.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ adi_sim_generate $project_name
2828

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

testbenches/ip/base/tests/test_program.sv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ program test_program;
5151
process current_process;
5252
string current_process_random_state;
5353

54-
5554
initial begin
5655

5756
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
@@ -42,5 +42,8 @@ adi_sim_add_define "TEST_PROGRAM=test_program"
4242

4343
adi_sim_generate $project_name
4444

45+
# Use this only for debugging specific seeds that failed previously
46+
#set_property -name {xsim.simulate.xsim.more_options} -value {-sv_seed 1695199824} -objects [get_filesets sim_1]
47+
4548
#launch_simulation
4649
#run all

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/dma_flock/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/dma_flock/tests/test_program.sv

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ program test_program;
6666
int has_dfsync;
6767
int sync_gen_en;
6868

69+
// process variables
70+
process current_process;
71+
string current_process_random_state;
72+
6973
initial begin
74+
75+
setLoggerVerbosity(ADI_VERBOSITY_NONE);
76+
77+
current_process = process::self();
78+
current_process_random_state = current_process.get_randstate();
79+
`INFO(("Randomization state: %s", current_process_random_state), ADI_VERBOSITY_NONE);
80+
7081
//creating environment
7182
base_env = new("Base Environment",
7283
`TH.`SYS_CLK.inst.IF,
@@ -83,8 +94,6 @@ program test_program;
8394
has_sfsync = `M_DMA_CFG_USE_EXT_SYNC;
8495
has_dfsync = `S_DMA_CFG_USE_EXT_SYNC;
8596

86-
setLoggerVerbosity(ADI_VERBOSITY_NONE);
87-
8897
base_env.start();
8998
dma_flock_env.start();
9099

0 commit comments

Comments
 (0)