60 unsigned int blockNo, wayNo, chNo;
65 for (wayNo = 0; wayNo <
USER_WAYS; wayNo++)
123void ReqTransNvmeToSlice(
unsigned int cmdSlotTag,
unsigned int startLba,
unsigned int nlb,
unsigned int cmdCode)
125 unsigned int reqSlotTag, requestedNvmeBlock, tempNumOfNvmeBlock, transCounter, tempLsa, loop, nvmeBlockOffset,
126 nvmeDmaStartIndex, reqCode;
128 requestedNvmeBlock = nlb + 1;
130 nvmeDmaStartIndex = 0;
140 assert(!
"[WARNING] Not supported command code [WARNING]");
147 tempNumOfNvmeBlock = requestedNvmeBlock;
163 nvmeDmaStartIndex += tempNumOfNvmeBlock;
166 while (transCounter < loop)
185 nvmeDmaStartIndex += tempNumOfNvmeBlock;
191 if ((tempNumOfNvmeBlock == 0) || (loop == 0))
220 unsigned int reqSlotTag, virtualSliceAddr, dataBufEntry;
264 unsigned int reqSlotTag, virtualSliceAddr;
325 unsigned int reqSlotTag, dataBufEntry;
384 assert(!
"[WARNING] Not supported reqCode. [WARNING]");
456 unsigned int dieNo, chNo, wayNo, blockNo, pageNo;
467 assert(!
"[WARNING] Not supported reqOpt-nandAddress [WARNING]");
478 if (pageNo < rowAddrDependencyTablePtr->block[chNo][wayNo][blockNo].permittedProgPage)
485 if (pageNo < rowAddrDependencyTablePtr->block[chNo][wayNo][blockNo].permittedProgPage)
492 assert(!
"[WARNING] Not supported checkRowAddrDepOpt [WARNING]");
522 assert(!
"[WARNING] Not supported checkRowAddrDepOpt [WARNING]");
525 assert(!
"[WARNING] Not supported reqCode [WARNING]");
549 unsigned int dieNo, chNo, wayNo, blockNo, pageNo, bufDepCheckReport;
560 assert(!
"[WARNING] Not supported reqOpt-nandAddress [WARNING]");
574 if (pageNo < rowAddrDependencyTablePtr->block[chNo][wayNo][blockNo].permittedProgPage)
636 unsigned int dieNo, chNo, wayNo, bufDepCheckReport, rowAddrDepCheckReport, rowAddrDepTableUpdateReport;
663 assert(!
"[WARNING] Not supported reqOpt-nandAddress [WARNING]");
676 assert(!
"[WARNING] Not supported report [WARNING]");
682 assert(!
"[WARNING] Not supported reqOpt [WARNING]");
685 assert(!
"[WARNING] Not supported reqType [WARNING]");
702 assert(!
"[WARNING] Not supported report [WARNING]");
708 assert(!
"[WARNING] Not supported report [WARNING]");
731 unsigned int targetReqSlotTag, dieNo, chNo, wayNo, rowAddrDepCheckReport;
781 assert(!
"[WARNING] Not supported reqOpt-nandAddress [WARNING]");
794 assert(!
"[WARNING] Not supported report [WARNING]");
800 assert(!
"[WARNING] Not supported reqOpt [WARNING]");
822 unsigned int reqSlotTag, nextReq, rowAddrDepCheckReport;
844 assert(!
"[WARNING] Not supported report [WARNING]");
847 assert(!
"[WARNING] Not supported reqOpt [WARNING]");
849 reqSlotTag = nextReq;
880 unsigned int devAddr, dmaIndex, numOfNvmeBlock;
888 while (numOfNvmeBlock < reqPoolPtr->reqPool[reqSlotTag].nvmeDmaInfo.numOfNvmeBlock)
902 while (numOfNvmeBlock < reqPoolPtr->reqPool[reqSlotTag].nvmeDmaInfo.numOfNvmeBlock)
915 assert(!
"[WARNING] Not supported reqCode [WARNING]");
920 unsigned int reqSlotTag, prevReq;
921 unsigned int rxDone, txDone;
950 reqSlotTag = prevReq;
unsigned int AddrTransRead(unsigned int logicalSliceAddr)
Get the virtual slice address of the given logical slice.
unsigned int AddrTransWrite(unsigned int logicalSliceAddr)
Assign a new virtual (physical) page to the specified logical page.
#define Vsa2VpageTranslation(virtualSliceAddr)
#define Vdie2PchTranslation(dieNo)
#define Vsa2VdieTranslation(virtualSliceAddr)
#define Vsa2VblockTranslation(virtualSliceAddr)
#define Vdie2PwayTranslation(dieNo)
void PutToDataBufHashList(unsigned int bufEntry)
Insert the given data buffer entry into the hash table.
void UpdateDataBufEntryInfoBlockingReq(unsigned int bufEntry, unsigned int reqSlotTag)
Append the request to the blocking queue of the specified data buffer entry.
P_TEMPORARY_DATA_BUF_MAP tempDataBufMapPtr
unsigned int CheckDataBufHit(unsigned int reqSlotTag)
Get the data buffer entry index of the given request.
P_DATA_BUF_MAP dataBufMapPtr
unsigned int AllocateDataBuf()
Retrieve a LRU data buffer entry from the LRU list.
#define MAIN_BLOCKS_PER_DIE
#define BYTES_PER_NVME_BLOCK
#define NVME_BLOCKS_PER_SLICE
HOST_DMA_STATUS g_hostDmaStatus
void set_auto_rx_dma(unsigned int cmdSlotTag, unsigned int cmd4KBOffset, unsigned int devAddr, unsigned int autoCompletion)
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)
unsigned int check_auto_tx_dma_partial_done(unsigned int tailIndex, unsigned int tailAssistIndex)
HOST_DMA_ASSIST_STATUS g_hostDmaAssistStatus
#define ROW_ADDR_DEPENDENCY_TABLE_ADDR
unsigned int GetFromFreeReqQ()
Get a free request from the free request queue.
SLICE_REQUEST_QUEUE sliceReqQ
void SelectiveGetFromBlockedByRowAddrDepReqQ(unsigned int reqSlotTag, unsigned int chNo, unsigned int wayNo)
Remove the given request from the blockedByRowAddrDepReqQ.
NVME_DMA_REQUEST_QUEUE nvmeDmaReqQ
unsigned int GetFromSliceReqQ()
Get a slice request from the slice request queue.
void PutToNandReqQ(unsigned int reqSlotTag, unsigned chNo, unsigned wayNo)
Add the given request to nandReqQ of the specified die.
void PutToBlockedByBufDepReqQ(unsigned int reqSlotTag)
Add the given request to blockedByBufDepReqQ.
void PutToNvmeDmaReqQ(unsigned int reqSlotTag)
Add the given request to the NVMe DMA request queue and update its status.
void PutToBlockedByRowAddrDepReqQ(unsigned int reqSlotTag, unsigned int chNo, unsigned int wayNo)
Add the given request to blockedByRowAddrDepReqQ.
void SelectiveGetFromBlockedByBufDepReqQ(unsigned int reqSlotTag)
Remove the given request from the blockedByBufDepReqQ.
void SelectiveGetFromNvmeDmaReqQ(unsigned int reqSlotTag)
Move the specified entry from the nvmeDmaReqQ to the freeReqQ.
void PutToSliceReqQ(unsigned int reqSlotTag)
Add the given request to the slice request queue.
BLOCKED_BY_ROW_ADDR_DEPENDENCY_REQUEST_QUEUE blockedByRowAddrDepReqQ[USER_CHANNELS][USER_WAYS]
#define REQ_SLOT_TAG_FAIL
#define REQ_SLOT_TAG_NONE
unsigned int GenerateDataBufAddr(unsigned int reqSlotTag)
Get the corresponding data buffer entry address of the given request.
void SyncReleaseEraseReq(unsigned int chNo, unsigned int wayNo, unsigned int blockNo)
Issuing requests until the specified block can be erased.
unsigned int blockingReqTail
unsigned int logicalSliceAddr
DATA_BUF_ENTRY dataBuf[AVAILABLE_DATA_BUFFER_ENTRY_COUNT]
unsigned int autoDmaRxOverFlowCnt
unsigned int autoDmaTxOverFlowCnt
HOST_DMA_FIFO_CNT_REG fifoTail
unsigned int programmedPageCnt
unsigned int virtualSliceAddr
unsigned int numOfNvmeBlock
unsigned int nvmeBlockOffset
unsigned int nandEccWarning
unsigned int dataBufFormat
Type of address stored in the SSD_REQ_FORMAT::dataBufInfo.
unsigned int nandAddr
Type of address stored in the SSD_REQ_FORMAT::nandInfo.
unsigned int rowAddrDependencyCheck
SSD_REQ_FORMAT reqPool[AVAILABLE_OUNTSTANDING_REQ_COUNT]
unsigned int blockedReadReqCnt
unsigned int permittedProgPage
unsigned int blockedEraseReqFlag
The row address dependency table for all the user blocks.
ROW_ADDR_DEPENDENCY_ENTRY block[USER_CHANNELS][USER_WAYS][MAIN_BLOCKS_PER_DIE]
unsigned int blockingReqTail
TEMPORARY_DATA_BUF_ENTRY tempDataBuf[AVAILABLE_TEMPORARY_DATA_BUFFER_ENTRY_COUNT]