Implements (mostly untested) rv64i)
This commit is contained in:
@@ -15,11 +15,18 @@ object OpLoad {
|
||||
|
||||
// Meaning of Funct3 in the context of an OpLoad instruction
|
||||
object Funct3 extends ChiselEnum {
|
||||
// Zero extend
|
||||
val LB = "b000".U
|
||||
val LH = "b001".U
|
||||
val LW = "b010".U
|
||||
|
||||
// Sign extend
|
||||
val LBU = "b100".U
|
||||
val LHU = "b101".U
|
||||
val LWU = "b110".U
|
||||
|
||||
// Arch width
|
||||
val LD = "b011".U
|
||||
}
|
||||
|
||||
io.optype := OpType.I
|
||||
@@ -55,6 +62,16 @@ object OpLoad {
|
||||
is(Funct3.LW) {
|
||||
io.memory_size := DMemSize.Word
|
||||
}
|
||||
is(Funct3.LWU) {
|
||||
io.memory_size := DMemSize.Word
|
||||
io.memory_sign_extend := true.B;
|
||||
}
|
||||
|
||||
// Long load
|
||||
is(Funct3.LD) {
|
||||
io.memory_size := DMemSize.Long
|
||||
io.memory_sign_extend := true.B;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user