diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2019-09-30 17:49:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-30 17:49:23 +0200 |
commit | 0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7 (patch) | |
tree | bd4c25fab759a4dc4a7354a9f6fc72205e97dfda /kernel | |
parent | 7ed13297b104c200f6d15cf1265417e823c8d308 (diff) | |
parent | 9e55b234b47b01dc396e793b7f31236c9e87c185 (diff) | |
download | yosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.tar.gz yosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.tar.bz2 yosys-0d27ffd4e6d53349d80d6f29f9e6b2f1c4b03cb7.zip |
Merge pull request #1416 from YosysHQ/mmicko/frontend_binary_in
Open aig frontend as binary file
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.cc | 4 | ||||
-rw-r--r-- | kernel/register.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kernel/register.cc b/kernel/register.cc index 3033ee710..37f2e5e1b 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -439,7 +439,7 @@ void Frontend::execute(std::vector<std::string> args, RTLIL::Design *design) FILE *Frontend::current_script_file = NULL; std::string Frontend::last_here_document; -void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx) +void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx, bool bin_input) { bool called_with_fp = f != NULL; @@ -489,7 +489,7 @@ void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<s next_args.insert(next_args.end(), filenames.begin()+1, filenames.end()); } std::ifstream *ff = new std::ifstream; - ff->open(filename.c_str()); + ff->open(filename.c_str(), bin_input ? std::ifstream::binary : std::ifstream::in); yosys_input_files.insert(filename); if (ff->fail()) delete ff; diff --git a/kernel/register.h b/kernel/register.h index be836013f..85d552f0d 100644 --- a/kernel/register.h +++ b/kernel/register.h @@ -94,7 +94,7 @@ struct Frontend : Pass virtual void execute(std::istream *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) = 0; static std::vector<std::string> next_args; - void extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx); + void extra_args(std::istream *&f, std::string &filename, std::vector<std::string> args, size_t argidx, bool bin_input = false); static void frontend_call(RTLIL::Design *design, std::istream *f, std::string filename, std::string command); static void frontend_call(RTLIL::Design *design, std::istream *f, std::string filename, std::vector<std::string> args); |