Documentation
¶
Overview ¶
Package mesh provides a connector implementation for the mesh.
Example ¶
Output: passed!
Index ¶
- type Connector
- func (c *Connector) AddTile(loc [3]int, ports []sim.Port)
- func (c *Connector) CreateNetwork(name string)
- func (c *Connector) EstablishNetwork()
- func (c *Connector) WithBandwidth(transferPerCycle float64) *Connector
- func (c *Connector) WithBufferAnalyzer(analyzer *bottleneckanalysis.BufferAnalyzer) *Connector
- func (c *Connector) WithEngine(e sim.Engine) *Connector
- func (c *Connector) WithFlitSize(size int) *Connector
- func (c *Connector) WithFreq(freq sim.Freq) *Connector
- func (c *Connector) WithMonitor(monitor *monitoring.Monitor) *Connector
- func (c *Connector) WithSwitchLatency(numCycles int) *Connector
- func (c *Connector) WithVisTracer(t tracing.Tracer) *Connector
Examples ¶
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
}
A Connector can help establishing a mesh or torus network.
func (*Connector) AddTile ¶
AddTile adds some ports to a give coordinate in the mesh or torus. The connector supports 3 dimensional meshes. If a 2D mesh is designed, simply set the third coordinate to 0. We assume first first tile always has a coordinate of [0,0,0]. Negative coordinate is not supported.
func (*Connector) CreateNetwork ¶
CreateNetwork starts the process of creating a network. It also resets the connector if the connector has been used to create another network.
func (*Connector) EstablishNetwork ¶
func (c *Connector) EstablishNetwork()
EstablishNetwork creates the switches, links, and the routing tables for the network to built.
func (*Connector) WithBandwidth ¶
WithBandwidth sets the bandwidth on each link in the unit of how many transfers per cycle.
func (*Connector) WithBufferAnalyzer ¶
func (c *Connector) WithBufferAnalyzer( analyzer *bottleneckanalysis.BufferAnalyzer, ) *Connector
WithBufferAnalyzer sets that buffer analyzer that can be used to record the buffer level in the mesh.
func (*Connector) WithEngine ¶
WithEngine sets the engine to be used.
func (*Connector) WithFlitSize ¶
WithFlitSize sets the flit size of the network.
func (*Connector) WithMonitor ¶
func (c *Connector) WithMonitor(monitor *monitoring.Monitor) *Connector
WithMonitor sets a monitor that can inspect the internal states of the components in the network.
func (*Connector) WithSwitchLatency ¶
WithSwitchLatency sets the latency on each switch.