Skip to content

[mailbox,dv] Add the first functional coverage model - #790

Open
martin-velay wants to merge 2 commits into
lowRISC:mainfrom
martin-velay:mailbox_dv_fcov
Open

martin-velay wants to merge 2 commits into
lowRISC:mainfrom
martin-velay:mailbox_dv_fcov

Conversation

@martin-velay

@martin-velay martin-velay commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of the mailbox block-level DV (#173), for the V1 SIM_COVERAGE_MODEL_ADDED item. Stacked on #784, so its first commit goes away once #784 merges.

Adds mailbox_env_cov with six of the eleven covergroups in the DV document: fifo_cg, status_cg, threshold_cg, access_cg, concurrency_cg and reset_cg. The scoreboard samples them after each check, and uses a model value only when every state it keeps agrees on it. The interrupt, error and flush covergroups come in V2 with the scoreboard models they need.

The vPlan features these covergroups answer now carry their items. Features with an open question on #755 keep none, as the vPlan header says.

All V1 tests pass on Xcelium with --cov, and data_transfer, the V1 feature among them, is at 100%.

The V1 checklist asks for the interrupts to be connected in the
testbench. Publish irq_o as intr_vif and keep it in the environment
configuration for the V2 interrupt checks.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
@martin-velay
martin-velay force-pushed the mailbox_dv_fcov branch 2 times, most recently from b700a2c to 40581de Compare November 11, 2026 07:40
Cover FIFO accesses, STATUS reads, threshold writes, every access,
cross-port concurrency and reset, sampled by the scoreboard once it has
checked an access. The interrupt, error and flush covergroups come with
their V2 models.

Give the vPlan features these covergroups answer their items.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
@martin-velay
martin-velay marked this pull request as ready for review November 11, 2026 08:21

@tchilikov-semify tchilikov-semify 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.

Looks good to me, only one minor question, but otherwise I think this PR is good to merge!

mailbox_state state = copy();
mailbox_result_t result = '{resp: RespOkay, data: '0};

if (acc.kind inside {AccessMboxW, AccessMboxR, AccessStatus}) begin

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.

Nit: is seen only for coverage? If so, would it make sense to add an if (cfg.en_cov) guard so it doesnt always sample?

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.

2 participants