parser/alu: extrem mega super sonderfall bugfix
[hwmod.git] / src / alu.vhd
index 014fc766c6f0210f219d1cddd57373cebc9c9304..3a8f54c67ff4d20a9cdc55c74f32ca0da61b878a 100644 (file)
@@ -215,7 +215,15 @@ begin
 
                                        aktdiv_int_next <= op1_var srl (dividend_msb_var - laengediv_var + 1);
 
-                                       if op1_var < op2_var then
+                                       -- anmerkung: xst (xilinx) kann folgende zeile nicht uebersetzen
+                                       -- > if op1 = to_signed(-2147483648, CBITS) then
+                                       -- darum folgende schreibweise ->
+                                       if op1 = x"80000000" then
+                                               -- so ziemlich das boeseste was passieren kann
+                                               div_calc_done2_int <= '1';
+                                               quo_next <= to_signed(-214748364,CBITS);
+                                               aktdiv_int_next <= to_signed(8,CBITS);
+                                       elsif (op1_var < op2_var) then
                                                div_calc_done2_int <= '1';
                                                quo_next <= to_signed(0,CBITS);
                                                aktdiv_int_next <= op1_var;