diff options
author | David Shah <davey1576@gmail.com> | 2018-07-20 11:36:32 +0200 |
---|---|---|
committer | David Shah <davey1576@gmail.com> | 2018-07-20 11:36:32 +0200 |
commit | 3bad9c26cff1ba2da7f1810e5915246874780744 (patch) | |
tree | 9805b386e407176e2bb633645cbf5f12928a09dd /ice40/arch.cc | |
parent | 79dc910b40b082c9d74d010557b7939fb18535fe (diff) | |
download | nextpnr-3bad9c26cff1ba2da7f1810e5915246874780744.tar.gz nextpnr-3bad9c26cff1ba2da7f1810e5915246874780744.tar.bz2 nextpnr-3bad9c26cff1ba2da7f1810e5915246874780744.zip |
ice40: Optimise reset/enable net checking
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r-- | ice40/arch.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index 1aa02294..786d8ba1 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -25,7 +25,7 @@ #include "placer1.h" #include "router1.h" #include "util.h" - +#include "cells.h" NEXTPNR_NAMESPACE_BEGIN // ----------------------------------------------------------------------- @@ -704,6 +704,14 @@ void Arch::assignArchInfo() NetInfo *ni = net.second.get(); if (isGlobalNet(ni)) ni->is_global = true; + ni->is_enable = false; + ni->is_reset = false; + for (auto usr : ni->users) { + if (is_enable_port(this, usr)) + ni->is_enable = true; + if (is_reset_port(this, usr)) + ni->is_reset = true; + } } for (auto &cell : getCtx()->cells) { CellInfo *ci = cell.second.get(); |