Construct a Wire with a default connection
Construct a Wire with a default connection
The hardware value that will serve as a type template and default value
Construct a Wire with a type template and a default connection
Construct a Wire with a type template and a chisel3.DontCare default
Utility for constructing hardware wires with a default connection
The two forms of
WireDefault
differ in how the type and width of the resulting Wire are specified.Single Argument
The single argument form uses the argument to specify both the type and default connection. For non-literal Bits, the width of the Wire will be inferred. For literal Bits and all non-Bits arguments, the type will be copied from the argument. See the following examples for more details:
1. Literal Bits initializer: width will be set to match
2. Non-Literal Element initializer - width will be inferred
3. Aggregate initializer - width will be set to match the aggregate
Double Argument
The double argument form allows the type of the Wire and the default connection to be specified independently.
The width inference semantics for
WireDefault
with two arguments match those of Wire. The first argument toWireDefault
is the type template which defines the width of theWire
in exactly the same way as the only argument to Wire.More explicitly, you can reason about
WireDefault
with multiple arguments as if it were defined as:The
Default
inWireDefault
refers to adefault
connection. This is in contrast to RegInit where theInit
refers to a value on reset.