[prim] Add a lint waiver for dv-only code / ifdefs

Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/ip/prim/lint/prim_sparse_fsm.waiver b/hw/ip/prim/lint/prim_sparse_fsm.waiver
new file mode 100644
index 0000000..61356a8
--- /dev/null
+++ b/hw/ip/prim/lint/prim_sparse_fsm.waiver
@@ -0,0 +1,11 @@
+# Copyright lowRISC contributors.
+# Licensed under the Apache License, Version 2.0, see LICENSE for details.
+# SPDX-License-Identifier: Apache-2.0
+#
+# waiver file for prim_sparse_fsm_flop
+
+waive -rules {IFDEF_CODE} -location {prim_sparse_fsm_flop.sv} -regexp {.*unused_valid_st.*} \
+      -comment "The unused_valid_st signal is used purely for DV only and is switched to a constant during lint / synth."
+
+waive -rules {PARAM_NOT_USED} -location {prim_sparse_fsm_flop.sv} -regexp {.*StateEnumT.*} \
+      -comment "The state enum is used only during DV / FPV."
\ No newline at end of file
diff --git a/hw/ip/prim/prim_sparse_fsm.core b/hw/ip/prim/prim_sparse_fsm.core
index 5367085..54fa810 100644
--- a/hw/ip/prim/prim_sparse_fsm.core
+++ b/hw/ip/prim/prim_sparse_fsm.core
@@ -22,6 +22,10 @@
     depend:
       # common waivers
       - lowrisc:lint:common
+    files:
+      - lint/prim_sparse_fsm.waiver
+    file_type: waiver
+
 
   files_veriblelint_waiver:
     depend: