1package xiangshan.backend.datapath 2 3import xiangshan.backend.datapath.DataConfig._ 4 5object RdConfig { 6 sealed abstract class RdConfig() { 7 val port: Int 8 val priority: Int 9 10 def getDataConfig: DataConfig 11 } 12 13 case class IntRD(port: Int = -1, priority: Int = Int.MaxValue) extends RdConfig() { 14 override def getDataConfig = IntData() 15 } 16 17 case class FpRD(port: Int = -1, priority: Int = Int.MaxValue) extends RdConfig() { 18 override def getDataConfig = FpData() 19 } 20 21 case class VfRD(port: Int = -1, priority: Int = Int.MaxValue) extends RdConfig() { 22 override def getDataConfig = VecData() 23 } 24 25 case class V0RD(port: Int = -1, priority: Int = Int.MaxValue) extends RdConfig() { 26 override def getDataConfig = V0Data() 27 } 28 29 case class VlRD(port: Int = -1, priority: Int = Int.MaxValue) extends RdConfig() { 30 override def getDataConfig = VlData() 31 } 32 33 case class NoRD() extends RdConfig() { 34 override val port: Int = -1 35 36 override val priority: Int = Int.MaxValue 37 38 override def getDataConfig: DataConfig = NoData() 39 } 40} 41 42