Hi Nazmus, BaseIndexingPolicy is simply a template instantiation of IndexingPolicyTemplate. So the method definition should be there.
Kind Regards Giacomo From: Nazmus Sakib via gem5-users <gem5-users@gem5.org> Date: Friday, 15 November 2024 at 23:31 To: gem5-users@gem5.org <gem5-users@gem5.org> Cc: Jason Lowe-Power <jlowepo...@ucdavis.edu>, Nazmus Sakib <nsak...@nmsu.edu> Subject: [gem5-users] Tags and Indexing Policy Hello. In tags/indexingPolicy/base.cc there is an extractTag function. In base.hh the prototype is: virtual Addr extractTag(const Addr addr) const; In base.cc, the definition is: Addr BaseIndexingPolicy::extractTag(const Addr addr) const { return (addr >> tagShift); } Whether it is set associative or skewed associative, extractTag remains same (no override). >From any tag class (base_set_assoc or sector), you can call this extractTag. I wanted a method to return setShift value from "indexing policy" back to "tag" class. In base.hh, I did: virtual int extractss() const; [same prototype as extractTag] In base.cc I did, int BaseIndexingPolicy::extractss() const { return setShift; } >From sector_tags.cc, I tried to call this extractss() . But build fails stating no extractss() declared in the scope. (I am calling it from an existing method in the sector_tags.cc). Why would this happen ? Note: setShift is under "protected", not "public" IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org