@@ -619,7 +619,7 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept {
619619 return n;
620620 }
621621
622- os << " --- nodes (" << n << " ) :" << endl;
622+ os << " ----- nodes (" << n << " ) :" << endl;
623623 for (uint i = 1 ; i <= n; i++) {
624624 const BNode& nd = nodePool_[i];
625625 CStr pts = nd.cPrimType ();
@@ -641,7 +641,8 @@ uint BLIF_file::printNodes(std::ostream& os) const noexcept {
641641 prnArray (os, A, sz, " " );
642642 }
643643
644- if (trace_ >= 5 ) {
644+ bool hasSigs = bool (nd.inPins_ .size ()) or bool (nd.inSigs_ .size ());
645+ if (trace_ >= 5 and hasSigs) {
645646 const string* A = nd.inPins_ .data ();
646647 size_t sz = nd.inPins_ .size ();
647648 os_printf (os, " ##inPins=%zu " , sz);
@@ -819,9 +820,10 @@ void BLIF_file::countBUFs(uint& nIBUF, uint& nOBUF, uint& nCBUF) const noexcept
819820
820821void BLIF_file::countMOGs (uint& nISERD,
821822 uint& nDSP38, uint& nDSP19,
822- uint& nRAM36, uint& nRAM18
823+ uint& nRAM36, uint& nRAM18,
824+ uint& nCARRY
823825 ) const noexcept {
824- nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = 0 ;
826+ nISERD = nDSP38 = nDSP19 = nRAM36 = nRAM18 = nCARRY = 0 ;
825827 uint nn = numNodes ();
826828 if (nn == 0 )
827829 return ;
@@ -851,6 +853,10 @@ void BLIF_file::countMOGs(uint& nISERD,
851853 }
852854 if (pt == TDP_RAM18KX2) {
853855 nRAM18++;
856+ continue ;
857+ }
858+ if (pt == CARRY) {
859+ nCARRY++;
854860 }
855861 }
856862}
@@ -1815,7 +1821,7 @@ bool BLIF_file::linkNodes() noexcept {
18151821 int pinIndex = -1 ;
18161822 BNode* par = findFabricParent (nd.id_ , nd.out_ , pinIndex);
18171823 if (!par) {
1818- if (nd.is_RAM () or nd.is_DSP ()) {
1824+ if (nd.is_RAM () or nd.is_DSP () or nd. is_CARRY () ) {
18191825 const string& net = nd.out_ ;
18201826 uint rid = nd.realId (*this );
18211827 BNode& realNd = bnodeRef (rid);
@@ -1826,7 +1832,7 @@ bool BLIF_file::linkNodes() noexcept {
18261832 assert (dataTerm < int64_t (realData.size ()));
18271833 if (dataTerm < 0 )
18281834 continue ;
1829- // RAM or DSP output bits may be unused
1835+ // RAM or DSP or CARRY output bits may be unused
18301836 if (trace_ >= 4 ) {
18311837 lprintf (" skipping dangling cell output issue for %s at line %u\n " ,
18321838 realNd.cPrimType (), realNd.lnum_ );
@@ -2293,10 +2299,8 @@ bool BLIF_file::createPinGraph() noexcept {
22932299 // lputs3();
22942300 kid = pg_.findNode (key);
22952301 if (kid) {
2296- if (trace_ >= 8 ) {
2297- lprintf (" \t\t ___ found nid %u '%s' for key %zu" ,
2298- kid, pg_.cnodeName (kid), key);
2299- }
2302+ lprintf (" \t\t ___ found nid %u '%s' for key %zu" ,
2303+ kid, pg_.cnodeName (kid), key);
23002304 }
23012305 else {
23022306 kid = pg_.insK (key);
0 commit comments