Stage 9: Full implemntation + passing tests
This commit is contained in:
@@ -28,6 +28,14 @@ class ImmediateDecoder extends Module {
|
||||
io.instruction(30, 21),
|
||||
0.U
|
||||
);
|
||||
val imm_b = Cat(
|
||||
Fill(19, io.instruction(31)),
|
||||
io.instruction(31),
|
||||
io.instruction(7),
|
||||
io.instruction(30, 25),
|
||||
io.instruction(11, 8),
|
||||
0.U
|
||||
)
|
||||
|
||||
switch(io.op_type) {
|
||||
is(OpType.U) {
|
||||
@@ -42,5 +50,8 @@ class ImmediateDecoder extends Module {
|
||||
is(OpType.J) {
|
||||
io.immediate := imm_j
|
||||
}
|
||||
is(OpType.B) {
|
||||
io.immediate := imm_b
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user