Rewrite exercise stuff
This commit is contained in:
parent
932413bb3d
commit
f5d038eaf6
9 changed files with 330 additions and 148 deletions
|
@ -5,26 +5,6 @@ import chisel3.util._
|
|||
import chisel3.core.Input
|
||||
import chisel3.iotesters.PeekPokeTester
|
||||
|
||||
|
||||
// From RISC-V reference card
|
||||
object ALUOps {
|
||||
|
||||
val ADD = 0.U(4.W)
|
||||
val SUB = 1.U(4.W)
|
||||
val AND = 2.U(4.W)
|
||||
val OR = 3.U(4.W)
|
||||
val XOR = 4.U(4.W)
|
||||
val SLT = 5.U(4.W)
|
||||
val SLL = 6.U(4.W)
|
||||
val SLTU = 7.U(4.W)
|
||||
val SRL = 8.U(4.W)
|
||||
val SRA = 9.U(4.W)
|
||||
val COPY_A = 10.U(4.W)
|
||||
val COPY_B = 11.U(4.W)
|
||||
|
||||
val DC = 15.U(4.W)
|
||||
}
|
||||
|
||||
object lookup {
|
||||
def BEQ = BitPat("b?????????????????000?????1100011")
|
||||
def BNE = BitPat("b?????????????????001?????1100011")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue