address to slave is now masked

This commit is contained in:
Mario Hüttel 2016-08-23 17:57:57 +02:00
parent 4ee6195c4d
commit 3d7b14c6ff
2 changed files with 16 additions and 8 deletions

View File

@ -62,7 +62,11 @@ begin
slave_in_use(slave_idx(i)) := '1';
masters_in(i).arready <= '1';
-- Write request to slave
if slave_idx(i) = SLAVE_COUNT then
slaves_in(slave_idx(i)).araddr <= masters_out(i).araddr;
else
slaves_in(slave_idx(i)).araddr <= masters_out(i).araddr and (not mask_array(slave_idx(i)));
end if;
slaves_in(slave_idx(i)).arid <= std_logic_vector(to_unsigned(i, RID_SLAVE_BITS - RID_MASTER_BITS)) & masters_out(i).arid;
slaves_in(slave_idx(i)).arburst <= masters_out(i).arburst;
slaves_in(slave_idx(i)).arcache <= masters_out(i).arcache;

View File

@ -68,7 +68,11 @@ begin
write_locks_s(i).locked <= '1';
slave_in_use(slave_idx) := '1';
-- output request to slave
if slave_idx = SLAVE_COUNT then
slaves_in(slave_idx).awaddr <= masters_out(i).awaddr;
else
slaves_in(slave_idx).awaddr <= masters_out(i).awaddr and (not mask_array(slave_idx));
end if;
slaves_in(slave_idx).awid <= std_logic_vector(to_unsigned(i, WID_SLAVE_BITS - WID_MASTER_BITS)) & masters_out(i).awid;
slaves_in(slave_idx).awburst <= masters_out(i).awburst;
slaves_in(slave_idx).awcache <= masters_out(i).awcache;