-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
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
Illegal Verilog output after 'proc_prune'; assigns 'reg' from a constant #2035
Comments
So, What are you trying to do exactly? |
Mh well it says "Unintended changes in simulation behavior are possible!"
I have a small nMigen design around minerva which fails during synthesis in ISE after a recent change minerva-cpu/minerva@890975e . This is the troublesome part of the Verilog code from nMigen (
|
Hm, you're right, and my initial assessment was incorrect--this has nothing to do with processes. Rather this is an interesting corner case and a bug in |
As a workaround I suggest you use the complete |
I've looked closer at this and I'm afraid it'll require some fairly significant re-engineering of the Verilog backend to properly fix. |
Before this commit, in a process like: process $group_0 assign $o 2'00 attribute \full_case 1 switch \x case 1'1 assign $o [0] 1'1 case assign $o [0] 1'0 end end "assign $o 2'00" would be promoted to "connect $o [1] 1'0". Mixing assign and connect statements to different bits of the same signal results in incorrect codegen from the write_verilog backend. After this commit, "assign $o 2'00" is pruned to "assign $o [1] 1'0" as a workaround. Fixes YosysHQ#2035.
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post72 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post73 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post74 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post76 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post77 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post79 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post80 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post81 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post82 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post84 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post85 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post86 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post87 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post88 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post89 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post90 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post91 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post92 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post94 from https://github.com/litex-hub/litex-data-auto
Updated data to v0.0-99-g0b5f6b2 based on 0b5f6b2 from https://github.com/lambdaconcept/minerva. > commit 0b5f6b2 > Author: Jean-François Nguyen <[email protected]> > Date: Fri Jan 22 15:20:35 2021 +0100 > > fetch: workaround YosysHQ/yosys#2035. > Updated using 0.0.post95 from https://github.com/litex-hub/litex-data-auto
Will be fixed by #4314. |
Steps to reproduce the issue
The following procedure generates illegal Verilog (at least XST fails and quick research tells me it cannot be blamed).
assign a_pc[1:0] = 2'h0;
(outside an always block)When the ilang code is changed so that the default case is named explicitly (
case
->case 1'1
) then the Verilog code is as expected.Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: