Compare commits
No commits in common. "9ed3dc3312896814674273d8c112da0dc2cb08ee" and "808827cbdd462cf7028318be8232084e551f4a1f" have entirely different histories.
9ed3dc3312
...
808827cbdd
@ -100,17 +100,19 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
|
||||
reg_read_port2_addr={Wbit,3'b000};
|
||||
reg_write_addr={Wbit,3'b000};
|
||||
ALU_1OP=`ALU_OP_ADD;
|
||||
if(Wbit)
|
||||
next_state=`PROC_DE_LOAD_16_PARAM;
|
||||
else
|
||||
case({Sbit,Wbit})
|
||||
2'b00,2'b11:
|
||||
next_state=`PROC_DE_LOAD_8_PARAM;
|
||||
2'b01:
|
||||
next_state=`PROC_DE_LOAD_16_PARAM;
|
||||
default:begin
|
||||
`invalid_instruction
|
||||
end
|
||||
11'b1000_00xx_101, /* SUB */
|
||||
11'b1000_00xx_000 : /* ADD */ begin
|
||||
endcase
|
||||
end
|
||||
11'b1000_00xx_000 : begin
|
||||
/* 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 | */
|
||||
/* 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;
|
||||
has_operands=1;
|
||||
Wbit=CIR[8:8];
|
||||
@ -122,6 +124,7 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
|
||||
OUT_MOD={1'b0,IN_MOD};
|
||||
reg_read_port2_addr={Wbit,RM};
|
||||
reg_write_addr={Wbit,RM};
|
||||
ALU_1OP=`ALU_OP_ADD;
|
||||
case({Sbit,Wbit})
|
||||
2'b00,2'b11:begin
|
||||
`start_unaligning_instruction
|
||||
@ -135,14 +138,6 @@ always @( CIR or SIMPLE_MICRO or seq_addr_input ) begin
|
||||
`invalid_instruction
|
||||
end
|
||||
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
|
||||
11'b1000_00xx_111 : begin
|
||||
/* CMP - compare Immediate with register / memory */
|
||||
|
Loading…
Reference in New Issue
Block a user