I'm taking log2 of following calculation:
tl_out.a.bits.size := log2Ceil(s1_row * s2_column * 4.U)
where, s1_row and s2_column are UInt. I'm getting following error:
[info] Compiling 1 Scala source to ...rocket-chip/target/scala-2.12/classes ...
[error] ...scala:199:25: overloaded method value apply with alternatives:
[error] (in: Int)Int <and>
[error] (in: BigInt)Int
[error] cannot be applied to (chisel3.core.UInt)
[error] tl_out.a.bits.size := log2Ceil(s1_row * s2_column * 4.U)
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
It seems that log2Ceil can not be performed on UInt/SInt. Is there any way to typecast UINT/SInt or alternate method for log2Ceil which can be performed over UInt? Please assist...
Thanks & Regards,