messaging

package
v4.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package messaging and its subpackages provides infrastructures to simulate interconnects.

Index

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.

func (*Flit) Clone

func (f *Flit) Clone() sim.Msg

Clone returns cloned Flit with different ID

func (*Flit) Meta

func (f *Flit) Meta() *sim.MsgMeta

Meta returns the meta data associated with the Flit.

type FlitBuilder

type FlitBuilder struct {
	// contains filtered or unexported fields
}

FlitBuilder can build flits

func (FlitBuilder) Build

func (b FlitBuilder) Build() *Flit

Build creates a new flit.

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 MsgBuffer

type MsgBuffer struct {
	Capacity int
	Buf      []sim.Msg
}

MsgBuffer is a buffer that can hold requests

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

type TransferEvent struct {
	*sim.EventBase
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL