nvlink

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package nvlink provides a connector that can create a network that includes PCIe, NVLink, and ethernet network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

Connector can connect devices into a network that includes PCIe, NVLink, and ethernet network.

func NewConnector

func NewConnector() *Connector

NewConnector creates a new connector that can help configure PCIe networks.

func (*Connector) AddPCIeSwitch

func (c *Connector) AddPCIeSwitch() (switchID int)

AddPCIeSwitch adds a new switch connecting from an existing switch.

func (*Connector) AddRootComplex

func (c *Connector) AddRootComplex(cpuPorts []sim.Port) (switchID int)

AddRootComplex adds a new switch connecting CPU ports.

func (c *Connector) ConnectDevicesWithNVLink(
	deviceA, deviceB int,
	numLink int,
)

ConnectDevicesWithNVLink establishes an NVLink Connection.

func (c *Connector) ConnectSwitchesWithEthernetLink(switchAID, switchBID int)

ConnectSwitchesWithEthernetLink establishes a ethernet link between two switches.

func (c *Connector) ConnectSwitchesWithPCIeLink(switchAID, switchBID int)

ConnectSwitchesWithPCIeLink connects two switches with a PCIe link.

func (*Connector) CreateEthernetSwitch

func (c *Connector) CreateEthernetSwitch() (switchID int)

CreateEthernetSwitch creates a ethernet switch.

func (*Connector) CreateNetwork

func (c *Connector) CreateNetwork(name string)

CreateNetwork creates a network. This function should be called before creating root complexes.

func (*Connector) EstablishRoute

func (c *Connector) EstablishRoute()

EstablishRoute populates the routing tables in the network.

func (*Connector) PlugInDevice

func (c *Connector) PlugInDevice(
	pcieSwitchID int,
	devicePorts []sim.Port,
) (deviceID int)

PlugInDevice connects a series of ports to a switch.

func (*Connector) WithEngine

func (c *Connector) WithEngine(engine sim.Engine) *Connector

WithEngine sets the event-driven simulation engine that the PCIe connection uses.

func (*Connector) WithEthernetBandwidth

func (c *Connector) WithEthernetBandwidth(bytePerSecond uint64) *Connector

WithEthernetBandwidth sets the bandwidth of each ethernet link.

func (*Connector) WithEthernetSwitchLatency

func (c *Connector) WithEthernetSwitchLatency(numCycle int) *Connector

WithEthernetSwitchLatency sets the latency of the ethernet switch.

func (*Connector) WithFrequency

func (c *Connector) WithFrequency(freq sim.Freq) *Connector

WithFrequency sets the frequency of the components in the connection.

func (*Connector) WithMonitor

func (c *Connector) WithMonitor(m *monitoring.Monitor) *Connector

WithMonitor sets the monitor that monitors the components in the connection.

func (*Connector) WithNVLinkBandwidth

func (c *Connector) WithNVLinkBandwidth(bytePerSecond uint64) *Connector

WithNVLinkBandwidth sets the bandwidth of each bandwidth link.

func (*Connector) WithNVLinkSwitchLatency

func (c *Connector) WithNVLinkSwitchLatency(numCycle int) *Connector

WithNVLinkSwitchLatency sets the latency of each NVLink switch.

func (*Connector) WithNVLinkVersion

func (c *Connector) WithNVLinkVersion(version int) *Connector

WithNVLinkVersion sets the version of the NVLink to use.

func (*Connector) WithPCIeBandwidth

func (c *Connector) WithPCIeBandwidth(bytePerSecond uint64) *Connector

WithPCIeBandwidth sets the bandwidth of all the connections in the PCIe network.

func (*Connector) WithPCIeSwitchLatency

func (c *Connector) WithPCIeSwitchLatency(numCycles int) *Connector

WithPCIeSwitchLatency sets the latency of each switch before the data can be forwarded to the next hop.

func (*Connector) WithPCIeVersion

func (c *Connector) WithPCIeVersion(version int, width int) *Connector

WithPCIeVersion sets the version of the PCIe network.

func (Connector) WithVisTracer

func (c Connector) WithVisTracer(t tracing.Tracer) Connector

WithVisTracer sets the tracer used to trace tasks in the network.

Jump to

Keyboard shortcuts

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