lowRISC / lowRISC/opentitan

Rethink how generic prim can be replaced by a tech-specific prim

Open
#13,337 3 comments 0 reactions 3 assignees View on GitHub

@weicaiyang is already working on this.

Since Jun 22, 2022.

Component:DV Component:OT_Blocks_Foundry Earlgrey-PROD Triaged Priority:P2
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

When generic prim is replaced by a tech-specific prim, the path to that prim will be changed, which affects DV to locate that prim.

This is a potential solution but not ideal.
In this example, we want to have an assertion to check the rising of `u_otp.gen_generic.u_impl_generic.u_reg_top.err_o` causes a fatal alert.
But the path is different when it's not ImplGeneric. We could use a macro (``` `OTP_PRIM_REG_TOP```) when it's not ImplGeneric, and rely on users to define the right path in a compile option
```
if (`PRIM_DEFAULT_IMPL == prim_pkg::ImplGeneric) begin : gen_reg_we_assert_generic
`ASSERT_PRIM_REG_WE_ONEHOT_ERROR_TRIGGER_ALERT(PrimRegWeOnehotCheck_A,
u_otp.gen_generic.u_impl_generic.u_reg_top, alert_tx_o[1])
end else if (`PRIM_DEFAULT_IMPL != prim_pkg::ImplXilinx) begin : gen_reg_we_assert_asic
`ASSERT_PRIM_REG_WE_ONEHOT_ERROR_TRIGGER_ALERT(PrimRegWeOnehotCheck_A,
u_otp.`OTP_PRIM_REG_TOP, alert_tx_o[1])
end
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.