summaryrefslogtreecommitdiff
path: root/techlibs/ice40/ice40_ffssr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'techlibs/ice40/ice40_ffssr.cc')
-rw-r--r--techlibs/ice40/ice40_ffssr.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/techlibs/ice40/ice40_ffssr.cc b/techlibs/ice40/ice40_ffssr.cc
index 9ebc3c0d..9afbc0fc 100644
--- a/techlibs/ice40/ice40_ffssr.cc
+++ b/techlibs/ice40/ice40_ffssr.cc
@@ -35,7 +35,7 @@ struct Ice40FfssrPass : public Pass {
}
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
{
- log_header("Executing ICE40_FFSSR pass (merge synchronous set/reset into FF cells).\n");
+ log_header(design, "Executing ICE40_FFSSR pass (merge synchronous set/reset into FF cells).\n");
size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++)
@@ -81,7 +81,12 @@ struct Ice40FfssrPass : public Pass {
for (auto cell : ff_cells)
{
- SigBit bit_d = sigmap(cell->getPort("\\D"));
+ SigSpec sig_d = cell->getPort("\\D");
+
+ if (GetSize(sig_d) < 1)
+ continue;
+
+ SigBit bit_d = sigmap(sig_d[0]);
if (sr_muxes.count(bit_d) == 0)
continue;