Add jal instruction
This commit is contained in:
@@ -20,6 +20,14 @@ class ImmediateDecoder extends Module {
|
||||
val imm_u = Cat(io.instruction(31, 12), 0.U(12.W));
|
||||
val imm_i = Cat(Fill(20, io.instruction(31)), io.instruction(31, 20));
|
||||
val imm_ir = io.instruction(24, 20);
|
||||
val imm_j = Cat(
|
||||
Fill(11, io.instruction(31)),
|
||||
io.instruction(31),
|
||||
io.instruction(19, 12),
|
||||
io.instruction(20),
|
||||
io.instruction(30, 21),
|
||||
0.U
|
||||
);
|
||||
|
||||
switch(io.op_type) {
|
||||
is(OpType.U) {
|
||||
@@ -31,5 +39,8 @@ class ImmediateDecoder extends Module {
|
||||
is(OpType.IR) {
|
||||
io.immediate := imm_ir
|
||||
}
|
||||
is(OpType.J) {
|
||||
io.immediate := imm_j
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user