diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-12-16 13:31:05 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-12-16 13:31:05 -0800 |
commit | 6b384861e4b1e02b24bf11d266cf11f461115cd8 (patch) | |
tree | a9b359918af5449b1aa2052034d39044c7c036ea /passes | |
parent | e990c013c57da8149dbbd2fe2633e953ec8f471b (diff) | |
download | yosys-6b384861e4b1e02b24bf11d266cf11f461115cd8.tar.gz yosys-6b384861e4b1e02b24bf11d266cf11f461115cd8.tar.bz2 yosys-6b384861e4b1e02b24bf11d266cf11f461115cd8.zip |
Oops
Diffstat (limited to 'passes')
-rw-r--r-- | passes/memory/memory_bram.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/passes/memory/memory_bram.cc b/passes/memory/memory_bram.cc index a1353e56d..7ce5e80e1 100644 --- a/passes/memory/memory_bram.cc +++ b/passes/memory/memory_bram.cc @@ -333,12 +333,9 @@ struct rules_t for (int idx = 1; idx <= GetSize(tokens)-1; idx++) { size_t c1 = tokens[1][0] == '!' ? 1 : 0; size_t c2 = tokens[1].find("="); - if (c2 != std::string::npos) - c2--; - bool exists = (c1 == 0); IdString key = RTLIL::escape_id(tokens[1].substr(c1, c2)); - Const val = c2 != std::string::npos ? tokens[1].substr(c2) : RTLIL::Const(1); + Const val = c2 != std::string::npos ? tokens[1].substr(c2+1) : RTLIL::Const(1); data.attributes.back().emplace_back(exists, key, val); } |