Skip to content

Commit

Permalink
Rename decoded_imm_uj to decoded_imm_j
Browse files Browse the repository at this point in the history
Signed-off-by: Clifford Wolf <clifford@clifford.at>
  • Loading branch information
cliffordwolf committed Mar 2, 2019
1 parent 6efa7d1 commit 6d145b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions picorv32.v
Expand Up @@ -637,7 +637,7 @@ module picorv32 #(
wire instr_trap;

reg [regindex_bits-1:0] decoded_rd, decoded_rs1, decoded_rs2;
reg [31:0] decoded_imm, decoded_imm_uj;
reg [31:0] decoded_imm, decoded_imm_j;
reg decoder_trigger;
reg decoder_trigger_q;
reg decoder_pseudo_trigger;
Expand Down Expand Up @@ -859,7 +859,7 @@ module picorv32 #(
is_alu_reg_imm <= mem_rdata_latched[6:0] == 7'b0010011;
is_alu_reg_reg <= mem_rdata_latched[6:0] == 7'b0110011;

{ decoded_imm_uj[31:20], decoded_imm_uj[10:1], decoded_imm_uj[11], decoded_imm_uj[19:12], decoded_imm_uj[0] } <= $signed({mem_rdata_latched[31:12], 1'b0});
{ decoded_imm_j[31:20], decoded_imm_j[10:1], decoded_imm_j[11], decoded_imm_j[19:12], decoded_imm_j[0] } <= $signed({mem_rdata_latched[31:12], 1'b0});

decoded_rd <= mem_rdata_latched[11:7];
decoded_rs1 <= mem_rdata_latched[19:15];
Expand All @@ -878,8 +878,8 @@ module picorv32 #(
decoded_rs1 <= 0;
decoded_rs2 <= 0;

{ decoded_imm_uj[31:11], decoded_imm_uj[4], decoded_imm_uj[9:8], decoded_imm_uj[10], decoded_imm_uj[6],
decoded_imm_uj[7], decoded_imm_uj[3:1], decoded_imm_uj[5], decoded_imm_uj[0] } <= $signed({mem_rdata_latched[12:2], 1'b0});
{ decoded_imm_j[31:11], decoded_imm_j[4], decoded_imm_j[9:8], decoded_imm_j[10], decoded_imm_j[6],
decoded_imm_j[7], decoded_imm_j[3:1], decoded_imm_j[5], decoded_imm_j[0] } <= $signed({mem_rdata_latched[12:2], 1'b0});

case (mem_rdata_latched[1:0])
2'b00: begin // Quadrant 0
Expand Down Expand Up @@ -1100,7 +1100,7 @@ module picorv32 #(
(* parallel_case *)
case (1'b1)
instr_jal:
decoded_imm <= decoded_imm_uj;
decoded_imm <= decoded_imm_j;
|{instr_lui, instr_auipc}:
decoded_imm <= mem_rdata_q[31:12] << 12;
|{instr_jalr, is_lb_lh_lw_lbu_lhu, is_alu_reg_imm}:
Expand Down Expand Up @@ -1545,7 +1545,7 @@ module picorv32 #(
end
if (instr_jal) begin
mem_do_rinst <= 1;
reg_next_pc <= current_pc + decoded_imm_uj;
reg_next_pc <= current_pc + decoded_imm_j;
latched_branch <= 1;
end else begin
mem_do_rinst <= 0;
Expand Down

0 comments on commit 6d145b7

Please sign in to comment.