We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't this line read:
raise LegalizeValue(value.offset, range(1 << len(value.offset)))
Currently this:
from nmigen import * from nmigen.cli import main m = Module() p = Signal(4, reset=0b11) a = Signal(1, reset = 1) m.d.sync += p.part(a, 1).eq(0) if __name__ == "__main__": main(m)
just generates one assignment:
/* Generated by Yosys 0.8+152 (git sha1 2a8e5bf9, gcc 8.2.0-r6 -fPIC -O3) */ (* top = 1 *) (* generator = "nMigen" *) module top(rst, clk, a); (* src = "cdc.py:6" *) reg [3:0] \$next\p ; (* src = "cdc.py:7" *) input a; (* src = "/home/robin/.local/lib/python3.7/site-packages/nmigen/hdl/ir.py:304" *) input clk; (* init = 4'h3 *) (* src = "cdc.py:6" *) reg [3:0] p = 4'h3; (* src = "/home/robin/.local/lib/python3.7/site-packages/nmigen/hdl/ir.py:304" *) input rst; always @(posedge clk) p <= \$next\p ; always @* begin \$next\p = p; casez (a) 1'hz: \$next\p [0] = 1'h0; endcase casez (rst) 1'h1: \$next\p = 4'h3; endcase end endmodule
which does not seem equivalent to the described logic.
The text was updated successfully, but these errors were encountered:
You're right! Good catch.
Sorry, something went wrong.
a57c72d
No branches or pull requests
Shouldn't this line read:
Currently this:
just generates one assignment:
which does not seem equivalent to the described logic.
The text was updated successfully, but these errors were encountered: