Skip to content

Commit ceb2ec7

Browse files
[Tatum][Parse] Fixed Extraneous Warning With get_clocks
The get_clocks command is used in an SDC file to reference a set of clocks by name using a regex string. The code to do this tries to produce a warning if get_clocks is used on a regex string and no clocks could be found. The issue is that the code to do this was mistakenly producing this warning for each clock in the circuit. For example, if we had {clk1, clk2, clk3} and we wanted to do "get_clocks {clk3}", we will get two warnings since clk1 and clk2 did not match. Fixed this by moving the warning out of one loop nest.
1 parent 971da65 commit ceb2ec7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

vpr/src/timing/read_sdc.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -946,12 +946,11 @@ class SdcParseCallback : public sdcparse::Callback {
946946
}
947947
}
948948
}
949-
950-
if (!found) {
951-
VTR_LOGF_WARN(fname_.c_str(), lineno_,
952-
"get_clocks target name or pattern '%s' matched no clocks\n",
953-
clock_glob_pattern.c_str());
954-
}
949+
}
950+
if (!found) {
951+
VTR_LOGF_WARN(fname_.c_str(), lineno_,
952+
"get_clocks target name or pattern '%s' matched no clocks\n",
953+
clock_glob_pattern.c_str());
955954
}
956955
}
957956

0 commit comments

Comments
 (0)