diff options
author | Josh Blum <josh@joshknows.com> | 2012-07-17 12:28:29 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-07-17 12:28:29 -0700 |
commit | 9ecbfeb8ee52b6a59b8757cb259b325cebd05199 (patch) | |
tree | b883bd36309c2d5fe07f8bc02e710afe0f7fc4af /usrp2/gpmc | |
parent | 0ff64ba45e9d26359297242504d0c06e47a36a38 (diff) | |
download | uhd-9ecbfeb8ee52b6a59b8757cb259b325cebd05199.tar.gz uhd-9ecbfeb8ee52b6a59b8757cb259b325cebd05199.tar.bz2 uhd-9ecbfeb8ee52b6a59b8757cb259b325cebd05199.zip |
e100: renamed top level for E100/E110 to E1x0
Some minor tweaks to gpmc_to_fifo + timing
Diffstat (limited to 'usrp2/gpmc')
-rw-r--r-- | usrp2/gpmc/gpmc_to_fifo.v | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usrp2/gpmc/gpmc_to_fifo.v b/usrp2/gpmc/gpmc_to_fifo.v index 043ec9b6b..680095620 100644 --- a/usrp2/gpmc/gpmc_to_fifo.v +++ b/usrp2/gpmc/gpmc_to_fifo.v @@ -36,7 +36,7 @@ //////////////////////////////////////////////////////////////////////// module gpmc_to_fifo - #(parameter PTR_WIDTH = 2, parameter ADDR_WIDTH = 10) + #(parameter PTR_WIDTH = 2, parameter ADDR_WIDTH = 10, parameter XFER_OFFSET = 2) (input [15:0] EM_D, input [ADDR_WIDTH:1] EM_A, input EM_CLK, input EM_WE, input clk, input reset, input clear, input arst, output [17:0] data_o, output src_rdy_o, input dst_rdy_i, @@ -47,7 +47,7 @@ module gpmc_to_fifo reg gpmc_state; reg [15:0] vita_len; reg [ADDR_WIDTH:1] addr; - wire [ADDR_WIDTH:1] last_addr = {vita_len[ADDR_WIDTH-2:0], 1'b0} - 1'b1 + 2; + wire [ADDR_WIDTH:1] last_addr = {vita_len[ADDR_WIDTH-2:0], 1'b0} - 1'b1 + XFER_OFFSET; reg [PTR_WIDTH:0] gpmc_ptr, next_gpmc_ptr; localparam GPMC_STATE_START = 0; localparam GPMC_STATE_FILL = 1; @@ -75,7 +75,7 @@ module gpmc_to_fifo case(gpmc_state) GPMC_STATE_START: begin - if (EM_A == 2) begin + if (EM_A == XFER_OFFSET) begin gpmc_state <= GPMC_STATE_FILL; vita_len <= EM_D; next_gpmc_ptr <= gpmc_ptr + 1; @@ -123,14 +123,14 @@ module gpmc_to_fifo if (reset | clear) begin fifo_state <= FIFO_STATE_CLAIM; fifo_ptr <= 0; - counter <= 2; + counter <= XFER_OFFSET; end else begin case(fifo_state) FIFO_STATE_CLAIM: begin if (bram_available_to_empty && data_o[16]) fifo_state <= FIFO_STATE_PRE; - counter <= 2; + counter <= XFER_OFFSET; end FIFO_STATE_PRE: begin @@ -142,7 +142,7 @@ module gpmc_to_fifo if (src_rdy_o && dst_rdy_i && data_o[17]) begin fifo_state <= FIFO_STATE_CLAIM; fifo_ptr <= fifo_ptr + 1; - counter <= 2; + counter <= XFER_OFFSET; end else if (src_rdy_o && dst_rdy_i) begin counter <= counter + 1; @@ -159,7 +159,7 @@ module gpmc_to_fifo //assign data and frame bits to bram input assign data_i[15:0] = EM_D; - assign data_i[16] = (addr == 2); + assign data_i[16] = (addr == XFER_OFFSET); assign data_i[17] = (addr == last_addr); //instantiate dual ported bram for async read + write |