Rethink how generic prim can be replaced by a tech-specific prim
@weicaiyang is already working on this.
Since Jun 22, 2022.
- 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
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.
Assessment
This issue has not been assessed yet.