From 878e2ddd8f95608aae1f9d4f84da0e06bc214e88 Mon Sep 17 00:00:00 2001 From: Michael Platzer Date: Mon, 7 Oct 2024 07:42:29 +0000 Subject: [PATCH] Guard unsynthesizable `$isunknown` with ifndef SYNTHESIS --- src/addr_decode_dync.sv | 2 ++ src/multiaddr_decode.sv | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/addr_decode_dync.sv b/src/addr_decode_dync.sv index b0bbb1db..124387b9 100644 --- a/src/addr_decode_dync.sv +++ b/src/addr_decode_dync.sv @@ -144,6 +144,7 @@ module addr_decode_dync #( // check_start: Enforces a smaller start than end address. // check_idx: Enforces a valid index in the rule. // check_overlap: Warns if there are overlapping address regions. + `ifndef SYNTHESIS always_comb begin : proc_check_addr_map if (!$isunknown(addr_map_i) && ~config_ongoing_i) begin for (int unsigned i = 0; i < NoRules; i++) begin @@ -183,5 +184,6 @@ module addr_decode_dync #( end end `endif + `endif endmodule diff --git a/src/multiaddr_decode.sv b/src/multiaddr_decode.sv index f73e560a..5d81cc8a 100644 --- a/src/multiaddr_decode.sv +++ b/src/multiaddr_decode.sv @@ -132,6 +132,7 @@ module multiaddr_decode #( // These following assumptions check the validity of the address map. // check_idx: Enforces a valid index in the rule. + `ifndef SYNTHESIS always_comb begin : proc_check_addr_map if (!$isunknown(addr_map_i)) begin for (int unsigned i = 0; i < NoRules; i++) begin @@ -146,6 +147,6 @@ module multiaddr_decode #( end end end - + `endif `endif endmodule