Skip to content

ExceptionsZalrsc test generator with 92% coverage#1019

Open
Teemooooooooo wants to merge 17 commits intoriscv:act4from
Teemooooooooo:Zalrsc
Open

ExceptionsZalrsc test generator with 92% coverage#1019
Teemooooooooo wants to merge 17 commits intoriscv:act4from
Teemooooooooo:Zalrsc

Conversation

@Teemooooooooo
Copy link
Contributor

@Teemooooooooo Teemooooooooo commented Mar 2, 2026

ExceptionsZalrsc python test generator at 92% coverage

Copy link
Collaborator

@davidharrishmc davidharrishmc left a comment

Choose a reason for hiding this comment

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

Many little things. Going a good direction!

@davidharrishmc
Copy link
Collaborator

davidharrishmc commented Mar 6, 2026 via email

@Teemooooooooo Teemooooooooo changed the title ExceptionsZalrsc 100% Coverage ExceptionsZalrsc not at 100% Coverage because of SAIL bug Mar 9, 2026
Copy link
Collaborator

@davidharrishmc davidharrishmc left a comment

Choose a reason for hiding this comment

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

Good to go after minor spacing fixes and merging into the latest version.

@davidharrishmc
Copy link
Collaborator

Could you add a comment in the coverage file by the coverpoints that aren't hit indicating why and pointing to the Sail bug, so we don't forget this and have to debug again later?

@jordancarlin jordancarlin changed the title ExceptionsZalrsc not at 100% Coverage because of SAIL bug ExceptionsZalrsc test generator with 92% coverage Mar 10, 2026
Copy link
Collaborator

@jordancarlin jordancarlin left a comment

Choose a reason for hiding this comment

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

One last comment and then this looks good to go.

Comment on lines +65 to +73
f" LI(x{data_reg}, 0xDECAFCAB)",
f" LI(x{temp_reg}, 0xBAD)",
test_data.add_testcase(f"lr.w_off{offset}", coverpoint, covergroup),
f" lr.w x{temp_reg}, (x{addr_reg})", # establish reservation
" nop",
write_sigupd(temp_reg, test_data),
f" LI(x{rd_reg}, 0xBAD)", # previous rd greater than 1
test_data.add_testcase(f"sc.w_off{offset}", coverpoint, covergroup),
f" sc.w x{rd_reg}, x{data_reg}, (x{addr_reg})",
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are limits on how many instruction can be between lr.w and sc.w. To avoid conflating this test with that limit, let's move the LI(x{rd_reg}, 0xBAD) before the lr.w. So initialize all of the registers, then do the lr.w and then do the sc.w (with a nop in between). Let's also move the write_sigupd for the temp_reg after the sc.w since it should not change in between helps avoid running extra instructions between them. This applies to all sc.w/sc.d tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of the reason that I put the LI(x{rd_reg}, 0xBAD) before the sc.w is because one of the coverpoint is rd_gt_one_prev. If I move it, it would just be nop before the sc.w, should I still move it?

@davidharrishmc
Copy link
Collaborator

davidharrishmc commented Mar 10, 2026 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.

3 participants