Skip to content
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

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

marcelocarvalhoLowRisc
Copy link
Contributor

New fix for the stress_all_gpio testcase with random reset. Basically included new if(reset) checks into the sequences to skip the flow when a reset comes, and replaced the wait_clks task to wait_clks_or_rst. This makes the gpio test pass with a reasonable number of seeds. It's a temporally fix until we have the reset agent on place.

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc requested a review from a team as a code owner December 16, 2024 09:52
@marcelocarvalhoLowRisc marcelocarvalhoLowRisc requested review from matutem and removed request for a team December 16, 2024 09:52
@marcelocarvalhoLowRisc marcelocarvalhoLowRisc force-pushed the rnd_reset_debug branch 14 times, most recently from ada03cb to 245aab3 Compare December 16, 2024 12:07
@rswarbrick
Copy link
Contributor

Please could you squash all these commits together?

@marcelocarvalhoLowRisc
Copy link
Contributor Author

Thanks!

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc force-pushed the rnd_reset_debug branch 2 times, most recently from 354ccf3 to 1d90818 Compare December 19, 2024 15:51
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marcelocarvalhoLowRisc! I've just gone through the changed files and I think my questions from December 17th still apply. Would you mind going through and updating things?

@marcelocarvalhoLowRisc
Copy link
Contributor Author

Hi @marcelocarvalhoLowRisc! I've just gone through the changed files and I think my questions from December 17th still apply. Would you mind going through and updating things?

I think now everything is fixed, sometimes I missed some comments that was not in the main page or in the commit section. Sorry about that

Comment on lines 37 to 38
`uvm_info(msg_id, $sformatf("gpio_i = %0h", gpio_i), UVM_LOW)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can drop this hunk (which changes a verbosity level and adds a newline).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

Comment on lines 65 to 70
//Skip if a reset is ongoing...
if (!cfg.clk_rst_vif.rst_n) break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment still applies (now on line 70)

Comment on lines 48 to 49
// Skip if a reset is ongoing...
if (!cfg.clk_rst_vif.rst_n) break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this break statement will have any effect.

The next one won't either, but I guess at least it avoids us generating a pointless UVM transaction. This one should probably be dropped.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept the second one, and removed the first one. =)

Comment on lines 79 to 76
cfg.clk_rst_vif.wait_clks_or_rst(delay);
`uvm_info(msg_id, $sformatf("waiting for %0d clock cycles", delay), UVM_HIGH)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that this isn't caused by your change, but this is rather silly! It prints the message after it has waited! I'd probably swap the two lines over.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahahah, fixed =)

Updates to the sequences to replace the wait_clk to wait_clks_or_rst.
Signed-off-by: Marcelo Carvalho Faleiro de Almeida <[email protected]>
Copy link
Contributor Author

@marcelocarvalhoLowRisc marcelocarvalhoLowRisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all fixed from my side.

Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good to me.

@rswarbrick rswarbrick merged commit 757ccdf into lowRISC:master Feb 7, 2025
38 checks passed
@marcelocarvalhoLowRisc marcelocarvalhoLowRisc deleted the rnd_reset_debug branch February 7, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants