aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/register.cc
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2019-09-29 13:22:11 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2019-09-29 13:22:11 +0200
commit3f70c1fd26eb109c2c4d899cce55f24bbf04acc1 (patch)
tree327cbd6c9c1c62362efe6e363ad6856f2f7e9a36 /kernel/register.cc
parentce0631c371f69f0132ea9ee4bc8f5ee576dbb1a3 (diff)
downloadyosys-3f70c1fd26eb109c2c4d899cce55f24bbf04acc1.tar.gz
yosys-3f70c1fd26eb109c2c4d899cce55f24bbf04acc1.tar.bz2
yosys-3f70c1fd26eb109c2c4d899cce55f24bbf04acc1.zip
Open aig frontend as binary file
Diffstat (limited to 'kernel/register.cc')
-rw-r--r--kernel/register.cc4
1 files changed, 2 insertions, 2 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;