[prim] Add missing waiver
- without this waiver file ascentlint runs will fail
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/ip/prim/lint/prim_cdc_rand_delay.waiver b/hw/ip/prim/lint/prim_cdc_rand_delay.waiver
new file mode 100644
index 0000000..00a95ef
--- /dev/null
+++ b/hw/ip/prim/lint/prim_cdc_rand_delay.waiver
@@ -0,0 +1,19 @@
+# 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_cdc_rand_delay
+
+waive -rules {IFDEF_CODE} -location {prim_cdc_rand_delay.sv} -regexp {.*contained within \`else block.*} \
+ -comment "Ifdefs are required for prim_rand_cdc_delay since it is turned on only for simulation."
+
+waive -rules {HIER_BRANCH_NOT_READ} -location {prim_cdc_rand_delay.sv} -regexp {.*dst_clk.*} \
+ -comment "Destination clock is only used when attempting to simulate random delays."
+
+waive -rules {INPUT_NOT_READ} -location {prim_cdc_rand_delay.sv} -regexp {dst_clk|src_clk} \
+ -comment "Source/Destination clock is only used when attempting to simulate random delays."
+
+waive -rules {PARAM_NOT_USED} -location {prim_cdc_rand_delay.sv} -regexp {UseSourceClock|LatencyPs|JitterPs} \
+ -comment "Randomization parameters are only used when attempting to simulate random delays."
+
+
diff --git a/hw/ip/prim/rtl/prim_cdc_rand_delay.sv b/hw/ip/prim/rtl/prim_cdc_rand_delay.sv
index 0260bed..37a965e 100644
--- a/hw/ip/prim/rtl/prim_cdc_rand_delay.sv
+++ b/hw/ip/prim/rtl/prim_cdc_rand_delay.sv
@@ -113,8 +113,8 @@
//
// Empirically, using std::randomize() has been found to be slower than $urandom, since the latter
// operates on a fixed data width of 32-bits. There may be an incredibly large number of instances
- // of this module in the DUT, causing this preformance hit to be noticeable. This method randomizes
- // the data piece-wise, 32-bits at a time using $urandom instead.
+ // of this module in the DUT, causing this preformance hit to be noticeable. This method
+ // randomizes the data piece-wise, 32-bits at a time using $urandom instead.
function automatic void fast_randomize(output logic [DataWidth-1:0] data);
for (int i = 0; i < DataWidth; i += 32) data = (data << 32) | $urandom();
endfunction