From ceb2ec74d5787d53a3bf8ee8cf114262b89b4632 Mon Sep 17 00:00:00 2001 From: AlexandreSinger Date: Tue, 29 Apr 2025 17:11:18 -0400 Subject: [PATCH] [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. --- vpr/src/timing/read_sdc.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/vpr/src/timing/read_sdc.cpp b/vpr/src/timing/read_sdc.cpp index e8db27b9a28..df35c6c0c63 100644 --- a/vpr/src/timing/read_sdc.cpp +++ b/vpr/src/timing/read_sdc.cpp @@ -946,12 +946,11 @@ class SdcParseCallback : public sdcparse::Callback { } } } - - if (!found) { - VTR_LOGF_WARN(fname_.c_str(), lineno_, - "get_clocks target name or pattern '%s' matched no clocks\n", - clock_glob_pattern.c_str()); - } + } + if (!found) { + VTR_LOGF_WARN(fname_.c_str(), lineno_, + "get_clocks target name or pattern '%s' matched no clocks\n", + clock_glob_pattern.c_str()); } }