mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 08:24:31 +02:00
Add FSM arc coverage to verilator_coverage .info output
Signed-off-by: Igor Zaworski <[email protected]>
This commit is contained in:
+6
-3
@@ -262,7 +262,6 @@ void VlcTop::writeInfo(const string& filename) {
|
||||
uint64_t daCount = 0;
|
||||
std::vector<const VlcPoint*> infoPoints;
|
||||
for (const auto& point : sc.points()) {
|
||||
if (point->isFsmArc()) continue;
|
||||
daCount = std::max(daCount, point->count());
|
||||
infoPoints.push_back(point);
|
||||
}
|
||||
@@ -272,10 +271,14 @@ void VlcTop::writeInfo(const string& filename) {
|
||||
int point_num = 0;
|
||||
for (const VlcPoint* point : infoPoints) {
|
||||
os << "BRDA:" << sc.lineno() << ",";
|
||||
os << "0,";
|
||||
if (point->comment().empty()) {
|
||||
if (point->isFsmArc()) {
|
||||
os << "2,";
|
||||
os << point->fsmFromState() << "->" << point->fsmToState();
|
||||
} else if (point->comment().empty()) {
|
||||
os << "0,";
|
||||
os << point_num;
|
||||
} else {
|
||||
os << (point->isFsmState() ? '1' : '0') << ',';
|
||||
std::string comment(point->comment());
|
||||
std::replace(comment.begin(), comment.end(), ',', '_');
|
||||
os << comment;
|
||||
|
||||
Reference in New Issue
Block a user