@@ -88,12 +88,13 @@ void PartitionMgr::writeArtNetSpec(const char* fileName)
8888 float Rratio;
8989 float p;
9090 float q;
91+ float avgK;
9192
9293 getFromODB (onlyUseMasters, top_name, numInsts, numPIs, numPOs, numSeq);
9394 logger_->report (" getFromODB done" );
9495 getFromSTA (Dmax, MDmax);
9596 logger_->report (" getFromSTA done" );
96- getFromPAR (Rratio, p, q);
97+ getFromPAR (Rratio, p, q, avgK );
9798 logger_->report (" getFromPAR done" );
9899 writeFile (onlyUseMasters,
99100 top_name,
@@ -106,16 +107,16 @@ void PartitionMgr::writeArtNetSpec(const char* fileName)
106107 Rratio,
107108 p,
108109 q,
110+ avgK,
109111 fileName);
110112}
111113
112- void PartitionMgr::getFromODB (
113- std::map<std::string, MasterInfo>& onlyUseMasters,
114- std::string& top_name,
115- int & numInsts,
116- int & numPIs,
117- int & numPOs,
118- int & numSeq)
114+ void PartitionMgr::getFromODB (std::map<std::string, MasterInfo>& onlyUseMasters,
115+ std::string& top_name,
116+ int & numInsts,
117+ int & numPIs,
118+ int & numPOs,
119+ int & numSeq)
119120{
120121 auto block = getDbBlock ();
121122 odb::dbSet<dbInst> insts = block->getInsts ();
@@ -286,12 +287,12 @@ void PartitionMgr::BuildTimingPath(int& Dmax, int& MDmax)
286287 MDmax = mac_max;
287288}
288289
289- void PartitionMgr::getFromPAR (float & Rratio, float & p, float & q)
290+ void PartitionMgr::getFromPAR (float & Rratio, float & p, float & q, float & avgK )
290291{
291- getRents (Rratio, p, q);
292+ getRents (Rratio, p, q, avgK );
292293}
293294
294- void PartitionMgr::getRents (float & Rratio, float & p, float & q)
295+ void PartitionMgr::getRents (float & Rratio, float & p, float & q, float & avgK )
295296{
296297 auto block = getDbBlock ();
297298 ModuleMgr modMgr;
@@ -314,7 +315,7 @@ void PartitionMgr::getRents(float& Rratio, float& p, float& q)
314315 ++id;
315316 }
316317
317- double avgK = totPins / block->getInsts ().size ();
318+ avgK = totPins / block->getInsts ().size ();
318319 bool flag = true ;
319320 while (flag) {
320321 flag = partitionCluster (triton_part, modMgr, cv);
@@ -697,6 +698,7 @@ void PartitionMgr::writeFile(
697698 const float Rratio,
698699 const float p,
699700 const float q,
701+ const float avgK,
700702 const char * fileName)
701703{
702704 std::ofstream outFile (fileName);
@@ -735,6 +737,16 @@ void PartitionMgr::writeFile(
735737 outFile << " O " << numPOs << ' \n ' ;
736738 outFile << " END\n " ;
737739 outFile.close ();
740+ logger_->report (" #instances: {}" , numInsts);
741+ logger_->report (" #primary inputs: {}" , numPIs);
742+ logger_->report (" #primary outputs: {}" , numPOs);
743+ logger_->report (" Ratio of Region I: {}" , Rratio);
744+ logger_->report (" Rent's exponent: {}" , p);
745+ logger_->report (" Average #pins per instances: {}" , avgK);
746+ logger_->report (" Ratio of #sequential instances to the #instances: {}" ,
747+ float (numSeq) / numInsts);
748+ logger_->report (" Maximum depth of any timing path: {}" , Dmax);
749+ logger_->report (" Maximum depth of macro path: {}" , MDmax);
738750}
739751
740752} // namespace par
0 commit comments