-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the gpio_stress_all with random reset #25657
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ class gpio_rand_intr_trigger_vseq extends gpio_base_vseq; | |
string msg_id = {`gfn, $sformatf(" Transaction-%0d", tr_num)}; | ||
|
||
`DV_CHECK_MEMBER_RANDOMIZE_FATAL(delay) | ||
cfg.clk_rst_vif.wait_clks(delay); | ||
cfg.clk_rst_vif.wait_clks_or_rst(delay); | ||
`uvm_info(msg_id, $sformatf("delay = %0d", delay), UVM_HIGH) | ||
|
||
// Step-1 Program interrupt registers | ||
|
@@ -52,7 +52,7 @@ class gpio_rand_intr_trigger_vseq extends gpio_base_vseq; | |
cfg.gpio_vif.drive(gpio_i); | ||
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(delay_before_gpio_change, | ||
delay_before_gpio_change inside {[1:5]};) | ||
cfg.clk_rst_vif.wait_clks(delay_before_gpio_change); | ||
cfg.clk_rst_vif.wait_clks_or_rst(delay_before_gpio_change); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, I think we probably want to return here if we're in reset? |
||
end | ||
gpio_tgl_cycle_done = 1'b1; | ||
end | ||
|
@@ -61,7 +61,11 @@ class gpio_rand_intr_trigger_vseq extends gpio_base_vseq; | |
uint rd_period; | ||
bit [TL_DW-1:0] reg_rd_data; | ||
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(rd_period, rd_period inside {[2:20]};) | ||
cfg.clk_rst_vif.wait_clks(rd_period); | ||
|
||
// Skip if a reset is ongoing... | ||
if (!cfg.clk_rst_vif.rst_n) break; | ||
|
||
cfg.clk_rst_vif.wait_clks_or_rst(rd_period); | ||
`uvm_info(msg_id, $sformatf("Reading intr_state after %0d more clock cycles", | ||
rd_period), UVM_HIGH) | ||
randcase | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class gpio_random_dout_din_vseq extends gpio_base_vseq; | |
for (uint tr_num = 0; tr_num < num_trans; tr_num++) begin | ||
|
||
`DV_CHECK_RANDOMIZE_FATAL(this) | ||
cfg.clk_rst_vif.wait_clks(delay); | ||
cfg.clk_rst_vif.wait_clks_or_rst(delay); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you probably need to return after this line if we are in reset. |
||
|
||
randcase | ||
// drive new gpio data in | ||
|
@@ -42,7 +42,13 @@ class gpio_random_dout_din_vseq extends gpio_base_vseq; | |
`DV_CHECK_STD_RANDOMIZE_FATAL(gpio_i) | ||
// drive gpio_vif after setting all output enables to 0's | ||
drive_gpio_in(gpio_i); | ||
cfg.clk_rst_vif.wait_clks(1); | ||
|
||
// Skip if a reset is ongoing... | ||
if (!cfg.clk_rst_vif.rst_n) break; | ||
cfg.clk_rst_vif.wait_clks_or_rst(1); | ||
|
||
// Skip if a reset is ongoing... | ||
if (!cfg.clk_rst_vif.rst_n) break; | ||
// read data_in register | ||
csr_rd(.ptr(ral.data_in), .value(data_in)); | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,18 @@ class gpio_random_long_reg_writes_reg_reads_vseq extends gpio_base_vseq; | |
// Wait for minimum 1 clock cycle initially to avoid reading of data_in | ||
// immediately as the first iteration after reset, while data_in prediction | ||
// is still being processed | ||
cfg.clk_rst_vif.wait_clks(1); | ||
cfg.clk_rst_vif.wait_clks_or_rst(1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we need to return if we've seen a reset? |
||
|
||
for (uint tr_num = 0; tr_num < num_trans; tr_num++) begin | ||
string msg_id = {`gfn, $sformatf(" Transaction-%0d", tr_num)}; | ||
uint num_reg_op; | ||
`DV_CHECK_MEMBER_RANDOMIZE_FATAL(delay) | ||
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(num_reg_op, num_reg_op inside {[25:50]};) | ||
|
||
cfg.clk_rst_vif.wait_clks(delay); | ||
cfg.clk_rst_vif.wait_clks_or_rst(delay); | ||
// Skip if a reset is ongoing... | ||
if (!cfg.clk_rst_vif.rst_n) return; | ||
|
||
randcase | ||
// drive new gpio data in | ||
1: begin | ||
|
@@ -41,7 +44,7 @@ class gpio_random_long_reg_writes_reg_reads_vseq extends gpio_base_vseq; | |
// drive gpio_vif after setting all output enables to 0's | ||
drive_gpio_in(gpio_i); | ||
// Wait for one clock cycle for us to read data_in reg reliably | ||
cfg.clk_rst_vif.wait_clks(1); | ||
cfg.clk_rst_vif.wait_clks_or_rst(1); | ||
end | ||
// long reg write | ||
1: begin | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to return here if we're in reset?