Versions in this module Expand all Collapse all v0 v0.2.0 Jan 3, 2026 Changes in this version + type CacheStats struct + Accesses uint64 + Hits uint64 + LoadHits uint64 + LoadMisses uint64 + Loads uint64 + MSHRFull uint64 + Misses uint64 + Prefetches uint64 + StoreHits uint64 + StoreMisses uint64 + Stores uint64 + Writebacks uint64 + func (s *CacheStats) HitRate() float64 + func (s *CacheStats) MissRate() float64 + type CoherenceMessage struct + Address uint64 + Data uint64 + RequestorID int + SharedCount int + Type CoherenceMessageType + type CoherenceMessageType int + const CoherenceDataFromMemory + const CoherenceExclusiveGrant + const CoherenceInvalidate + const CoherenceInvalidateAck + const CoherenceRead + const CoherenceSharedRequest + const CoherenceSharedResponse + const CoherenceWrite + const CoherenceWriteback + func (t CoherenceMessageType) String() string + type CoherenceStats struct + CoherenceMisses uint64 + ExclusiveReads uint64 + InvalidatesSent uint64 + SharedReads uint64 + Upgrades uint64 + Writebacks uint64 + type DirectoryEntry struct + Owner int + Sharers []int + State MESIState + type MESIController struct + func NewMESIController() *MESIController + func (mc *MESIController) GetDirectoryState(address uint64) *DirectoryEntry + func (mc *MESIController) HandleInvalidateAck(address uint64, coreID int) + func (mc *MESIController) HandleRequest(msg CoherenceMessage) []CoherenceMessage + type MESIState int + const StateExclusive + const StateInvalid + const StateModified + const StateShared + func (s MESIState) String() string + type MSHREntry struct + Address uint64 + CPU uint32 + EnqueueCycle uint64 + IP uint64 + InstrDependOnMe []uint64 + InstrID uint64 + Merged bool + MergedWith int + PrefetchFromThis bool + ReadyCycle uint64 + Type compcache.AccessType + VAddress uint64 + type MSHRQueue struct + func NewMSHRQueue(maxSize int) *MSHRQueue + func (mq *MSHRQueue) Allocate(entry *MSHREntry) (index int, success bool) + func (mq *MSHRQueue) Clear() + func (mq *MSHRQueue) Find(addr uint64) (index int, found bool) + func (mq *MSHRQueue) GetAll() []*MSHREntry + func (mq *MSHRQueue) IsFull() bool + func (mq *MSHRQueue) Merge(index int, instrID uint64) + func (mq *MSHRQueue) Remove(index int) *MSHREntry + func (mq *MSHRQueue) RemoveByAddress(addr uint64) *MSHREntry + func (mq *MSHRQueue) Size() int + type SetAssociativeCache struct + func NewSetAssociativeCache(config compcache.CacheConfig) (*SetAssociativeCache, error) + func (c *SetAssociativeCache) Access(addr uint64, vaddr uint64, instrID uint64, at compcache.AccessType, ...) (hit bool, readyCycle uint64, mshrIndex int) + func (c *SetAssociativeCache) GetMSHRStats() (size int, capacity int) + func (c *SetAssociativeCache) GetStats() interface{} + func (c *SetAssociativeCache) HandleFill(addr uint64, data uint64, cycle uint64) bool + func (c *SetAssociativeCache) ResetStats() + func (c *SetAssociativeCache) SetCycle(cycle uint64) + func (c *SetAssociativeCache) SetLowerLevel(lowerLevel interface{ ... }) + func (c *SetAssociativeCache) SetStandaloneMode(standalone bool)