Skip to main content

merlin

Merlin consists of models used for the simulation of high-performance interconnects. The models conform to the SimpleNetwork interface and consist of a configurable input/output queued high-radix router, and network interface for use by the endpoint model. The router supports multiple network topologies and has pluggable implementations for crossbar arbitration and output arbitration. Merlin is primarily designed to model system-level interconnects, but is sufficiently flexible to be used as a node-level network as well.

At a Glance

Source Code: sst-elements/.../merlin  
SST Name: merlin  
Maturity Level: Mature (3)  
Development Path: Active  
Last Released: SST 16.1

Required dependencies​

None

Optional dependencies​

None

Elements​

Use sst-info merlin or sst-info merlin.<element> to see each element's parameters, ports, and statistics. Most networks are built with the sst.merlin.* Python modules (sst.merlin.base, sst.merlin.topology, sst.merlin.router, sst.merlin.interface, sst.merlin.endpoint, and sst.merlin.targetgen) rather than by creating these elements directly; see the example below. The top-level sst.merlin module is an older, deprecated API kept for existing scripts and should not be used for new configurations.

LibraryElementTypeDescription
merlinhr_routerComponentHigh-radix router; the router used by all Merlin topologies
merlinBridgeComponentBridge that connects two separate Merlin networks
merlintrafficgenComponentEndpoint that generates traffic using a configurable address pattern
merlinoffered_loadComponentEndpoint that measures latency as offered load varies
merlinbackground_trafficComponentEndpoint that generates pattern-based background traffic alongside other network jobs
merlintest_nicComponentTest endpoint that checks basic network functionality
merlinbisection_testComponentTest endpoint that measures network bisection bandwidth
merlinpt2pt_testComponentTest endpoint that measures point-to-point latency and bandwidth
merlinroute_testComponentTest endpoint that checks routing
merlinshift_nicComponentTest endpoint that sends a shift traffic pattern
merlinsimple_patterns.incastComponentTest endpoint that sends an incast traffic pattern
merlinsimple_patterns.emptyComponentEndpoint that connects to the network but sends no traffic; fills unused network ports
merlinlinkcontrolSubComponentStandard network interface for endpoints (SimpleNetwork API)
merlinreorderlinkcontrolSubComponentNetwork interface that restores packet order for networks that can deliver packets out of order
merlinendpointNICSubComponentNetwork interface with a pipeline of pluggable functions (e.g., sourceRoutingPlugin)
merlinsourceRoutingPluginSubComponentendpointNIC plugin that adds source-routing headers to packets
merlinportcontrolSubComponentPort controller used by hr_router for each router port
merlinarb.output.basicSubComponentBasic output-port arbitration for portcontrol
merlinarb.output.qos.multiSubComponentMulti-level output-port arbitration with quality-of-service support for portcontrol
merlinxbar_arb_lruSubComponentLeast-recently-used crossbar arbitration for hr_router
merlinxbar_arb_lru_infxSubComponentLeast-recently-used crossbar arbitration for hr_router, modeling an "infinite" crossbar
merlinxbar_arb_ageSubComponentAge-based crossbar arbitration for hr_router
merlinxbar_arb_randSubComponentRandom crossbar arbitration for hr_router
merlinxbar_arb_rrSubComponentRound-robin crossbar arbitration for hr_router
merlinsinglerouterSubComponentTopology with a single router
merlinmeshSubComponentMulti-dimensional mesh topology
merlintorusSubComponentMulti-dimensional torus topology
merlinhyperxSubComponentMulti-dimensional HyperX topology
merlinfattreeSubComponentFat-tree topology
merlindragonflySubComponentDragonfly topology with an all-to-all pattern within each group
merlinpolarflySubComponentPolarFly topology, a diameter-2 topology that scales to large networks at low cost
merlinpolarstarSubComponentPolarStar topology, a highly scalable diameter-3 topology
merlinanytopoSubComponentTopology read from an external file; supports source routing and per-hop destination-tag routing
merlintargetgen.uniformSubComponentTraffic target generator that picks uniformly random destinations
merlintargetgen.bit_complementSubComponentTraffic target generator that sends to the bit-complement destination (num_peers - 1 - id)
merlintargetgen.shiftSubComponentTraffic target generator that sends to the destination shift endpoints away
merlincircuit_network_inspectorSubComponentNetwork inspector that counts circuits (as in circuit switching) through a router
merlintest_network_inspectorSubComponentNetwork inspector used to test the NetworkInspector API
merlinarb.base.single.lruModuleLeast-recently-used arbitration helper, used when one match per round is needed
merlinarb.base.single.roundrobinModuleRound-robin arbitration helper, used when one match per round is needed
Building a 4x4 torus with the sst.merlin.* modules (based on merlin/tests/polarfly_455_test.py)
import sst
from sst.merlin.base import *
from sst.merlin.endpoint import *
from sst.merlin.interface import *
from sst.merlin.topology import *

# Topology
topo = topoTorus()
topo.shape = "4x4"
topo.width = "1x1"
topo.local_ports = 1
topo.link_latency = "20ns"

# Router
router = hr_router()
router.link_bw = "4GB/s"
router.flit_size = "8B"
router.xbar_bw = "6GB/s"
router.input_latency = "20ns"
router.output_latency = "20ns"
router.input_buf_size = "4kB"
router.output_buf_size = "4kB"
router.xbar_arb = "merlin.xbar_arb_lru"
topo.router = router

# Endpoints and their network interface
networkif = LinkControl()
networkif.link_bw = "4GB/s"
networkif.input_buf_size = "1kB"
networkif.output_buf_size = "1kB"

ep = TestJob(0, topo.getNumNodes())
ep.network_interface = networkif

system = System()
system.setTopology(topo)
system.allocateNodes(ep, "linear")
system.build()