Skip to content

Commit

Permalink
[lint] Fix linting errors for SHA2 instantiated in HMAC
Browse files Browse the repository at this point in the history
Since SHA2 is not instantiated with support of SHA2-384/512 some FFs
are assigned a constant zero. Waive these cases.

Signed-off-by: Robert Schilling <[email protected]>
  • Loading branch information
Razer6 committed Jan 22, 2024
1 parent fc12380 commit 8589983
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions hw/ip/hmac/lint/hmac.waiver
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ waive -rules {NOT_READ} -location {*_reg_top.sv} -regexp {(address|param|user)}

waive -rules {NOT_READ HIER_NET_NOT_READ} -location {hmac.sv} -regexp {'msg_fifo_wmask.* is not read} \
-comment "Only first bit in a byte is used"

waive -rules {CONST_FF} -location {prim_sha2.sv} -regexp {Flip-flop 'round_q\[6\]' is driven by constant zero} \
-comment "prim_sha2 is not instantiated in SHA2-384/512 multimode"
waive -rules {CONST_FF} -location {prim_sha2_pad.sv} -regexp {Flip-flop 'digest_mode_flag' is driven by constant zeros in module 'prim_sha2_pad' \(MultimodeEn=1'h0\)} \
-comment "prim_sha2 is not instantiated in SHA2-384/512 multimode"
5 changes: 0 additions & 5 deletions hw/ip/prim/lint/prim_sha2.waiver
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,9 @@ waive -rules {ARITH_CONTEXT} -location {prim_sha2_pkg.sv} -regexp {Bitlength of
waive -rules {INPUT_NOT_READ} -location {prim_sha2_pkg.sv} -regexp {Input port 'h_i\[0:7\]\[63:32\]' is not read from in function 'compress_multi_256'}
-comment "Upper bits are only used in SHA2-384/512"



# INTEGER
waive -rules {INTEGER} -location {prim_sha2_pkg.sv} -regexp {'amt' of type int used as a}
waive -rules {TWO_STATE_TYPE} -location {prim_sha2_pkg.sv} -regexp {'amt' is of two state type 'int'} \
-comment "shift function behaves as static, it is called with constant in the design"
waive -rules {INTEGER} -location {prim_sha2_pkg.sv} -regexp {'amt' of type integer used as a non-constant value} \
-comment "rotate function behaves as static function - it is called with a constant value in the design"

waive -rules {INTEGER} -location {tlul_socket_1n.sv} -regexp {'idx' of type int used} \
-comment "It compares with the signal and used as constant"

0 comments on commit 8589983

Please sign in to comment.