Add Jump instructions
This commit is contained in:
parent
ce288f2840
commit
d2b945d974
|
@ -36,6 +36,8 @@
|
||||||
// Program counter
|
// Program counter
|
||||||
$next_pc[31:0] = $reset ? 0 :
|
$next_pc[31:0] = $reset ? 0 :
|
||||||
$taken_br ? $br_tgt_pc :
|
$taken_br ? $br_tgt_pc :
|
||||||
|
$is_jal ? $br_tgt_pc :
|
||||||
|
$is_jalr ? $jalr_tgt_pc :
|
||||||
($pc + 4);
|
($pc + 4);
|
||||||
$pc[31:0] = >>1$next_pc;
|
$pc[31:0] = >>1$next_pc;
|
||||||
|
|
||||||
|
@ -124,9 +126,12 @@
|
||||||
$is_bgeu ? $src1_value >= $src2_value :
|
$is_bgeu ? $src1_value >= $src2_value :
|
||||||
0;
|
0;
|
||||||
|
|
||||||
// Branch target
|
// Branch/JAL target
|
||||||
$br_tgt_pc[31:0] = $pc + $imm;
|
$br_tgt_pc[31:0] = $pc + $imm;
|
||||||
|
|
||||||
|
// Jump and link register target
|
||||||
|
$jalr_tgt_pc[31:0] = $src1_value + $imm;
|
||||||
|
|
||||||
// Arithmetic Logic Unit
|
// Arithmetic Logic Unit
|
||||||
$sltu_rslt[31:0] = {31'b0, $src1_value < $src2_value};
|
$sltu_rslt[31:0] = {31'b0, $src1_value < $src2_value};
|
||||||
$sltiu_rslt[31:0] = {31'b0, $src1_value < $imm};
|
$sltiu_rslt[31:0] = {31'b0, $src1_value < $imm};
|
||||||
|
|
Loading…
Reference in New Issue