UseLegacyWidthBehavior

chisel3.stage.UseLegacyWidthBehavior

Use legacy Chisel width behavior.

'''This should only be used for checking for unexpected semantic changes when bumping to Chisel 7.0.0.'''

Use as CLI option --use-legacy-width.

There are two width bugs fixed in Chisel 7.0 that could affect the semantics of user code. Enabling this option will restore the old, buggy behavior, described below:

  1. The width of shift-right when shift amount is >= the width of the argument

When this option is enabled, the behavior is as follows:

  • Calling .getWidth on the resulting value will report the width as 0.
  • The width of the resulting value will be treated as 1-bit for generating Verilog.
  1. The width of ChiselEnum values

When this option is enabled, the behavior is as follows:

  • Calling .getWidth on a specific ChiselEnum value will give the width needed to encode the enum. This is the minimum width needed to encode the maximum value encoded by the enum.
  • The resulting FIRRTL will have the minimum width needed to encode the literal value for just that specific enum value.

Attributes

Source
ChiselAnnotations.scala
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait ChiselOption
trait Annotation
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
Source
Mirror.scala
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton
Source
Mirror.scala

Inherited and Abstract types

type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Inherited methods

final def addOptions(p: OptionParser[AnnotationSeq]): Unit

Add all shell (command line) options to an option parser

Add all shell (command line) options to an option parser

Value parameters

p

an option parser

Attributes

Inherited from:
HasShellOptions
Source
Registration.scala
def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
Source
Mirror.scala
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def serialize: String

Optional pretty print

Optional pretty print

Attributes

Note

rarely used

Inherited from:
Annotation
Source
Annotation.scala
def update(renames: RenameMap): Seq[NoTargetAnnotation]

Update the target based on how signals are renamed

Update the target based on how signals are renamed

Attributes

Inherited from:
NoTargetAnnotation
Source
Annotation.scala

Concrete fields

val options: Seq[ShellOption[_]]

A sequence of options provided

A sequence of options provided

Attributes

Source
ChiselAnnotations.scala