parser: / und mod in hardware
[hwmod.git] / src / beh_parser_tb.vhd
index 61d25447fed37a482cd15c77ae97f7d64149dc66..663e1bda455d58e5d1c0c500fa1d5168bb199adb 100644 (file)
@@ -16,7 +16,7 @@ architecture sim of beh_parser_tb is
 
        -- alu
        signal opcode : alu_ops;
-       signal op1, op2, op3 : csigned;
+       signal op1, op2, op3, opM : csigned;
        signal do_calc, calc_done, calc_error : std_logic;
 
        --scanner
@@ -44,6 +44,7 @@ begin
                op1 => op1,
                op2 => op2,
                op3 => op3,
+               opM => opM,
                do_calc => do_calc,
                calc_done => calc_done,
                calc_error => calc_error,
@@ -64,6 +65,7 @@ begin
                op1 => op1,
                op2 => op2,
                op3 => op3,
+               opM => opM,
                opcode => opcode
        );
 
@@ -105,11 +107,11 @@ begin
 
                i := 1;
                f_loop : while not endfile(f) loop
-                       realresult := (71 => character'val(0), others => character'val(32));
+                       realresult := (71 => nul, others => ' ');
 
                        f1_loop : while not endfile(f) loop
                                readline (f, l);
-                               input := (others => character'val(0));
+                               input := (others => nul);
                                if (l'length <= 72) then
                                        input(1 to l'length) := l.all;
                                        if (input(1) = '#') then
@@ -125,7 +127,7 @@ begin
 
                        f2_loop : while not endfile(f) loop
                                readline (f, l);
-                               expectedresult := (others => character'val(0));
+                               expectedresult := (others => nul);
                                if (l'length <= 72) then
                                        expectedresult(1 to l'length) := l.all;
                                        if (expectedresult(1) = '#') then
@@ -142,9 +144,9 @@ begin
 
                        -- ergebnis string richtig formatieren
                        hstrtmp := expectedresult;
-                       expectedresult := (71 => character'val(0), others => character'val(32));
+                       expectedresult := (71 => nul, others => ' ');
                        for x in 1 to 70 loop
-                               if hstrtmp(x) /= character'val(0) then
+                               if hstrtmp(x) /= nul then
                                        expectedresult((70-y) + x) := hstrtmp(x);
                                end if;
                        end loop;