diff --git a/doc/proj/rv_timer.md b/doc/proj/rv_timer.md index bd9195d92..7e497ed29 100644 --- a/doc/proj/rv_timer.md +++ b/doc/proj/rv_timer.md @@ -42,7 +42,26 @@ This sign-off is based on commit [`b597321`][d1-commit]. ### V1 -*Not yet started - see [stages.md][verification stages].* +All checklist items refer to the [V1 verification sign-off checklist][V1 checklist]. +This sign-off is based on commit [`d428cd9`][v1-commit]. + +| Type | Item | Status | Note/Collaterals | +|---------------|------------------------------------|--------|------------------| +| Documentation | DV_DOC_DRAFT_COMPLETED | Done | [Timer DV document][] describes the goals, testbench architecture, stimulus, coverage, and checking strategy | +| Documentation | TESTPLAN_COMPLETED | Done | [Timer testplan][] defines the V1 `random` test and post-V1 reset, configuration, boundary value and stress testpoints | +| Testbench | TB_TOP_CREATED | Done | [tb.sv][] instantiates clock and reset, TileLink, interrupt and alert interfaces along with the Timer DUT; the RACL policies are tied to zero | +| Testbench | PRELIMINARY_ASSERTION_CHECKS_ADDED | Done | [rv_timer_bind.sv][] binds the TLUL protocol and CSR assertions; the Timer RTL checks that outputs are known after reset | +| Integration | PRE_VERIFIED_SUB_MODULES_V1 | Waived | The submodules are shared OpenTitan primitives and TileLink adapters (`prim_intr_hw`, `prim_subreg`, `prim_alert_sender`, `tlul_adapter_reg`, etc.), unmodified in Mocha. They are covered through the IPs that instantiate them, so none carries an independent V1 sign-off; the [OpenTitan rv_timer checklist][] records this item as N/A | +| Review | DESIGN_SPEC_REVIEWED | Done | The specification was reviewed through the OpenTitan sign-off process, where the block reached V3, and the [theory of operation][theory] was reviewed against the Mocha instantiation for this sign-off. It describes the single hart, single timer configuration Mocha uses, and the interrupt drives the CVA6-CHERI timer interrupt directly. Mocha has no alert handler or RACL controller, so `alert_tx_o` and `racl_error_o` are left open and the RACL policies are tied to their defaults at the [instantiation][instantiation] | +| Review | TESTPLAN_REVIEWED | Done | The [OpenTitan rv_timer checklist][] records the testplan review as complete upstream. The V1 testpoints of the [Timer testplan][], `random` plus the imported CSR testpoints, apply as written | +| Review | STD_TEST_CATEGORIES_PLANNED | Done | Reset, boundary value, on-the-fly reconfiguration and stress tests are covered in the [Timer testplan][]; error scenarios are limited to the TL-UL illegal access and bus integrity testpoints imported from the common testplans; security countermeasures are captured in the sec_cm testplan, but V2S is not used in Mocha; power, performance and debug are N/A | +| Simulation | SIM_TB_ENV_CREATED | Done | CIP-based UVM environment with TL agent and scoreboard; the scoreboard models each timer and checks the interrupt pins | +| Tests | SIM_SMOKE_TEST_PASSING | Done | All V1 testpoints (`rv_timer_random` and the five CSR tests): 30/30 passed, 5 seeds each, with Xcelium on November 12, 2026 at commit `d428cd9` with the [testplan path fix][path fix] applied | +| Regression | SIM_SMOKE_REGRESSION_SETUP | Done | `smoke` regression in `rv_timer_sim_cfg.hjson` selects `rv_timer_random`; the aggregate Mocha config imports the Timer simulation config | +| Regression | SIM_NIGHTLY_REGRESSION_SETUP | Done | The Timer is included in `mocha_sim_cfgs.hjson`; results are published on the [COSMIC reports dashboard][] | +| Coverage | SIM_COVERAGE_MODEL_ADDED | Done | Block-level coverage is in `rv_timer_env_cov.sv` | +| Tests | FPV_MAIN_ASSERTIONS_PROVEN | N/A | This V1 sign-off uses simulation; TLUL and CSR assertions are enabled in the simulation testbench | +| Regression | FPV_REGRESSION_SETUP | N/A | No Timer FPV regression is configured in Mocha | ### V2 @@ -64,3 +83,13 @@ This sign-off is based on commit [`b597321`][d1-commit]. [registers]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/doc/registers.md [output asserts]: https://github.com/lowRISC/mocha/blob/b5973217f704923917e7761f73df7dfcb8d0c345/hw/vendor/lowrisc_ip/ip/rv_timer/rtl/rv_timer.sv#L173-L178 [patch]: ../../hw/vendor/patches/lowrisc_ip/rv_timer +[V1 checklist]: stages.md#v1-verification-sign-off-checklist +[v1-commit]: https://github.com/lowRISC/mocha/commit/d428cd9580070a09722130daf1e37db0dd68b975 +[theory]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/doc/theory_of_operation.md +[instantiation]: https://github.com/lowRISC/mocha/blob/d428cd9580070a09722130daf1e37db0dd68b975/hw/top_chip/rtl/top_chip_system.sv#L893-L909 +[Timer DV document]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/dv/README.md +[Timer testplan]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson +[tb.sv]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/dv/tb/tb.sv +[rv_timer_bind.sv]: ../../hw/vendor/lowrisc_ip/ip/rv_timer/dv/sva/rv_timer_bind.sv +[COSMIC reports dashboard]: https://dashboard.reports.lowrisc.org/cosmic/mocha/dashboard.html +[path fix]: ../../hw/vendor/patches/lowrisc_ip/rv_timer/0003_fix_testplan_paths.patch diff --git a/doc/proj/stages.md b/doc/proj/stages.md index 87d5134fa..ce4f09cf8 100644 --- a/doc/proj/stages.md +++ b/doc/proj/stages.md @@ -30,7 +30,7 @@ This table shows the current design and verification stage for each block in Moc | [SRAM][] | D1 | V0 | | [Tag controller][] | D1 | V0 | | [TileLink crossbar][] | D1 | V1 | -| [Timer][] | D1 | V0 | +| [Timer][] | D1 | V1 | | [UART][] | D1 | V1 | | | | | | Top chip | N/A* | V0 | diff --git a/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson b/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson index bcedaac5b..757095361 100644 --- a/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson +++ b/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson @@ -3,11 +3,11 @@ // SPDX-License-Identifier: Apache-2.0 { name: "rv_timer" - import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson", - "hw/dv/tools/dvsim/testplans/alert_test_testplan.hjson", - "hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson", - "hw/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson", - "hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson", + import_testplans: ["hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/csr_testplan.hjson", + "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/alert_test_testplan.hjson", + "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/intr_test_testplan.hjson", + "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson", + "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson", "rv_timer_sec_cm_testplan.hjson"] testpoints: [ { diff --git a/hw/vendor/lowrisc_ip/ip/rv_timer/dv/rv_timer_sim_cfg.hjson b/hw/vendor/lowrisc_ip/ip/rv_timer/dv/rv_timer_sim_cfg.hjson index f55b8190f..641c29d04 100644 --- a/hw/vendor/lowrisc_ip/ip/rv_timer/dv/rv_timer_sim_cfg.hjson +++ b/hw/vendor/lowrisc_ip/ip/rv_timer/dv/rv_timer_sim_cfg.hjson @@ -18,10 +18,10 @@ fusesoc_core: lowrisc:dv:rv_timer_sim:0.1 // Testplan hjson file. - testplan: "{proj_root}/hw/ip/rv_timer/data/rv_timer_testplan.hjson" + testplan: "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson" // RAL spec - used to generate the RAL model. - ral_spec: "{proj_root}/hw/ip/rv_timer/data/rv_timer.hjson" + ral_spec: "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer.hjson" // Import additional common sim cfg files. import_cfgs: [// Project wide common sim cfg file @@ -41,8 +41,8 @@ reseed: 20 // Add specific exclusion files. - vcs_cov_excl_files: ["{proj_root}/hw/ip/rv_timer/dv/cov/rv_timer_unr_excl.el", - "{proj_root}/hw/ip/rv_timer/dv/cov/rv_timer_racl_exclusions.el"] + vcs_cov_excl_files: ["{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/dv/cov/rv_timer_unr_excl.el", + "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/dv/cov/rv_timer_racl_exclusions.el"] // Default UVM test and seq class name. uvm_test: rv_timer_base_test diff --git a/hw/vendor/patches/lowrisc_ip/rv_timer/0003_fix_testplan_paths.patch b/hw/vendor/patches/lowrisc_ip/rv_timer/0003_fix_testplan_paths.patch new file mode 100644 index 000000000..426deb2c5 --- /dev/null +++ b/hw/vendor/patches/lowrisc_ip/rv_timer/0003_fix_testplan_paths.patch @@ -0,0 +1,49 @@ +diff --git a/data/rv_timer_testplan.hjson b/data/rv_timer_testplan.hjson +index bcedaac5b..757095361 100644 +--- a/data/rv_timer_testplan.hjson ++++ b/data/rv_timer_testplan.hjson +@@ -3,11 +3,11 @@ + // SPDX-License-Identifier: Apache-2.0 + { + name: "rv_timer" +- import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson", +- "hw/dv/tools/dvsim/testplans/alert_test_testplan.hjson", +- "hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson", +- "hw/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson", +- "hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson", ++ import_testplans: ["hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/csr_testplan.hjson", ++ "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/alert_test_testplan.hjson", ++ "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/intr_test_testplan.hjson", ++ "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/stress_all_with_reset_testplan.hjson", ++ "hw/vendor/lowrisc_ip/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson", + "rv_timer_sec_cm_testplan.hjson"] + testpoints: [ + { +diff --git a/dv/rv_timer_sim_cfg.hjson b/dv/rv_timer_sim_cfg.hjson +index f55b8190f..641c29d04 100644 +--- a/dv/rv_timer_sim_cfg.hjson ++++ b/dv/rv_timer_sim_cfg.hjson +@@ -18,10 +18,10 @@ + fusesoc_core: lowrisc:dv:rv_timer_sim:0.1 + + // Testplan hjson file. +- testplan: "{proj_root}/hw/ip/rv_timer/data/rv_timer_testplan.hjson" ++ testplan: "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer_testplan.hjson" + + // RAL spec - used to generate the RAL model. +- ral_spec: "{proj_root}/hw/ip/rv_timer/data/rv_timer.hjson" ++ ral_spec: "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/data/rv_timer.hjson" + + // Import additional common sim cfg files. + import_cfgs: [// Project wide common sim cfg file +@@ -41,8 +41,8 @@ + reseed: 20 + + // Add specific exclusion files. +- vcs_cov_excl_files: ["{proj_root}/hw/ip/rv_timer/dv/cov/rv_timer_unr_excl.el", +- "{proj_root}/hw/ip/rv_timer/dv/cov/rv_timer_racl_exclusions.el"] ++ vcs_cov_excl_files: ["{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/dv/cov/rv_timer_unr_excl.el", ++ "{proj_root}/hw/vendor/lowrisc_ip/ip/rv_timer/dv/cov/rv_timer_racl_exclusions.el"] + + // Default UVM test and seq class name. + uvm_test: rv_timer_base_test