+ rd_req = 0;
+ wr_req = 1;
+ next_write_reg = 0;
+ case (busaddr[1:0])
+ 2'b00: wr_data = {rd_data_latch[31:8], op2[7:0]};
+ 2'b01: wr_data = {rd_data_latch[31:16], op2[7:0], rd_data_latch[7:0]};
+ 2'b10: wr_data = {rd_data_latch[31:24], op2[7:0], rd_data_latch[15:0]};
+ 2'b11: wr_data = {op2[7:0], rd_data_latch[23:0]};
+ endcase
+ if(insn[21] /* W */ | !insn[24] /* P */) begin
+ if(!rw_wait)
+ next_lsr_state = 4'b0100;
+ end else if (!rw_wait)
+ next_lsr_state = 4'b1000;
+ end
+ 4'b0100: begin
+ outstall = 1;
+ rd_req = 0;
+ wr_req= 0;