Versions in this module Expand all Collapse all v3 v3.1.0 Nov 6, 2024 v3.0.0 Mar 13, 2024 Changes in this version + var HookPosAfterEvent = &HookPos + var HookPosBeforeEvent = &HookPos + var HookPosBufPop = &HookPos + var HookPosBufPush = &HookPos + var HookPosConnDeliver = &HookPos + var HookPosConnDoneTrans = &HookPos + var HookPosConnStartSend = &HookPos + var HookPosConnStartTrans = &HookPos + var HookPosPortMsgRecvd = &HookPos + var HookPosPortMsgRetrieve = &HookPos + var HookPosPortMsgSend = &HookPos + func BuildName(parentName, elementName string) string + func BuildNameWithIndex(parentName, elementName string, index int) string + func BuildNameWithMultiDimensionalIndex(parentName, elementName string, index []int) string + func NameMustBeValid(name string) + func UseParallelIDGenerator() + func UseSequentialIDGenerator() + type Buffer interface + CanPush func() bool + Capacity func() int + Clear func() + Peek func() interface{} + Pop func() interface{} + Push func(e interface{}) + Size func() int + func NewBuffer(name string, capacity int) Buffer + type BufferedSender interface + CanSend func(count int) bool + Clear func() + Send func(msg Msg) + Tick func(now VTimeInSec) bool + func NewBufferedSender(port Port, buffer Buffer) BufferedSender + type Component interface + NotifyPortFree func(now VTimeInSec, port Port) + NotifyRecv func(now VTimeInSec, port Port) + type ComponentBase struct + func NewComponentBase(name string) *ComponentBase + func (c *ComponentBase) Name() string + type Connection interface + CanSend func(src Port) bool + NotifyAvailable func(now VTimeInSec, port Port) + PlugIn func(port Port, sourceSideBufSize int) + Send func(msg Msg) *SendError + Unplug func(port Port) + type ControlMsg struct + ClearPorts bool + Disable bool + Enable bool + Reset bool + func (c *ControlMsg) Meta() *MsgMeta + type ControlMsgBuilder struct + ClearPorts bool + Disable bool + Dst Port + Enable bool + Reset bool + SendTime VTimeInSec + Src Port + TrafficBytes int + TrafficClass int + func (c ControlMsgBuilder) Build() *ControlMsg + func (c ControlMsgBuilder) WithClearPorts() ControlMsgBuilder + func (c ControlMsgBuilder) WithDisable() ControlMsgBuilder + func (c ControlMsgBuilder) WithDst(dst Port) ControlMsgBuilder + func (c ControlMsgBuilder) WithEnable() ControlMsgBuilder + func (c ControlMsgBuilder) WithReset() ControlMsgBuilder + func (c ControlMsgBuilder) WithSendTime(sendTime VTimeInSec) ControlMsgBuilder + func (c ControlMsgBuilder) WithSrc(src Port) ControlMsgBuilder + func (c ControlMsgBuilder) WithTrafficBytes(trafficBytes int) ControlMsgBuilder + func (c ControlMsgBuilder) WithTrafficClass(trafficClass int) ControlMsgBuilder + type DirectConnection struct + func NewDirectConnection(name string, engine Engine, freq Freq) *DirectConnection + func (c *DirectConnection) CanSend(src Port) bool + func (c *DirectConnection) NotifyAvailable(now VTimeInSec, _ Port) + func (c *DirectConnection) PlugIn(port Port, sourceSideBufSize int) + func (c *DirectConnection) Send(msg Msg) *SendError + func (c *DirectConnection) Tick(now VTimeInSec) bool + func (c *DirectConnection) Unplug(_ Port) + type Domain struct + func NewDomain(name string) *Domain + func (d Domain) Name() string + type Engine interface + Continue func() + Finished func() + Pause func() + RegisterSimulationEndHandler func(handler SimulationEndHandler) + Run func() error + type Event interface + Handler func() Handler + IsSecondary func() bool + Time func() VTimeInSec + type EventBase struct + ID string + func NewEventBase(t VTimeInSec, handler Handler) *EventBase + func (e EventBase) Handler() Handler + func (e EventBase) IsSecondary() bool + func (e EventBase) SetHandler(h Handler) + func (e EventBase) Time() VTimeInSec + type EventLogger struct + func NewEventLogger(logger *log.Logger) *EventLogger + func (h *EventLogger) Func(ctx HookCtx) + type EventQueue interface + Len func() int + Peek func() Event + Pop func() Event + Push func(evt Event) + type EventQueueImpl struct + func NewEventQueue() *EventQueueImpl + func (q *EventQueueImpl) Len() int + func (q *EventQueueImpl) Peek() Event + func (q *EventQueueImpl) Pop() Event + func (q *EventQueueImpl) Push(evt Event) + type EventScheduler interface + Schedule func(e Event) + type Freq float64 + const GHz + const Hz + const KHz + const MHz + func (f Freq) Cycle(time VTimeInSec) uint64 + func (f Freq) HalfTick(t VTimeInSec) VTimeInSec + func (f Freq) NCyclesLater(n int, now VTimeInSec) VTimeInSec + func (f Freq) NextTick(now VTimeInSec) VTimeInSec + func (f Freq) NoEarlierThan(t VTimeInSec) VTimeInSec + func (f Freq) Period() VTimeInSec + func (f Freq) ThisTick(now VTimeInSec) VTimeInSec + type GeneralRsp struct + OriginalReq Msg + func (r *GeneralRsp) GetRspTo() string + func (r *GeneralRsp) Meta() *MsgMeta + type GeneralRspBuilder struct + Dst Port + OriginalReq Msg + SendTime VTimeInSec + Src Port + TrafficBytes int + TrafficClass int + func (c GeneralRspBuilder) Build() *GeneralRsp + func (c GeneralRspBuilder) WithDst(dst Port) GeneralRspBuilder + func (c GeneralRspBuilder) WithOriginalReq(originalReq Msg) GeneralRspBuilder + func (c GeneralRspBuilder) WithSendTime(sendTime VTimeInSec) GeneralRspBuilder + func (c GeneralRspBuilder) WithSrc(src Port) GeneralRspBuilder + func (c GeneralRspBuilder) WithTrafficBytes(trafficBytes int) GeneralRspBuilder + func (c GeneralRspBuilder) WithTrafficClass(trafficClass int) GeneralRspBuilder + type Handler interface + Handle func(e Event) error + type Hook interface + Func func(ctx HookCtx) + type HookCtx struct + Detail interface{} + Domain Hookable + Item interface{} + Pos *HookPos + type HookPos struct + Name string + type Hookable interface + AcceptHook func(hook Hook) + Hooks func() []Hook + NumHooks func() int + type HookableBase struct + func NewHookableBase() *HookableBase + func (h *HookableBase) AcceptHook(hook Hook) + func (h *HookableBase) Hooks() []Hook + func (h *HookableBase) InvokeHook(ctx HookCtx) + func (h *HookableBase) NumHooks() int + type IDGenerator interface + Generate func() string + func GetIDGenerator() IDGenerator + type InsertionQueue struct + func NewInsertionQueue() *InsertionQueue + func (q *InsertionQueue) Len() int + func (q *InsertionQueue) Peek() Event + func (q *InsertionQueue) Pop() Event + func (q *InsertionQueue) Push(evt Event) + type LimitNumMsgPort struct + func NewLimitNumMsgPort(comp Component, capacity int, name string) *LimitNumMsgPort + func NewLimitNumMsgPortWithExternalBuffer(comp Component, buf Buffer, name string) *LimitNumMsgPort + func (p *LimitNumMsgPort) CanSend() bool + func (p *LimitNumMsgPort) Component() Component + func (p *LimitNumMsgPort) Name() string + func (p *LimitNumMsgPort) NotifyAvailable(now VTimeInSec) + func (p *LimitNumMsgPort) Peek() Msg + func (p *LimitNumMsgPort) Recv(msg Msg) *SendError + func (p *LimitNumMsgPort) Retrieve(now VTimeInSec) Msg + func (p *LimitNumMsgPort) Send(msg Msg) *SendError + func (p *LimitNumMsgPort) SetConnection(conn Connection) + type LogHook interface + type LogHookBase struct + type Msg interface + Meta func() *MsgMeta + type MsgMeta struct + Dst Port + ID string + RecvTime VTimeInSec + SendTime VTimeInSec + Src Port + TrafficBytes int + TrafficClass int + type Name struct + Tokens []NameToken + func ParseName(sname string) Name + type NameToken struct + ElemName string + Index []int + type Named interface + Name func() string + type ParallelEngine struct + func NewParallelEngine() *ParallelEngine + func (e *ParallelEngine) Continue() + func (e *ParallelEngine) CurrentTime() VTimeInSec + func (e *ParallelEngine) Finished() + func (e *ParallelEngine) Pause() + func (e *ParallelEngine) RegisterSimulationEndHandler(handler SimulationEndHandler) + func (e *ParallelEngine) Run() error + func (e *ParallelEngine) Schedule(evt Event) + type Port interface + CanSend func() bool + Component func() Component + NotifyAvailable func(now VTimeInSec) + Peek func() Msg + Recv func(msg Msg) *SendError + Retrieve func(now VTimeInSec) Msg + Send func(msg Msg) *SendError + SetConnection func(conn Connection) + type PortMsgLogger struct + func NewPortMsgLogger(logger *log.Logger, timeTeller TimeTeller) *PortMsgLogger + func (h *PortMsgLogger) Func(ctx HookCtx) + type PortOwner interface + AddPort func(name string, port Port) + GetPortByName func(name string) Port + Ports func() []Port + type PortOwnerBase struct + func NewPortOwnerBase() *PortOwnerBase + func (po *PortOwnerBase) AddPort(name string, port Port) + func (po PortOwnerBase) GetPortByName(name string) Port + func (po PortOwnerBase) Ports() []Port + type Rsp interface + GetRspTo func() string + type SendError struct + func NewSendError() *SendError + type SerialEngine struct + func NewSerialEngine() *SerialEngine + func (e *SerialEngine) Continue() + func (e *SerialEngine) CurrentTime() VTimeInSec + func (e *SerialEngine) Finished() + func (e *SerialEngine) Pause() + func (e *SerialEngine) RegisterSimulationEndHandler(handler SimulationEndHandler) + func (e *SerialEngine) Run() error + func (e *SerialEngine) Schedule(evt Event) + type SimulationEndHandler interface + Handle func(now VTimeInSec) + type TickEvent struct + func MakeTickEvent(t VTimeInSec, handler Handler) TickEvent + type TickScheduler struct + Engine Engine + Freq Freq + func NewSecondaryTickScheduler(handler Handler, engine Engine, freq Freq) *TickScheduler + func NewTickScheduler(handler Handler, engine Engine, freq Freq) *TickScheduler + func (t *TickScheduler) TickLater(now VTimeInSec) + func (t *TickScheduler) TickNow(now VTimeInSec) + type Ticker interface + Tick func(now VTimeInSec) bool + type TickingComponent struct + func NewSecondaryTickingComponent(name string, engine Engine, freq Freq, ticker Ticker) *TickingComponent + func NewTickingComponent(name string, engine Engine, freq Freq, ticker Ticker) *TickingComponent + func (c *TickingComponent) Handle(e Event) error + func (c *TickingComponent) NotifyPortFree(now VTimeInSec, _ Port) + func (c *TickingComponent) NotifyRecv(now VTimeInSec, _ Port) + type TimeTeller interface + CurrentTime func() VTimeInSec + type VTimeInSec float64 v3.0.0-alpha.31 Nov 29, 2023 v3.0.0-alpha.30 Sep 9, 2023 v3.0.0-alpha.29 Jun 24, 2023 v3.0.0-alpha.28 Jun 6, 2023 v3.0.0-alpha.27 May 31, 2023 v3.0.0-alpha.26 May 31, 2023 v3.0.0-alpha.25 May 31, 2023 Other modules containing this package github.com/sarchlab/akita/v4