Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard unsynthesizable $isunknown with ifndef SYNTHESIS #239

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading