From 49a931b0d1889890ef914caa62fd6fd6ff9917ab Mon Sep 17 00:00:00 2001 From: Ethan Mahintorabi Date: Fri, 13 Dec 2024 09:44:30 -0800 Subject: [PATCH] Adds default liberty check to Sta::writeTimingModel (#144) Signed-off-by: Ethan Mahintorabi --- search/Sta.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/search/Sta.cc b/search/Sta.cc index 05bd3dcc..2fdf228b 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -5600,6 +5600,9 @@ Sta::writeTimingModel(const char *lib_name, const char *filename, const Corner *corner) { + if (network()->defaultLibertyLibrary() == nullptr) { + report_->error(2141, "No liberty libraries found."); + } LibertyLibrary *library = makeTimingModel(lib_name, cell_name, filename, corner, this); writeLiberty(library, filename, this);