parser/alu: extrem mega super sonderfall bugfix
[hwmod.git] / src / parser.vhd
index c74b4cb1e801dacda11a7121a545b145bc64cd7c..8fa3a2b3c38a8679d275ff5bfd3d8956802d7354 100644 (file)
@@ -248,7 +248,9 @@ begin
                                end if;
                        when SWRITE_CHAR1 =>
                                if p_wdone = '1' then
-                                       if strich_int < 10 then
+                                       -- ueberpruefung auf -2147483648 fuer testfall 39 und 40
+                                       -- x"80000000": xst (xilinx) workaround
+                                       if strich_int < 10 and strich_int /= x"80000000" then
                                                if z_sign_int = '1' then
                                                        state_next <= SWRITE_SIGN1;
                                                else
@@ -534,7 +536,13 @@ begin
                                opp_next <= aktop_int;
 
                        when SWRITE_CHAR0 =>
-                               op1_next <= strich_int;
+                               -- fuer testfall 39 und 40
+                               if strich_int = to_signed(-214748364,CBITS) then
+                                       op1_next <= to_signed(214748364,CBITS);
+                                       strich_next <= to_signed(214748364,CBITS);
+                               else
+                                       op1_next <= strich_int;
+                               end if;
                                opcode_next <= ALU_DIV;
                                op2_next <= to_signed(10,CBITS);
                                do_calc_next <= '1';