Skip to content

Commit

Permalink
Zero counter in each line
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
  • Loading branch information
RRozak committed Jan 21, 2025
1 parent 629da03 commit a73aec2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/VlcTop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,14 @@ void VlcTop::writeInfo(const string& filename) {
int point_num = 0;
for (const auto& point : sc.points()) {
os << "BRDA:" << sc.lineno() << ",";
os << point_num << ",";
const string cmt = point->comment().substr(0, point->comment().find("="));

if (cmt.rfind("toggle_", 0) != 0) {
std::string typeStr = cmt.substr(0, cmt.find("_")) + "_" + std::to_string(point_num);
os << typeStr << "," << typeStr;
std::string typeStr = cmt.substr(0, cmt.find("_"));
os << typeStr << "_" << point_num;
} else {
os << cmt << "," << cmt;
os << cmt;
}
os << ",";
os << point->count() << "\n";
Expand Down

0 comments on commit a73aec2

Please sign in to comment.