46#ifndef REQUEST_ALLOCATION_H_
47#define REQUEST_ALLOCATION_H_
57#define AVAILABLE_OUNTSTANDING_REQ_COUNT ((USER_DIES)*128)
59#define REQ_SLOT_TAG_NONE 0xffff
60#define REQ_SLOT_TAG_FAIL 0xffff
94void PutToNandReqQ(
unsigned int reqSlotTag,
unsigned chNo,
unsigned wayNo);
95void GetFromNandReqQ(
unsigned int chNo,
unsigned int wayNo,
unsigned int reqStatus,
unsigned int reqCode);
118#define REQ_ENTRY(iEntry) (&reqPoolPtr->reqPool[(iEntry)])
119#define REQ_BUF(iEntry) (REQ_ENTRY((iEntry))->dataBufInfo.entry)
120#define REQ_LSA(iEntry) (REQ_ENTRY((iEntry))->logicalSliceAddr)
121#define REQ_VSA(iEntry) (REQ_ENTRY((iEntry))->nandInfo.virtualSliceAddr)
130#define REQ_CODE_IS(idx, code) (REQ_ENTRY((idx))->reqCode == (code))
139#define REQ_TYPE_IS(idx, type) (REQ_ENTRY((idx))->reqType == (type))
148#define REQ_QUEUE_TYPE_IS(idx, qType) (REQ_ENTRY((idx))->reqQueueType == (qType))
unsigned int GetFromFreeReqQ()
Get a free request from the free request queue.
#define AVAILABLE_OUNTSTANDING_REQ_COUNT
SLICE_REQUEST_QUEUE sliceReqQ
unsigned int blockedReqCnt
void SelectiveGetFromBlockedByRowAddrDepReqQ(unsigned int reqSlotTag, unsigned int chNo, unsigned int wayNo)
Remove the given request from the blockedByRowAddrDepReqQ.
void PutToFreeReqQ(unsigned int reqSlotTag)
Add the given request to the free request queue.
NVME_DMA_REQUEST_QUEUE nvmeDmaReqQ
struct _REQ_POOL REQ_POOL
The request entries pool for both NVMe and NAND requests.
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 GetFromNandReqQ(unsigned int chNo, unsigned int wayNo, unsigned int reqStatus, unsigned int reqCode)
Move the head request of the specified nandReqQ queue to freeReqQ.
void InitReqPool()
Initialize the request pool and the request queues.
unsigned int notCompletedNandReqCnt
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.
BLOCKED_BY_BUFFER_DEPENDENCY_REQUEST_QUEUE blockedByBufDepReqQ
void PutToSliceReqQ(unsigned int reqSlotTag)
Add the given request to the slice request queue.
NAND_REQUEST_QUEUE nandReqQ[USER_CHANNELS][USER_WAYS]
void SelectiveGetFromNvmeDmaReqQ(unsigned int regSlotTag)
Move the specified entry from the nvmeDmaReqQ to the freeReqQ.
struct _REQ_POOL * P_REQ_POOL
FREE_REQUEST_QUEUE freeReqQ
BLOCKED_BY_ROW_ADDR_DEPENDENCY_REQUEST_QUEUE blockedByRowAddrDepReqQ[USER_CHANNELS][USER_WAYS]
The request entries pool for both NVMe and NAND requests.
SSD_REQ_FORMAT reqPool[AVAILABLE_OUNTSTANDING_REQ_COUNT]