Documentation
¶
Index ¶
- type CacheCapability
- type CacheRole
- type CacheWithHomeStore
- type CacheWithRequestStore
- type DirectoryCapability
- type DirectoryStore
- type HomeCache
- type HomeCacheLine
- type NodeCapability
- type PacketAllocator
- type RequestCache
- type RequestCacheHandler
- type TransactionCapability
- type TransactionCreator
- type TxRequestParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheCapability ¶
type CacheCapability interface {
NodeCapability
Role() CacheRole
}
CacheCapability is a NodeCapability that also exposes cache helpers.
type CacheRole ¶
type CacheRole string
CacheRole represents the intended owner of the cache capability.
type CacheWithHomeStore ¶
type CacheWithHomeStore interface {
CacheCapability
HomeCache() HomeCache
}
CacheWithHomeStore adds home cache accessors.
func NewHomeCacheCapability ¶
func NewHomeCacheCapability(name string) CacheWithHomeStore
type CacheWithRequestStore ¶
type CacheWithRequestStore interface {
CacheCapability
RequestCache() RequestCache
}
CacheWithRequestStore adds request cache accessors.
func NewMESICacheCapability ¶
func NewMESICacheCapability(name string) CacheWithRequestStore
type DirectoryCapability ¶
type DirectoryCapability interface {
NodeCapability
Directory() DirectoryStore
}
DirectoryCapability provides address-to-node tracking for coherence.
func NewDirectoryCapability ¶
func NewDirectoryCapability(name string) DirectoryCapability
NewDirectoryCapability creates a capability maintaining sharer lists per address.
type DirectoryStore ¶
type DirectoryStore interface {
Add(address uint64, nodeID int)
Remove(address uint64, nodeID int)
Clear(address uint64)
Reset()
}
DirectoryStore exposes operations for managing sharer sets.
type HomeCache ¶
type HomeCache interface {
GetLine(addr uint64) (HomeCacheLine, bool)
UpdateLine(addr uint64, line HomeCacheLine)
Invalidate(addr uint64)
Clear()
}
HomeCache exposes cache helpers for HomeNode.
type HomeCacheLine ¶
HomeCacheLine represents cache metadata maintained by HomeNode.
type NodeCapability ¶
type NodeCapability interface {
Descriptor() hooks.PluginDescriptor
Register(broker *hooks.PluginBroker) error
}
NodeCapability represents a self-contained behaviour that can attach hooks to the broker.
func NewFlowControlCapability ¶
func NewFlowControlCapability(name string, mgr policy.Manager) NodeCapability
NewFlowControlCapability returns a capability that performs flow control using policy.Manager.
func NewHookCapability ¶
func NewHookCapability(name string, category hooks.PluginCategory, description string, bundle hooks.HookBundle) NodeCapability
NewHookCapability builds a capability from an arbitrary set of hook handlers.
func NewRoutingCapability ¶
func NewRoutingCapability(name string, mgr policy.Manager) NodeCapability
NewRoutingCapability returns a capability that resolves routes using policy.Manager.
type PacketAllocator ¶
PacketAllocator allocates unique packet IDs.
type RequestCache ¶
type RequestCache interface {
GetState(addr uint64) core.MESIState
SetState(addr uint64, state core.MESIState)
Invalidate(addr uint64)
Clear()
}
RequestCache exposes MESI cache helpers for RequestNode.
type RequestCacheHandler ¶
type RequestCacheHandler interface {
CacheWithRequestStore
HandleResponse(packet *core.Packet)
BuildSnoopResponse(nodeID int, req *core.Packet, alloc PacketAllocator, cycle int) (*core.Packet, error)
}
RequestCacheHandler adds high-level helpers for RequestNode cache behaviour.
type TransactionCapability ¶
type TransactionCapability interface {
NodeCapability
Creator() TransactionCreator
}
TransactionCapability exposes a creator function for request nodes.
func NewDefaultTransactionCapability ¶
func NewDefaultTransactionCapability( name string, allocate func() (int64, error), createTxn func(core.CHITransactionType, uint64, int) *core.Transaction, ) TransactionCapability
NewDefaultTransactionCapability builds a capability using allocator/transaction providers.
func NewTransactionCapability ¶
func NewTransactionCapability(name string, creator TransactionCreator) TransactionCapability
NewTransactionCapability wraps a creator function into a NodeCapability.
type TransactionCreator ¶
type TransactionCreator func(params TxRequestParams) (*core.Packet, *core.Transaction, error)
TransactionCreator builds request packets along with transactions.