-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add finish port #70
Add finish port #70
Conversation
cache/coh_policy.hpp
Outdated
@@ -173,6 +173,8 @@ class CohPolicyBase { | |||
return std::make_pair(false, cmd_for_null()); | |||
} | |||
|
|||
// finish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有必要啊,你现在基本就是都要呗,暂时代价也不是很大,没必要在征询policy了。
cache/coherence.hpp
Outdated
@@ -43,6 +43,9 @@ class OuterCohPortBase | |||
|
|||
bool is_uncached() const { return coh_id == -1; } | |||
virtual void query_loc_req(uint64_t addr, std::list<LocInfo> *locs) = 0; | |||
|
|||
virtual void finish_req(uint64_t addr) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有比必要纯虚函数啊,对于不需要支持的,直接就不实现,根类上给一个空实现就好了。
cache/coherence.hpp
Outdated
@@ -280,6 +290,11 @@ class InnerCohPortT : public IPUC | |||
} | |||
return std::make_pair(hit, writeback); | |||
} | |||
virtual void finish_resp(uint64_t addr){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没必要征询policy
cache/coherence.hpp
Outdated
} | ||
|
||
virtual void flush(uint64_t addr, uint64_t *delay) { addr = normalize(addr); flush_line(addr, policy->cmd_for_flush(), delay); } | ||
virtual void flush(uint64_t addr, uint64_t *delay) { addr = normalize(addr); flush_line(addr, policy->cmd_for_flush(), delay); outer->finish_req(addr);} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flush和writeback为什么要finish?对于flush来说,LLC的flush_line()在结束的时候,所有内部缓存的处理已经完成了啊?
cache/coherence.hpp
Outdated
flush_line(meta->addr(iset), policy->cmd_for_flush(), delay); | ||
outer->finish_req(meta->addr(iset)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flush没有必要送finish啊?
@@ -100,6 +105,9 @@ class OuterCohPortUncached : public OuterCohPortBase | |||
virtual void query_loc_req(uint64_t addr, std::list<LocInfo> *locs){ | |||
coh->query_loc_resp(addr, locs); | |||
} | |||
virtual void finish_req(uint64_t addr){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
位置不对,finish只有在cached的port里面才有!
当然,这会给你造成麻烦,当LLC收到从一个uncached缓存来的acquire,grant之后不会收到finish。但是在这个时候,这个acquire 的coh_id应该是-1?所以LLC如果发现grant的请求的coh_id是-1,可以直接触发自己inner_cache的finish_resp(),而不用等inner cache发出finish
finish只有在cached的port里面才有! 在你看完所有的review,确认OK之后,我再merge |
No description provided.