From 039c3a59826de4410dd9257262430729fb0b4000 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 13 Apr 2020 19:08:46 -0700 Subject: kernel: Module::makeblackbox() to clear connections + delete wires last --- kernel/rtlil.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel') diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 196e301b6..3e5896813 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -776,6 +776,7 @@ void RTLIL::Module::makeblackbox() connections_.clear(); remove(delwires); + set_bool_attribute(ID::blackbox); } -- cgit v1.2.3 From b66904e9cdef8cd0e0019f9a1a3a7a13abdcc10c Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 14 Apr 2020 08:18:04 -0700 Subject: Revert "Merge branch 'eddie/kernel_makeblackbox' into eddie/abc9_auto_dff" This reverts commit e08497c7c9d8a6f7a3eccddf2149c45d9ecff207, reversing changes made to e366fd55122236a21c6daee6765724add840a1f9. --- kernel/rtlil.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'kernel') diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 3e5896813..196e301b6 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -776,7 +776,6 @@ void RTLIL::Module::makeblackbox() connections_.clear(); remove(delwires); - set_bool_attribute(ID::blackbox); } -- cgit v1.2.3 From 7812a2959b9b23b44e8144f9edb139f282d623e1 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 16 Apr 2020 10:21:08 -0700 Subject: kernel: TimingInfo to clamp -ve setup/edge-sensitive delays to zero --- kernel/timinginfo.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'kernel') diff --git a/kernel/timinginfo.h b/kernel/timinginfo.h index fb4e0930d..36908868c 100644 --- a/kernel/timinginfo.h +++ b/kernel/timinginfo.h @@ -128,11 +128,9 @@ struct TimingInfo int rise_max = cell->getParam(ID::T_RISE_MAX).as_int(); int fall_max = cell->getParam(ID::T_FALL_MAX).as_int(); int max = std::max(rise_max,fall_max); - if (max < 0) - log_warning("Module '%s' contains specify cell '%s' with T_{RISE,FALL}_MAX < 0 which is currently unsupported. Ignoring.\n", log_id(module), log_id(cell)); - if (max <= 0) { - log_debug("Module '%s' contains specify cell '%s' with T_{RISE,FALL}_MAX <= 0 which is currently unsupported. Ignoring.\n", log_id(module), log_id(cell)); - continue; + if (max < 0) { + log_warning("Module '%s' contains specify cell '%s' with T_{RISE,FALL}_MAX < 0 which is currently unsupported. Clamping to 0.\n", log_id(module), log_id(cell)); + max = 0; } for (const auto &d : dst) { auto &v = t.arrival[NameBit(d)]; @@ -152,11 +150,9 @@ struct TimingInfo if (!c.wire->port_input) log_error("Module '%s' contains specify cell '%s' where DST '%s' is not a module input.\n", log_id(module), log_id(cell), log_signal(dst)); int max = cell->getParam(ID::T_LIMIT_MAX).as_int(); - if (max < 0) - log_warning("Module '%s' contains specify cell '%s' with T_LIMIT_MAX < 0 which is currently unsupported. Ignoring.\n", log_id(module), log_id(cell)); - if (max <= 0) { - log_debug("Module '%s' contains specify cell '%s' with T_LIMIT_MAX <= 0 which is currently unsupported. Ignoring.\n", log_id(module), log_id(cell)); - continue; + if (max < 0) { + log_warning("Module '%s' contains specify cell '%s' with T_LIMIT_MAX < 0 which is currently unsupported. Clamping to 0.\n", log_id(module), log_id(cell)); + max = 0; } for (const auto &s : src) { auto &v = t.required[NameBit(s)]; -- cgit v1.2.3 From b3e2538a140cac36c32b133d4475a052cfc46809 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 21 Apr 2020 14:12:28 -0700 Subject: abc9_ops: fix bypass boxes using (* abc9_bypass *) --- kernel/constids.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/constids.inc b/kernel/constids.inc index 6b40a5908..25996d2d8 100644 --- a/kernel/constids.inc +++ b/kernel/constids.inc @@ -2,10 +2,9 @@ X(A) X(abc9_box) X(abc9_box_id) X(abc9_box_seq) +X(abc9_bypass) X(abc9_carry) X(abc9_flop) -X(abc9_holes) -X(abc9_init) X(abc9_lut) X(abc9_mergeability) X(abc9_scc) -- cgit v1.2.3 From 7146c0339e0b79ec24bc89e7fdf15331436e0e53 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 21 Apr 2020 17:03:28 -0700 Subject: timinginfo: ignore $specify2 cells if EN is false --- kernel/timinginfo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kernel') diff --git a/kernel/timinginfo.h b/kernel/timinginfo.h index 36908868c..d818e580b 100644 --- a/kernel/timinginfo.h +++ b/kernel/timinginfo.h @@ -82,6 +82,9 @@ struct TimingInfo for (auto cell : module->cells()) { if (cell->type == ID($specify2)) { + auto en = cell->getPort(ID::EN); + if (en.is_fully_const() && !en.as_bool()) + continue; auto src = cell->getPort(ID::SRC); auto dst = cell->getPort(ID::DST); for (const auto &c : src.chunks()) -- cgit v1.2.3 From 67fc0c3698693f049e805211c49d6219f17d7c7d Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 14 May 2020 16:44:35 -0700 Subject: abc9: use (* abc9_keep *) instead of (* abc9_scc *); apply to $_DFF_?_ instead of moving them to $__ prefix --- kernel/constids.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel') diff --git a/kernel/constids.inc b/kernel/constids.inc index 25996d2d8..345bfaee8 100644 --- a/kernel/constids.inc +++ b/kernel/constids.inc @@ -5,9 +5,9 @@ X(abc9_box_seq) X(abc9_bypass) X(abc9_carry) X(abc9_flop) +X(abc9_keep) X(abc9_lut) X(abc9_mergeability) -X(abc9_scc) X(abc9_scc_id) X(abcgroup) X(ABITS) -- cgit v1.2.3