8000 axi_dmac: Add interface description register · analogdevicesinc/hdl@d2b1164 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit d2b1164

Browse files
committed
axi_dmac: Add interface description register
Adds information on: - Log 2 of interface data widths in bits - Interface type (0 - Axi MemoryMap, 1 - AXI Stream, 2 - FIFO ) . Lets the driver discover interface widths and interface type settings, this will deprecate the corresponding device tree properties. This is useful in case of parametrized projects where the width of the datapath is changing. This change will allow the use of a generic device tree node. Updated version to 4.3.a
1 parent f3b69c1 commit d2b1164

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

library/axi_dmac/axi_dmac.v

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ axi_dmac_regmap #(
397397
.BYTES_PER_BEAT_WIDTH_DEST(BYTES_PER_BEAT_WIDTH_DEST),
398398
.BYTES_PER_BEAT_WIDTH_SRC(BYTES_PER_BEAT_WIDTH_SRC),
399399
.BYTES_PER_BURST_WIDTH(BYTES_PER_BURST_WIDTH),
400+
.DMA_TYPE_DEST(DMA_TYPE_DEST),
401+
.DMA_TYPE_SRC(DMA_TYPE_SRC),
400402
.DMA_AXI_ADDR_WIDTH(DMA_AXI_ADDR_WIDTH),
401403
.DMA_LENGTH_WIDTH(DMA_LENGTH_WIDTH),
402404
.DMA_LENGTH_ALIGN(DMA_LENGTH_ALIGN),

library/axi_dmac/axi_dmac_regmap.v

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ module axi_dmac_regmap #(
4141
parameter BYTES_PER_BEAT_WIDTH_DEST = 1,
4242
parameter BYTES_PER_BEAT_WIDTH_SRC = 1,
4343
parameter BYTES_PER_BURST_WIDTH = 7,
44+
parameter DMA_TYPE_DEST = 0,
45+
parameter DMA_TYPE_SRC = 2,
4446
parameter DMA_AXI_ADDR_WIDTH = 32,
4547
parameter DMA_LENGTH_WIDTH = 24,
4648
parameter DMA_LENGTH_ALIGN = 3,
@@ -112,7 +114,7 @@ module axi_dmac_regmap #(
112114
input [31:0] dbg_ids1
113115
);
114116

115-
localparam PCORE_VERSION = 'h00040262;
117+
localparam PCORE_VERSION = 'h00040361;
116118

117119
// Register interface signals
118120
reg [31:0] up_rdata = 32'h00;
@@ -199,6 +201,9 @@ always @(posedge s_axi_aclk) begin
199201
9'h001: up_rdata <= ID;
200202
9'h002: up_rdata <= up_scratch;
201203
9'h003: up_rdata <= 32'h444d4143; // "DMAC"
204+
9'h004: up_rdata <= {16'b0,
205+
2'b0,DMA_TYPE_SRC[1:0],BYTES_PER_BEAT_WIDTH_SRC[3:0],
206+
2'b0,DMA_TYPE_DEST[1:0],BYTES_PER_BEAT_WIDTH_DEST[3:0]};
202207
9'h020: up_rdata <= up_irq_mask;
203208
9'h021: up_rdata <= up_irq_pending;
204209
9'h022: up_rdata <= up_irq_source;

0 commit comments

Comments
 (0)
0