chipsalliance / chipsalliance/chisel

Output bundle can't be assigned Mux

Open
#2,985 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
4.8k
Forks
658
Avg merge
18h 59m
Merged PRs (30d)
14

Description

**Type of issue**: Bug Report

**Please provide the steps to reproduce the problem:**

```scala
import chisel3._
import chisel3.util._

class Top extends RawModule {
val q = IO(Output(Vec(2, Bool())))

val a = WireInit(VecInit(1.B, 0.B))
val b = WireInit(VecInit(0.B, 1.B))

q <> Mux(1.B, a, b)
}

object Main extends App {
(new chisel3.stage.ChiselStage)
.emitVerilog(new Top, args)
}
```

**What is the current behavior?**

```
chisel3.internal.ChiselException: internal error: attempted to generate LHS ref to ReadOnlyBinding OpBinding(Top@248deced,None)
```

**What is the expected behavior?**

It shouldn't error.

**Please tell us about your environment:**

- version: `3.6-SNAPSHOT`

**Other Information**

**What is the use case for changing the behavior?**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.