After some more tinkering around I'm replying myself…
Should have found this out earlier.
One solution is:
val decReg = Reg(new FeDec())
when (io.ena) {
decReg := io.fedec
}
FeDec() is the data type (Bundle) of io.fedec.
Using the some trick with reset value works as well:
val decReg = Reg(resetVal = new FeDec())
when (io.ena) {
decReg := io.fedec
}
Cheers,
Martin
> --
> You received this message because you are subscribed to the Google Groups "chisel-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
chisel-users...@googlegroups.com.
> To post to this group, send email to
chisel...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
>