Skip to content

Commit e9fad8b

Browse files
author
shypark98
committed
fix error
Signed-off-by: shypark98 <[email protected]>
1 parent bfc357d commit e9fad8b

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/par/include/par/PartitionMgr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ class PartitionMgr
260260
void getFromODB(std::map<std::string, MasterInfo>& onlyUseMasters,
261261
std::string& top_name,
262262
int& numInsts,
263+
int& numMacros,
263264
int& numPIs,
264265
int& numPOs,
265266
int& numSeq);
@@ -290,6 +291,7 @@ class PartitionMgr
290291
void writeFile(const std::map<std::string, MasterInfo>& onlyUseMasters,
291292
const std::string& top_name,
292293
int numInsts,
294+
int numMacros,
293295
int numPIs,
294296
int numPOs,
295297
int numSeq,

src/par/src/ArtNetSpec.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,19 @@ void PartitionMgr::writeArtNetSpec(const char* fileName)
8080
std::map<std::string, MasterInfo> onlyUseMasters;
8181
std::string top_name;
8282
int numInsts = 0;
83+
int numMacros = 0;
8384
int numPIs = 0;
8485
int numPOs = 0;
8586
int numSeq = 0;
8687
int Dmax = -1;
8788
int MDmax = -1;
88-
float Rratio;
89-
float p;
90-
float q;
91-
float avgK;
89+
float Rratio = 0.0;
90+
float p = 0.0;
91+
float q = 0.0;
92+
float avgK = 0.0;
9293

93-
getFromODB(onlyUseMasters, top_name, numInsts, numPIs, numPOs, numSeq);
94+
getFromODB(
95+
onlyUseMasters, top_name, numInsts, numMacros, numPIs, numPOs, numSeq);
9496
logger_->report("getFromODB done");
9597
getFromSTA(Dmax, MDmax);
9698
logger_->report("getFromSTA done");
@@ -99,6 +101,7 @@ void PartitionMgr::writeArtNetSpec(const char* fileName)
99101
writeFile(onlyUseMasters,
100102
top_name,
101103
numInsts,
104+
numMacros,
102105
numPIs,
103106
numPOs,
104107
numSeq,
@@ -114,6 +117,7 @@ void PartitionMgr::writeArtNetSpec(const char* fileName)
114117
void PartitionMgr::getFromODB(std::map<std::string, MasterInfo>& onlyUseMasters,
115118
std::string& top_name,
116119
int& numInsts,
120+
int& numMacros,
117121
int& numPIs,
118122
int& numPOs,
119123
int& numSeq)
@@ -149,6 +153,9 @@ void PartitionMgr::getFromODB(std::map<std::string, MasterInfo>& onlyUseMasters,
149153
if (inserted) {
150154
info.isMacro = isMacro;
151155
}
156+
if (isMacro) {
157+
numMacros++;
158+
}
152159
}
153160
}
154161

@@ -171,7 +178,7 @@ void PartitionMgr::BuildTimingPath(int& Dmax, int& MDmax)
171178
// Timing paths are grouped into path groups according to the clock
172179
// associated with the endpoint of the path, for example, path group for clk
173180
// int group_count = top_n_;
174-
int group_count = 1000;
181+
int group_count = INT_MAX;
175182
int endpoint_count = 1; // The number of paths to report for each endpoint.
176183
// Definition for findPathEnds function in Search.hh
177184
// PathEndSeq *findPathEnds(ExceptionFrom *from,
@@ -225,7 +232,6 @@ void PartitionMgr::BuildTimingPath(int& Dmax, int& MDmax)
225232

226233
auto block = getDbBlock();
227234
std::map<std::string, int> pathDepthMap;
228-
229235
// check all the timing paths
230236
for (auto& path_end : path_ends) {
231237
// Printing timing paths to logger
@@ -690,6 +696,7 @@ void PartitionMgr::writeFile(
690696
const std::map<std::string, MasterInfo>& onlyUseMasters,
691697
const std::string& top_name,
692698
const int numInsts,
699+
const int numMacros,
693700
const int numPIs,
694701
const int numPOs,
695702
const int numSeq,
@@ -738,6 +745,7 @@ void PartitionMgr::writeFile(
738745
outFile << "END\n";
739746
outFile.close();
740747
logger_->report("#instances: {}", numInsts);
748+
logger_->report("#macros: {}", numMacros);
741749
logger_->report("#primary inputs: {}", numPIs);
742750
logger_->report("#primary outputs: {}", numPOs);
743751
logger_->report("Ratio of Region I: {}", Rratio);

0 commit comments

Comments
 (0)