Skip to content

Commit d676295

Browse files
committed
Improve API using some unmerged PRs
1 parent 753378b commit d676295

File tree

3 files changed

+64
-70
lines changed

3 files changed

+64
-70
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ lazy val chiselv = (project in file("."))
2727

2828
// Default library versions
2929
lazy val versions = new {
30-
val chisel3 = "3.5.0-RC2"
30+
val chisel3 = "3.5-SNAPSHOT"
3131
val chiseltest = "0.5.0-RC2"
3232
val scalatest = "3.2.10"
3333
val organizeimports = "0.5.0"

src/main/scala/Constants.scala

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package chiselv
22

3-
import chisel3._
4-
import chisel3.experimental.ChiselEnum
3+
import chisel3.experimental.{ChiselEnum, ChiselEnum1H}
54

65
object Instruction extends ChiselEnum {
76
val ERR,
@@ -21,13 +20,6 @@ object Instruction extends ChiselEnum {
2120
= Value
2221
}
2322

24-
object InstructionType extends ChiselEnum {
25-
val INST_I = Value((1 << 0).U)
26-
val INST_S = Value((1 << 1).U)
27-
val INST_B = Value((1 << 2).U)
28-
val INST_U = Value((1 << 3).U)
29-
val INST_J = Value((1 << 4).U)
30-
val INST_Z = Value((1 << 5).U)
31-
val INST_R = Value((1 << 6).U)
32-
val IN_ERR = Value((1 << 7).U)
23+
object InstructionType extends ChiselEnum1H {
24+
val INST_I, INST_S, INST_B, INST_U, INST_J, INST_Z, INST_R, IN_ERR = Value
3325
}

0 commit comments

Comments
 (0)