dfflegalize: Prefer mapping dff to sdff before adff
authorMarcelina Kościelnicka <mwk@0x04.net>
Sun, 5 Jul 2020 02:57:24 +0000 (04:57 +0200)
committerMarcelina Kościelnicka <mwk@0x04.net>
Sun, 5 Jul 2020 10:01:43 +0000 (12:01 +0200)
This ensures that, when both sync and async FFs are available and abc9
is involved, the sync FFs will be used, and will thus remain available
for sequential synthesis.

passes/techmap/dfflegalize.cc

index 7f2cdc6accea9e6f1317f6e3b35691861ebddd18..b2fe90702da7e1ff454fa5c3a2d47a9bd62b3fb7 100644 (file)
@@ -364,7 +364,7 @@ flip_dqi:
                                // Some DFF is supported with this init val.  Just pick a type.
                                if (ff_type == FF_DFF) {
                                        // Try adding a set or reset pin.
-                                       for (auto new_type: {FF_ADFF0, FF_ADFF1, FF_SDFF0, FF_SDFF1})
+                                       for (auto new_type: {FF_SDFF0, FF_SDFF1, FF_ADFF0, FF_ADFF1})
                                                if (supported_cells[new_type] & initmask) {
                                                        ff_type = new_type;
                                                        sig_r = State::S0;