mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Changed frontend-api from FILE to std::istream
This commit is contained in:
parent
5dce303a2a
commit
19cff41eb4
22 changed files with 116 additions and 89 deletions
|
@ -463,11 +463,12 @@ struct DfflibmapPass : public Pass {
|
|||
if (liberty_file.empty())
|
||||
log_cmd_error("Missing `-liberty liberty_file' option!\n");
|
||||
|
||||
FILE *f = fopen(liberty_file.c_str(), "r");
|
||||
if (f == NULL)
|
||||
std::ifstream f;
|
||||
f.open(liberty_file.c_str());
|
||||
if (f.fail())
|
||||
log_cmd_error("Can't open liberty file `%s': %s\n", liberty_file.c_str(), strerror(errno));
|
||||
LibertyParser libparser(f);
|
||||
fclose(f);
|
||||
f.close();
|
||||
|
||||
find_cell(libparser.ast, "$_DFF_N_", false, false, false, false);
|
||||
find_cell(libparser.ast, "$_DFF_P_", true, false, false, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue