Entity: data_offload_fsm

Diagram

TX_OR_RXN_PATH WR_ADDRESS_WIDTH WR_DATA_WIDTH RD_ADDRESS_WIDTH RD_DATA_WIDTH wr_clk wr_resetn_in wr_valid_in wr_last [WR_DATA_WIDTH/8-1:0] wr_tkeep rd_clk rd_resetn_in rd_ready rd_oneshot init_req [ 1:0] sync_config sync_external sync_internal wr_resetn_out wr_valid_out wr_ready [WR_ADDRESS_WIDTH-1:0] wr_addr rd_resetn_out reg rd_valid [RD_ADDRESS_WIDTH-1:0] rd_addr rd_last [RD_DATA_WIDTH/8-1:0] rd_tkeep init_ack [ 1:0] wr_fsm_state [ 1:0] rd_fsm_state [63:0] sample_count

Description



Copyright 2018 (c) Analog Devices, Inc. All rights reserved.

In this HDL repository, there are many different and unique modules, consisting of various HDL (Verilog or VHDL) components. The individual modules are developed independently, and may be accompanied by separate and unique license terms.

The user should read each of these license terms, and understand the freedoms and responsibilities that he or she has by using this source/core.

This core is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Redistribution and use of source or resulting binaries, with or without modification of this file, are permitted under one of the following two license terms:

  1. The GNU General Public License version 2 as published by the Free Software Foundation, which can be found in the top level directory of this repository (LICENSE_GPL2), and also online at: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html

OR

  1. An ADI specific BSD license, which can be found in the top level directory of this repository (LICENSE_ADIBSD), and also on-line at: https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD This will allow to generate bit files and not release the source code, as long as it attaches to an ADI device.


Generics

Generic name Type Value Description
TX_OR_RXN_PATH 0
WR_ADDRESS_WIDTH 4
WR_DATA_WIDTH 128
RD_ADDRESS_WIDTH 4
RD_DATA_WIDTH 128

Ports

Port name Direction Type Description
wr_clk input write control interface
wr_resetn_in input
wr_resetn_out output
wr_valid_in input
wr_valid_out output
wr_ready output
wr_addr output [WR_ADDRESS_WIDTH-1:0]
wr_last input
wr_tkeep input [WR_DATA_WIDTH/8-1:0]
rd_clk input read control interface
rd_resetn_in input
rd_resetn_out output
rd_ready input
rd_valid output reg
rd_addr output [RD_ADDRESS_WIDTH-1:0]
rd_last output
rd_tkeep output [RD_DATA_WIDTH/8-1:0]
rd_oneshot input 0 - CYCLIC; 1 - ONE_SHOT;
init_req input Synchronization interface - synchronous to the device clock (ADC or DAC)
init_ack output
sync_config input [ 1:0]
sync_external input
sync_internal input
wr_fsm_state output [ 1:0] FSM debug
rd_fsm_state output [ 1:0]
sample_count output [63:0]

Signals

Name Type Description
wr_last_addr reg [WR_ADDRESS_WIDTH-1:0] internal registers
wr_last_keep reg [WR_DATA_WIDTH/8-1:0]
rd_tkeep_last reg [RD_DATA_WIDTH/8-1:0]
rd_last_addr reg [RD_ADDRESS_WIDTH-1:0]
rd_isempty reg
rd_init_req_d reg
wr_init_req_d reg
wr_ready_d reg
wr_almost_full wire internal signals
wr_init_req_s wire
wr_init_req_pos_s wire
wr_init_ack_s wire
rd_isfull_s wire
wr_isempty_s wire
rd_empty_s wire
rd_wr_last_s wire
rd_init_req_s wire
rd_init_req_neg_s wire
rd_init_ack_s wire
rd_wr_last_addr_s wire [WR_ADDRESS_WIDTH-1:0]
rd_wr_last_tkeep_s wire [WR_DATA_WIDTH/8-1:0]
wr_sync_internal_s wire
rd_sync_internal_s wire
wr_sync_external_s wire
rd_sync_external_s wire
wr_oneshot wire
wr_fsm_state reg [1:0]
rd_fsm_state reg [1:0]

Constants

Name Type Value Description
WR_IDLE 2'b00 FSM states
WR_SYNC 2'b01
WR_WRITE_TO_MEM 2'b11
WR_WAIT_TO_END 2'b10
RD_IDLE 2'b00
RD_SYNC 2'b01
RD_READ_FROM_MEM 2'b11
AUTOMATIC 2'b00 Synchronization options
HARDWARE 2'b01
SOFTWARE 2'b10
LSB WR_ADDRESS_WIDTH - RD_ADDRESS_WIDTH helper parameters for last address, tkeep conversion
POW2_LSB 1 << LSB

Processes

Type: always

Description
Mealy state machine for write control

Type: always

Description
the initialization interface (init_req) is edge sensitive

Type: always

Description
write address generation

Type: always

Description
reset the storage unit's FMS before each transfer

Type: always

Type: always

Type: always

Type: always

Description
sample counter for debug purposes, the value of the counter resets at every new incoming request

Type: always

Description
Mealy state machine for read control

Type: always

Description
the initialization interface (init_req) is edge sensitive TODO: This should be redefined! Will work only of init_req is active during the whole DMA transfer (use xfer_req for driving init_req)

Type: always

Description
Reset the storage unit's FSM before each transfer

Type: always

Description
read address generation

Type: always

Type: always

Type: always

Instantiations

Description
CDC circuits

Description
convert write address and last/keep to read address and last/keep

State machines

  • Mealy state machine for write control
undefined
  • Mealy state machine for read control
state transitions cluster_rd_fsm_state rd_fsm_state RD_IDLE RD_IDLE RD_IDLE->RD_IDLE not (((!TX_OR_RXN_PATH) & rd_isfull_s) || (rd_wr_last_s))    RD_SYNC RD_SYNC RD_IDLE->RD_SYNC TX_OR_RXN_PATH    ((!TX_OR_RXN_PATH) & rd_isfull_s) || (rd_wr_last_s)    RD_READ_FROM_MEM RD_READ_FROM_MEM RD_IDLE->RD_READ_FROM_MEM not (TX_OR_RXN_PATH)    ((!TX_OR_RXN_PATH) & rd_isfull_s) || (rd_wr_last_s)    RD_SYNC->RD_READ_FROM_MEM !TX_OR_RXN_PATH    RD_READ_FROM_MEM->RD_IDLE (rd_empty_s && (rd_init_req_s || (rd_oneshot && rd_last)) && rd_ready)    RD_READ_FROM_MEM->RD_READ_FROM_MEM not ((rd_empty_s && (rd_init_req_s || (rd_oneshot && rd_last)) && rd_ready))