Skip to content
Permalink
Browse files

or1200: l.lws support

Using the l.lws instruction doesn't work currently.
It simply skips the instruction. No exception or reaction.
The patch attached simply duplicates the behaviour of
l.lwz for l.lws.

Patch by: Jeppe Græsdal Johansen <jjohan07@student.aau.dk>
  • Loading branch information...
stekern
stekern committed Oct 25, 2012
1 parent ade38f8 commit 385ffbf33cc08ae598109c30af5f64fe15a68615
Showing with 13 additions and 2 deletions.
  1. +12 −2 rtl/verilog/or1200_ctrl.v
  2. +1 −0 rtl/verilog/or1200_defines.v
@@ -275,7 +275,8 @@ always @(id_insn) begin
id_simm = {{16{id_insn[15]}}, id_insn[15:0]};

// l.lxx (load instructions)
`OR1200_OR32_LWZ, `OR1200_OR32_LBZ, `OR1200_OR32_LBS,
`OR1200_OR32_LWZ, `OR1200_OR32_LWS,
`OR1200_OR32_LBZ, `OR1200_OR32_LBS,
`OR1200_OR32_LHZ, `OR1200_OR32_LHS:
id_simm = {{16{id_insn[15]}}, id_insn[15:0]};

@@ -684,6 +685,7 @@ always @(posedge clk or `OR1200_RST_EVENT rst) begin
`OR1200_OR32_MACI,
`endif
`OR1200_OR32_LWZ,
`OR1200_OR32_LWS,
`OR1200_OR32_LBZ,
`OR1200_OR32_LBS,
`OR1200_OR32_LHZ,
@@ -958,7 +960,11 @@ always @(posedge clk or `OR1200_RST_EVENT rst) begin
// l.lwz
`OR1200_OR32_LWZ:
rfwb_op <= {`OR1200_RFWBOP_LSU, 1'b1};


// l.lws
`OR1200_OR32_LWS:
rfwb_op <= {`OR1200_RFWBOP_LSU, 1'b1};

// l.lbz
`OR1200_OR32_LBZ:
rfwb_op <= {`OR1200_RFWBOP_LSU, 1'b1};
@@ -1096,6 +1102,10 @@ always @(id_insn) begin
`OR1200_OR32_LWZ:
id_lsu_op = `OR1200_LSUOP_LWZ;

// l.lws
`OR1200_OR32_LWS:
id_lsu_op = `OR1200_LSUOP_LWS;

// l.lbz
`OR1200_OR32_LBZ:
id_lsu_op = `OR1200_LSUOP_LBZ;
@@ -699,6 +699,7 @@
`define OR1200_OR32_MACI 6'b010011
/* */
`define OR1200_OR32_LWZ 6'b100001
`define OR1200_OR32_LWS 6'b100010
`define OR1200_OR32_LBZ 6'b100011
`define OR1200_OR32_LBS 6'b100100
`define OR1200_OR32_LHZ 6'b100101

0 comments on commit 385ffbf

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