chipsalliance / chipsalliance/chisel

Should we allow bit-select on/with Bool() type?

Open
#2,946 2 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**: Feature Request

**Is your feature request related to a problem? Please describe.**

It is nonintuitive what it is supposed to mean if you have a Bool type and do a bit-select on it (which is apparently allowed even if the thing you are bit-selecting with is a boolean!). IN fact it is strange that we allow a Bool to be the selector too.

**Describe the solution you'd like**

It would make more sense if it were a compile or runtime error to do a bitselect on a Bool type or a bitSelect where the selector is a Bool type.

**Describe alternatives you've considered**

Leave things as they are

**Additional context**

https://scastie.scala-lang.org/HU5nisSDQR6g35rO66Nzhg

**What is the use case for implementing this feature?**

What is the use case for allowing this?

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.