54#define AVAILABLE_DATA_BUFFER_ENTRY_COUNT (16 * USER_DIES)
55#define AVAILABLE_TEMPORARY_DATA_BUFFER_ENTRY_COUNT (USER_DIES)
57#define DATA_BUF_NONE 0xffff
58#define DATA_BUF_FAIL 0xffff
59#define DATA_BUF_DIRTY 1
60#define DATA_BUF_CLEAN 0
62#define FindDataBufHashTableEntry(logicalSliceAddr) ((logicalSliceAddr) % AVAILABLE_DATA_BUFFER_ENTRY_COUNT)
202#define BUF_ENTRY(iEntry) (&dataBufMapPtr->dataBuf[(iEntry)])
203#define BUF_HEAD_IDX() (dataBufLruList.headEntry)
204#define BUF_TAIL_IDX() (dataBufLruList.tailEntry)
205#define BUF_HEAD_ENTRY() (BUF_ENTRY(BUF_HEAD_IDX()))
206#define BUF_TAIL_ENTRY() (BUF_ENTRY(BUF_TAIL_IDX()))
207#define BUF_PREV_IDX(iEntry) (BUF_ENTRY((iEntry))->prevEntry)
208#define BUF_NEXT_IDX(iEntry) (BUF_ENTRY((iEntry))->nextEntry)
209#define BUF_PREV_ENTRY(iEntry) (BUF_ENTRY(BUF_PREV_IDX((iEntry))))
210#define BUF_NEXT_ENTRY(iEntry) (BUF_ENTRY(BUF_NEXT_IDX((iEntry))))
212#define BUF_ENTRY_IS_HEAD(iEntry) (BUF_PREV_IDX((iEntry)) == DATA_BUF_NONE)
213#define BUF_ENTRY_IS_TAIL(iEntry) (BUF_NEXT_IDX((iEntry)) == DATA_BUF_NONE)
215#define H_BUF_ENTRY(iEntry) (&dataBufHashTablePtr->dataBufHash[(iEntry)])
216#define H_BUF_HEAD_ENTRY(iEntry) (BUF_ENTRY(H_BUF_ENTRY((iEntry))->headEntry))
217#define H_BUF_HEAD_IDX(iEntry) (H_BUF_ENTRY((iEntry))->headEntry)
219#define BUF_LSA(iEntry) (BUF_ENTRY((iEntry))->logicalSliceAddr)
221#define BUF_DATA_ENTRY2ADDR(iEntry) (DATA_BUFFER_BASE_ADDR + ((iEntry)*BYTES_PER_DATA_REGION_OF_SLICE))
222#define BUF_SPARE_ENTRY2ADDR(iEntry) (SPARE_DATA_BUFFER_BASE_ADDR + ((iEntry)*BYTES_PER_SPARE_REGION_OF_SLICE))
struct _DATA_BUF_HASH_ENTRY * P_DATA_BUF_HASH_ENTRY
struct _DATA_BUF_ENTRY DATA_BUF_ENTRY
The structure of the data buffer entry.
struct _DATA_BUF_LRU_LIST DATA_BUF_LRU_LIST
The structure of LRU list that records the head and tail data buffer entry index of the LRU list.
void UpdateTempDataBufEntryInfoBlockingReq(unsigned int bufEntry, unsigned int reqSlotTag)
Append the request to the blocking queue specified by given temp buffer entry.
struct _TEMPORARY_DATA_BUF_MAP TEMPORARY_DATA_BUF_MAP
The structure of the temp data buffer table.
void PutToDataBufHashList(unsigned int bufEntry)
Insert the given data buffer entry into the hash table.
P_DATA_BUF_HASH_TABLE dataBufHashTable
struct _TEMPORARY_DATA_BUF_ENTRY TEMPORARY_DATA_BUF_ENTRY
struct _DATA_BUF_HASH_TABLE * P_DATA_BUF_HASH_TABLE
void UpdateDataBufEntryInfoBlockingReq(unsigned int bufEntry, unsigned int reqSlotTag)
Append the request to the blocking queue of the specified data buffer entry.
void InitDataBuf()
Initialization process of the Data buffer.
unsigned int AllocateTempDataBuf(unsigned int dieNo)
Retrieve the index of temp buffer entry of the target die.
struct _DATA_BUF_LRU_LIST * P_DATA_BUF_LRU_LIST
struct _DATA_BUF_MAP * P_DATA_BUF_MAP
struct _DATA_BUF_HASH_TABLE DATA_BUF_HASH_TABLE
The structure of data buffer hash table.
#define AVAILABLE_DATA_BUFFER_ENTRY_COUNT
void SelectiveGetFromDataBufHashList(unsigned int bufEntry)
Remove the given data buffer entry from the hash table.
struct _DATA_BUF_ENTRY * P_DATA_BUF_ENTRY
struct _TEMPORARY_DATA_BUF_ENTRY * P_TEMPORARY_DATA_BUF_ENTRY
P_TEMPORARY_DATA_BUF_MAP tempDataBufMapPtr
unsigned int CheckDataBufHit(unsigned int reqSlotTag)
Get the data buffer entry index of the given request.
struct _DATA_BUF_HASH_ENTRY DATA_BUF_HASH_ENTRY
The structure of data buffer bucket that records the head and tail data buffer entry index in the buc...
P_DATA_BUF_MAP dataBufMapPtr
struct _TEMPORARY_DATA_BUF_MAP * P_TEMPORARY_DATA_BUF_MAP
struct _DATA_BUF_MAP DATA_BUF_MAP
The structure of data buffer table.
DATA_BUF_LRU_LIST dataBufLruList
unsigned int AllocateDataBuf()
Retrieve a LRU data buffer entry from the LRU list.
#define AVAILABLE_TEMPORARY_DATA_BUFFER_ENTRY_COUNT
The structure of the data buffer entry.
unsigned int hashNextEntry
unsigned int hashPrevEntry
unsigned int blockingReqTail
unsigned int logicalSliceAddr
The structure of data buffer bucket that records the head and tail data buffer entry index in the buc...
The structure of data buffer hash table.
DATA_BUF_HASH_ENTRY dataBufHash[AVAILABLE_DATA_BUFFER_ENTRY_COUNT]
The structure of LRU list that records the head and tail data buffer entry index of the LRU list.
The structure of data buffer table.
DATA_BUF_ENTRY dataBuf[AVAILABLE_DATA_BUFFER_ENTRY_COUNT]
unsigned int blockingReqTail
The structure of the temp data buffer table.
TEMPORARY_DATA_BUF_ENTRY tempDataBuf[AVAILABLE_TEMPORARY_DATA_BUFFER_ENTRY_COUNT]