diff options
author | gatecat <gatecat@ds0.me> | 2021-05-14 21:13:43 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | dce847b2f3ab5257b41c2c12c2146ef400d56135 (patch) | |
tree | 9769b3de082aa8edc0ba446454e7f74c7ab71520 | |
parent | b29fa1d24c44f7f6454158d27e751203c2d9e099 (diff) | |
download | nextpnr-dce847b2f3ab5257b41c2c12c2146ef400d56135.tar.gz nextpnr-dce847b2f3ab5257b41c2c12c2146ef400d56135.tar.bz2 nextpnr-dce847b2f3ab5257b41c2c12c2146ef400d56135.zip |
mistral: Trim SDATA if SLOAD is low
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r-- | mistral/pack.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mistral/pack.cc b/mistral/pack.cc index f8c55cd1..e704160c 100644 --- a/mistral/pack.cc +++ b/mistral/pack.cc @@ -167,6 +167,15 @@ struct MistralPacker if (ci->type != id_MISTRAL_NOT && ci->type != id_GND && ci->type != id_VCC) process_inv_constants(cell.second); } + // Special case - SDATA can only be trimmed if SLOAD is low + for (auto cell : sorted(ctx->cells)) { + CellInfo *ci = cell.second; + if (ci->type != id_MISTRAL_FF) + continue; + if (ci->get_pin_state(id_SLOAD) != PIN_0) + continue; + disconnect_port(ctx, ci, id_SDATA); + } // Remove superfluous inverters and constant drivers trim_design(); } |