資源簡(jiǎn)介
Cache模擬器,完成了以下功能: a. 能夠設(shè)置 Cache 總的大小 b. 能夠設(shè)置 Cache 塊的大小 c. 能夠設(shè)置Cache 的映射機(jī)制:直接映射、n-路組相聯(lián) d. 能夠設(shè)置Cache 的替換策略:LRU、FIFO … e. 能夠設(shè)置 Cache 的寫策略:寫回法、寫直達(dá)法 f. 能夠設(shè)置將 Cache 分為數(shù)據(jù) Cache 和 指令 Cache g. 能夠設(shè)置預(yù)取策略 h. 能夠設(shè)置寫不命中的調(diào)塊策略
代碼片段和文件信息
#include?
#include?
#include?
/**********Cache參數(shù)**********/
bool?independentCache;//true?or?false
bool?step;
unsigned?long?int?cacheSize;//統(tǒng)一cache
unsigned?long?int?blockSize;//Cache塊大小
unsigned?long?int?blockSum;//Cache塊總數(shù)
unsigned?long?int?groupSum;//Cache組數(shù)
unsigned?long?int?InstructionCacheSize;//分離Cache大小
unsigned?long?int?InsBlockSum;//指令Cache塊總數(shù)
unsigned?long?int?InsGroupSum;//指令Cache組數(shù)
/**********Cache策略**********/
unsigned?int?associative;//相連度
unsigned?int?replacementStrategy;//替換策略
unsigned?int?writeStrategy;//寫策略
unsigned?int?prefetchStrategy;//預(yù)取策略
unsigned?int?writeMissStrategy;//寫不命中調(diào)塊策略
/***********數(shù)據(jù)輸出**********/
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
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????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個(gè)文件信息
評(píng)論
共有 條評(píng)論