3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-25 01:55:33 +00:00

SigSpec refactoring: More cleanups of old SigSpec use pattern

This commit is contained in:
Clifford Wolf 2014-07-22 23:50:21 +02:00
parent 9e94f41b89
commit 115dd959d9
3 changed files with 56 additions and 58 deletions

View file

@ -309,9 +309,11 @@ struct AST_INTERNAL::ProcessGenerator
RTLIL::SigSpec new_temp_signal(RTLIL::SigSpec sig)
{
sig.optimize();
for (size_t i = 0; i < sig.chunks().size(); i++)
std::vector<RTLIL::SigChunk> chunks = sig.chunks();
for (int i = 0; i < SIZE(chunks); i++)
{
RTLIL::SigChunk &chunk = sig.chunks_rw()[i];
RTLIL::SigChunk &chunk = chunks[i];
if (chunk.wire == NULL)
continue;
@ -329,7 +331,8 @@ struct AST_INTERNAL::ProcessGenerator
chunk.wire = wire;
chunk.offset = 0;
}
return sig;
return chunks;
}
// recursively traverse the AST an collect all assigned signals