Last week, I implemented probe related stuff in Chisel binder (chipsalliance/chisel#3668). In CIRCT, firrtl.ref.rwprobe needs a target attribute with InnerRefAttr type. So I filled inner_sym attribute for all ops that have it. It worked fine then.
In recent days, I've noticed that CIRCT complains an error if an op's inner_sym is filled and not referenced later.
error: unable to lower due to symbol "_WIRE" with target not preserved by lowering
firtool doesn't have this problem, because firtool fills the inner_sym only when it needs to refer to an op result, via function getOrAddInnerSym (called from FIRStmtParser::parseRWProbe).
But in the external program, there is no such information as InnerSymbolNamespace and uint64_t fieldID (because they are private). What would be the best way to handle a situation like the target attribute of rwprobe?
Last week, I implemented probe related stuff in Chisel binder (chipsalliance/chisel#3668). In CIRCT,
firrtl.ref.rwprobe
needs atarget
attribute withInnerRefAttr
type. So I filledinner_sym
attribute for all ops that have it. It worked fine then.In recent days, I've noticed that CIRCT complains an error if an op's
inner_sym
is filled and not referenced later.firtool doesn't have this problem, because firtool fills the
inner_sym
only when it needs to refer to an op result, via functiongetOrAddInnerSym
(called fromFIRStmtParser::parseRWProbe
).But in the external program, there is no such information as
InnerSymbolNamespace
anduint64_t fieldID
(because they are private). What would be the best way to handle a situation like thetarget
attribute ofrwprobe
?