Created
April 25, 2023 20:44
-
-
Save fgaray/9d8e37059bdbaa1dec836e7c96ca8e0c to your computer and use it in GitHub Desktop.
Test case for missing clocks in STA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dft/CMakeLists.txt b/src/dft/CMakeLists.txt | |
index dbff4f64f..d747b68b0 100644 | |
--- a/src/dft/CMakeLists.txt | |
+++ b/src/dft/CMakeLists.txt | |
@@ -70,6 +70,7 @@ target_link_libraries(dft | |
dft_config_lib | |
dft_replace_lib | |
dft_clock_domain_lib | |
+ dft_utils_lib | |
) | |
diff --git a/src/dft/src/Dft.cpp b/src/dft/src/Dft.cpp | |
index 426a90260..eb03e7eff 100644 | |
--- a/src/dft/src/Dft.cpp | |
+++ b/src/dft/src/Dft.cpp | |
@@ -42,6 +42,7 @@ | |
#include "ScanReplace.hh" | |
#include "odb/db.h" | |
#include "utl/Logger.h" | |
+#include "Utils.hh" | |
namespace dft { | |
@@ -135,6 +136,23 @@ void Dft::insert_dft() | |
// Perform scan replacement | |
scan_replace_->scanReplace(); | |
+ | |
+ odb::dbChip* chip = db_->getChip(); | |
+ odb::dbBlock* block = chip->getBlock(); | |
+ odb::dbInst* inst = block->findInst("ff1"); | |
+ | |
+ std::vector<odb::dbITerm*> clock_pins = utils::GetClockPin(inst); | |
+ | |
+ odb::dbITerm* clock_pin = clock_pins.at(0); | |
+ std::optional<sta::Clock*> clock = utils::GetClock(sta_, clock_pin); | |
+ | |
+ if (clock.has_value()) { | |
+ std::cout << "Clock found!" << std::endl; | |
+ } else { | |
+ std::cout << "No clock found :(" << std::endl; | |
+ } | |
+ | |
+ | |
// TODO: Scan Architect and Scan Stitching | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment