Reputation: 407
I want to convert Seq[Bool] into a UInt value. I try asUInt method, but it report an error that asUInt is not a member of IndexedSeq.
For example:
val valid = Wire(Vec(4, Bool()))
val ready = Wire(Vec(4, Bool()))
val fire = (valid zip ready).map{case (vld, rdy) => vld && rdy}
val fire_mask = fire.asUInt()
Upvotes: 1
Views: 713
Reputation: 3761
You should convert fire
to Chisel Vec
instead of Scala Vector
:
val fire = VecInit((valid zip ready).map{case (vld, rdy) => vld && rdy})
Upvotes: 3