Replies: 4 comments 8 replies
-
@hovind FYI |
Beta Was this translation helpful? Give feedback.
-
We should add this to Chisel itself (or better yet, implement object Whatever {
implicit class SeqExtensions[T <: Data](xs: Seq[T]) {
def :<>=(rhs: Seq[T]): Unit =
xs.zip(rhs).foreach { case (l, r) => l :<>= r }
}
} Then you just make sure to import import Whatever._
// or
import Whatever.SeqExtensions Then you can use the extension operator: foo.map(_.io.foo) :<>= io.foo I am using |
Beta Was this translation helpful? Give feedback.
-
I would encourage us if we add this to chisel to add a check that the sequences are the same length |
Beta Was this translation helpful? Give feedback.
-
Example of how to do this without waiting for a Chisel upgrade: https://scastie.scala-lang.org/f8sVrCjcRuqOCARbgkx28w |
Beta Was this translation helpful? Give feedback.
-
Is there a way to use
<>
for Seq?So I have a local variable Seq[Foo] of modules, and a val bar=Vec(n, new FooBundlke()) in my io and I want to hook the Foos to the io...
Beta Was this translation helpful? Give feedback.
All reactions