Skip to content
Snippets Groups Projects
Commit 07071eb5 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

crossbar: silence a warning for crossbars with 1 slave

parent 8b259e40
No related merge requests found
...@@ -82,19 +82,21 @@ architecture rtl of xwb_crossbar is ...@@ -82,19 +82,21 @@ architecture rtl of xwb_crossbar is
constant zero : t_wishbone_address := (others => '0'); constant zero : t_wishbone_address := (others => '0');
begin begin
-- all (i,j) with 0 <= i < j < n -- all (i,j) with 0 <= i < j < n
for i in 0 to g_num_slaves-2 loop if g_num_slaves > 1 then
for j in i+1 to g_num_slaves-1 loop for i in 0 to g_num_slaves-2 loop
assert not (((c_mask(i) and c_mask(j)) and (c_address(i) xor c_address(j))) = zero) or for j in i+1 to g_num_slaves-1 loop
((c_mask(i) or not c_address(i)) = zero) or -- disconnected slave? assert not (((c_mask(i) and c_mask(j)) and (c_address(i) xor c_address(j))) = zero) or
((c_mask(j) or not c_address(j)) = zero) -- disconnected slave? ((c_mask(i) or not c_address(i)) = zero) or -- disconnected slave?
report "Address ranges must be distinct (slaves " & ((c_mask(j) or not c_address(j)) = zero) -- disconnected slave?
Integer'image(i) & "[" & f_bits2string(c_address(i)) & "/" & report "Address ranges must be distinct (slaves " &
f_bits2string(c_mask(i)) & "] & " & Integer'image(i) & "[" & f_bits2string(c_address(i)) & "/" &
Integer'image(j) & "[" & f_bits2string(c_address(j)) & "/" & f_bits2string(c_mask(i)) & "] & " &
f_bits2string(c_mask(j)) & "])" Integer'image(j) & "[" & f_bits2string(c_address(j)) & "/" &
severity Failure; f_bits2string(c_mask(j)) & "])"
severity Failure;
end loop;
end loop; end loop;
end loop; end if;
for i in 0 to g_num_slaves-1 loop for i in 0 to g_num_slaves-1 loop
report "Mapping slave #" & report "Mapping slave #" &
Integer'image(i) & "[" & f_bits2string(c_address(i)) & "/" & Integer'image(i) & "[" & f_bits2string(c_address(i)) & "/" &
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment