Open dtzSiFive opened 1 year ago
Reachable from this OMIR-leveraging input:
circuit OMIRField: %[[
{ "class": "freechips.rocketchip.objectmodel.OMIRAnnotation",
"nodes": [
{
"fields": [
{
"info": "",
"name": "track",
"value": "OMDontTouchedReferenceTarget:~OMIRField|OMIRField>n"
}
],
"id": "OMID:0",
"info": "dummy"
}
]
}
]]
module OMIRField:
input x : {a: UInt<5>, b: UInt<0>}
output nb : UInt
node n = x
nb <= n.b
Other declarations as well, such as registers. Here's one reachable from FIRRTL:
FIRRTL version 4.0.0
circuit OMIRZW:
public module OMIRZW:
input x : {a: UInt<5>, b: UInt<0>}
input c : Clock
input reset : UInt<1>
output out : UInt<0>
output r_path : Path
regreset r : UInt, c, reset, UInt<0>(0)
connect r, x.b
connect out, r
propassign r_path, path("OMReferenceTarget:~OMIRZW|OMIRZW>r")
Consider this MLIR example:
Feeding through LowerToHW:
circt-opt --lower-firrtl-to-hw
produces:And if run through
firtool
directly, produces:The non-failing error isn't great and should be fixed (cc #4770 for similar in adjacent code). Also, this should be caught by the verifier in HW but that support isn't in place yet (cc #3526).
Moving the symbol to a port produces an error, modified input:
Error: