xref: /XiangShan/src/main/scala/xiangshan/backend/datapath/RdConfig.scala (revision 4daa5bf3c3f27e7fd090866d52405b21e107eb8d)
1package xiangshan.backend.datapath
2
3import xiangshan.backend.datapath.DataConfig.{DataConfig, IntData, NoData, VecData, FpData}
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 NoRD() extends RdConfig() {
26    override val port: Int = -1
27
28    override val priority: Int = Int.MaxValue
29
30    override def getDataConfig: DataConfig = NoData()
31  }
32}
33
34