Skip to content

Conversation

@machshev
Copy link
Collaborator

@machshev machshev commented Nov 18, 2025

Introduce a CoverageMetrics model instead of the dict. Create a new method on the tool plugins to convert from eda tool specific coverage fields to generic names that match the opentitan-site dashboard fields.

Update the report summary and block report templates to use the new model. Add the extra fields in the summary report to make it more like the dashboard (contain the same information).

image

Fixes: #20


code: float | None = None
"""Code Coverage."""
toggle: float | None = None

Choose a reason for hiding this comment

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

I am surprised to see toggle coverage being not included inside code cov. Can you tell me the reason?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question, I don't know the answer... I'm not a DV expert. Just replicated the logic for the existing OT dashboard https://opentitan.org/dashboard/index.html

Maybe we can discuss this Monday on a call and you can explain?

Copy link

@martin-velay martin-velay Nov 24, 2025

Choose a reason for hiding this comment

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

I see, that's very surprising on the OT dashboard too! I don't know if there is a particular need for that, but it shouldn't be separated. That's also probably something we should change on OT board.
Do you know who has done that on OT board? If yes, can you tag him/her in this thread or talk directly with this person?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"Sequence[float]",
[
raw_metrics[m]
for m in (

Choose a reason for hiding this comment

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

That's where you should have the "toggle".

"Sequence[float]",
[
raw_metrics[m]
for m in (

Choose a reason for hiding this comment

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

I guess we should also see toggle here too.

"Sequence[float]",
[
raw_metrics[m]
for m in (

Choose a reason for hiding this comment

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

I don't really know if it matters, but maybe good to write it somewhere or at least for your own knowledge. Xcelium and VCS use different words for almost the same things:

Coverage Concept Synopsys VCS Term Cadence Xcelium Term
Did this part of code execute? Line (or Statement) Coverage Block Coverage
Did this if/case take all paths? Branch Coverage Branch Coverage
Did the logic evaluate to 0 & 1? Condition Coverage Expression Coverage
Did the signal wiggle? Toggle Coverage Toggle Coverage
Did the state machine transition? FSM Coverage FSM Coverage

The main difference and confusion is about line vs block:
Cadence block: counts blocks of code. A "block" is a sequence of statements between branching points (like begin and end). If the simulator enters a begin...end block, Xcelium assumes all statements inside that block are executed because there is no way to exit the block halfway through (unless there is a disable/return). Xcelium can also do statement (=line) coverage (counting individual statements), but "Block" is their primary metric.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, this is really helpful information. We should probably have that as part of the documentation within the code base. Either a docstring in the EDA tool plug-in module or perhaps a README?

@machshev machshev force-pushed the dashboard branch 2 times, most recently from 3416d7b to 5bac0d9 Compare November 25, 2025 12:13
@machshev machshev force-pushed the dashboard branch 5 times, most recently from 39ef96f to 501b9b2 Compare November 25, 2025 15:47
@machshev
Copy link
Collaborator Author

@martin-velay I've updated the design as per our discussion. The underlying data model now preserves the raw data more accurately using the mapping you provided above in the table.

Both the block and summary templates have been updated to display the information.

image image

@machshev machshev force-pushed the dashboard branch 2 times, most recently from 33c2120 to 33791b1 Compare November 25, 2025 16:13
@machshev
Copy link
Collaborator Author

After further feedback the headings are now hierarchical:
image

Introduce a CoverageMetrics model instead of the dict. Create a new
method on the tool plugins to convert from eda tool specific coverage
fields to generic names that match the opentitan-site dashboard fields.

Update the report summary and block report templates to use the new
model. Add the extra fields in the summary report to make it more like
the dashboard (contain the same information).

Signed-off-by: James McCorrie <james.mccorrie@lowrisc.org>
@machshev
Copy link
Collaborator Author

image Using color instead of table borders.

Copy link

@martin-velay martin-velay left a comment

Choose a reason for hiding this comment

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

OK, it looks much better and to go in the right direction. Let's approve that one and see if any further work is required. Thanks James!

@martin-velay martin-velay added this pull request to the merge queue Nov 25, 2025
Merged via the queue into lowRISC:master with commit a784cb2 Nov 25, 2025
6 checks passed
@machshev machshev deleted the dashboard branch November 25, 2025 16:46
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.

Report generation from templates

2 participants