aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Harder <me@jix.one>2022-06-29 17:53:58 +0200
committerJannis Harder <me@jix.one>2022-06-30 12:09:04 +0200
commit5db542742b8f69405417e5a715b4b72ce4c78534 (patch)
tree00ad832cc6a32751142e1648bcb713b00656a7c2
parentb80976b543fc9f19d8ac5e574b904f1f8c67cd49 (diff)
downloadyosys-5db542742b8f69405417e5a715b4b72ce4c78534.tar.gz
yosys-5db542742b8f69405417e5a715b4b72ce4c78534.tar.bz2
yosys-5db542742b8f69405417e5a715b4b72ce4c78534.zip
async2sync: turn FFs with const clks into gclk FFs with feedback
The formal backends do not support multiple clocks. This includes constant clocks. Constant clocks do appear in what isn't a proper multiclock design, for example when mapping not fully initialized ROMs. As converting FFs with constant clocks to FFs using the global is doable even in a single clock flow, make async2sync do this.
-rw-r--r--passes/sat/async2sync.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/passes/sat/async2sync.cc b/passes/sat/async2sync.cc
index 46c76eba9..6fdf470b1 100644
--- a/passes/sat/async2sync.cc
+++ b/passes/sat/async2sync.cc
@@ -75,6 +75,9 @@ struct Async2syncPass : public Pass {
if (ff.has_gclk)
continue;
+ if (ff.has_clk && ff.sig_clk.is_fully_const())
+ ff.has_ce = ff.has_clk = ff.has_srst = false;
+
if (ff.has_clk)
{
if (ff.has_sr) {