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;
delete wave /beh_alu_tb/inst/op1
delete wave /beh_alu_tb/inst/op1_next
add wave -radix decimal inst/op1_int
+add wave -radix decimal inst/op1
delete wave /beh_alu_tb/inst/op2_int
delete wave /beh_alu_tb/inst/op2
delete wave /beh_alu_tb/inst/op2_next
add wave -radix decimal inst/op2_int
+add wave -radix decimal inst/op2
delete wave /beh_alu_tb/inst/op3_int
delete wave /beh_alu_tb/inst/op3
56 => (5134123, ALU_DIV, 358015, 121913, 14, false),
-- extra
60 => (5, ALU_SUB, -2147483648, 0, 0, true),
+ 61 => (-2147483647, ALU_SUB, 1, 0, -2147483648, false),
+ 62 => (-2147483647, ALU_ADD, -1, 0, -2147483648, false),
+ 63 => (-2147483648, ALU_DIV, 10, 8, -214748364, false),
others => (0, ALU_ADD, 0, 0, 0, false)
);
variable checkall : boolean := true;
add wave -hex inst/p_write_int
add wave -hex inst/p_write_next
+delete wave /beh_parser_tb/inst/*_next
+
#rauszoomen
wave zoomout 500.0
# t38
5--2147483648
> Fehler: Over- bzw. Underflow
+# t39
+-2147483647-1
+-2147483648
+# t40
+-1073741824+-1073741824
+-2147483648
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
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';