Stage 9: Full implemntation + passing tests

This commit is contained in:
2025-11-07 18:03:45 +01:00
parent 2117f8155e
commit 036f432d76
10 changed files with 197 additions and 9 deletions

View File

@@ -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
}
}
}