axi_dmac: address_generator: Make 'len' registered

Slightly improves the timing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
main
Lars-Peter Clausen 2014-04-04 14:55:27 +02:00
parent 66e6c1cc21
commit 7ca43f4920
1 changed files with 9 additions and 1 deletions

View File

@ -76,9 +76,10 @@ localparam MAX_BEATS_PER_BURST = 2**(C_BEATS_PER_BURST_WIDTH);
assign burst = 2'b01;
assign prot = 3'b000;
assign cache = 4'b0011;
assign len = eot ? req_last_burst_length : MAX_BEATS_PER_BURST - 1;
assign len = length;
assign size = $clog2(C_DMA_DATA_WIDTH/8);
reg [7:0] length = 'h0;
reg [31-C_ADDR_ALIGN_BITS:0] address = 'h00;
reg [C_BEATS_PER_BURST_WIDTH-1:0] last_burst_len = 'h00;
assign addr = {address, {C_ADDR_ALIGN_BITS{1'b0}}};
@ -96,6 +97,13 @@ always @(posedge clk) begin
end
end
always @(posedge clk) begin
if (eot == 1'b1)
length <= req_last_burst_length;
else
length <= MAX_BEATS_PER_BURST - 1;
end
always @(posedge clk) begin
if (resetn == 1'b0) begin
address <= 'h00;