Documentation
¶
Overview ¶
Package messaging and its subpackages provides infrastructures to simulate interconnects.
Index ¶
- type Flit
- type FlitBuilder
- func (b FlitBuilder) Build() *Flit
- func (b FlitBuilder) WithDst(dst sim.RemotePort) FlitBuilder
- func (b FlitBuilder) WithMsg(msg sim.Msg) FlitBuilder
- func (b FlitBuilder) WithNumFlitInMsg(n int) FlitBuilder
- func (b FlitBuilder) WithSeqID(i int) FlitBuilder
- func (b FlitBuilder) WithSrc(src sim.RemotePort) FlitBuilder
- type MsgBuffer
- type TrafficCounter
- type TransferEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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.RemotePort) 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) WithSeqID ¶
func (b FlitBuilder) WithSeqID(i int) FlitBuilder
WithSeqID sets the SeqID of the Flit.
func (FlitBuilder) WithSrc ¶
func (b FlitBuilder) WithSrc(src sim.RemotePort) 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.