3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-26 14:07:55 +00:00

Fixed all users of SigSpec::chunks_rw() and removed it

This commit is contained in:
Clifford Wolf 2014-07-23 15:36:09 +02:00
parent 85db102e13
commit 4e802eb7f6
11 changed files with 80 additions and 91 deletions

View file

@ -41,14 +41,15 @@ static void apply_prefix(std::string prefix, std::string &id)
static void apply_prefix(std::string prefix, RTLIL::SigSpec &sig, RTLIL::Module *module)
{
for (size_t i = 0; i < sig.chunks().size(); i++) {
if (sig.chunks()[i].wire == NULL)
continue;
std::string wire_name = sig.chunks()[i].wire->name;
apply_prefix(prefix, wire_name);
assert(module->wires.count(wire_name) > 0);
sig.chunks_rw()[i].wire = module->wires[wire_name];
}
std::vector<RTLIL::SigChunk> chunks = sig;
for (auto &chunk : chunks)
if (chunk.wire != NULL) {
std::string wire_name = chunk.wire->name;
apply_prefix(prefix, wire_name);
assert(module->wires.count(wire_name) > 0);
chunk.wire = module->wires[wire_name];
}
sig = chunks;
}
struct TechmapWorker