1
0
rocket-chip/rocket/src/main/scala/consts.scala

58 lines
1.1 KiB
Scala
Raw Normal View History

2014-09-13 03:06:41 +02:00
// See LICENSE for license details.
package rocket
2012-10-08 05:15:54 +02:00
package constants
import Chisel._
2011-12-09 09:42:43 +01:00
import scala.math._
2012-10-08 05:15:54 +02:00
trait ScalarOpConstants {
2012-11-25 13:24:25 +01:00
val SZ_BR = 3
2012-10-10 06:35:03 +02:00
val BR_X = Bits("b???", 3)
val BR_EQ = Bits(0, 3)
val BR_NE = Bits(1, 3)
val BR_J = Bits(2, 3)
val BR_N = Bits(3, 3)
val BR_LT = Bits(4, 3)
val BR_GE = Bits(5, 3)
val BR_LTU = Bits(6, 3)
val BR_GEU = Bits(7, 3)
2012-10-10 06:35:03 +02:00
2013-09-12 12:44:38 +02:00
val A1_X = Bits("b??", 2)
val A1_ZERO = UInt(0, 2)
val A1_RS1 = UInt(1, 2)
2014-02-11 04:04:42 +01:00
val A1_PC = UInt(2, 2)
2013-09-12 12:44:38 +02:00
val IMM_X = Bits("b???", 3)
val IMM_S = UInt(0, 3)
val IMM_SB = UInt(1, 3)
val IMM_U = UInt(2, 3)
val IMM_UJ = UInt(3, 3)
val IMM_I = UInt(4, 3)
val IMM_Z = UInt(5, 3)
2013-09-12 12:44:38 +02:00
val A2_X = Bits("b??", 2)
val A2_ZERO = UInt(0, 2)
val A2_FOUR = UInt(1, 2)
val A2_RS2 = UInt(2, 2)
val A2_IMM = UInt(3, 2)
val X = Bool.DC
val N = Bool(false)
val Y = Bool(true)
val SZ_DW = 1
val DW_X = X
val DW_32 = N
val DW_64 = Y
val DW_XPR = Y
2015-03-14 10:49:07 +01:00
val SZ_PRV = 2
val PRV_U = 0
val PRV_S = 1
val PRV_H = 2
val PRV_M = 3
val RA = UInt(1, 5)
2012-10-08 05:15:54 +02:00
}