当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 2 Fork 2

Jiaxun Yang/sim-godson
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lsq.h 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
Jiaxun Yang 提交于 2019-11-13 20:22 . Initial commit
#ifndef LSQ_H
#define LSQ_H
#if 0
#define DWORD_MATCH(a1,a2) (((a1)|0x7) == ((a2)|0x7))
enum lsq_state { LSQ_EMPTY,LSQ_ENTER,LSQ_ISSUE,LSQ_DCACHE,LSQ_DTAGCMP,LSQ_READCACHE,LSQ_WRITEBACK,LSQ_COMMIT,LSQ_DELAY1 };
struct load_store_queue {
struct inst_descript *rs;
enum lsq_state state;
int tag;
int op;
int op_load;
int op_store;
md_addr_t addr;
md_addr_t paddr;
struct cache_blk *blk;
int ex;
int set;
int way;
int cachehit;
unsigned char byterdy;
unsigned char bytemask;
int fetching;
};
extern struct load_store_queue *lsq;
extern int lsq_head1,lsq_head,lsq_tail,lsq_num;
extern int lsq_ifq_size;
/* index of lsq item in certain states,at most one item for each of these */
extern int lsq_issuei,lsq_dcachei,lsq_dtagcmpi,lsq_missi,lsq_wtbki;
/* refill/replace operation in dcache/dtagcmp stage */
extern struct refill_packet *lsq_refill,*lsq_dcache_refill,*lsq_dtagcmp_refill;
extern counter_t sim_loadcnt,sim_storecnt,sim_loadmisscnt,sim_storemisscnt;
extern counter_t sim_loadfwdcnt,sim_storefwdcnt,sim_ldwtbkdelaycnt;
extern counter_t lsq_count,lsq_fcount;
extern void lsq_enqueue(struct inst_descript *rs);
extern void lsq_issue(struct inst_descript *rs);
extern void lsq_init(void);
extern void lsq_stage(void);
extern void lsq_cancel_one(int i);
extern void lsq_dump(void);
#endif
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/flygoat/sim-godson.git
git@gitee.com:flygoat/sim-godson.git
flygoat
sim-godson
sim-godson
master

搜索帮助