Skip to content

Commit

Permalink
axi_dmac: Add interface description register
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ronagyl committed Aug 12, 2020
1 parent f3b69c1 commit d2b1164
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions library/axi_dmac/axi_dmac.v
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ axi_dmac_regmap #(
.BYTES_PER_BEAT_WIDTH_DEST(BYTES_PER_BEAT_WIDTH_DEST),
.BYTES_PER_BEAT_WIDTH_SRC(BYTES_PER_BEAT_WIDTH_SRC),
.BYTES_PER_BURST_WIDTH(BYTES_PER_BURST_WIDTH),
.DMA_TYPE_DEST(DMA_TYPE_DEST),
.DMA_TYPE_SRC(DMA_TYPE_SRC),
.DMA_AXI_ADDR_WIDTH(DMA_AXI_ADDR_WIDTH),
.DMA_LENGTH_WIDTH(DMA_LENGTH_WIDTH),
.DMA_LENGTH_ALIGN(DMA_LENGTH_ALIGN),
Expand Down
7 changes: 6 additions & 1 deletion library/axi_dmac/axi_dmac_regmap.v
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ module axi_dmac_regmap #(
parameter BYTES_PER_BEAT_WIDTH_DEST = 1,
parameter BYTES_PER_BEAT_WIDTH_SRC = 1,
parameter BYTES_PER_BURST_WIDTH = 7,
parameter DMA_TYPE_DEST = 0,
parameter DMA_TYPE_SRC = 2,
parameter DMA_AXI_ADDR_WIDTH = 32,
parameter DMA_LENGTH_WIDTH = 24,
parameter DMA_LENGTH_ALIGN = 3,
Expand Down Expand Up @@ -112,7 +114,7 @@ module axi_dmac_regmap #(
input [31:0] dbg_ids1
);

localparam PCORE_VERSION = 'h00040262;
localparam PCORE_VERSION = 'h00040361;

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

0 comments on commit d2b1164

Please sign in to comment.