lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.58k stars 776 forks source link

[fpv/lc_ctrl] Does not treat long enum numbers correctly #12693

Open cindychip opened 2 years ago

cindychip commented 2 years ago

In LC_CTRL, these two sec_cm assertions failed: https://github.com/lowRISC/opentitan/blob/master/hw/ip/lc_ctrl/rtl/lc_ctrl.sv#L729-L740 because enum type incorrectly categorized two declared values. https://github.com/lowRISC/opentitan/blob/master/hw/ip/prim/rtl/prim_sparse_fsm_flop.sv#L43-L50

I think the reason is because the enum type is too large - The lc_state_e is 320 bits enum, and lc_cnt_e is 600 bits enum. But when I reduce both of them to 16 bits, the assertions passed.

image

Contacting AE to see if we have a solution for that.

cindychip commented 1 year ago

We have a temp solution to solve this.

gdessouky commented 1 year ago

@cindychip is this still a relevant issue? My understanding from above is that the assertions pass once you reduce the enum bits? But you also say this is a temp fix. WDYT, is this still relevant?

cindychip commented 1 year ago

@cindychip is this still a relevant issue? My understanding from above is that the assertions pass once you reduce the enum bits? But you also say this is a temp fix. WDYT, is this still relevant?

Thanks Ghada, This could be an icebox item. we already implemented a workaround.

gdessouky commented 1 year ago

Great, thanks to confirm, labeling this as https://github.com/lowRISC/opentitan/labels/Type%3AIcebox then.