Skip to content

Commit

Permalink
dfflibmap: allow gzipped liberty files
Browse files Browse the repository at this point in the history
  • Loading branch information
widlarizer committed Jan 4, 2025
1 parent 6310454 commit d75b6bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions passes/techmap/clockgate.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "kernel/yosys.h"
#include "kernel/ff.h"
#include "kernel/gzip.h"
#include "libparse.h"
#include <optional>

Expand Down Expand Up @@ -308,13 +309,12 @@ struct ClockgatePass : public Pass {
if (!liberty_files.empty()) {
LibertyMergedCells merged;
for (auto path : liberty_files) {
std::ifstream f;
f.open(path.c_str());
std::istream& f = uncompressed(path);
if (f.fail())
log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
LibertyParser p(f);
merged.merge(p);
f.close();
delete &f;
}
std::tie(pos_icg_desc, neg_icg_desc) =
find_icgs(merged.cells, dont_use_cells);
Expand Down

0 comments on commit d75b6bb

Please sign in to comment.