You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled across the following use of SourceAnnotation/SinkAnnotation in the wild which tries to wire an abstract Reset signal to a concrete UInt<1>:
circuit Foo : %[[
{
"class":"firrtl.passes.wiring.SourceAnnotation",
"target":"~Foo|Bar>y",
"pin":"xyz"
},
{
"class":"firrtl.passes.wiring.SinkAnnotation",
"target":"~Foo|Foo>x",
"pin":"xyz"
}
]]
module Bar :
wire y : Reset
y is invalid
module Foo :
inst bar of Bar
wire x : UInt<1>
x is invalid
Running this through firtool --parse-only produces the following error:
input.fir:14:5: error: Wiring Problem source type '!firrtl.reset' does not match sink type '!firrtl.uint<1>'
wire y : Reset
^
input.fir:19:5: note: The sink is here.
wire x : UInt<1>
^
Related to #4496 which added support for lowering some of these legacy wiring annotations as WiringProblems.
The issue is that the LowerAnnotations pass already checks for the types of the source/sink to line up. But the abstract Reset type only gets eliminated in InferResets, which runs after this pass. So we either have to make the anno lowering more lenient (accepting compatible types), or move the type checking to a later point when we actually deal with materializing XMRs or the wires themselves.
The text was updated successfully, but these errors were encountered:
I stumbled across the following use of
SourceAnnotation
/SinkAnnotation
in the wild which tries to wire an abstractReset
signal to a concreteUInt<1>
:Running this through
firtool --parse-only
produces the following error:Related to #4496 which added support for lowering some of these legacy wiring annotations as
WiringProblem
s.The issue is that the
LowerAnnotations
pass already checks for the types of the source/sink to line up. But the abstractReset
type only gets eliminated inInferResets
, which runs after this pass. So we either have to make the anno lowering more lenient (accepting compatible types), or move the type checking to a later point when we actually deal with materializing XMRs or the wires themselves.The text was updated successfully, but these errors were encountered: