cop1x fix

This commit is contained in:
cxy004 2022-08-12 18:14:39 +08:00
parent 2cdcbfadab
commit 5ab3445482

View File

@ -13,13 +13,16 @@ module decoder2 (
assign CU2 = {CU[3:1], CU[0] | kernel};
always_comb begin
ri = 1'b1;
ce = instr[27:26];
cpu = ce != 2'b11
& ~CU2[ce] & ( instr[31:28] == 4'b0100 // COPx
| instr[31:28] == 4'b1100 // LWCx
| instr[31:28] == 4'b1101 // LDCx
| instr[31:28] == 4'b1110 // SWCx
| instr[31:28] == 4'b1111 // SDCx
ce = {instr[27] & ~instr[26], instr[26]};
cpu = ~CU2[ce] & ( instr[31:28] == 4'b0100 // COPx
| instr[31:26] == 6'b110001 // LWC1
| instr[31:26] == 6'b110010 // LWC2
| instr[31:26] == 6'b110101 // LDC1
| instr[31:26] == 6'b110110 // LDC2
| instr[31:26] == 4'b111001 // SWC1
| instr[31:26] == 4'b111010 // SWC2
| instr[31:26] == 4'b111101 // SDC1
| instr[31:26] == 4'b111110 // SDC2
); // TODO: Cache instruction
casez (instr)
32'b00000000000???????????????000000: ri = 1'b0; // SLL