Skip to content

Commit

Permalink
axi_to_reg: Change type definition scope to localparam
Browse files Browse the repository at this point in the history
  • Loading branch information
thommythomaso committed Aug 4, 2023
1 parent f157980 commit 586831a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions hw/future/axi_to_reg_v2.sv
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ module axi_to_reg_v2 #(
// how many times is the AXI bus wider than the regbus?
localparam int unsigned NumBanks = AxiDataWidth / RegDataWidth;

typedef logic [AxiAddrWidth-1 :0] addr_t;
typedef logic [RegDataWidth-1 :0] reg_data_t;
typedef logic [RegDataWidth/8-1:0] reg_strb_t;
localparam type reg_addr_t = logic [AxiAddrWidth-1 :0];
localparam type reg_data_t = logic [RegDataWidth-1 :0];
localparam type reg_strb_t = logic [RegDataWidth/8-1:0];

// TCDM BUS
logic [NumBanks-1:0] mem_req;
logic [NumBanks-1:0] mem_gnt;
addr_t [NumBanks-1:0] mem_addr;
reg_addr_t [NumBanks-1:0] mem_addr;
reg_data_t [NumBanks-1:0] mem_wdata;
reg_strb_t [NumBanks-1:0] mem_strb;
logic [NumBanks-1:0] mem_we;
Expand All @@ -75,7 +75,7 @@ module axi_to_reg_v2 #(
.BufDepth ( 32'd1 ),
.HideStrb ( 1'b0 ),
.OutFifoDepth ( 32'd1 ),
.addr_t ( addr_t ),
.addr_t ( reg_addr_t ),
.mem_data_t ( reg_data_t ),
.mem_strb_t ( reg_strb_t )
) i_axi_to_detailed_mem (
Expand Down

0 comments on commit 586831a

Please sign in to comment.