資源簡介
Cache模擬器,完成了以下功能: a. 能夠設置 Cache 總的大小 b. 能夠設置 Cache 塊的大小 c. 能夠設置Cache 的映射機制:直接映射、n-路組相聯 d. 能夠設置Cache 的替換策略:LRU、FIFO … e. 能夠設置 Cache 的寫策略:寫回法、寫直達法 f. 能夠設置將 Cache 分為數據 Cache 和 指令 Cache g. 能夠設置預取策略 h. 能夠設置寫不命中的調塊策略
代碼片段和文件信息
#include?
#include?
#include?
/**********Cache參數**********/
bool?independentCache;//true?or?false
bool?step;
unsigned?long?int?cacheSize;//統一cache
unsigned?long?int?blockSize;//Cache塊大小
unsigned?long?int?blockSum;//Cache塊總數
unsigned?long?int?groupSum;//Cache組數
unsigned?long?int?InstructionCacheSize;//分離Cache大小
unsigned?long?int?InsBlockSum;//指令Cache塊總數
unsigned?long?int?InsGroupSum;//指令Cache組數
/**********Cache策略**********/
unsigned?int?associative;//相連度
unsigned?int?replacementStrategy;//替換策略
unsigned?int?writeStrategy;//寫策略
unsigned?int?prefetchStrategy;//預取策略
unsigned?int?writeMissStrategy;//寫不命中調塊策略
/***********數據輸出**********/
unsigned?long?int?operationCounter?=?0;//total
unsigned?long?int?readDataCounter?=?0;//0
unsigned?long?int?readDataMissCounter?=?0;
unsigned?long?int?readDataHitCounter?=?0;//0
unsigned?long?int?writeDataCounter?=?0;//1
unsigned?long?int?writeDataMissCounter?=?0;
unsigned?long?int?writeDataHitCou
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4015??2014-12-11?15:54??CACHE?Simulator\CACHE?Simulator\CACHE?Simulator.vcxproj
?????文件????????943??2014-12-11?15:54??CACHE?Simulator\CACHE?Simulator\CACHE?Simulator.vcxproj.filters
?????文件??????29826??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\CACHE.cpp
?????文件?????????81??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\CACHE?Simulator.lastbuildstate
?????文件??????11572??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\CACHE?Simulator.log
?????文件??????64615??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\CACHE.obj
?????文件????????706??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\cl.command.1.tlog
?????文件???????2012??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\CL.read.1.tlog
?????文件????????478??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\CL.write.1.tlog
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
?????文件??????????2??2014-12-16?15:33??CACHE?Simulator\CACHE?Simulator\Debug\li
............此處省略93個文件信息
評論
共有 條評論