Skip to content
Permalink
Browse files

Raise illegal instruction exception when l.ror is not implemented

Instead of throwing an illegal instruction exception when the rotate
instructions are disabled (OR1200_ALU_IMPL_ROTATE is undefined), another
instruction (slr?) was executed instead.

This closes bug 97

Signed-off-by: Olof Kindgren <olof at opencores.org>
acked-by: Julius Baxter <julius at opencores.org>
  • Loading branch information...
olof
olof committed Oct 20, 2013
1 parent 0c3e1ce commit 26febe37c93640be91497dc500567663a0f41da0
Showing with 6 additions and 3 deletions.
  1. +6 −3 rtl/verilog/or1200_ctrl.v
@@ -698,7 +698,9 @@ always @(posedge clk or `OR1200_RST_EVENT rst) begin
`ifdef OR1200_MULT_IMPLEMENTED
`OR1200_OR32_MULI,
`endif
`ifdef OR1200_IMPL_ALU_ROTATE
`OR1200_OR32_SH_ROTI,
`endif
`OR1200_OR32_SFXXI,
`OR1200_OR32_MTSPR,
`ifdef OR1200_MAC_IMPLEMENTED
@@ -810,11 +812,11 @@ always @(posedge clk or `OR1200_RST_EVENT rst) begin
`OR1200_OR32_MULI:
alu_op <= `OR1200_ALUOP_MUL;
`endif

`ifdef OR1200_IMPL_ALU_ROTATE
// Shift and rotate insns with immediate
`OR1200_OR32_SH_ROTI:
alu_op <= `OR1200_ALUOP_SHROT;
`endif
// SFXX insns with immediate
`OR1200_OR32_SFXXI:
alu_op <= `OR1200_ALUOP_COMP;
@@ -1008,9 +1010,10 @@ always @(posedge clk or `OR1200_RST_EVENT rst) begin
`endif

// Shift and rotate insns with immediate
`ifdef OR1200_IMPL_ALU_ROTATE
`OR1200_OR32_SH_ROTI:
rfwb_op <= {`OR1200_RFWBOP_ALU, 1'b1};
`endif
// ALU instructions except the one with immediate
`OR1200_OR32_ALU:
rfwb_op <= {`OR1200_RFWBOP_ALU, 1'b1};

0 comments on commit 26febe3

Please sign in to comment.
You can’t perform that action at this time.