Module prim_onehot_check
Block Diagram of prim_onehot_check
Name |
Default |
Description |
---|---|---|
AddrWidth |
5 |
|
OneHotWidth |
2**AddrWidth |
|
AddrCheck |
1 |
If set to 0, the addr_i input will not be used for the check and can be tied off. |
EnableCheck |
1 |
If set to 0, the en_i value will not be used for the check and can be tied off. |
StrictCheck |
1 |
If set to 1, the oh_i vector must always be one hot if en_i is set to 1. If set to 0, the oh_i vector may be 0 if en_i is set to 1 (useful when oh_i can be masked). |
EnableAlertTriggerSVA |
1 |
This should only be disabled in special circumstances, for example in non-comportable IPs where an error does not trigger an alert. |
Name |
Type |
Direction |
Description |
---|---|---|---|
clk_i |
wire logic |
input |
|
rst_ni |
wire logic |
input |
|
oh_i |
wire logic [OneHotWidth - 1 : 0] |
input |
|
addr_i |
wire logic [AddrWidth - 1 : 0] |
input |
|
en_i |
wire logic |
input |
|
err_o |
var logic |
output |
Name |
Kind |
Description |
---|---|---|
prim_onehot_check.NumSources_A |
immediate assert |
(OneHotWidth >= 1)
|
prim_onehot_check.AddrWidth_A |
immediate assert |
(AddrWidth >= 1)
|
prim_onehot_check.AddrRange_A |
immediate assert |
(OneHotWidth <= (2 ** AddrWidth))
|
prim_onehot_check.AddrImpliesEnable_A |
immediate assert |
((AddrCheck && EnableCheck) || ! AddrCheck)
|
prim_onehot_check.Onehot0Check_A |
concurent assert |
disable iff((!rst_ni)!=='0)(! $onehot0(oh_i) |-> err_o)
|
prim_onehot_check.EnableCheck_A |
concurent assert |
disable iff((!rst_ni)!=='0)((| oh_i != en_i) |-> err_o)
|
prim_onehot_check.EnableCheck_A |
concurent assert |
disable iff((!rst_ni)!=='0)((! en_i && | oh_i) |-> err_o)
|
prim_onehot_check.AddrCheck_A |
concurent assert |
disable iff((!rst_ni)!=='0)((oh_i[addr_i] != | oh_i) |-> err_o)
|
prim_onehot_check.AssertConnected_A |
immediate assert |
((unused_assert_connected === 1'b1) || ! EnableAlertTriggerSVA)
|
The onehot width can be <= 2**AddrWidth and does not have to be a power of two.