Added GP_DFF INIT parameter
authorClifford Wolf <clifford@clifford.at>
Wed, 23 Mar 2016 07:12:54 +0000 (08:12 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 23 Mar 2016 07:12:54 +0000 (08:12 +0100)
techlibs/greenpak4/cells_sim.v
techlibs/greenpak4/synth_greenpak4.cc

index d9ddaaccf370641fe4417afebcaff66d4ab82429..f8593b9fb60cb83ae188175794686d2fd6893967 100644 (file)
@@ -1,4 +1,6 @@
 module GP_DFF(input D, CLK, nRSTZ, nSETZ, output reg Q);
+       parameter [0:0] INIT = 1'bx;
+       initial Q = INIT;
        always @(posedge CLK, negedge nRSTZ, negedge nSETZ) begin
                if (!nRSTZ)
                        Q <= 1'b0;
index 30ed8f74c50d27fa0d739081825a4b2c0f14182c..7d43cf579da3d840acd565e0d7bba278e2b14c00 100644 (file)
@@ -98,6 +98,7 @@ struct SynthGreenPAK4Pass : public Pass {
                log("\n");
                log("    map_cells:\n");
                log("        techmap -map +/greenpak4/cells_map.v\n");
+               log("        dffinit -ff GP_DFF Q INIT\n");
                log("        clean\n");
                log("\n");
                log("    check:\n");
@@ -205,6 +206,7 @@ struct SynthGreenPAK4Pass : public Pass {
                if (check_label(active, run_from, run_to, "map_cells"))
                {
                        Pass::call(design, "techmap -map +/greenpak4/cells_map.v");
+                       Pass::call(design, "dffinit -ff GP_DFF Q INIT");
                        Pass::call(design, "clean");
                }