mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-30 16:03:17 +00:00
Merge pull request #4834 from YosysHQ/emil/gzip-refactor
Memory-efficient zlib usage across Liberty file consumers
This commit is contained in:
commit
b06a661913
22 changed files with 714 additions and 536 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "kernel/celltypes.h"
|
||||
#include "passes/techmap/libparse.h"
|
||||
#include "kernel/cost.h"
|
||||
#include "kernel/gzip.h"
|
||||
#include "libs/json11/json11.hpp"
|
||||
|
||||
USING_YOSYS_NAMESPACE
|
||||
|
@ -347,13 +348,12 @@ statdata_t hierarchy_worker(std::map<RTLIL::IdString, statdata_t> &mod_stat, RTL
|
|||
|
||||
void read_liberty_cellarea(dict<IdString, cell_area_t> &cell_area, string liberty_file)
|
||||
{
|
||||
std::ifstream f;
|
||||
f.open(liberty_file.c_str());
|
||||
std::istream* f = uncompressed(liberty_file.c_str());
|
||||
yosys_input_files.insert(liberty_file);
|
||||
if (f.fail())
|
||||
if (f->fail())
|
||||
log_cmd_error("Can't open liberty file `%s': %s\n", liberty_file.c_str(), strerror(errno));
|
||||
LibertyParser libparser(f);
|
||||
f.close();
|
||||
LibertyParser libparser(*f);
|
||||
delete f;
|
||||
|
||||
for (auto cell : libparser.ast->children)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue