[hw,lcctrl,dv] Improve DV environment for muxed JTAG TAP/DMI
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
When merging the TLUL DMI LC Ctrl functionality, the DV environment was added with several ifdefs, deciding between the existing JTAG TAP and the new TLUL DMI interface. This implementation is not the most beautiful one, but it works. It was decided to merge that first to block further RTL development and improve the DV environment separately.
@rswarbrick Proposed some improvements in https://github.com/lowRISC/opentitan/pull/24507#discussion_r1810618433
> I wonder whether it would make sense to give the agent something like a "configure_use_dmi" function? Then we wouldn't need all the ifdefs: we could just call it with the correct value after construction, avoiding tangling the config so much with the construction.
>
> Working through the items:
>
> For the abits field, I think we'd just need set_reset?
> For the n_bits default value override, this just goes through to the uvm_reg constructor. I think we can just use the larger value (with a comment)?
> For the address field, I think we could just use the larger value again. It's the top field in the register, so I don't think that would cause a problem.
In a [second note](https://github.com/lowRISC/opentitan/pull/24507#discussion_r1810618433) he suggested to factor the ifdef to:
> ```
> `ifdef USE_DMI_INTERFACE
> localparam bit use_dmi_interface = 1'b1;
> `else
> localparam bit use_dmi_interface = 1'b0;
> `endif
> ```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DV environment for the muxed JTAG TAP and TLUL DMI interfaces, then review the improvements discussed in PR 24507. Check how USE_DMI_INTERFACE controls construction and configuration, including abits, n_bits, and address fields. Done means reducing the conditional tangling while preserving both interface modes.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100