OpenCores
URL https://opencores.org/ocsvn/mpmc8/mpmc8/trunk

Subversion Repositories mpmc8

[/] [mpmc8/] [trunk/] [rtl/] [mpmc10/] [mpmc10_addr_gen.sv] - Diff between revs 5 and 10

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 5 Rev 10
Line 37... Line 37...
import mpmc10_pkg::*;
import mpmc10_pkg::*;
 
 
module mpmc10_addr_gen(rst, clk, state, rdy, num_strips, strip_cnt, addr_base, addr);
module mpmc10_addr_gen(rst, clk, state, rdy, num_strips, strip_cnt, addr_base, addr);
input rst;
input rst;
input clk;
input clk;
input [3:0] state;
input mpmc10_state_t state;
input rdy;
input rdy;
input [5:0] num_strips;
input [5:0] num_strips;
input [5:0] strip_cnt;
input [5:0] strip_cnt;
input [31:0] addr_base;
input [31:0] addr_base;
output reg [31:0] addr;
output reg [31:0] addr;
 
 
always_ff @(posedge clk)
always_ff @(posedge clk)
if (rst)
if (rst)
        addr <= 32'h1FFFFFFF;
        addr <= 32'h1FFFFFFF;
else begin
else begin
        if (state==mpmc10_pkg::PRESET2)
        if (state==PRESET2)
                addr <= addr_base;
                addr <= {addr_base[31:4],4'h0};
        else if (state==mpmc10_pkg::READ_DATA1 && rdy && strip_cnt != num_strips)
        else if (state==READ_DATA1 && rdy && strip_cnt != num_strips)
                addr[31:4] <= addr[31:4] + 2'd1;
                addr[31:4] <= addr[31:4] + 2'd1;
        // Increment the address if we had to start a new burst.
        // Increment the address if we had to start a new burst.
//      else if (state==WRITE_DATA3 && req_strip_cnt!=num_strips)
//      else if (state==WRITE_DATA3 && req_strip_cnt!=num_strips)
//              app_addr <= app_addr + {req_strip_cnt,4'h0};    // works for only 1 missed burst
//              app_addr <= app_addr + {req_strip_cnt,4'h0};    // works for only 1 missed burst
end
end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.