I defined several varabiales, including post_addra, h_rdata and addra.
val post_addra=RegInit(0.U)
val addra=RegInit(0.U)
val h_rdata=RegInit(0.U)
Since post_addra is determined by h_rdata and addra. So I write this code.
post_addra := h_rdata(((addra+1.U) << 4.U)-1.U , (addra << 4.U) + 8.U)
However I got an error.
"[error] (x: BigInt,y: BigInt)chisel3.core.UInt
[error] (x: Int,y: Int)chisel3.core.UInt
[error] cannot be applied to (chisel3.core.UInt, chisel3.core.UInt)
[error] post_addra := h_rdata(((addra+1.U) << 4.U)-1.U , (addra << 4.U) + 8.U)"
The Chisel does not support using uint to extract. What should I do.