Line 359... |
Line 359... |
slave_busy <= 0;
|
slave_busy <= 0;
|
end else begin
|
end else begin
|
for(i = 0; i < WB_MASTER; i = i + 1) begin
|
for(i = 0; i < WB_MASTER; i = i + 1) begin
|
if(master_busy[i] == 0) begin
|
if(master_busy[i] == 0) begin
|
if(wbd_stb_master[i] & slave_busy[wbd_taddr_master_t[i]] == 0) begin
|
if(wbd_stb_master[i] & slave_busy[wbd_taddr_master_t[i]] == 0) begin
|
slave_busy[wbd_taddr_master_t[i]] <= 1;
|
$display("Locking Master Id: %d for tar_master: %d, Total Master: %x ", i, wbd_taddr_master_t[i], wbd_taddr_master);
|
master_busy[i] <= 1;
|
slave_busy[wbd_taddr_master_t[i]] = 1;
|
|
master_busy[i] = 1;
|
end
|
end
|
end else if(wbd_cyc_master[i] == 0) begin
|
end else if(wbd_cyc_master[i] == 0) begin
|
master_busy[i] <= 0;
|
master_busy[i] <= 0;
|
slave_busy[wbd_taddr_master_t[i]] <= 0;
|
slave_busy[wbd_taddr_master_t[i]] <= 0;
|
end
|
end
|
Line 378... |
Line 379... |
if(master_busy[n] == 0) begin
|
if(master_busy[n] == 0) begin
|
if(wbd_stb_master[n] & slave_busy[wbd_taddr_master_t[n]] == 0) begin
|
if(wbd_stb_master[n] & slave_busy[wbd_taddr_master_t[n]] == 0) begin
|
master_mx_id[n] <= wbd_taddr_master_t[n];
|
master_mx_id[n] <= wbd_taddr_master_t[n];
|
slave_mx_id [wbd_taddr_master_t[n]] <= n;
|
slave_mx_id [wbd_taddr_master_t[n]] <= n;
|
// synopsys translate_off
|
// synopsys translate_off
|
// $display("%m:%t: Locking Master : %d with Slave : %d",$time,i,wbd_taddr_master_t[n]);
|
$display("%m:%t: Locking Master : %d with Slave : %d",$time,i,wbd_taddr_master_t[n]);
|
// synopsys translate_on
|
// synopsys translate_on
|
end
|
end
|
end else if(wbd_cyc_master[n] == 0) begin
|
end else if(wbd_cyc_master[n] == 0) begin
|
if(master_busy[n] == 1) begin
|
if(master_busy[n] == 1) begin
|
// synopsys translate_off
|
// synopsys translate_off
|
// $display("%m:%t: Releasing Master : %d with Slave : %d",$time,i,wbd_taddr_master_t[n]);
|
$display("%m:%t: Releasing Master : %d with Slave : %d",$time,i,wbd_taddr_master_t[n]);
|
// synopsys translate_on
|
// synopsys translate_on
|
end
|
end
|
end
|
end
|
end
|
end
|
end
|
end
|