Skip to content

Commit

Permalink
Bump common_cells version
Browse files Browse the repository at this point in the history
  • Loading branch information
micprog committed Aug 8, 2023
1 parent c0cb75d commit f2d0c6a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package:
- "Florian Zaruba <[email protected]>"

dependencies:
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", rev: "99fcffdc3f8a5f3f590f6c9f687f65a2e9f2e0fe" } # updated mem_to_banks_detailed
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.31.0 }
common_verification: { git: "https://github.com/pulp-platform/common_verification.git", version: 0.2.3 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.2 }

Expand Down
30 changes: 15 additions & 15 deletions src/axi_to_detailed_mem.sv
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,14 @@ module axi_to_detailed_mem #(

// Split single memory request to desired number of banks.
mem_to_banks_detailed #(
.AddrWidth ( AddrWidth ),
.DataWidth ( DataWidth ),
.ErspWidth ( 2 ),
.NumBanks ( NumBanks ),
.HideStrb ( HideStrb ),
.MaxTrans ( BufDepth ),
.FifoDepth ( OutFifoDepth ),
.AtopWidth ( $bits(tmp_atop_t) )
.AddrWidth ( AddrWidth ),
.DataWidth ( DataWidth ),
.RUserWidth ( 2 ),
.NumBanks ( NumBanks ),
.HideStrb ( HideStrb ),
.MaxTrans ( BufDepth ),
.FifoDepth ( OutFifoDepth ),
.WUserWidth ( $bits(tmp_atop_t) )
) i_mem_to_banks (
.clk_i,
.rst_ni,
Expand All @@ -475,21 +475,21 @@ module axi_to_detailed_mem #(
.addr_i ( mem_req.addr ),
.wdata_i ( mem_req.wdata ),
.strb_i ( mem_req.strb ),
.atop_i ( mem_req_atop ),
.wuser_i ( mem_req_atop ),
.we_i ( mem_req.we ),
.rvalid_o ( mem_rvalid ),
.rdata_o ( mem_rdata.data ),
.ersp_o ( tmp_ersp ),
.ruser_o ( tmp_ersp ),
.bank_req_o ( mem_req_o ),
.bank_gnt_i ( mem_gnt_i ),
.bank_addr_o ( mem_addr_o ),
.bank_wdata_o ( mem_wdata_o ),
.bank_strb_o ( mem_strb_o ),
.bank_atop_o ( banked_req_atop ),
.bank_wuser_o ( banked_req_atop ),
.bank_we_o ( mem_we_o ),
.bank_rvalid_i ( mem_rvalid_i ),
.bank_rdata_i ( mem_rdata_i ),
.bank_ersp_i ( bank_ersp )
.bank_ruser_i ( bank_ersp )
);

// Join memory read data and meta data stream.
Expand Down Expand Up @@ -528,9 +528,9 @@ module axi_to_detailed_mem #(
for (genvar i = 0; i < NumBanks; i++) begin
// Set active write banks based on strobe
assign meta_buf_bank_strb[i] = |meta_buf.strb[i*NumBytesPerBank +: NumBytesPerBank];
// Set active read banks based on size and address offset
assign meta_buf_size_enable[i] = i*NumBytesPerBank + NumBytesPerBank > (meta_buf.addr % DataWidth/8) &&
i*NumBytesPerBank < ((meta_buf.addr % DataWidth/8) + 1<<meta_buf.size);
// Set active read banks based on size and address offset: (bank.end > addr) && (bank.start < addr+size)
assign meta_buf_size_enable[i] = ((i*NumBytesPerBank + NumBytesPerBank) > (meta_buf.addr % DataWidth/8)) &&
((i*NumBytesPerBank) < ((meta_buf.addr % DataWidth/8) + 1<<meta_buf.size));
end
assign resp_b_err = |(m2s_resp.err & meta_buf_bank_strb); // Ensure only active banks are used (strobe)
assign resp_b_exokay = &(m2s_resp.exokay | ~meta_buf_bank_strb); // Ensure only active banks are used (strobe)
Expand Down

0 comments on commit f2d0c6a

Please sign in to comment.