Skip to content

[top,dv] Add testplan for top-level - #668

Open
martin-velay wants to merge 3 commits into
lowRISC:mainfrom
martin-velay:chip_testplan
Open

[top,dv] Add testplan for top-level#668
martin-velay wants to merge 3 commits into
lowRISC:mainfrom
martin-velay:chip_testplan

Conversation

@martin-velay

@martin-velay martin-velay commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Create the full testplan for existing and future tests for top-level DV.

@martin-velay martin-velay linked an issue Jul 13, 2026 that may be closed by this pull request
@martin-velay
martin-velay marked this pull request as ready for review July 13, 2026 16:59
@martin-velay
martin-velay force-pushed the chip_testplan branch 3 times, most recently from b26d306 to 78f957d Compare July 15, 2026 11:52

@marnovandermaas marnovandermaas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My initial review.

"i2c_host_tx_rx_cheri"]
}
{
name: chip_i2c_device_tx_rx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What about i2c host?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What do you mean? i2c_host is just above.

Comment thread hw/top_chip/data/chip_testplan.hjson
SW flushes both FIFOs, acknowledges any pending interrupts, sets threshold
registers to `MAILBOX_FIFO_DEPTH`, enables all three interrupts, then:
- Confirms the read FIFO is empty and write FIFO is not full.
- Writes `MAILBOX_FIFO_DEPTH` elements (0xBEEF0000..N) and confirms the write

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why did you chose the value BEEF0000?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's just an arbitrary value easy to find in ca log or waves. Do you have another suggestion?

Comment thread hw/top_chip/data/chip_testplan.hjson Outdated
Comment thread hw/top_chip/data/chip_testplan.hjson Outdated
Comment thread hw/top_chip/data/chip_testplan.hjson Outdated
Comment thread hw/top_chip/data/chip_testplan.hjson Outdated
Comment thread hw/top_chip/data/chip_testplan.hjson Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It's a bit sad that you are adding the image files before they are available. Is there a cleaner way to add a test that is expected to fail?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I haven't found any other way, and I took this path as it has been mentioned in a meeting that it's good to see some red tests becoming green eventually. I agree with that, then we know directly from a quick glance at the dashboard where we stand. Do you have another suggestion?

Signed-off-by: martin-velay <mvelay@lowrisc.org>
Signed-off-by: martin-velay <mvelay@lowrisc.org>
Signed-off-by: martin-velay <mvelay@lowrisc.org>
@martin-velay

Copy link
Copy Markdown
Contributor Author

@marnovandermaas, I have implemented most of your feedback and answer to your questions. The comment I've marked as resolved are because I am certain it's addressed. I also did some simplification about the IRQ tests and added a forgotten link to the testplan from the sim_cfg file.

@marnovandermaas marnovandermaas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've had another go at reviewing this PR, but I think it still has too many mistakes to approve it. I haven't yet gone through the body text since I already found some mistakes in the categorisation and the test titles, but I assume there will be many more mistakes in the body. My opinion is that we need to cut the pull request down significantly if we are going to merge this in a reasonable time. To make it more manageable, what do you think about deleting the description body text (not the initial sentence) for all the V2 items and that you have a go at checking/rewriting the body text for the V1 points to gain confidence that there are no mistakes there?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a way to prove that these two are equivalent? I don't really want to spend the time manually checking that everything is still there after the re-order.

every byte read back matches the byte written, confirming an agent-driven
controller-mode transaction over the chip I2C pins in both directions.

Both vanilla and CHERI firmware images are exercised.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't think it's worth repeating this for each test.


{
name: chip_clkmgr_smoke
desc: '''Verify software control of gateable and hintable clocks via the clock manager.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The software and hint clocks are unused in Mocha and are likely to be removed in the future.

"clkmgr_smoke_cheri"]
}
{
name: chip_clkmgr_clock_gating

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clock gating is currently not used in the Mocha design and not sure if this will be included in the future.


Both vanilla and CHERI firmware images are exercised.
'''
stage: V1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this necessary for V1 or can this be V2?

once the chip returns to active power.
'''
stage: V2
tests: ["rv_dm_access_after_wakeup"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why does this not have CHERI version?

///////////////////////////////////////////////////////////////////////////

{
name: chip_alert_handler_smoke

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is no alert handler in Mocha.

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.

Top level DV - Create testplan

2 participants