Cleanup ice40
authorEddie Hung <eddie@fpgeh.com>
Fri, 26 Apr 2019 21:31:59 +0000 (14:31 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 26 Apr 2019 21:31:59 +0000 (14:31 -0700)
techlibs/ice40/synth_ice40.cc

index 8899bfcc4aafdbaa168fb0a20efa2d3ad07fb884..5de33110aab84231a21810302b9bd3416d8ba813 100644 (file)
@@ -225,11 +225,13 @@ struct SynthIce40Pass : public ScriptPass
                        run("proc");
                }
 
-               if (flatten && check_label("flatten", "(unless -noflatten)"))
+               if (check_label("flatten", "(unless -noflatten)"))
                {
-                       run("flatten");
-                       run("tribuf -logic");
-                       run("deminout");
+                       if (flatten) {
+                               run("flatten");
+                               run("tribuf -logic");
+                               run("deminout");
+                       }
                }
 
                if (check_label("coarse"))