aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--passes/sat/assertpmux.cc2
-rw-r--r--tests/sat/bug2595.ys18
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