history: bugfix fuer leere eingabe
[hwmod.git] / src / history.vhd
index 5cdc79fe7c98a60313ed3d3fcef177dcd08000e3..cf091e317b9aeafcef64a464e8a4f25d012d3e2b 100644 (file)
@@ -88,7 +88,7 @@ begin
                        p_wdone_int <= '0';
                        p_read_int <= (others => '0');
                        p_sp_read_int <= (others => '0');
-                       p_sp_write_int <= (others => '0');
+                       p_sp_write_int <= std_logic_vector(to_unsigned(71,p_sp_write_int'length));
 
                        address_int <= (0 => '1', others => '0');
                        data_in_int <= x"00";
@@ -246,6 +246,9 @@ begin
                        when S_S_FIN =>
                                s_cnt_next <= (0 => '1', others => '0');
                                d_new_result_next <= '1';
+                               -- resetten der parser counter
+                               p_sp_read_next <= (others => '0');
+                               p_sp_write_next <= std_logic_vector(to_unsigned(71,p_sp_write_next'length));
                        when S_S_FIN_POSUP =>
                                -- TODO: overflow nach 50 berechnungen... => wieder von vorne anfangen
                                pos_next <= std_logic_vector(unsigned(pos_int) + to_unsigned(142,H_RAM_WIDTH));
@@ -257,9 +260,6 @@ begin
                                if s_take = '0' then
                                        was_bs_next <= '0';
                                end if;
-                               -- TODO: bessere stelle fuers reseten der parser signale?
-                               p_sp_read_next <= (others => '0');
-                               p_sp_write_next <= std_logic_vector(to_unsigned(71,p_sp_write_next'length));
 
                        when S_D_INIT =>
                                addr_tmp := (others => '0');