From 172315602718ceabf45e69040912a1fdb81056c2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 12 Sep 2024 08:38:53 +0200 Subject: [PATCH] Reset and Load restriction --- himbaechel/uarch/ng-ultra/ng_ultra.cc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/himbaechel/uarch/ng-ultra/ng_ultra.cc b/himbaechel/uarch/ng-ultra/ng_ultra.cc index 407a76e6..be084724 100644 --- a/himbaechel/uarch/ng-ultra/ng_ultra.cc +++ b/himbaechel/uarch/ng-ultra/ng_ultra.cc @@ -455,8 +455,11 @@ template bool check_assign_sig(std::array &sig_set struct SectionFEWorker { - std::array clk{}; - std::array reset_load{}; + std::array clk{}; // from local system matrix + std::array reset{}; // from local system matrix + std::array load{}; // from local system matrix + std::array shared{}; // 1 from local system matrix + // Additional R and L can be used from RI network bool run(const NgUltraImpl *impl,const Context *ctx, BelId bel, CellInfo *cell) { Loc loc = ctx->getBelLocation(bel); @@ -464,13 +467,14 @@ struct SectionFEWorker const CellInfo *ff = ctx->getBoundBelCell(ctx->getBelByLocation(Loc(loc.x,loc.y,id))); if (ff == nullptr) continue; - // TODO: This restriction is too limited, need to revisit - /* - if (!check_assign_sig(reset_load, ff->getPort(id_R))) - return false; - if (!check_assign_sig(reset_load, ff->getPort(id_L))) - return false; - */ + if (!check_assign_sig(reset, ff->getPort(id_R))) { + if (!check_assign_sig(shared, ff->getPort(id_R))) + return false; + } + if (!check_assign_sig(load, ff->getPort(id_L))) { + if (!check_assign_sig(shared, ff->getPort(id_L))) + return false; + } if (!check_assign_sig(clk, ff->getPort(id_CK))) return false; }