[rv_plic,lint] Tell Verilator to split variables for scheduling
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/rv_plic/lint/rv_plic.vlt b/hw/ip/rv_plic/lint/rv_plic.vlt
index e32010c..1579f93 100644
--- a/hw/ip/rv_plic/lint/rv_plic.vlt
+++ b/hw/ip/rv_plic/lint/rv_plic.vlt
@@ -4,3 +4,13 @@
//
// waiver file for rv_plic
+`verilator_config
+
+// Tell the Verilator scheduler to split up these variables into
+// separate pieces when it's figuring out process scheduling. This
+// avoids spurious UNOPTFLAT warnings caused by the fact that the
+// arrays feed into themselves (with different bits for different
+// positions in the tree).
+split_var -module "rv_plic_target" -var "is_tree"
+split_var -module "rv_plic_target" -var "id_tree"
+split_var -module "rv_plic_target" -var "max_tree"