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
{{ message }}
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
The current implementation of RemoveResets will remove resets from registers which have are connected to invalid values within module scope looking through connects. This doesn't look through nodes, however.
Now consider this second circuit which replaces wire tmp with node tmp:
circuit Bar:
module Bar:
input clock: Clock
input reset: UInt<1>
input d: UInt<8>
output q: UInt<8>
wire inv: UInt<8>
inv is invalid
node tmp = inv
reg r: UInt<8>, clock with: (reset => (reset, tmp))
r <= d
q <= r
This produces the following Verilog:
always @(posedge clock) beginif (reset) begin
r <=8'h0;
endelsebegin
r <= d;
endend
This issues is filed just for tracking purposes (and CIRCT will now make the same non-optimization in the node case). This behavior doesn't seem correct, but removing a reset could have surprising consequences.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current implementation of
RemoveResets
will remove resets from registers which have are connected to invalid values within module scope looking through connects. This doesn't look through nodes, however.Consider this first circuit:
The register
r
is emitted as:Now consider this second circuit which replaces
wire tmp
withnode tmp
:This produces the following Verilog:
This issues is filed just for tracking purposes (and CIRCT will now make the same non-optimization in the
node
case). This behavior doesn't seem correct, but removing a reset could have surprising consequences.The text was updated successfully, but these errors were encountered: