sst-elements
sst-elements copied to clipboard
hr_router: no propagation of `StandardMem::Request` during initialization from custom component
Hello,
I am using a simple configuration as follows:
In practice, there are more components, but this is essentially it.
Actual configuration code with some redaction
import os
import sys
import sst
cpu = sst.Component("core", "my.custom_component")
cpu.addParams({
<redacted>
})
iface = cpu.setSubComponent("mem", "memHierarchy.standardInterface")
iface.addParams({"verbose": 0, "debug": 0, "debug_level": 0})
cpu_nic = iface.setSubComponent("memlink", "memHierarchy.MemNIC")
cpu_nic.addParams({"group": 0, "network_bw": "25GB/s"})
chiprtr = sst.Component("chiprtr", "merlin.hr_router")
chiprtr.addParams({
"id": 0,
"num_ports": "2",
"input_buf_size": "4kB",
"output_buf_size": "4kB",
"flit_size": "8B",
"xbar_bw": "4GB/s",
"link_bw": "4GB/s",
"link_latency": "1ns",
"input_latency": "1ns",
"output_latency": "1ns",
"topology": "merlin.singlerouter",
})
chiprtr.setSubComponent("topology", "merlin.singlerouter")
memctrl = sst.Component("memory", "memHierarchy.MemController")
memctrl.addParams({
"debug" : 0,
"debug_level" : 10,
"clock" : "1GHz",
"addr_range_end" : 512*1024*1024-1,
})
mem_nic = memctrl.setSubComponent("cpulink", "memHierarchy.MemNIC")
mem_nic.addParams({"group" : 1, "network_bw" : "25GB/s"})
memory = memctrl.setSubComponent("backend", "memHierarchy.simpleMem")
memory.addParams({
"access_time" : "10 ns",
"mem_size" : "512MiB",
"request_width": 64,
})
link_cpu_rtr = sst.Link("link_cpu")
link_cpu_rtr.connect( (cpu_nic, "port", "100ps"), (chiprtr, "port0", "100ps") )
link_mem_rtr = sst.Link("link_mem")
link_mem_rtr.connect( (mem_nic, "port", "100ps"), (chiprtr, "port1", "100ps") )
My problem arises during initialization, in my custom component, I am trying to use SST::Interface::StandardMem::sendUntimedData()
to send SST::Interface::StandardMem::Write
requests containing data I would like to be present in my memory. But it does not work, as far as I can tell, it does not end up writing to memory.
However, if I remove the merlin router, and connect the memory and custom component directly (using memHierarchy.MemLink
instead of memHierarchy.MemNIC
, then it initializes just fine. Reading some of the CPP source. Notably: https://github.com/sstsimulator/sst-elements/blob/0d612004114daec1be8028cf4b05ec57d8481712/src/sst/elements/merlin/hr_router/hr_router.cc#L463 and https://github.com/sstsimulator/sst-elements/blob/0d612004114daec1be8028cf4b05ec57d8481712/src/sst/elements/merlin/topology/singlerouter.cc#L54
It looks to me like routing of messages should occur during initialization, therefore I am wondering the following:
- Is this a config issue with the
MemNIC
- Or is it a config issue with the
hr_router
- Or is it a config issue with the topology of the router
- Or is is not implemented in one of the components being used here?
Any help would be appreciated. Thanks in advance,
Sébastien