Use newer warning format.

This commit is contained in:
Wilson Snyder 2020-02-09 18:08:19 -05:00
parent 2108b19b94
commit d201ce40a0
2 changed files with 18 additions and 21 deletions

View File

@ -893,8 +893,7 @@ private:
m_graph.userClearVertices();
// May be very large vector, so only report the "most important"
// elements. Up to 10 of the widest
std::cerr<<V3Error::msgPrefix()
<<" Widest candidate vars to split:"<<endl;
std::cerr << V3Error::warnMore() << "... Widest candidate vars to split:" << endl;
std::stable_sort(m_unoptflatVars.begin(), m_unoptflatVars.end(), OrderVarWidthCmp());
vl_unordered_set<const AstVar*> canSplitList;
int lim = m_unoptflatVars.size() < 10 ? m_unoptflatVars.size() : 10;
@ -902,19 +901,18 @@ private:
OrderVarStdVertex* vsvertexp = m_unoptflatVars[i];
AstVar* varp = vsvertexp->varScp()->varp();
const bool canSplit = V3SplitVar::canSplitVar(varp);
std::cerr<<V3Error::msgPrefix()<<" "
<<varp->fileline()<<" "<<varp->prettyName()<<std::dec
<<", width "<<varp->width()<<", fanout "
<<vsvertexp->fanout();
std::cerr << V3Error::warnMore() << " " << varp->fileline() << " "
<< varp->prettyName() << std::dec << ", width " << varp->width()
<< ", fanout " << vsvertexp->fanout();
if (canSplit) {
std::cerr <<", can be split";
std::cerr <<", can split_var";
canSplitList.insert(varp);
}
std::cerr << std::endl;
}
// Up to 10 of the most fanned out
std::cerr<<V3Error::msgPrefix()
<<" Most fanned out candidate vars to split:"<<endl;
std::cerr << V3Error::warnMore()
<< "... Most fanned out candidate vars to split:" << endl;
std::stable_sort(m_unoptflatVars.begin(), m_unoptflatVars.end(),
OrderVarFanoutCmp());
lim = m_unoptflatVars.size() < 10 ? m_unoptflatVars.size() : 10;
@ -922,19 +920,18 @@ private:
OrderVarStdVertex* vsvertexp = m_unoptflatVars[i];
AstVar* varp = vsvertexp->varScp()->varp();
const bool canSplit = V3SplitVar::canSplitVar(varp);
std::cerr<<V3Error::msgPrefix()<<" "
<<varp->fileline()<<" "<<varp->prettyName()
<<", width "<<std::dec<<varp->width()
<<", fanout "<<vsvertexp->fanout();
std::cerr << V3Error::warnMore() << " " << varp->fileline() << " "
<< varp->prettyName() << ", width " << std::dec << varp->width()
<< ", fanout " << vsvertexp->fanout();
if (canSplit) {
std::cerr<<", can be split";
std::cerr << ", can split_var";
canSplitList.insert(varp);
}
std::cerr<<endl;
}
if (!canSplitList.empty()) {
std::cerr << V3Error::msgPrefix()
<< "Adding /*verilator split_var*/ to variables above may resolve this warning."
std::cerr << V3Error::warnMore()
<< "... Suggest add /*verilator split_var*/ to appropriate variables above."
<< std::endl;
}
V3Stats::addStat("Order, SplitVar, candidates", canSplitList.size());

View File

@ -5,9 +5,9 @@
t/t_unoptflat_simple_2.v:14: Example path: t.x
t/t_unoptflat_simple_2.v:16: Example path: ASSIGNW
t/t_unoptflat_simple_2.v:14: Example path: t.x
%Warning-UNOPTFLAT: Widest candidate vars to split:
%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 10, can be split
%Warning-UNOPTFLAT: Most fanned out candidate vars to split:
%Warning-UNOPTFLAT: t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 10, can be split
%Warning-UNOPTFLAT: Adding /*verilator split_var*/ to variables above may resolve this warning.
... Widest candidate vars to split:
t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 10, can split_var
... Most fanned out candidate vars to split:
t/t_unoptflat_simple_2.v:14: t.x, width 3, fanout 10, can split_var
... Suggest add /*verilator split_var*/ to appropriate variables above.
%Error: Exiting due to