diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-20 11:00:09 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-20 11:01:04 +0200 |
commit | e57db5e9b256d801c1d4337e44e1a7173a115d07 (patch) | |
tree | 9b4dfae20d2b1fce65fa320354c5d626a0678963 /kernel/rtlil.cc | |
parent | efa78840261871616f9af15e5ad9a5bc89f95857 (diff) | |
download | yosys-e57db5e9b256d801c1d4337e44e1a7173a115d07.tar.gz yosys-e57db5e9b256d801c1d4337e44e1a7173a115d07.tar.bz2 yosys-e57db5e9b256d801c1d4337e44e1a7173a115d07.zip |
Added std::set<RTLIL::SigBit> to RTLIL::SigSpec conversion
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index dea0e1050..748deae3e 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1451,10 +1451,17 @@ RTLIL::SigSpec::SigSpec(RTLIL::SigBit bit, int width) RTLIL::SigSpec::SigSpec(std::vector<RTLIL::SigBit> bits) { - chunks.reserve(bits.size()); + this->width = 0; for (auto &bit : bits) - chunks.push_back(bit); - this->width = bits.size(); + append_bit(bit); + check(); +} + +RTLIL::SigSpec::SigSpec(std::set<RTLIL::SigBit> bits) +{ + this->width = 0; + for (auto &bit : bits) + append_bit(bit); check(); } |