diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-02-22 22:02:48 +0100 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-02-22 23:30:28 +0100 |
commit | 4746ffd7b2f5de0bc1f29f35e9044091a3c704e0 (patch) | |
tree | 77007250b21e9ce359e5f105734b58eba1c495f9 | |
parent | 01ccb80b708b45926b3690949479715ebf5e2853 (diff) | |
download | yosys-4746ffd7b2f5de0bc1f29f35e9044091a3c704e0.tar.gz yosys-4746ffd7b2f5de0bc1f29f35e9044091a3c704e0.tar.bz2 yosys-4746ffd7b2f5de0bc1f29f35e9044091a3c704e0.zip |
assertpmux: Fix crash on unused $pmux output.
Fixes #2595.
-rw-r--r-- | passes/sat/assertpmux.cc | 2 | ||||
-rw-r--r-- | tests/sat/bug2595.ys | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/passes/sat/assertpmux.cc b/passes/sat/assertpmux.cc index e9a10465e..f31b78804 100644 --- a/passes/sat/assertpmux.cc +++ b/passes/sat/assertpmux.cc @@ -88,7 +88,7 @@ struct AssertpmuxWorker { SigSpec output; - for (auto muxuser : sigbit_muxusers.at(bit)) + for (auto muxuser : sigbit_muxusers[bit]) { Cell *cell = std::get<0>(muxuser); int portidx = std::get<1>(muxuser); diff --git a/tests/sat/bug2595.ys b/tests/sat/bug2595.ys new file mode 100644 index 000000000..f668fd747 --- /dev/null +++ b/tests/sat/bug2595.ys @@ -0,0 +1,18 @@ +read_ilang <<EOT +module \top + wire input 3 \A + wire width 2 input 2 \B + wire width 2 input 1 \S + wire \Y + cell $pmux \my_pmux + parameter signed \S_WIDTH 2 + parameter signed \WIDTH 1 + connect \A \A + connect \B \B + connect \S \S + connect \Y \Y + end +end +EOT + +assertpmux |