Unverified Commit 13a46c4d authored by Schuyler Eldridge's avatar Schuyler Eldridge Committed by GitHub
Browse files

Revert "Shift right produce at least 1 bit width result (#3752)" (#3817)

Revert changes to the width of static shift right.  Originally, Chisel
would return a 0-bit value.  However, this violated the FIRRTL spec which
mandated that this return a 1-bit value.  FIRRTL compilers would then
clean this up, however, if a user looks at the Chisel-determined width
they would get the wrong answer.

Commit 1634320c made Chisel align with
FIRRTL.  After additional discussion, it was decided that the best course
of action was to make FIRRTL _align with Chisel_ for UInt, but not for
SInt.  Specifically, the following behaviors are what we want to move
towards:

  1. The smallest width of a UInt shifted right is 0-bit
  2. The smallest width of an SInt shifted right is 1-bit

This will then be handled with changes to the FIRRTL spec and by FIRRTL
compilers.  In the mean time, do not introduce incorrect behavior in
Chisel and preserve things the way they were.

This reverts commit 1634320c

.

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@sifive.com>
parent e271ec26
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment