From ca1d7ccffe0c13bb31dc09694898dca74ad4b525 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 30 Jan 2016 22:38:08 +0000 Subject: [PATCH] Temporary fix for br993 - assertion failure in flip-flop synthesis. (cherry-picked from master branch) Synthesis does not currently support some commonly used styles for representing flip-flops, e.g. q <= 0; if (en) q <= 1; or if (clr) q <= 0; if (set) q <= 1; For now, output a "sorry" message. --- synth2.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/synth2.cc b/synth2.cc index 24fb80a03..3d3805891 100644 --- a/synth2.cc +++ b/synth2.cc @@ -1421,6 +1421,16 @@ bool NetBlock::synth_sync(Design*des, NetScope*scope, are used to collect the outputs from the substatement for the inputs of the FF bank. */ NetBus tmp_out (scope, tmp_set.size()); + for (unsigned idx = 0 ; idx < tmp_out.pin_count() ; idx += 1) { + unsigned ptr = nex_map.find_nexus(tmp_set[idx]); + ivl_assert(*this, ptr < nex_out.pin_count()); + if (nex_out.pin(ptr).is_linked()) { + cerr << get_fileline() << ": sorry: multiple statements " + "assigning to the same flip-flop are not yet " + "supported in synthesis." << endl; + return false; + } + } /* Create a temporary ff_ce (FF clock-enable) that accounts for the subset of outputs that this