endpoint

package
v4.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package endpoint provides endpoint

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder can help building End Points.

func MakeBuilder

func MakeBuilder() Builder

MakeBuilder creates a new EndPointBuilder with default configurations.

func (Builder) Build

func (b Builder) Build(name string) *Comp

Build creates a new End Point.

func (Builder) WithDevicePorts

func (b Builder) WithDevicePorts(ports []sim.Port) Builder

WithDevicePorts sets a list of ports that communicate directly through the End Point.

func (Builder) WithEncodingOverhead

func (b Builder) WithEncodingOverhead(o float64) Builder

WithEncodingOverhead sets the encoding overhead.

func (Builder) WithEngine

func (b Builder) WithEngine(e sim.Engine) Builder

WithEngine sets the engine of the End Point to build.

func (Builder) WithFlitByteSize

func (b Builder) WithFlitByteSize(n int) Builder

WithFlitByteSize sets the flit byte size that the End Point supports.

func (Builder) WithFreq

func (b Builder) WithFreq(freq sim.Freq) Builder

WithFreq sets the frequency of the End Point to built.

func (Builder) WithNetworkPortBufferSize

func (b Builder) WithNetworkPortBufferSize(n int) Builder

WithNetworkPortBufferSize sets the network port buffer size of the end point.

func (Builder) WithNumInputChannels

func (b Builder) WithNumInputChannels(num int) Builder

WithNumInputChannels sets the number of input channels of the End Point to build.

func (Builder) WithNumOutputChannels

func (b Builder) WithNumOutputChannels(num int) Builder

WithNumOutputChannels sets the number of output channels of the End Point to build.

type Comp

type Comp struct {
	*sim.TickingComponent
	sim.MiddlewareHolder

	DevicePorts      []sim.Port
	NetworkPort      sim.Port
	DefaultSwitchDst sim.Port
	// contains filtered or unexported fields
}

Comp is an akita component(Endpoint) that delegates sending and receiving actions of a few ports.

func (*Comp) NotifyAvailable

func (c *Comp) NotifyAvailable(_ sim.Port)

NotifyAvailable triggers the endpoint to continue to tick.

func (*Comp) NotifySend

func (c *Comp) NotifySend()

NotifySend is called by a port to notify the connection there are messages waiting to be sent, can start tick

func (*Comp) PlugIn

func (c *Comp) PlugIn(port sim.Port, srcBufCap int)

PlugIn connects a port to the endpoint.

func (*Comp) Tick

func (c *Comp) Tick() bool

func (*Comp) Unplug

func (c *Comp) Unplug(_ sim.Port)

Unplug removes the association of a port and an endpoint.

Jump to

Keyboard shortcuts

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