@@ -457,7 +457,7 @@ bool BLIF_file::checkBlif() noexcept {
457
457
}
458
458
459
459
// -- write yaml file to check prim-DB:
460
- if (trace_ >= 5 ) {
460
+ if (trace_ >= 7 ) {
461
461
// string written = pr_write_yaml( DFFRE );
462
462
// string written = pr_write_yaml( DSP19X2 );
463
463
// string written = pr_write_yaml( DSP38 );
@@ -1472,8 +1472,9 @@ bool BLIF_file::checkClockSepar(vector<const Node*>& clocked) noexcept {
1472
1472
pg_.countClockNodes ());
1473
1473
}
1474
1474
1475
- if (not pg_.hasClockNodes ())
1475
+ if (not pg_.hasClockNodes ()) {
1476
1476
return true ;
1477
+ }
1477
1478
1478
1479
// -- paint clock nodes and their incoming edges Red
1479
1480
for (NW::NI I (pg_); I.valid (); ++I) {
@@ -1580,7 +1581,7 @@ bool BLIF_file::createPinGraph() noexcept {
1580
1581
uint nid = 0 , kid = 0 , eid = 0 ;
1581
1582
vector<string> INP;
1582
1583
vector<upair> PAR;
1583
- char nm_buf[512 ] = {};
1584
+ char nm_buf[520 ] = {};
1584
1585
1585
1586
pg2blif_.reserve (2 * nodePool_.size () + 1 );
1586
1587
@@ -1697,6 +1698,59 @@ bool BLIF_file::createPinGraph() noexcept {
1697
1698
}
1698
1699
}
1699
1700
1701
+ // -- create pg-nodes for sequential input pins
1702
+ vector<const Node*> clocked;
1703
+ collectClockedNodes (clocked);
1704
+ if (trace_ >= 4 )
1705
+ lprintf (" createPinGraph: clocked.size()= %zu\n " , clocked.size ());
1706
+ if (not clocked.empty ()) {
1707
+ for (const Node* cnp : clocked) {
1708
+ const Node& cn = *cnp;
1709
+ assert (cn.hasPrimType ());
1710
+ if (cn.ptype_ == prim::CLK_BUF or cn.ptype_ == prim::FCLK_BUF)
1711
+ continue ;
1712
+ lputs9 ();
1713
+ for (uint i = 0 ; i < cn.inPins_ .size (); i++) {
1714
+ const string& inp = cn.inPins_ [i];
1715
+ assert (not inp.empty ());
1716
+ if (not pr_pin_is_clock (cn.ptype_ , inp))
1717
+ continue ;
1718
+ assert (cn.cell_hc_ );
1719
+ key = hashComb (cn.cell_hc_ , inp);
1720
+ assert (key);
1721
+ assert (not pg_.hasKey (key));
1722
+ kid = pg_.insK (key);
1723
+ assert (kid);
1724
+ pg_.nodeRef (kid).markClk (true );
1725
+
1726
+ ::snprintf (nm_buf, 510 , " nd%u_L%u_cn" ,
1727
+ kid, cn.lnum_);
1728
+ pg_.setNodeName (kid, nm_buf);
1729
+
1730
+ pg2blif_.emplace (kid, cn.id_ );
1731
+
1732
+ const string& inet = cn.inSigs_ [i];
1733
+ assert (not inet.empty ());
1734
+ const Node* driver = findFabricDriver (cn.id_ , inet);
1735
+ if (!driver)
1736
+ continue ;
1737
+
1738
+ uint64_t qk = hashComb (driver->id_ , driver->out_ );
1739
+ assert (qk);
1740
+ uint pid = pg_.insK (qk);
1741
+
1742
+ ::snprintf (nm_buf, 510 , " nd%u_L%u_" ,
1743
+ pid, driver->lnum_);
1744
+ if (driver->ptype_ == prim::CLK_BUF)
1745
+ ::strcat (nm_buf, " CBUF" );
1746
+ pg_.setNodeName (pid, nm_buf);
1747
+
1748
+ eid = pg_.linK (qk, key);
1749
+ assert (eid);
1750
+ }
1751
+ }
1752
+ }
1753
+
1700
1754
pg_.setNwName (" pin_graph" );
1701
1755
1702
1756
// writePinGraph("pin_graph_1.dot");
0 commit comments