mirror of https://github.com/YosysHQ/yosys.git
dfflibmap: allow gzipped liberty files
This commit is contained in:
parent
6c55df3467
commit
094ab8c017
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "kernel/yosys.h"
|
||||
#include "kernel/sigtools.h"
|
||||
#include "kernel/gzip.h"
|
||||
#include "libparse.h"
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
@ -632,11 +633,12 @@ struct DfflibmapPass : public Pass {
|
|||
for (auto path : liberty_files) {
|
||||
std::ifstream f;
|
||||
f.open(path.c_str());
|
||||
if (f.fail())
|
||||
std::istream* ff = uncompressed(&f, path);
|
||||
if (ff->fail())
|
||||
log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
|
||||
LibertyParser p(f);
|
||||
LibertyParser p(*ff);
|
||||
merged.merge(p);
|
||||
f.close();
|
||||
delete ff;
|
||||
}
|
||||
|
||||
find_cell(merged.cells, ID($_DFF_N_), false, false, false, false, false, false, dont_use_cells);
|
||||
|
|
Loading…
Reference in New Issue