When I am running a code for testing in fixedpoint, I am getting an error. Can anyone help me with the code??? Code:
import chisel3._
import chisel3.util._
import chisel3.experimental.FixedPoint
import chisel3.internal.ChiselException
import scala.language.experimental.macros
class FPMul extends Module {
val io = IO(new Bundle {
val a = Input(FixedPoint(4.W, 2.BP))
val b = Input(FixedPoint(4.W, 2.BP))
val p = Output(FixedPoint(8.W, 2.BP))
})
io.p := io.a + io.b / 6.0.F(0.BP)
}
Error:
#### chisel3.internal.ChiselException: division is illegal on FixedPoint types**
Your help is highly appreciated.
It's simply not possible with
FixedPoint
.As Jack explained it, if you want to do division, you will need to implement it yourself.