lowRISC / lowRISC/opentitan

[chip] plic_all_irqs test processes `*_irq_serviced` incorrectly

Open
#15,584 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:ChipLevelTest Component:Software Earlgrey-PROD Candidate IP:rv_plic Priority:P3
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.