亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dcache.c

?? skyeye是一個可以模擬嵌入式硬件開發板的系統軟件
?? C
字號:
#include "emul.h"#include "stdio.h"// WARNING: currently, the memory access latencies are not simulated.// WARNING: currently, the effect of write buffers isn't simulated.// State information for the data cache.#define W_FLAG			1#define CS_First		1#define	CS_Last			2// Cache states -- unused on R4600/R4700, but needed for control_dcache().#define	CS_Invalid 			(0 << CS_First)#define	CS_Shared  	 		(1 << CS_Last)#define	CS_CleanExclusive 		(2 << CS_Last)#define	CS_DirtyExclusive 		(3 << CS_Last)// Reset the L1 data cache.void reset_dcache(MIPS_State* mstate){	int i, j;    	for (i = 0; i < Dcache_sets; ++i) {		for (j = 0; j < Dcache_assoc; ++j) {	    		mstate->dcache.set[i].line[j].tag = bad_tag;	    		mstate->dcache.set[i].line[j].state = CS_Invalid;	    		//dcache.set[i].lru_init();	    		Dcache_lru_init(mstate->dcache.set[i].Dcache_lru);		}    	}}// Perform a cache operation (for use by decode_cache()).void control_dcache(MIPS_State* mstate, VA va, PA pa, int op, int type){    	if (type)		return; // secondary cache not presents    	switch (op) {    		case 0:    		{			// Index Writeback Invalidate.			MIPSDCacheSet* set=&mstate->dcache.set[Dcache_index(va)];			MIPSDCacheLine*line=&set->line[Dcache_block(va)];				if (line->state & W_FLAG) {				PA pa = (Dcache_index(va) << Dcache_index_first) |					(line->tag << (Dcache_index_last + 1));				int j;				for(j = 0; j < 4; j++)		    			mips_mem_write(pa+8*j , line->data+j, 8);	    			line->tag = bad_tag;				line->state = CS_Invalid;			}			break;    		}    		case 1:    		{			/* Index Load Tag.  This cannot be implemented properly as I don't			 * store the tag for invalidated entries.			 */			break;    		}    		case 2:    		{			/* Index Store Tag.  The comment from (1) applies. As ``Index Load			 * Tag'' is not implemented, this may be left as a noop.			 */			break;    		}    		case 3:    		{			// Create Dirty Exclusive.			UInt32 tag = Dcache_tag(pa);			MIPSDCacheSet* set= &mstate->dcache.set[Dcache_index(va)];			MIPSDCacheLine* line=&set->line[Dcache_block(va)];			if (line->tag != tag && (line->state & W_FLAG)) {	    			// Write back current data.				PA pa = (Dcache_index(va) << Dcache_index_first) |(line->tag << (Dcache_index_last + 1));				int j;				for(j = 0; j < 4; j++)				    	mips_mem_write(pa + 8 * j , line->data + j, 8);			}			line->tag = tag;			line->state = CS_DirtyExclusive | (line->state & W_FLAG);			break;    		}    		case 4:    		{			// Hit Invalidate.			UInt32 tag = Dcache_tag(pa);			MIPSDCacheSet* set = &mstate->dcache.set[Dcache_index(va)];			MIPSDCacheLine* line=&set->line[Dcache_block(va)];			if (line->tag != tag && (line->state & W_FLAG)) {			    // Hit: invalidate the cache.			    line->tag = bad_tag;			    line->state = CS_Invalid;			} else {			    // Miss: clear the CH bit in status register.			}			break;    		}	    	case 5:    		{			// Hit Writeback Invalidate.			UInt32 tag = Dcache_tag(pa);			MIPSDCacheSet* set = &mstate->dcache.set[Dcache_index(va)];			MIPSDCacheLine* line=&set->line[Dcache_block(va)];			if (line->tag == tag && (line->state & W_FLAG)) {				PA pa = (Dcache_index(va) << Dcache_index_first) |(line->tag << (Dcache_index_last + 1));				int j;				for (j = 0; j < 4; j++)				    	mips_mem_write(pa + 8 * j , line->data + j, 8);	 		}			line->tag = bad_tag;			line->state = CS_Invalid;			break;    		}    		case 6:    		{			// Hit Writeback.			UInt32 tag = Dcache_tag(pa);			MIPSDCacheSet* set = &mstate->dcache.set[Dcache_index(va)];			MIPSDCacheLine* line=&set->line[Dcache_block(va)];			if (line->tag == tag && (line->state & W_FLAG)) {			    	// Write back current data.				PA pa = (Dcache_index(va) << Dcache_index_first) |					(line->tag << (Dcache_index_last + 1));				int j;				for (j = 0; j < 4; j++)				    	mips_mem_write(pa+8*j , line->data+j, 8);				}			line->tag = bad_tag;			break;    		}     		case 7:			// Hit Set Virtual.			break; // secondary cache not present    	}}/* Perform a load from the virtual address (va). The address translation has * already been performed and the physical address is (pa). The coherency * algorithm to use is encoded in high-order bits of (pa) using the same * encoding as that of the xkphys address space region. It is a template * explicitely specialized for doubleword, word, halfword and byte, to improve * performance of the endianess correction algorithm, as well as minor * improvements steming from the fact that bit field extraction on variable * boundaries is slow. */void load(MIPS_State* mstate, VA va, PA pa, UInt32* x, int size){	// to generate the time out interrupt	UInt32 addr = bits(pa, 31, 0);	int i;     	int ca = coherency_algorithm(pa);    	if (ca == 0x5) { //Shi yang 2006-08-15		// A direct memory access.		mips_mem_read(pa, x, size);		return;			    	}    	// A cached memory access.    	UInt32 index = Dcache_index(pa); //Shi yang 2006-08-15    	UInt32 tag = Dcache_tag(pa);    	MIPSDCacheSet* set = &(mstate->dcache.set[index]);     	MIPSDCacheLine* line = &(set->line[0]);    	const PA line_mask = Dcache_line_size - 1;    	int j;    	for (j = 0; j < Dcache_assoc; ++j, ++line) {		if (line->tag == tag) {	    		Dcache_lru_touch(set->Dcache_lru,j);	    		goto cache_hit;		}    	}      	i = Dcache_lru_replace(mstate->dcache.set[index].Dcache_lru);	line = &(mstate->dcache.set[index].line[i]);	// Shi yang 2006-08-15 R3000's cache is write through cache.    	for(j = 0; j < 4; j++)    		mips_mem_read((pa & ~line_mask) + 8 * j , line->data + j, 8);    	line->tag = tag;	Dcache_lru_touch(set->Dcache_lru, i);		int offset;	UInt32 cachelinedata;	cachelinedata = line->data[(pa & line_mask) / 8];	cache_hit:        	/* Finally, fetch the data from the cache.    	 * return swizzle<syscmd>(line->data[(pa & line_mask) / 8], va);	 */	    	switch (size) {		case 1:    		{			offset = (((UInt32) mstate->bigendSig * 3) ^ (va & 3)) << 3; //Shi yang 2006-08-18	 		*x = (cachelinedata >> offset) & 0xffL;			break;		}		case 2:    		{			offset = (((UInt32)mstate->bigendSig * 2) ^ (va & 2)) << 3; //Shi yang 2006-08-18			*x = (cachelinedata >> offset) & 0xffffL;				break;		}		case 4:    		{			*x = cachelinedata;			break;		}    	}}/* Store data to the virtual address (va). The address translation has already * been performed and the physical address is (pa). The coherency algorithm to * use is encoded in high-order bits of (pa) using the same encoding as that * of the xkphys address space region. It is a template explicitely * specialized for doubleword, word, halfword and byte, to improve performance * of the endianess correction algorithm, as well as minor improvements * steming from the fact that bit field extraction on variable boundaries is * slow. */void store(MIPS_State* mstate, UInt32 data, VA va, PA pa, int size){	UInt32 addr=bits(pa, 31, 0);       	UInt32 x = data;  	int ca = coherency_algorithm(pa);		// Anthony Lee 2007-01-30 : no {} ???	if (ca == 0x5) //Shi yang uncached area		mips_mem_write(pa, &data, size);		return; //Shi yang 2006-08-28    	// A cached memory access.    	UInt32 index = Dcache_index(pa); //Shi yang 2006-08-15    	UInt32 tag = Dcache_tag(pa);    	MIPSDCacheSet* set = &(mstate->dcache.set[index]);     	MIPSDCacheLine* line = &(set->line[0]);    	const PA line_mask = Dcache_line_size - 1;    	int j;    	for (j = 0; j < Dcache_assoc; ++j, ++line) {		if (line->tag == tag) {	    		Dcache_lru_touch(set->Dcache_lru, j);	    		goto cache_hit;		}    	}   	int i;   	i = Dcache_lru_replace(mstate->dcache.set[index].Dcache_lru); //Replace cache line	line = &(mstate->dcache.set[index].line[i]);	    	line->tag = tag;	Dcache_lru_touch(set->Dcache_lru, i);		int offset;	UInt32* cachelinedata; //Shi yang 2006-08-15	cachelinedata = &(line->data[(pa & line_mask) / 8]);cache_hit:        	/* Finally, fetch the data from the cache.    	 * return swizzle<syscmd>(line->data[(pa & line_mask) / 8], va);	 */	    	switch (size) {		case 1:    		{			offset = (((UInt32) mstate->bigendSig * 3) ^ (va & 3)) << 3; //Shi yang 2006-08-18			*cachelinedata = clear_bits(*cachelinedata, offset, 0) | (x & 0xffL); //Shi yang 2006-08-15 Write cache line 			mips_mem_write(pa, &data, size); //Write memory			break;		}		case 2:    		{			offset = (((UInt32)mstate->bigendSig * 2) ^ (va & 2)) << 3; //Shi yang 2006-08-18			*cachelinedata = clear_bits(*cachelinedata, offset, 0) | (x & 0xffffL); 			mips_mem_write(pa, &data, size);			break;		}		case 4:    		{			//*x = cachelinedata;			*cachelinedata = x; 			mips_mem_write(pa, &data, size);			break;		}    	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区蜜桃| 99热这里都是精品| 午夜精品福利一区二区三区蜜桃| 中文字幕免费不卡在线| 久久久久久久久久电影| 久久亚洲二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 这里只有精品免费| 日韩女优电影在线观看| 日韩视频一区二区三区| 欧美一区二区三区性视频| 欧美一级日韩一级| 日韩免费观看2025年上映的电影| 欧美va日韩va| 久久久久久免费毛片精品| 久久精品日产第一区二区三区高清版 | 日韩电影在线观看电影| 亚洲高清视频在线| 久久99精品国产麻豆婷婷洗澡| 日本美女一区二区三区视频| 激情欧美日韩一区二区| 福利一区二区在线观看| 99精品桃花视频在线观看| 在线观看视频一区二区| 91麻豆精品91久久久久同性| 精品国产sm最大网站| 国产日韩欧美麻豆| 亚洲综合丝袜美腿| 久久精品99国产精品日本| 床上的激情91.| 欧美色视频在线| 精品久久一区二区三区| 亚洲视频综合在线| 青青国产91久久久久久| 99久久99久久精品国产片果冻| 欧美片在线播放| 国产午夜精品一区二区三区四区| 夜夜嗨av一区二区三区中文字幕 | 日本一区二区三区免费乱视频| 国产精品久久久久久久久免费丝袜 | 久久色在线观看| 一区二区三区在线看| 久久99最新地址| 欧美视频一区二区三区| 久久精品男人天堂av| 午夜久久久久久| 波多野结衣一区二区三区 | 专区另类欧美日韩| 久久91精品久久久久久秒播 | 亚洲国产成人91porn| 国产福利一区二区| 欧美一区二区三级| 伊人一区二区三区| 成人免费不卡视频| 欧美α欧美αv大片| 亚洲国产精品人人做人人爽| 国产成人鲁色资源国产91色综| 在线播放一区二区三区| 亚洲视频一二区| 国产不卡在线播放| 精品国产乱码久久久久久蜜臀 | 国产在线一区二区综合免费视频| 在线观看视频欧美| 最新中文字幕一区二区三区| 国产精品性做久久久久久| 欧美精品乱人伦久久久久久| 玉足女爽爽91| 99re热这里只有精品免费视频| 国产人成一区二区三区影院| 久久99在线观看| 欧美zozozo| 另类小说综合欧美亚洲| 911精品国产一区二区在线| 亚洲一区二区三区四区的| 色婷婷久久一区二区三区麻豆| 国产精品国产自产拍高清av| 成人精品视频网站| 国产欧美日韩在线| 成人性生交大片免费看中文网站| 久久久一区二区| 成人在线视频一区二区| 国产精品欧美精品| 99精品欧美一区二区蜜桃免费| 亚洲欧美色一区| 欧美影院精品一区| 天天爽夜夜爽夜夜爽精品视频| 制服丝袜激情欧洲亚洲| 琪琪久久久久日韩精品| 欧美一区二区福利视频| 韩国一区二区在线观看| 久久久精品国产免大香伊| 懂色av中文一区二区三区| 国产精品青草久久| 色狠狠一区二区| 婷婷中文字幕综合| 欧美成人一区二区| 成人禁用看黄a在线| 一区二区三区四区高清精品免费观看| 欧美性淫爽ww久久久久无| 麻豆精品视频在线| 国产欧美日韩三级| 91国偷自产一区二区使用方法| 视频一区二区三区中文字幕| 精品国产亚洲在线| 色综合久久久久综合99| 日韩高清在线电影| 国产喷白浆一区二区三区| 白白色 亚洲乱淫| 三级一区在线视频先锋 | 自拍偷拍欧美精品| 91精品国产色综合久久不卡电影 | 97久久超碰国产精品电影| 亚洲午夜精品17c| 久久一区二区视频| 欧美影院精品一区| 国产精品99久久久| 亚洲成人综合网站| 国产精品麻豆网站| 欧美一区2区视频在线观看| 成人免费av网站| 蜜臀av亚洲一区中文字幕| 国产精品乱人伦中文| 在线观看91av| 一本久道久久综合中文字幕| 激情综合色综合久久| 亚洲一区在线观看免费| 国产欧美日韩综合精品一区二区| 欧美日韩日本视频| 成人白浆超碰人人人人| 久久成人久久爱| 午夜伦欧美伦电影理论片| 国产精品久久福利| 久久久久久久久久看片| 91精品国产日韩91久久久久久| 成人一区二区三区中文字幕| 麻豆成人91精品二区三区| 有码一区二区三区| 18欧美亚洲精品| 国产无一区二区| 欧美xxxx在线观看| 日韩欧美国产不卡| 91精品欧美综合在线观看最新| 色偷偷成人一区二区三区91| 成人少妇影院yyyy| 国产裸体歌舞团一区二区| 久久99久久久欧美国产| 日韩不卡一区二区三区| 天天av天天翘天天综合网色鬼国产 | 亚洲人成网站色在线观看| 国产区在线观看成人精品 | 日本乱人伦aⅴ精品| av在线不卡免费看| 懂色av中文一区二区三区| 国产91对白在线观看九色| 国产精品一区二区久激情瑜伽| 黑人精品欧美一区二区蜜桃| 激情五月婷婷综合网| 久久精品999| 国产又黄又大久久| 国产.精品.日韩.另类.中文.在线.播放| 久久99精品国产麻豆婷婷洗澡| 国内成+人亚洲+欧美+综合在线| 久久成人久久爱| 国产精品一区2区| 不卡欧美aaaaa| 91免费看`日韩一区二区| 色综合天天性综合| 色网站国产精品| 欧美人狂配大交3d怪物一区| 日韩三级伦理片妻子的秘密按摩| 日韩一级欧美一级| 欧美精品一区二区三| 中文字幕欧美区| 一区二区三区日本| 婷婷国产在线综合| 国产精品资源在线| 97成人超碰视| 日韩美一区二区三区| 中文字幕 久热精品 视频在线 | 欧美v国产在线一区二区三区| 国产婷婷一区二区| 亚洲综合色区另类av| 蜜桃av噜噜一区| 99久久精品免费看国产免费软件| 在线视频观看一区| 欧美mv和日韩mv的网站| 国产精品对白交换视频| 午夜精品久久一牛影视| 国产精品中文字幕一区二区三区| 91麻豆免费观看| 欧美电影精品一区二区| 亚洲色图一区二区三区| 日日夜夜精品视频天天综合网| 国产麻豆精品一区二区| 欧美一个色资源| 亚洲国产高清aⅴ视频| 日本在线不卡一区| 91美女福利视频| 久久亚洲一级片| 日产精品久久久久久久性色|