Documentation
¶
Overview ¶
Package pcie provides a Connector and establishes a PCIe connection.
Index ¶
- type Connector
- func (c *Connector) AddRootComplex(cpuPorts []sim.Port) (switchID int)
- func (c *Connector) AddSwitch(baseSwitchID int) (switchID int)
- func (c *Connector) CreateNetwork(name string)
- func (c *Connector) EstablishRoute()
- func (c *Connector) PlugInDevice(baseSwitchID int, devicePorts []sim.Port)
- func (c *Connector) WithBandwidth(bytePerSecond uint64) *Connector
- func (c *Connector) WithEngine(engine sim.Engine) *Connector
- func (c *Connector) WithFrequency(freq sim.Freq) *Connector
- func (c *Connector) WithMonitor(m *monitoring.Monitor) *Connector
- func (c *Connector) WithSwitchLatency(numCycles int) *Connector
- func (c *Connector) WithVersion(version int, width int) *Connector
- func (c *Connector) WithVisTracer(tracer tracing.Tracer) *Connector
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 PCIe network.
func NewConnector ¶
func NewConnector() *Connector
NewConnector creates a new connector that can help configure PCIe networks.
func (*Connector) AddRootComplex ¶
AddRootComplex adds a new switch connecting CPU ports.
func (*Connector) CreateNetwork ¶
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 ¶
PlugInDevice connects a series of ports to a switch.
func (*Connector) WithBandwidth ¶
WithBandwidth sets the bandwidth of all the connections in the PCIe network.
func (*Connector) WithEngine ¶
WithEngine sets the event-driven simulation engine that the PCIe connection uses.
func (*Connector) WithFrequency ¶
WithFrequency sets the frequency used by the components in the connection. It does not have to be the exact frequency of the network. Instead, it is better to set as same frequency that the network interfaces work at.
func (*Connector) WithMonitor ¶
func (c *Connector) WithMonitor(m *monitoring.Monitor) *Connector
WithMonitor sets the monitor that inspects the states of the component associated with the connection.
func (*Connector) WithSwitchLatency ¶
WithSwitchLatency sets the extra latency on each switch before a switch can forward a flit.
func (*Connector) WithVersion ¶
WithVersion sets the version of the network.