Skip to content

Commit

Permalink
expose address normalize API to user
Browse files Browse the repository at this point in the history
  • Loading branch information
wsong83 committed Jan 29, 2024
1 parent aa0fca9 commit b591f80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cache/coherence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,12 @@ typedef InnerCohPortT<InnerCohPortUncached> InnerCohPort;

// interface with the processing core is a special InnerCohPort
class CoreInterface : public InnerCohPortUncached {
protected:
uint64_t normalize(uint64_t addr) const { return addr & ~0x3full ;}

public:
CoreInterface(CohPolicyBase *policy) : InnerCohPortUncached(policy) {}
virtual ~CoreInterface() {}

uint64_t normalize(uint64_t addr) const { return addr & ~0x3full; }

virtual const CMDataBase *read(uint64_t addr, uint64_t *delay) {
addr = normalize(addr);
auto cmd = policy->cmd_for_read();
Expand Down

0 comments on commit b591f80

Please sign in to comment.