3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-27 02:45:52 +00:00

Merge pull request #1416 from YosysHQ/mmicko/frontend_binary_in

Open aig frontend as binary file
This commit is contained in:
Miodrag Milanović 2019-09-30 17:49:23 +02:00 committed by GitHub
commit 0d27ffd4e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View file

@ -285,6 +285,8 @@ end_of_header:
}
else if (c == 'c') {
f.ignore(1);
if (f.peek() == '\r')
f.ignore(1);
if (f.peek() == '\n')
break;
// Else constraint (TODO)
@ -1056,13 +1058,15 @@ struct AigerFrontend : public Frontend {
}
break;
}
extra_args(f, filename, args, argidx);
extra_args(f, filename, args, argidx, true);
if (module_name.empty()) {
#ifdef _WIN32
char fname[_MAX_FNAME];
_splitpath(filename.c_str(), NULL /* drive */, NULL /* dir */, fname, NULL /* ext */);
module_name = fname;
char* bn = strdup(fname);
module_name = RTLIL::escape_id(bn);
free(bn);
#else
char* bn = strdup(filename.c_str());
module_name = RTLIL::escape_id(bn);