mirror of https://github.com/YosysHQ/yosys.git
dfflibmap: allow gzipped liberty files
This commit is contained in:
parent
6310454890
commit
d75b6bb3d7
|
@ -1,5 +1,6 @@
|
||||||
#include "kernel/yosys.h"
|
#include "kernel/yosys.h"
|
||||||
#include "kernel/ff.h"
|
#include "kernel/ff.h"
|
||||||
|
#include "kernel/gzip.h"
|
||||||
#include "libparse.h"
|
#include "libparse.h"
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
|
@ -308,13 +309,12 @@ struct ClockgatePass : public Pass {
|
||||||
if (!liberty_files.empty()) {
|
if (!liberty_files.empty()) {
|
||||||
LibertyMergedCells merged;
|
LibertyMergedCells merged;
|
||||||
for (auto path : liberty_files) {
|
for (auto path : liberty_files) {
|
||||||
std::ifstream f;
|
std::istream& f = uncompressed(path);
|
||||||
f.open(path.c_str());
|
|
||||||
if (f.fail())
|
if (f.fail())
|
||||||
log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
|
log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
|
||||||
LibertyParser p(f);
|
LibertyParser p(f);
|
||||||
merged.merge(p);
|
merged.merge(p);
|
||||||
f.close();
|
delete &f;
|
||||||
}
|
}
|
||||||
std::tie(pos_icg_desc, neg_icg_desc) =
|
std::tie(pos_icg_desc, neg_icg_desc) =
|
||||||
find_icgs(merged.cells, dont_use_cells);
|
find_icgs(merged.cells, dont_use_cells);
|
||||||
|
|
Loading…
Reference in New Issue