Documentation
¶
Overview ¶
Package messaging and its subpackages provides infrastructures to simulate interconnects.
Index ¶
- type Channel
- func (c *Channel) CanSend(port sim.Port) bool
- func (c *Channel) NotifyAvailable(now sim.VTimeInSec, port sim.Port)
- func (c *Channel) PlugIn(port sim.Port, sourceSideBufSize int)
- func (c *Channel) Send(msg sim.Msg) *sim.SendError
- func (c *Channel) Tick(now sim.VTimeInSec) bool
- func (c *Channel) Unplug(port sim.Port)
- type ChannelBuilder
- type Flit
- type FlitBuilder
- func (b FlitBuilder) Build() *Flit
- func (b FlitBuilder) WithDst(dst sim.Port) FlitBuilder
- func (b FlitBuilder) WithMsg(msg sim.Msg) FlitBuilder
- func (b FlitBuilder) WithNumFlitInMsg(n int) FlitBuilder
- func (b FlitBuilder) WithSendTime(t sim.VTimeInSec) FlitBuilder
- func (b FlitBuilder) WithSeqID(i int) FlitBuilder
- func (b FlitBuilder) WithSrc(src sim.Port) FlitBuilder
- type MsgBuffer
- type TrafficCounter
- type TransferEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { *sim.TickingComponent // contains filtered or unexported fields }
Channel connects two ports and can deliver messages with configurable latencies.
func (*Channel) NotifyAvailable ¶
func (c *Channel) NotifyAvailable(now sim.VTimeInSec, port sim.Port)
NotifyAvailable is called by a port to notify that the connection can deliver to the port again.
type ChannelBuilder ¶
type ChannelBuilder struct {
// contains filtered or unexported fields
}
ChannelBuilder can build channels.
func MakeChannelBuilder ¶
func MakeChannelBuilder() ChannelBuilder
MakeChannelBuilder creates a ChannelBuilder.
func (ChannelBuilder) Build ¶
func (b ChannelBuilder) Build(name string) *Channel
Build creates a new channel with the given name.
func (ChannelBuilder) WithEngine ¶
func (b ChannelBuilder) WithEngine(e sim.Engine) ChannelBuilder
WithEngine sets the engine of the channel to be built.
func (ChannelBuilder) WithFreq ¶
func (b ChannelBuilder) WithFreq(f sim.Freq) ChannelBuilder
WithFreq sets the frequency of the channel to be built.
func (ChannelBuilder) WithPipelineParameters ¶
func (b ChannelBuilder) WithPipelineParameters( numStage, cyclesPerStage, width int, ) ChannelBuilder
WithPipelineParameters sets the parameters of the channel internel pipeline.
type Flit ¶
type Flit struct { sim.MsgMeta SeqID int NumFlitInMsg int Msg sim.Msg OutputBuf sim.Buffer // The buffer to route to within a switch }
Flit is the smallest trasferring unit on a network.
type FlitBuilder ¶
type FlitBuilder struct {
// contains filtered or unexported fields
}
FlitBuilder can build flits
func (FlitBuilder) WithDst ¶
func (b FlitBuilder) WithDst(dst sim.Port) FlitBuilder
WithDst sets the dst of the request to send
func (FlitBuilder) WithMsg ¶
func (b FlitBuilder) WithMsg(msg sim.Msg) FlitBuilder
WithMsg sets the msg of the flit to build.
func (FlitBuilder) WithNumFlitInMsg ¶
func (b FlitBuilder) WithNumFlitInMsg(n int) FlitBuilder
WithNumFlitInMsg sets the NumFlitInMsg for of flit to build.
func (FlitBuilder) WithSendTime ¶
func (b FlitBuilder) WithSendTime(t sim.VTimeInSec) FlitBuilder
WithSendTime sets the send time of the request to build
func (FlitBuilder) WithSeqID ¶
func (b FlitBuilder) WithSeqID(i int) FlitBuilder
WithSeqID sets the SeqID of the Flit.
func (FlitBuilder) WithSrc ¶
func (b FlitBuilder) WithSrc(src sim.Port) FlitBuilder
WithSrc sets the src of the request to send
type TrafficCounter ¶
type TrafficCounter struct {
TotalData uint64
}
A TrafficCounter counts number of bytes transferred over a connection
func (*TrafficCounter) Func ¶
func (c *TrafficCounter) Func(ctx *sim.HookCtx)
Func adds the delivered traffic to the counter
type TransferEvent ¶
A TransferEvent is an event that marks that a message completes transfer.
func NewTransferEvent ¶
func NewTransferEvent( time sim.VTimeInSec, handler sim.Handler, msg sim.Msg, vc int, ) *TransferEvent
NewTransferEvent creates a new TransferEvent.