Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/anjpar/fuse ctrl changes #671

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/axi/rtl/axi_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
//

package axi_pkg;
localparam int AXI_DW = 32;
calebofearth marked this conversation as resolved.
Show resolved Hide resolved
localparam int AXI_AW = 32;
localparam int AXI_UW = 32;
localparam int AXI_IW = 1;
localparam int AXI_BC = AXI_DW/8;
localparam int AXI_BW = $clog2(AXI_BC);

localparam AXI_LEN_MAX_VALUE = 256; // 8-bit LEN signal = 256 beats max
localparam AXI_LEN_WIDTH = $clog2(AXI_LEN_MAX_VALUE);
Expand Down
8 changes: 8 additions & 0 deletions src/axi/rtl/axi_sub.sv
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module axi_sub import axi_pkg::*; #(
output logic [IW-1:0] id,
output logic [DW-1:0] wdata, // Requires: Component dwidth == AXI dwidth
output logic [BC-1:0] wstrb, // Requires: Component dwidth == AXI dwidth
output logic [2:0] size,
input logic [DW-1:0] rdata, // Requires: Component dwidth == AXI dwidth
output logic last, // Asserted with final 'dv' of a burst
input logic hld,
Expand All @@ -80,6 +81,7 @@ module axi_sub import axi_pkg::*; #(
logic [AW-1:0] r_addr; // Byte address
logic [UW-1:0] r_user;
logic [IW-1:0] r_id;
logic [2:0] r_size;
logic r_last; // Asserted with final 'dv' of a burst
logic r_hld;
logic r_err;
Expand All @@ -93,6 +95,7 @@ module axi_sub import axi_pkg::*; #(
logic [IW-1:0] w_id;
logic [DW-1:0] w_wdata; // Requires: Component dwidth == AXI dwidth
logic [BC-1:0] w_wstrb; // Requires: Component dwidth == AXI dwidth
logic [2:0] w_size;
logic w_last; // Asserted with final 'dv' of a burst
logic w_hld;
logic w_err;
Expand Down Expand Up @@ -125,6 +128,7 @@ module axi_sub import axi_pkg::*; #(
.id (w_id ),
.wdata(w_wdata),
.wstrb(w_wstrb),
.wsize(w_size ),
.last (w_last ),
.hld (w_hld ),
.err (w_err )
Expand Down Expand Up @@ -157,6 +161,7 @@ module axi_sub import axi_pkg::*; #(
.addr (r_addr ),
.user (r_user ),
.id (r_id ),
.size (r_size ),
.last (r_last ),
.hld (r_hld ),
.err (r_err ),
Expand All @@ -181,6 +186,7 @@ module axi_sub import axi_pkg::*; #(
.r_user (r_user ),
.r_id (r_id ),
.r_last (r_last ),
.r_size (r_size ),
.r_hld (r_hld ),
.r_err (r_err ),
.r_rdata(r_rdata),
Expand All @@ -192,6 +198,7 @@ module axi_sub import axi_pkg::*; #(
.w_id (w_id ),
.w_wdata(w_wdata),
.w_wstrb(w_wstrb),
.w_size (w_size ),
.w_last (w_last ),
.w_hld (w_hld ),
.w_err (w_err ),
Expand All @@ -204,6 +211,7 @@ module axi_sub import axi_pkg::*; #(
.id (id ),
.wdata (wdata ),
.wstrb (wstrb ),
.size (size ),
.last (last ),
.hld (hld ),
.rd_err (rd_err ),
Expand Down
4 changes: 4 additions & 0 deletions src/axi/rtl/axi_sub_arb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module axi_sub_arb import axi_pkg::*; #(
input logic [AW-1:0] r_addr, // Byte address
input logic [UW-1:0] r_user,
input logic [IW-1:0] r_id,
input logic [2:0] r_size,
input logic r_last, // Asserted with final 'dv' of a burst
output logic r_hld,
output logic r_err,
Expand All @@ -57,6 +58,7 @@ module axi_sub_arb import axi_pkg::*; #(
input logic [IW-1:0] w_id,
input logic [DW-1:0] w_wdata, // Requires: Component dwidth == AXI dwidth
input logic [BC-1:0] w_wstrb, // Requires: Component dwidth == AXI dwidth
input logic [2:0] w_size,
input logic w_last, // Asserted with final 'dv' of a burst
output logic w_hld,
output logic w_err,
Expand All @@ -69,6 +71,7 @@ module axi_sub_arb import axi_pkg::*; #(
output logic [IW-1:0] id,
output logic [DW-1:0] wdata, // Requires: Component dwidth == AXI dwidth
output logic [BC-1:0] wstrb, // Requires: Component dwidth == AXI dwidth
output logic [2:0] size,
output logic last, // Asserted with final 'dv' of a burst
input logic hld,
input logic rd_err, // Asserts with rdata for reads (when C_LAT > 0)
Expand Down Expand Up @@ -125,6 +128,7 @@ module axi_sub_arb import axi_pkg::*; #(
user = r_win ? r_user : w_user;
id = r_win ? r_id : w_id ;
last = r_win ? r_last : w_last;
size = r_win ? r_size : w_size;
r_hld = hld || !r_win;
w_hld = hld || r_win;
r_err = rd_err;
Expand Down
4 changes: 3 additions & 1 deletion src/axi/rtl/axi_sub_rd.sv
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module axi_sub_rd import axi_pkg::*; #(
output logic [AW-1:0] addr, // Byte address
output logic [UW-1:0] user,
output logic [IW-1:0] id,
output logic [2:0] size,
output logic last, // Asserted with final 'dv' of a burst
input logic hld,
input logic err,
Expand Down Expand Up @@ -192,9 +193,10 @@ module axi_sub_rd import axi_pkg::*; #(
// Address Calculations //
// --------------------------------------- //
// Force aligned address to component
always_comb addr = {txn_ctx.addr[AW-1:BW],BW'(0)};
always_comb addr = {txn_ctx.addr[AW-1:0]};//,BW'(0)};
calebofearth marked this conversation as resolved.
Show resolved Hide resolved
always_comb user = txn_ctx.user;
always_comb id = txn_ctx.id;
always_comb size = txn_ctx.size;
always_comb last = txn_cnt == 0;

// Use full address to calculate next address (in case of arsize < data width)
Expand Down
7 changes: 5 additions & 2 deletions src/axi/rtl/axi_sub_wr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module axi_sub_wr import axi_pkg::*; #(
output logic [IW-1:0] id,
output logic [DW-1:0] wdata, // Requires: Component dwidth == AXI dwidth
output logic [BC-1:0] wstrb, // Requires: Component dwidth == AXI dwidth
output logic [2:0] wsize,
output logic last, // Asserted with final 'dv' of a burst
input logic hld,
input logic err
Expand Down Expand Up @@ -233,7 +234,7 @@ module axi_sub_wr import axi_pkg::*; #(
// Address Calculations //
// --------------------------------------- //
// Force aligned address to component
always_comb addr = {txn_ctx.addr[AW-1:BW],BW'(0)};
always_comb addr = {txn_ctx.addr[AW-1:0]};//,BW'(0)};
always_comb user = txn_ctx.user;
always_comb id = txn_ctx.id;

Expand Down Expand Up @@ -296,19 +297,21 @@ module axi_sub_wr import axi_pkg::*; #(
.OPT_OUTREG (0 ),
//
.OPT_PASSTHROUGH(0 ),
.DW (DW + BC + 1)
.DW (DW + BC + 1 + 3)
) i_dp_skd (
.i_clk (clk ),
.i_reset(rst_n ),
.i_valid(txn_wvalid ),
.o_ready(txn_wready ),
.i_data ({s_axi_if.wdata,
s_axi_if.wstrb,
txn_ctx.size,
calebofearth marked this conversation as resolved.
Show resolved Hide resolved
s_axi_if.wlast}),
.o_valid(dv_pre ),
.i_ready(!hld ),
.o_data ({wdata,
wstrb,
wsize,
last } )
);

Expand Down
Loading
Loading