Skip to content

Commit

Permalink
addr_decode: Guard unsynthesizable $isunknown (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-platzer authored Oct 7, 2024
1 parent ef7d003 commit 7d90f2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/addr_decode_dync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -183,5 +184,6 @@ module addr_decode_dync #(
end
end
`endif
`endif

endmodule
3 changes: 2 additions & 1 deletion src/multiaddr_decode.sv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -146,6 +147,6 @@ module multiaddr_decode #(
end
end
end

`endif
`endif
endmodule

0 comments on commit 7d90f2e

Please sign in to comment.