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

[flash_ctrl] Change FIFO interrupts to status type #21226

Merged
merged 6 commits into from
Mar 1, 2024

Conversation

msfschaffner
Copy link
Contributor

@msfschaffner msfschaffner commented Feb 6, 2024

The first two commits patch up common infrastructure:

  1. The clear_all_interrupts task in the cip_base_vseq needs to be adjusted so that it does not fail when status interrupts remain asserted (since they cannot be cleared via a write to the INTR_STATE register.
  2. Another optional field default is added to the interrupt declaration in the IP Hjson file. This allows us to define what the default expectation of the interrupt should be during automatically generated tests such as the chip_plic_all_irqs top-level test. That test is aligned to treat status interrupts differently now. In particular, the ones that are asserted by default will not be enabled until that specific interrupt is being tested.

The last two commits are the changes in flash_ctrl, aligning the interrupt type behavior according to #21211.

This fixes #21211

@msfschaffner msfschaffner self-assigned this Feb 6, 2024
@msfschaffner msfschaffner force-pushed the flash-ctrl-irqs branch 6 times, most recently from 4811b62 to 2ae1820 Compare February 6, 2024 21:40
@msfschaffner msfschaffner force-pushed the flash-ctrl-irqs branch 5 times, most recently from b6abd1b to 7facc39 Compare February 6, 2024 23:27
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.

I've not carefully reviewed the last commit, but the rest looked sensible to me. I think there are a couple of tweaks that might be worth doing to make it easier to understand.

hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv Show resolved Hide resolved
hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv Outdated Show resolved Hide resolved
hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv Outdated Show resolved Hide resolved
hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv Outdated Show resolved Hide resolved
util/reggen/interrupt.py Outdated Show resolved Hide resolved
@msfschaffner msfschaffner force-pushed the flash-ctrl-irqs branch 6 times, most recently from 7acf5f0 to 21790b4 Compare February 28, 2024 23:18
@jdonjdon
Copy link
Contributor

@msfschaffner flash_ctrl block dv cleanup is updated here

@msfschaffner msfschaffner force-pushed the flash-ctrl-irqs branch 5 times, most recently from 380d7ff to adbbc22 Compare February 29, 2024 19:38
@msfschaffner msfschaffner force-pushed the flash-ctrl-irqs branch 3 times, most recently from 49b2191 to 96d2a21 Compare March 1, 2024 01:27
Only event type interrupts can be cleared by writing 1 to them since
they are W1C. Status type interrupts cannot be cleared that way since
they are RO for SW. Instead, the underlying cause has to be addressed,
such as reading out a FIFO if it is above a certain watermark level.

Signed-off-by: Michael Schaffner <[email protected]>
This allows to specify whether a status type interrupt is expected to
assert by default. The field is intended to be used in generated DV
collateral, primarily.

Signed-off-by: Michael Schaffner <[email protected]>
This adds the option to mute status type IRQs in the testutils ISR,
given that an IP contains status type interrupts.

Signed-off-by: Michael Schaffner <[email protected]>
Need to increase the version to 2.0.0 due to a SW visible CSR change.
The D/V stages should be straightforward to recertify.

Signed-off-by: Michael Schaffner <[email protected]>
Signed-off-by: Jaedon Kim <[email protected]>
Signed-off-by: Michael Schaffner <[email protected]>
@msfschaffner msfschaffner merged commit 1845e1b into lowRISC:master Mar 1, 2024
30 of 32 checks passed
@jwnrt jwnrt mentioned this pull request May 14, 2024
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.

[flash_ctrl] Change of interrupt types to status
5 participants