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

[pattgen,dv] General code tidy-up #26318

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

rswarbrick
Copy link
Contributor

There a detailed notes in the commits, but a big chunk of this work is in pattgen_base_vseq (which was quite long, so had several possible cleanups).

@rswarbrick rswarbrick added Component:DV DV issue: testbench, test case, etc. IP:pattgen labels Feb 16, 2025
@rswarbrick rswarbrick requested a review from a team as a code owner February 16, 2025 23:05
@rswarbrick rswarbrick requested review from eshapira and removed request for a team February 16, 2025 23:05
No functional change, but this adds some documentation comments and
also sets list_of_alerts a bit earlier (in the constructor instead of
initialize()).

Signed-off-by: Rupert Swarbrick <[email protected]>
The variable is only used in the stress sequence, so it probably makes
more sense to define it there, instead of the base vseq.

Signed-off-by: Rupert Swarbrick <[email protected]>
This is just getting rid of a class variable.

Signed-off-by: Rupert Swarbrick <[email protected]>
Rather than a function that operates in place on a reference, just use
a task: there's only ever one thing being modified.

Also, change the naming to "left rotate", which matches how things
look in MSB-first SystemVerilog.

Signed-off-by: Rupert Swarbrick <[email protected]>
We now have a setup_pattgen_channel task, which takes the channel
index as an argument.

Signed-off-by: Rupert Swarbrick <[email protected]>
It's dramatically easier to use this with the channel index instead of
the enum that we were using. Write the simpler version and add a
documentation comment.

Signed-off-by: Rupert Swarbrick <[email protected]>
This should be a little less tied in with the two channel setup and
avoid a bit of repetition.

Signed-off-by: Rupert Swarbrick <[email protected]>
The call sites already had the "is an error injected?" logic. Use that.

Signed-off-by: Rupert Swarbrick <[email protected]>
This was an enum representing the four possibilities for a 2-bit
bitmask in a rather confusing way. Get rid of it.

Signed-off-by: Rupert Swarbrick <[email protected]>
This is only ever set to 50% and is used to weight the random choice
of a bit (and it seems unlikely we'll ever care more about one
polarity).

Get rid of the unused customizability.

Signed-off-by: Rupert Swarbrick <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. IP:pattgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant