57#define HOST_IP_ADDR (XPAR_NVME_CTRL_0_BASEADDR)
59#define DEV_IRQ_MASK_REG_ADDR (HOST_IP_ADDR + 0x4)
60#define DEV_IRQ_CLEAR_REG_ADDR (HOST_IP_ADDR + 0x8)
61#define DEV_IRQ_STATUS_REG_ADDR (HOST_IP_ADDR + 0xC)
63#define PCIE_STATUS_REG_ADDR (HOST_IP_ADDR + 0x100)
64#define PCIE_FUNC_REG_ADDR (HOST_IP_ADDR + 0x104)
66#define NVME_STATUS_REG_ADDR (HOST_IP_ADDR + 0x200)
67#define HOST_DMA_FIFO_CNT_REG_ADDR (HOST_IP_ADDR + 0x204)
68#define NVME_ADMIN_QUEUE_SET_REG_ADDR (HOST_IP_ADDR + 0x21C)
69#define NVME_IO_SQ_SET_REG_ADDR (HOST_IP_ADDR + 0x220)
70#define NVME_IO_CQ_SET_REG_ADDR (HOST_IP_ADDR + 0x260)
72#define NVME_CMD_FIFO_REG_ADDR (HOST_IP_ADDR + 0x300)
73#define NVME_CPL_FIFO_REG_ADDR (HOST_IP_ADDR + 0x304)
74#define HOST_DMA_CMD_FIFO_REG_ADDR (HOST_IP_ADDR + 0x310)
76#define NVME_CMD_SRAM_ADDR (HOST_IP_ADDR + 0x10000)
78#define HOST_DMA_DIRECT_TYPE (1)
79#define HOST_DMA_AUTO_TYPE (0)
81#define HOST_DMA_TX_DIRECTION (1)
82#define HOST_DMA_RX_DIRECTION (0)
84#define ONLY_CPL_TYPE (0)
85#define AUTO_CPL_TYPE (1)
86#define CMD_SLOT_RELEASE_TYPE (2)
87#define P_SLOT_TAG_WIDTH (10)
214 unsigned short SC : 8;
355unsigned int get_nvme_cmd(
unsigned short *qID,
unsigned short *cmdSlotTag,
unsigned int *cmdSeqNum,
356 unsigned int *cmdDword);
358void set_auto_nvme_cpl(
unsigned int cmdSlotTag,
unsigned int specific,
unsigned int statusFieldWord);
362void set_nvme_cpl(
unsigned int sqId,
unsigned int cid,
unsigned int specific,
unsigned int statusFieldWord);
364void set_io_sq(
unsigned int ioSqIdx,
unsigned int valid,
unsigned int cqVector,
unsigned int qSzie,
365 unsigned int pcieBaseAddrL,
unsigned int pcieBaseAddrH);
367void set_io_cq(
unsigned int ioCqIdx,
unsigned int valid,
unsigned int irqEn,
unsigned int irqVector,
368 unsigned int qSzie,
unsigned int pcieBaseAddrL,
unsigned int pcieBaseAddrH);
370void set_direct_tx_dma(
unsigned int devAddr,
unsigned int pcieAddrH,
unsigned int pcieAddrL,
unsigned int len);
372void set_direct_rx_dma(
unsigned int devAddr,
unsigned int pcieAddrH,
unsigned int pcieAddrL,
unsigned int len);
374void set_auto_tx_dma(
unsigned int cmdSlotTag,
unsigned int cmd4KBOffset,
unsigned int devAddr,
375 unsigned int autoCompletion);
377void set_auto_rx_dma(
unsigned int cmdSlotTag,
unsigned int cmd4KBOffset,
unsigned int devAddr,
378 unsigned int autoCompletion);
struct _NVME_CMD_FIFO_REG NVME_CMD_FIFO_REG
void set_nvme_admin_queue(unsigned int sqValid, unsigned int cqValid, unsigned int cqIrqEn)
HOST_DMA_STATUS g_hostDmaStatus
struct _HOST_DMA_FIFO_CNT_REG HOST_DMA_FIFO_CNT_REG
struct _DEV_IRQ_REG DEV_IRQ_REG
unsigned int check_nvme_cc_en()
void set_auto_rx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
void set_link_width(unsigned int linkNum)
struct _HOST_DMA_CMD_FIFO_REG HOST_DMA_CMD_FIFO_REG
struct _HOST_DMA_ASSIST_STATUS HOST_DMA_ASSIST_STATUS
struct _NVME_IO_CQ_SET_REG NVME_IO_CQ_SET_REG
void set_direct_rx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
struct _NVME_CMD_SRAM _NVME_CMD_SRAM
struct _HOST_DMA_STATUS HOST_DMA_STATUS
void set_nvme_csts_shst(unsigned int shst)
struct _NVME_CPL_FIFO_REG NVME_CPL_FIFO_REG
struct _NVME_ADMIN_QUEUE_SET_REG NVME_ADMIN_QUEUE_SET_REG
void check_direct_rx_dma_done()
unsigned int check_auto_rx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
void set_auto_tx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
void set_auto_nvme_cpl(unsigned int cmdSlotTag, unsigned int specific, unsigned int statusFieldWord)
void pcie_async_reset(unsigned int rstCnt)
void set_nvme_cpl(unsigned int sqId, unsigned int cid, unsigned int specific, unsigned int statusFieldWord)
void check_direct_tx_dma_done()
void check_auto_rx_dma_done()
struct _PCIE_STATUS_REG PCIE_STATUS_REG
struct _PCIE_FUNC_REG PCIE_FUNC_REG
unsigned int check_auto_tx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
void check_auto_tx_dma_done()
void set_nvme_slot_release(unsigned int cmdSlotTag)
struct _NVME_IO_SQ_SET_REG NVME_IO_SQ_SET_REG
HOST_DMA_ASSIST_STATUS g_hostDmaAssistStatus
unsigned int get_nvme_cmd(unsigned short *qID, unsigned short *cmdSlotTag, unsigned int *cmdSeqNum, unsigned int *cmdDword)
void set_io_sq(unsigned int ioSqIdx, unsigned int valid, unsigned int cqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
void set_direct_tx_dma(unsigned int devAddr, unsigned int pcieAddrH, unsigned int pcieAddrL, unsigned int len)
void set_io_cq(unsigned int ioCqIdx, unsigned int valid, unsigned int irqEn, unsigned int irqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
struct _NVME_STATUS_REG NVME_STATUS_REG
unsigned int mAxiWriteErr
unsigned int pcieCpldLenErr
unsigned int autoDmaRxOverFlowCnt
unsigned int autoDmaTxOverFlowCnt
unsigned int cmd4KBOffset
unsigned int autoCompletion
unsigned int dmaDirection
unsigned char directDmaRx
unsigned char directDmaTx
unsigned int directDmaRxCnt
HOST_DMA_FIFO_CNT_REG fifoHead
unsigned int autoDmaRxCnt
HOST_DMA_FIFO_CNT_REG fifoTail
unsigned int directDmaTxCnt
unsigned int autoDmaTxCnt
unsigned int dword[128][16]
unsigned short cmdSlotTag
unsigned short statusFieldWord
struct _NVME_CPL_FIFO_REG::@25::@27::@31::@33 statusField
unsigned int pcieBaseAddrL
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrH
unsigned int pcieBaseAddrL