diff options
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/ast/simplify.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc index b94a8d710..f7364b9a8 100644 --- a/frontends/ast/simplify.cc +++ b/frontends/ast/simplify.cc @@ -2886,7 +2886,8 @@ AstNode *AstNode::readmem(bool is_readmemh, std::string mem_filename, AstNode *m int meminit_size=0; std::ifstream f; - f.open(mem_filename.c_str()); + std::string path = filename.substr(0, filename.find_last_of("\\/")+1); + f.open(path + mem_filename.c_str()); yosys_input_files.insert(mem_filename); if (f.fail()) |