Repository navigation
feat(sim)!: report severity, location and assertion of severity tasks - #1875
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This pull request is part of a Mergify stack:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2da588a274
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Queued — the merge queue status continues in this comment ↓. |
2da588a to
1a9cabc
Compare
Revision history
|
1a9cabc to
e96ed5a
Compare
Merge Queue Status
This pull request spent 1 hour 18 minutes 59 seconds in the queue, with no time running CI. ReasonThe pull request conflicts with the base branch The pull request was held in the queue, conflicting with at least one of 4 pull requests ahead of it. The conflict became a base branch one after #1838, #1847, #1884 merged. HintYou should update or rebase your pull request. If you want to requeue this pull request, you can post a Requeued — the merge queue status continues in this comment ↓. |
e96ed5a to
960a5f3
Compare
Merge Queue Status
This pull request spent 48 minutes 26 seconds in the queue, including 3 minutes 43 seconds running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
Failing checks: HintYou may have to fix your CI before adding the pull request to the queue again. Requeued — the merge queue status continues in this comment ↓. |
IEEE 1800-2023 20.10 has every severity task report its severity, the file and line of the call, the scope that issued it and the simulation time. Celox lost most of this: - `$info`, `$warning` and `$error` all became `RuntimeEvent::AssertContinue`, so the severity was gone; - events carried no location and no scope; - the `celox` command failed a run on `$warning` and `$info`. This is the first part of SVA stage 1 (#89). Deferred assertions and concurrent assertions will report through the same record. **`RuntimeEvent::Report`.** It replaces `AssertContinue` and `AssertFatal`. A `Report` has: - `severity`: `Info`, `Warning`, `Error` or `Fatal`; - `message`: the formatted bytes, as before; - `scope`: from the drain context, else the scope of the site; - `location`: the file and line as `` `__FILE__ `` and `` `__LINE__ `` give them, so `` `line `` directives apply; - `assertion`: for a report from an action block of an immediate assertion, its statement label (which names it in its scope, 16.3), `assert`/`assume`/`cover`, and whether the pass or the fail action issued it. The default `$error` of an `assert` or `assume` without a fail action has the location of the assertion. Severity tasks in subroutines the action block calls are not attributed; - `time`: the time of the drain context. The VPI host drains at each callback, so its times are exact. A later change stamps events at the end of their time slot for every host. `Report::render` formats a report as `Error: file:line: message`, then the time and the scope. The VPI host and the `celox` command print reports this way. **Design metadata.** `RuntimeEventKind::Report(Severity)` replaces `AssertContinue` and `AssertFatal`. Veryl's `$assert` is a fatal report and `$assert_continue` an error. `RuntimeEventSite` has `location` and `assertion` (serde default: none). The SV analyzer records the logical file and line in `SourceSpan` and attributes severity tasks to their assertion in `Stmt::SystemTask::assertion`. A task of a nested assertion keeps the attribution of the inner one. The native image container version is 35. **Failures.** - The `celox` command fails a run only on `$error` and `$fatal`. - The Veryl native testbench and the SV suite harness count only errors and fatal reports as failures. They print info and warning reports like `$display`. - `$fatal` still ends the simulation with an error. - lydite's proof backend (`lydite/conformance/veryl-proof`) accepts reports below `Fatal` where it accepted `AssertContinue`, and still fails closed on fatal ones. - New `crates/celox/tests/sv_reports.rs` on the interpreter, cranelift, native and wasm backends: - `$info`, `$warning` and `$error` give their severity, message, line and scope; - action blocks of a labeled `assert` (with a `$warning` fail action and with the default `$error`), a labeled `cover` and an unlabeled `assume` name their assertion and outcome; - an `always_comb` report keeps its location; - a `` `line `` directive sets the file and line; - a failing assertion in the action block of another reports the inner one; - plus a unit test of `Report::render`. - New lydite unit test `test_events.test_only_nonfatal_runtime_events_are_observed`: `Display`, `Write` and reports up to `Error` are observed, and `Fatal`, `Finish` and `Stop` fail closed. The `bridge` job's veryl-proof gate rejected `flip_flop::test_ff_assert_message_output_argument_is_eager` without it. - New `celox` command test: a run fails on `$error` but not on `$info` or `$warning`, and each is printed with its severity and location. - Existing tests that compare drained events now compare them without the report context, which they do not check. Their messages and severities are unchanged. - `cargo nextest run` with CI's features (`celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus`): - celox and celox-vpi: 13,548 passed; - celox-frontend-{core,sv,veryl}, celox-sv-analyzer, celox-runtime, celox-design, celox-slt, celox-test-suite and celox-napi: 1,294 passed. - sv-tests conformance (`conformance/sv-tests/run.py`): unchanged from `expected.tsv`. - `cargo clippy --workspace --all-targets` with CI's features and `-D warnings`; clippy of `celox` without default features; `cargo fmt --check`. - `celox::RuntimeEvent::AssertContinue` and `AssertFatal` are replaced by `RuntimeEvent::Report(Report)`. - `celox_design::RuntimeEventKind::AssertContinue` and `AssertFatal` are replaced by `RuntimeEventKind::Report(Severity)`. - `celox_design::RuntimeEventSite` has the new fields `location` and `assertion`. - `celox_sv_analyzer::ir::SourceSpan` has the new fields `logical_path` and `line`, and `Stmt::SystemTask` has `assertion`. - The `celox` command no longer fails a run on `$info` or `$warning`, and prints reports with their severity and location. Change-Id: I4abb3cc497c11a31008ec8429fedaf365b4689a1
960a5f3 to
a8d379a
Compare
Merge Queue Status
This pull request spent 1 hour 1 minute 12 seconds in the queue, including 24 minutes 14 seconds running CI. Required conditions to merge
|
IEEE 1800-2023 20.10 has every severity task report its severity, the file and line of the call, the scope that issued it and the simulation time. Celox lost most of this:
$info,$warningand$errorall becameRuntimeEvent::AssertContinue, so the severity was gone;celoxcommand failed a run on$warningand$info.This is the first part of SVA stage 1 (#89). Deferred assertions and concurrent assertions will report through the same record.
RuntimeEvent::Report. It replacesAssertContinueandAssertFatal. AReporthas:severity:Info,Warning,ErrororFatal;message: the formatted bytes, as before;scope: from the drain context, else the scope of the site;location: the file and line as`__FILE__and`__LINE__give them, so`linedirectives apply;assertion: for a report from an action block of an immediate assertion, its statement label (which names it in its scope, 16.3),assert/assume/cover, and whether the pass or the fail action issued it. The default$errorof anassertorassumewithout a fail action has the location of the assertion. Severity tasks in subroutines the action block calls are not attributed;time: the time of the drain context. The VPI host drains at each callback, so its times are exact. A later change stamps events at the end of their time slot for every host.Report::renderformats a report asError: file:line: message, then the time and the scope. The VPI host and theceloxcommand print reports this way.Design metadata.
RuntimeEventKind::Report(Severity)replacesAssertContinueandAssertFatal. Veryl's$assertis a fatal report and$assert_continuean error.RuntimeEventSitehaslocationandassertion(serde default: none). The SV analyzer records the logical file and line inSourceSpanand attributes severity tasks to their assertion inStmt::SystemTask::assertion. A task of a nested assertion keeps the attribution of the inner one. The native image container version is 35.Failures.
The
celoxcommand fails a run only on$errorand$fatal.The Veryl native testbench and the SV suite harness count only errors and fatal reports as failures. They print info and warning reports like
$display.$fatalstill ends the simulation with an error.lydite's proof backend (
lydite/conformance/veryl-proof) accepts reports belowFatalwhere it acceptedAssertContinue, and still fails closed on fatal ones.New
crates/celox/tests/sv_reports.rson the interpreter, cranelift, native and wasm backends:$info,$warningand$errorgive their severity, message, line and scope;assert(with a$warningfail action and with the default$error), a labeledcoverand an unlabeledassumename their assertion and outcome;always_combreport keeps its location;`linedirective sets the file and line;Report::render.New lydite unit test
test_events.test_only_nonfatal_runtime_events_are_observed:Display,Writeand reports up toErrorare observed, andFatal,FinishandStopfail closed. Thebridgejob's veryl-proof gate rejectedflip_flop::test_ff_assert_message_output_argument_is_eagerwithout it.New
celoxcommand test: a run fails on$errorbut not on$infoor$warning, and each is printed with its severity and location.Existing tests that compare drained events now compare them without the report context, which they do not check. Their messages and severities are unchanged.
cargo nextest runwith CI's features (celox/systemverilog,celox-test-suite/verilator,celox-test-suite/icarus):sv-tests conformance (
conformance/sv-tests/run.py): unchanged fromexpected.tsv.cargo clippy --workspace --all-targetswith CI's features and-D warnings; clippy ofceloxwithout default features;cargo fmt --check.celox::RuntimeEvent::AssertContinueandAssertFatalare replaced byRuntimeEvent::Report(Report).celox_design::RuntimeEventKind::AssertContinueandAssertFatalare replaced byRuntimeEventKind::Report(Severity).celox_design::RuntimeEventSitehas the new fieldslocationandassertion.celox_sv_analyzer::ir::SourceSpanhas the new fieldslogical_pathandline, andStmt::SystemTaskhasassertion.The
celoxcommand no longer fails a run on$infoor$warning, and prints reports with their severity and location.