diff --git a/planning/src/RS/rsCheck.cpp b/planning/src/RS/rsCheck.cpp index 400e2098..571b5430 100644 --- a/planning/src/RS/rsCheck.cpp +++ b/planning/src/RS/rsCheck.cpp @@ -106,13 +106,15 @@ bool do_check_blif(CStr cfn, ls << "-----\n"; { - uint nISERD = 0, nDSP38 = 0, nDSP19X = 0, nTDP_RAM36K = 0, nTDP_RAM18K = 0; - bfile.countMOGs(nISERD, nDSP38, nDSP19X, nTDP_RAM36K, nTDP_RAM18K); + uint nISERD = 0, nDSP38 = 0, nDSP19X = 0, + nTDP_RAM36K = 0, nTDP_RAM18K = 0, nCARRY = 0; + bfile.countMOGs(nISERD, nDSP38, nDSP19X, nTDP_RAM36K, nTDP_RAM18K, nCARRY); ls << "----- #I_SERDES= " << nISERD << endl; ls << "----- #DSP19X= " << nDSP19X << endl; ls << "----- #DSP38= " << nDSP38 << endl; ls << "----- #TDP_RAM36K= " << nTDP_RAM36K << endl; ls << "----- #TDP_RAM18KX2= " << nTDP_RAM18K << endl; + ls << "----- #CARRY= " << nCARRY << endl; } ls << "-----\n"; ls << "----- PinGraph: " << bfile.pinGraphFile_ << endl; diff --git a/planning/src/file_io/pln_blif_file.cpp b/planning/src/file_io/pln_blif_file.cpp index 7e129b2d..7a01c4fd 100644 --- a/planning/src/file_io/pln_blif_file.cpp +++ b/planning/src/file_io/pln_blif_file.cpp @@ -619,7 +619,7 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept { return n; } - os << "--- nodes (" << n << ") :" << endl; + os << "----- nodes (" << n << ") :" << endl; for (uint i = 1; i <= n; i++) { const BNode& nd = nodePool_[i]; CStr pts = nd.cPrimType(); @@ -641,7 +641,8 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept { prnArray(os, A, sz, " "); } - if (trace_ >= 5) { + bool hasSigs = bool(nd.inPins_.size()) or bool(nd.inSigs_.size()); + if (trace_ >= 5 and hasSigs) { const string* A = nd.inPins_.data(); size_t sz = nd.inPins_.size(); os_printf(os, " ##inPins=%zu ", sz); @@ -819,9 +820,10 @@ void BLIF_file::countBUFs(uint& nIBUF, uint& nOBUF, uint& nCBUF) const noexcept void BLIF_file::countMOGs(uint& nISERD, uint& nDSP38, uint& nDSP19, - uint& nRAM36, uint& nRAM18 + uint& nRAM36, uint& nRAM18, + uint& nCARRY ) const noexcept { - nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = 0; + nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = nCARRY = 0; uint nn = numNodes(); if (nn == 0) return; @@ -851,6 +853,10 @@ void BLIF_file::countMOGs(uint& nISERD, } if (pt == TDP_RAM18KX2) { nRAM18++; + continue; + } + if (pt == CARRY) { + nCARRY++; } } } @@ -1815,7 +1821,7 @@ bool BLIF_file::linkNodes() noexcept { int pinIndex = -1; BNode* par = findFabricParent(nd.id_, nd.out_, pinIndex); if (!par) { - if (nd.is_RAM() or nd.is_DSP()) { + if (nd.is_RAM() or nd.is_DSP() or nd.is_CARRY()) { const string& net = nd.out_; uint rid = nd.realId(*this); BNode& realNd = bnodeRef(rid); @@ -1826,7 +1832,7 @@ bool BLIF_file::linkNodes() noexcept { assert(dataTerm < int64_t(realData.size())); if (dataTerm < 0) continue; - // RAM or DSP output bits may be unused + // RAM or DSP or CARRY output bits may be unused if (trace_ >= 4) { lprintf("skipping dangling cell output issue for %s at line %u\n", realNd.cPrimType(), realNd.lnum_); @@ -2293,10 +2299,8 @@ bool BLIF_file::createPinGraph() noexcept { // lputs3(); kid = pg_.findNode(key); if (kid) { - if (trace_ >= 8) { - lprintf("\t\t ___ found nid %u '%s' for key %zu", - kid, pg_.cnodeName(kid), key); - } + lprintf("\t\t ___ found nid %u '%s' for key %zu", + kid, pg_.cnodeName(kid), key); } else { kid = pg_.insK(key); diff --git a/planning/src/file_io/pln_blif_file.h b/planning/src/file_io/pln_blif_file.h index 026aa36b..29926aa0 100644 --- a/planning/src/file_io/pln_blif_file.h +++ b/planning/src/file_io/pln_blif_file.h @@ -201,6 +201,9 @@ struct BLIF_file : public fio::MMapReader bool is_clockLess_DSP() const noexcept { return isClockLess_ and prim::pr_is_DSP(ptype_); } + bool is_CARRY() const noexcept { + return ptype_ == prim::CARRY; + } bool canDriveClockNode() const noexcept { return isTopInput() or is_CLK_BUF() or ptype_ == prim::I_SERDES; @@ -322,7 +325,7 @@ struct BLIF_file : public fio::MMapReader void countBUFs(uint& nIBUF, uint& nOBUF, uint& nCBUF) const noexcept; void countMOGs(uint& nISERD, uint& nDSP38, uint& nDSP19X, - uint& nRAM36, uint& nRAM18) const noexcept; + uint& nRAM36, uint& nRAM18, uint& nCARRY) const noexcept; uint typeHist(prim::Prim_t t) const noexcept { return typeHistogram_[t]; } diff --git a/planning/src/main.cpp b/planning/src/main.cpp index bd54d259..853db45b 100644 --- a/planning/src/main.cpp +++ b/planning/src/main.cpp @@ -1,4 +1,4 @@ -static const char* _pln_VERSION_STR = "pln0361"; +static const char* _pln_VERSION_STR = "pln0362"; #include "RS/rsEnv.h" #include "util/pln_log.h"