This commit is contained in:
Raphael Jacquot 2019-02-11 10:41:34 +01:00
parent 6407e6673e
commit 8b63d25e8f
6 changed files with 16 additions and 16 deletions

View file

@ -12,7 +12,7 @@
4'h4: decstate <= `DEC_14X;
4'h5: decstate <= `DEC_15X;
4'h6, 4'h7, 4'h8, 4'hC: begin
t_ptr <= (nb_in[0] & nb_in[1]) | (nb_in[2] & nb_in[3]);
t_ptr <= (nb_in[0] && nb_in[1]) || (nb_in[2] && nb_in[3]);
t_add_sub <= nb_in[3];
decstate <= `DEC_PTR_MATH;
end

View file

@ -14,13 +14,6 @@
alu_reg_dest <= `ALU_REG_C;
alu_op <= `ALU_OP_COPY;
// alu_debug <= 1;
decstate <= `DEC_ALU_INIT;
alu_return <= `DEC_START;
// `ifdef SIM
// $write("%5h LC (%h)\t%1h", inst_start_PC, t_cnt, nb_in);
// for(t_ctr = 0; t_ctr != t_cnt; t_ctr ++)
// $write("%1h", C[(((t_cnt - t_ctr - 4'h1)+P)%16)*4+:4]);
// $write("\n");
// `endif
end

View file

@ -1,4 +1,11 @@
`DEC_AC_BIT_SET_TEST: begin
/******************************************************************************
* 82x
*
* lots of things there
*
*/
`DEC_AC_BIT_SET_TEST: begin
$display("ERROR: %h | t_reg %b | t_set_test %b | t_set_test_val %b",
nb_in, t_reg, t_set_test, t_set_test_val);
if (!t_set_test) begin

View file

@ -14,7 +14,7 @@
alu_last <= 4;
alu_op <= nb_in[2]?`ALU_OP_TEST_NEQ:`ALU_OP_TEST_EQ;
if (!nb_in[3]) begin
alu_reg_src1 <= {2'b00, nb_in[0], !(nb_in[1] | nb_in[0])};
alu_reg_src1 <= {2'b00, nb_in[0], !(nb_in[1] || nb_in[0])};
alu_reg_src2 <= {2'b00, nb_in[1:0]};
end
else begin
@ -29,7 +29,7 @@
`ifdef SIM
$write("%5h ?", inst_start_PC);
case ({2'b00, (nb_in[3]?nb_in[1:0]:{nb_in[0], !(nb_in[1] | nb_in[0])})})
case ({2'b00, (nb_in[3]?nb_in[1:0]:{nb_in[0], !(nb_in[1] || nb_in[0])})})
`ALU_REG_A: $write("A");
`ALU_REG_B: $write("B");
`ALU_REG_C: $write("C");

View file

@ -20,7 +20,7 @@
if (!nb_in[2]) alu_op <= `ALU_OP_ZERO;
else begin
alu_op <= `ALU_OP_COPY;
alu_reg_src1 <= {2'b00, nb_in[0], (!(nb_in[0] | nb_in[1])) & nb_in[2]};
alu_reg_src1 <= {2'b00, nb_in[0], (!(nb_in[0] || nb_in[1])) && nb_in[2]};
end;
end else begin
$display("DEC_Axx_EXEC %h", nb_in);

View file

@ -20,17 +20,17 @@
2'b01: begin
alu_op <= `ALU_OP_COPY;
alu_reg_dest <= {2'b00, nb_in[1:0]};
alu_reg_src1 <= {2'b00, nb_in[0], !(nb_in[1] | nb_in[0])};
alu_reg_src1 <= {2'b00, nb_in[0], !(nb_in[1] || nb_in[0])};
end
2'b10: begin
alu_op <= `ALU_OP_COPY;
alu_reg_dest <= {2'b00, nb_in[0], !(nb_in[1] | nb_in[0])};
alu_reg_dest <= {2'b00, nb_in[0], !(nb_in[1] || nb_in[0])};
alu_reg_src1 <= {2'b00, nb_in[1:0]};
end
2'b11: begin
alu_op <= `ALU_OP_EXCH;
alu_reg_dest <= {2'b00, nb_in[1] & nb_in[0], (!nb_in[1]) & nb_in[0]};
alu_reg_src1 <= {2'b00, nb_in[1] | nb_in[0], (!nb_in[1]) ^ nb_in[0]};
alu_reg_dest <= {2'b00, nb_in[1] && nb_in[0], (!nb_in[1]) && nb_in[0]};
alu_reg_src1 <= {2'b00, nb_in[1] || nb_in[0], (!nb_in[1]) ^ nb_in[0]};
alu_halt <= 1;
end
endcase