[chip] plic_all_irqs test processes `*_irq_serviced` incorrectly
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
_Related PR: https://github.com/lowRISC/opentitan/pull/15580_
[Related Code](https://cs.opensource.google/opentitan/opentitan/+/master:util/topgen/templates/plic_all_irqs_test.c.tpl;l=198;bpv=0) reads `*_irq_serviced` right after the test code writes to `INTR_TEST` field.
The issue is that there's gap between writing to `INTR_TEST` and the receiving interrupt from the. local processor. The delay is dependent on the clock ratio between the processor and the peripheral , and the Xbar structure.
CC: @a-will @sriyerg @tjaychen
> estimate 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with util/topgen/templates/plic_all_irqs_test.c.tpl at the referenced line and review related PR #15580 for context. Trace how INTR_TEST and *_irq_serviced are handled in the generated plic_all_irqs test. Done means the test reliably observes each serviced interrupt despite processor and peripheral timing differences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100