This issue is really low priority, just wanted to record it. Inlining a module instance should cause the names of all things to be prefixed with the instance's name. The issue in MFC is that memories have a single name representing the module name and the instance name, and so we have no way to modify the name of one without the other.
test.fir
circuit Top:
module Top:
input r : {addr: UInt<4>, en: UInt<1>, clk: Clock, flip data: UInt<8>}
input w : {addr: UInt<4>, en: UInt<1>, clk: Clock, data: UInt<8>, mask: UInt<1>}
inst bar of Bar
bar.r <= r
bar.w <= w
module Bar:
input r : {addr: UInt<4>, en: UInt<1>, clk: Clock, flip data: UInt<8>}
input w : {addr: UInt<4>, en: UInt<1>, clk: Clock, data: UInt<8>, mask: UInt<1>}
mem memory:
data-type => UInt<8>
depth => 16
reader => r
writer => w
read-latency => 1
write-latency => 1
read-under-write => undefined
memory.r <= r
memory.w <= w
This issue is really low priority, just wanted to record it. Inlining a module instance should cause the names of all things to be prefixed with the instance's name. The issue in MFC is that memories have a single name representing the module name and the instance name, and so we have no way to modify the name of one without the other.
test.fir
test.anno.json
Running through MFC
./bin/firtool --repl-seq-mem -repl-seq-mem-file=out.conf --strip-debug-info test.fir --annotation-file=test.anno.json
The name of the instance should be
bar_memory
.Running through SFC:
firrtl -i test.fir -o test -frsq -c:Top:-o:out.conf --inline Top.Bar