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

Update RV64I sraw test cases #565

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

trdthg
Copy link
Contributor

@trdthg trdthg commented Nov 19, 2024

Description

  • Add sraw to unsgn_rs2 group, rs2 is shift, which should be unsign
  • The sraw testcases were very old with a covarage of 98.20% (109/111), this patch regenerate the cases with riscv_ctg (without -r), making covarageto 100%.

Related Issues

Ratified/Unratified Extensions

  • Ratified
  • Unratified

List Extensions

List the extensions that your PR affects. In case of unratified extensions, please provide a link to the spec draft that was referred to make this PR.

Reference Model Used

  • SAIL
  • Spike
  • Other - < SPECIFY HERE >

Mandatory Checklist:

Optional Checklist:

  • Were the tests hand-written/modified ?
  • Have you run these on any hard DUT model ? Please specify name and provide link if possible in the description
  • If you have modified arch_test.h Please provide a detailed description of the changes in the Description section above.

- Add sraw to unsgn_rs2 group
- The sraw testcases were very old with a covarage of 98.20% (109/111),
  this patch regenerate the cases with riscv_ctg (without `-r`), making
  covarageto 100%.
@trdthg trdthg changed the title Update sraw test cases Update RV64I sraw test cases Nov 19, 2024
@allenjbaum
Copy link
Collaborator

allenjbaum commented Nov 19, 2024 via email

@trdthg
Copy link
Contributor Author

trdthg commented Nov 20, 2024

I thought this is strange too.

My ctg command is below:

riscv_ctg -v debug -d ./tests/ -cf ./coverage/dataset.cgf -cf ./coverage/i/rv64i.cgf -bi rv64i -p2

I checked the 35 generated tests:

  • op1, op2, rd are basically gradually decreasing, from x31 to x0, covering all cases of coverage
  • The first 7 and the last 2 cover all of val_comb.rfmt_base_shift

It does seem to be covered, after all, 111 is the sum of these coverage points

The last generation was 4 years ago, and I don't know exactly what happened.


(I'm not sure what the -r option does)

-r, --randomize Randomize Outputs.

> If randomization is enabled we use the `MinConflictsSolver` solver to find solutions.

if self.random:
problem = Problem(MinConflictsSolver())
else:
problem = Problem()

I haven't tested the behavior of MinConflictsSolver, and I suspect it may lead to generated tests being difficult to reproduce

After some testing, I found that the tests ctg generated each time is different. This is completely different from what I expected. I also had another person try it, and the results were also different.

@allenjbaum
Copy link
Collaborator

allenjbaum commented Nov 20, 2024 via email

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.

2 participants