2020-06-21 11:20:06 +08:00
|
|
|
package xiangshan.backend.exu
|
|
|
|
|
|
|
|
import chisel3._
|
|
|
|
import chisel3.util._
|
|
|
|
import xiangshan._
|
|
|
|
import xiangshan.FuType._
|
2020-07-14 19:38:20 +08:00
|
|
|
import utils._
|
2020-07-08 20:00:02 +08:00
|
|
|
import xiangshan.backend._
|
2020-11-08 09:25:42 +08:00
|
|
|
import xiangshan.backend.fu.{Alu, FunctionUnit}
|
2020-07-11 15:02:46 +08:00
|
|
|
import xiangshan.backend.fu.FunctionUnit._
|
2020-06-21 11:20:06 +08:00
|
|
|
|
2020-07-11 15:02:46 +08:00
|
|
|
|
2020-11-08 09:25:42 +08:00
|
|
|
class AluExeUnit extends Exu(
|
|
|
|
exuName = "AluExeUnit",
|
|
|
|
fuGen = Seq((FunctionUnit.alu _, (_: FunctionUnit) => true.B)),
|
|
|
|
wbIntPriority = 0,
|
|
|
|
wbFpPriority = Int.MaxValue
|
|
|
|
)
|
|
|
|
{
|
|
|
|
val alu = supportedFunctionUnits.collectFirst{
|
|
|
|
case a: Alu => a
|
|
|
|
}.get
|
|
|
|
|
2020-11-15 20:35:03 +08:00
|
|
|
io.toInt.bits.redirectValid := alu.redirectOutValid
|
|
|
|
io.toInt.bits.redirect := alu.redirectOut
|
|
|
|
io.toInt.bits.brUpdate := alu.brUpdate
|
|
|
|
}
|