From b591f8017d1031a1040eef5343487a72dbe5f03b Mon Sep 17 00:00:00 2001 From: Wei Song Date: Mon, 29 Jan 2024 15:18:04 +0800 Subject: [PATCH] expose address normalize API to user --- cache/coherence.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cache/coherence.hpp b/cache/coherence.hpp index 971295d..7c860d5 100644 --- a/cache/coherence.hpp +++ b/cache/coherence.hpp @@ -284,13 +284,12 @@ typedef InnerCohPortT 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();