The width of a Wire (inferred or not) is copied from the type template
val w0 = Wire(UInt()) // width is inferredval w1 = Wire(UInt(8.W)) // width is set to 8val w2 = Wire(Vec(4, UInt())) // width is inferredval w3 = Wire(Vec(4, UInt(8.W))) // width of each element is set to 8class MyBundle {
val unknown = UInt()
val known = UInt(8.W)
}
val w4 = Wire(new MyBundle)
// Width of w4.unknown is inferred// Width of w4.known is set to 8
Utility for constructing hardware wires
The width of a
Wire
(inferred or not) is copied from the type template