end record alu_testv;
-- ggf. groesse des arrays erhoehen
- type alu_testv_array is array (natural range 0 to 60) of alu_testv;
+ type alu_testv_array is array (natural range 0 to 65) of alu_testv;
variable testmatrix : alu_testv_array :=
( 0 => (-5, ALU_DIV, 3, 2, -1, false),
54 => (0, ALU_DIV, 10, 0, 0, false),
55 => (10, ALU_DIV, 10, 0, 1, false),
56 => (5134123, ALU_DIV, 358015, 121913, 14, false),
+ -- extra
+ 60 => (5, ALU_SUB, -2147483648, 0, 0, true),
others => (0, ALU_ADD, 0, 0, 0, false)
);
variable checkall : boolean := true;
case opp_int is
when ALU_NOP | ALU_ADD | ALU_SUB =>
case opp_int is
- when ALU_SUB => op1_next <= (not tmp) + 1;
+ when ALU_SUB =>
+ -- xst (xilinx) workaround
+ if x"80000000" = tmp then
+ -- vgl. testfall 37 und 38
+ err_next <= 3;
+ op1_next <= tmp;
+ else
+ op1_next <= (not tmp) + 1;
+ end if;
when others => op1_next <= tmp;
end case;
case aktop_int is
punkt_next <= op3;
when others => assert (false) report "SCALC_2/1: shouldn't happen!";
end case;
+ when ALU_DONE => null;
when others => assert (false) report "SCALC_2/2: shouldn't happen!";
end case;
-- aktuelle rechenoperation fuer naechste 'runde' uebernehmen