[rstmgr,dv] Reset Manager DV ported to mocha#506
Conversation
| - files_rtl | ||
| - files_dv | ||
| default_tool: vcs | ||
| default_tool: xcelium |
There was a problem hiding this comment.
This is the source of your issue with the src file being not generated. The .src file is your file list generated from FuseSoc. I know that confusing, I went into this trap earlier too.
The VCS backend generates a .scr file, which is an identical format to a more standard .f format. We are only running FuseSoc up to the point it generates the filelist file (.scr in this case).
d7f29db to
7d337b2
Compare
| // Wait till rst_lc_n is inactive for non-aon. | ||
| `DV_WAIT(cfg.rstmgr_vif.resets_o.rst_lc_n[1]) | ||
| // Wait till rst_por_aon_n is inactive for non-aon. | ||
| `DV_WAIT(cfg.rstmgr_vif.resets_o.rst_por_aon_n[1]) |
There was a problem hiding this comment.
I think this should be the same reset as the one fed into the reset manager block in the top which is rst_por_io_n
There was a problem hiding this comment.
Probably makes sense to switch rst_*lc* with rst_por_io_n everywhere (and Marno agrees as well).
There was a problem hiding this comment.
Okay, but then it is DomainAonSel right?
There was a problem hiding this comment.
rst_lc_n[1] -> rst_por_io_n[1] so this is going to be Domain0Sel?
There was a problem hiding this comment.
Yes, DomainAonSel is 0, Domain0Sel is 1.
a5c3e8f to
3d667b7
Compare
marnovandermaas
left a comment
There was a problem hiding this comment.
Some comments from my end.
| - `CASCADED_ASSERTS(CascadeLcToLc, rst_lc_src_n[rstmgr_pkg::Domain0Sel], | ||
| - resets_o.rst_lc_n[rstmgr_pkg::Domain0Sel], SysCycles, clk_main_i) | ||
| - | ||
| - // Controlled by rst_sys_src_n. |
There was a problem hiding this comment.
There are a few resets controlled by SYS SRC in Mocha, such as rst_{main,io,spi_device,spi_host,i2c}_n
There was a problem hiding this comment.
It would be good to investigate whether we should have cascade asserts for those.
| else: | ||
| assert 0, "No preferred clock available" | ||
|
|
||
| -preferred_rst_n = f"rst_lc_{preferred_domain}_n" |
There was a problem hiding this comment.
Can't we just update the preferred domain? This also fixes the power on reset preference below.
* open titan specific paths changed to mocha specific ones in the template files * 0001_Fix_Paths_And_Tools.patch file created with the changes Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* The patched config and template config files added to the source code Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
3d667b7 to
8b0d9b8
Compare
* 0002 patches fix the auto generated reset manager's dv files to be run Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* These modifications will enable to run block level simulations on rstmgr while using correct reset signals and domains in the UVM tb. Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* rstmgr's smoketest added to top level simulation list Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* changes in hw/vendor/patches/lowrisc_ip/i2c/0002-Fix-Widths.patch file got implemented in upstream repo, making this patch redundant. * this commit removes the patch file Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* Upstream repo now contains the patch file, therfore hw/vendor/patches/lowrisc_ip/prim_xilinx/0001_Mem_Init_String.patch is deleted Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
Update code from upstream repository https://github.com/lowRISC/opentitan to revision 7e53929271cf69fce17966be5b665ba91df17694 * [alert,dv] Don't return too early from a ping (Rupert Swarbrick) * [dv] Rationalise dv_base_driver reset tracking (Rupert Swarbrick) * [dv] Restructure the way jtag_dmi_reg_frontdoor is given dmi/dtmcs (Rupert Swarbrick) * [aes/dv] Add RAL type override to allow separating GCM and non-GCM DV (Pirmin Vogel) * [hw/otbn] Add new HPC gadgets (Hakim Filali) * [prim/rtl] Improve prim_fifo_async_simple for rv_dm and lc_ctrl (Neil Webb) * [clkmgr/cdc] Deglitch on shadow register error alerts (Neil Webb) * [prim/rtl] Explicitly assign values to FSM states in prim_sync_reqack (Neil Webb) * [rstmgr, DV] Fixed the message and ID body inside (Kinza Qamar) * [i2c,hw] Correct assign/compare widths (Elliot Baptist) * [dv] Pass is_active from cip_base_env_cfg to alert and TL agents (Rupert Swarbrick) * [dv] Stop jtag_dmi_monitor depending on jtag_agent_cfg (Rupert Swarbrick) * [dv] Beta-reduce slightly silly templating in fpv_csr.sv.tpl (Rupert Swarbrick) * [dv] Fix REGWEN_PATH in fpv_csr.sv.tpl (Rupert Swarbrick) * [top/templates] Indentation and whitespaces fixes (Florian Glaser) * [topgen] Automatically generate port map for toplevels (Florian Glaser) * [clkmgr,dv] Fix invalid type in clkmgr_regwen_vseq (Rupert Swarbrick) * [tl,dv] Make TL assertions cause simulation failure when they fail (Rupert Swarbrick) * [topgen,sw] Fix operations between different enum types, part II (Luís Marques) * [rv_plic,rtl] Move the onehot0 checks to rv_plic_gateway (Rupert Swarbrick) * [rv_plic,doc] Add some careful documentation to rv_plic_gateway.sv (Rupert Swarbrick) * [rv_plic,rtl] Simplify code for ia update in the gateway (Rupert Swarbrick) * [rv_plic,rtl] Simplify ip_o rule in rv_plic_gateway (Rupert Swarbrick) * [rv_plic,fpv] Add an assertion about relationship between ia and ip (Rupert Swarbrick) * [I2C, dv] Removed unused argument (Kinza Qamar) * [tl,dv] Clear the stop flag at the end, not the start, of body() (Rupert Swarbrick) * [I2C, dv] Simplified i2c_device_response seq's drive_read_byte() (Kinza Qamar) * [i2c/rtl] Change VAL register input to synced SCL/SDA (Neil Webb) * [I2C, dv] Removed the unused i2c_dv_if (Kinza Qamar) * [dv] Simplify key sideload driver (Rupert Swarbrick) * [dv] Allow a cfg to be passed directly to dv_base_agent (Rupert Swarbrick) * [hw,prim] Add new prim_inv (Hakim Filali) * [prim] Add prim_flop_x module to wrap different prim_flop variants (Pirmin Vogel) * [dv] Remove csr_base_addr argument from dv_base_env_cfg::initialize (Rupert Swarbrick) * [dv] Add "Monitor" to if_mode_e (Rupert Swarbrick) * [hw] gpiodpi: fix backwards log message (Alice Ziuziakowska) * [pwrmgr,dv] Remove do-nothing $assertoff (Rupert Swarbrick) Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
* As result of previous patches to template files new dv files are generated for rstmgr. Signed-off-by: Kolos Koblasz <kolos.koblasz@semify-eda.com>
8b0d9b8 to
cf832c4
Compare


This PR ports Reset Manager Controller DV code from Opentitan to Mocha.
This PR will address: #433 --- Close #433
Project specific tests:
dvsim hw/top_chip/ip_autogen/rstmgr/dv/rstmgr_sim_cfg.hjson -i all --cov
Test Results
Coverage Results
Coverage Dashboard
Failure Buckets
UVM_FATAL (rstmgr_leaf_rst_cnsty_vseq.sv:159) [rstmgr_leaf_rst_cnsty_vseq] Timeout waiting for alert fatal_cnsty_faulthas 27 failures:1.rstmgr_leaf_rst_cnsty.45788128805664214418475274298876099271975220649024862745597390570666361824047
Line 93, in log /home/kkoblasz/projects/mocha/scratch/kk_rst_mgr_dv/rstmgr.sim.xcelium/1.rstmgr_leaf_rst_cnsty/latest/run.log
2.rstmgr_leaf_rst_cnsty.43535571888821152156200193949083009951604505169671122206112137140095695086956
Line 93, in log /home/kkoblasz/projects/mocha/scratch/kk_rst_mgr_dv/rstmgr.sim.xcelium/2.rstmgr_leaf_rst_cnsty/latest/run.log
... and 25 more failures.
[ legend ]: [S: scheduled, Q: queued, R: running, P: passed, F: failed, K: killed, T: total]
00:01:14 [ build ]: [S: 000, Q: 000, R: 000, P: 002, F: 000, K: 000, T: 002] 100%
00:02:35 [ run ]: [S: 000, Q: 000, R: 000, P: 593, F: 027, K: 000, T: 620] 100%
00:03:05 [ cov_merge ]: [S: 000, Q: 000, R: 000, P: 001, F: 000, K: 000, T: 001] 100%
00:03:12 [ cov_report ]: [S: 000, Q: 000, R: 000, P: 001, F: 000, K: 000, T: 001] 100%
Top level tests:
dvsim hw/top_chip/dv/mocha_sim_cfgs.hjson --select-cfgs rstmgr -i smoke --cov
Test Results
Coverage Results
Coverage Dashboard
TOP_MOCHA_BATCH_SIM Simulation Results (Summary)
Tuesday May 12 2026 17:45:09 UTC
Github Revision:
cf832c4Branch: kk_rst_mgr_dv
00:00:07 [ build ]: [S: 0, Q: 0, R: 0, P: 2, F: 0, K: 0, T: 2] 100%
00:00:08 [ run ]: [S: 0, Q: 0, R: 0, P: 3, F: 0, K: 0, T: 3] 100%
00:00:12 [ cov_merge ]: [S: 0, Q: 0, R: 0, P: 1, F: 0, K: 0, T: 1] 100%
00:00:16 [ cov_report ]: [S: 0, Q: 0, R: 0, P: 1, F: 0, K: 0, T: 1] 100%