Compare commits

..

No commits in common. "9ed3dc3312896814674273d8c112da0dc2cb08ee" and "808827cbdd462cf7028318be8232084e551f4a1f" have entirely different histories.

View File

@ -100,17 +100,19 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
reg_read_port2_addr={Wbit,3'b000}; reg_read_port2_addr={Wbit,3'b000};
reg_write_addr={Wbit,3'b000}; reg_write_addr={Wbit,3'b000};
ALU_1OP=`ALU_OP_ADD; ALU_1OP=`ALU_OP_ADD;
if(Wbit) case({Sbit,Wbit})
next_state=`PROC_DE_LOAD_16_PARAM; 2'b00,2'b11:
else next_state=`PROC_DE_LOAD_8_PARAM;
next_state=`PROC_DE_LOAD_8_PARAM; 2'b01:
next_state=`PROC_DE_LOAD_16_PARAM;
default:begin
`invalid_instruction
end
endcase
end end
11'b1000_00xx_101, /* SUB */ 11'b1000_00xx_000 : begin
11'b1000_00xx_000 : /* ADD */ begin
/* ADD - Add Immediate word/byte to register/memory */ /* ADD - Add Immediate word/byte to register/memory */
/* 1 0 0 0 0 0 S W | MOD 0 0 0 R/M | < DISP LO > | < DISP HI > | DATA | DATA if W | */ /* 1 0 0 0 0 0 S W | MOD 0 0 0 R/M | < DISP LO > | < DISP HI > | DATA | DATA if W | */
/* SUB - Subtract mmediate word/byte from register/memory */
/* 1 0 0 0 0 0 S W | MOD 0 0 0 R/M | < DISP LO > | < DISP HI > | DATA | DATA if W | */
opcode_size=1; opcode_size=1;
has_operands=1; has_operands=1;
Wbit=CIR[8:8]; Wbit=CIR[8:8];
@ -122,6 +124,7 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
OUT_MOD={1'b0,IN_MOD}; OUT_MOD={1'b0,IN_MOD};
reg_read_port2_addr={Wbit,RM}; reg_read_port2_addr={Wbit,RM};
reg_write_addr={Wbit,RM}; reg_write_addr={Wbit,RM};
ALU_1OP=`ALU_OP_ADD;
case({Sbit,Wbit}) case({Sbit,Wbit})
2'b00,2'b11:begin 2'b00,2'b11:begin
`start_unaligning_instruction `start_unaligning_instruction
@ -135,14 +138,6 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
`invalid_instruction `invalid_instruction
end end
endcase endcase
case(CIR[5:3])
3'b000: ALU_1OP=`ALU_OP_ADD;
3'b101: ALU_1OP=`ALU_OP_SUB_REVERSE;
default:begin
/*Should be impossible*/
`invalid_instruction
end
endcase
end end
11'b1000_00xx_111 : begin 11'b1000_00xx_111 : begin
/* CMP - compare Immediate with register / memory */ /* CMP - compare Immediate with register / memory */