projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d8318a
)
Added automatic memid generation to memory_unpack command
author
Clifford Wolf
<clifford@clifford.at>
Thu, 16 Jan 2014 23:15:15 +0000
(
00:15
+0100)
committer
Clifford Wolf
<clifford@clifford.at>
Thu, 16 Jan 2014 23:15:15 +0000
(
00:15
+0100)
passes/memory/memory_unpack.cc
patch
|
blob
|
history
diff --git
a/passes/memory/memory_unpack.cc
b/passes/memory/memory_unpack.cc
index 6aa6698f77fd3a409f15901a7eb9584df1f1c8ad..060d8e671a6e105b7465f18381c6289425573f05 100644
(file)
--- a/
passes/memory/memory_unpack.cc
+++ b/
passes/memory/memory_unpack.cc
@@
-31,8
+31,8
@@
static void handle_memory(RTLIL::Module *module, RTLIL::Cell *memory)
RTLIL::IdString mem_name = RTLIL::escape_id(memory->parameters.at("\\MEMID").decode_string());
-
if
(module->memories.count(mem_name) != 0)
-
log_error("Already found a memory object with the ID %s.\n", mem_name.c_str()
);
+
while
(module->memories.count(mem_name) != 0)
+
mem_name += stringf("_%d", RTLIL::autoidx++
);
RTLIL::Memory *mem = new RTLIL::Memory;
mem->name = mem_name;