Skip to content

Commit

Permalink
New: Finalize AXI-Crossbar integration and pass successfully the
Browse files Browse the repository at this point in the history
     compliance testsuite
  • Loading branch information
dpretet committed Dec 8, 2021
1 parent c033857 commit e7a983e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion rtl/friscv_dcache.sv
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ module friscv_dcache
///////////////////////////////////////////////////////////////////////////

// This FIFO stores the address for write data alignement
// NB: UNUSED
// TODO: Evaluate if it could be needed
friscv_scfifo
#(
.PASS_THRU (0),
Expand Down Expand Up @@ -206,7 +208,7 @@ module friscv_dcache
// Write Data channel
///////////////////////////////////////////////////////////////////////////

assign wr_position = awaddr_w[ADDR_LSB+:SCALE_W];
assign wr_position = memfy_awaddr[ADDR_LSB+:SCALE_W];

always @ (*) begin: GEN_WSTRB
for (int i=0;i<SCALE;i=i+1) begin
Expand Down
8 changes: 4 additions & 4 deletions test/common/axi4l_ram.sv
Original file line number Diff line number Diff line change
Expand Up @@ -416,16 +416,16 @@ module axi4l_ram
p1_bvalid <= 1'b1;
p1_bid <= p1_awid_s;

if (AXI2_DATA_W<AXI_DATA_W) begin
for (int i=0;i<AXI2_DATA_W/8;i++) begin
if (AXI1_DATA_W<AXI_DATA_W) begin
for (int i=0;i<AXI1_DATA_W/8;i++) begin
if (p1_wstrb_s[i]) begin
mem[p1_awaddr_s[ADDR_LSB_W+:ADDRW]][(p1_wr_position+i*8)+:8] <= p1_wdata_s[8*i+:8];
end
end
end else begin
for (int i=0;i<AXI_DATA_W/8;i++) begin
if (p1_wstrb_s[i]) begin
mem[p1_awaddr_s[ADDR_LSB_W+:ADDRW]][8*i+:8] <= p1_wdata[8*i+:8];
mem[p1_awaddr_s[ADDR_LSB_W+:ADDRW]][8*i+:8] <= p1_wdata_s[8*i+:8];
end
end
end
Expand Down Expand Up @@ -475,7 +475,7 @@ module axi4l_ram
end else begin
for (int i=0;i<AXI_DATA_W/8;i++) begin
if (p2_wstrb_s[i]) begin
mem[p2_awaddr_s[ADDR_LSB_W+:ADDRW]][8*i+:8] <= p2_wdata[8*i+:8];
mem[p2_awaddr_s[ADDR_LSB_W+:ADDRW]][8*i+:8] <= p2_wdata_s[8*i+:8];
end
end
end
Expand Down

0 comments on commit e7a983e

Please sign in to comment.