display/history: komisches init verhalten
[hwmod.git] / src / display.vhd
index 8fca39cc8e8372b726ad4800811dfe7ff94be4b6..17a717e7ef6243c9b21a6a9ccaaf0d16d3c3d786 100644 (file)
@@ -26,7 +26,7 @@ entity display is
 end entity display;
 
 architecture beh of display is
-       type DISPLAY_STATE is (SIDLE, S_NEW_RESULT, S_NEW_INPUT, S_COUNTUP, S_GETCH,
+       type DISPLAY_STATE is (S_INIT, SIDLE, S_NEW_RESULT, S_NEW_INPUT, S_COUNTUP, S_GETCH,
        S_CR1, S_NL1, S_PUTCH1, S_PUTCH2, S_WAIT, S_NOP1);
        signal state_int, state_next : DISPLAY_STATE;
        signal d_zeile_int, d_zeile_next : hzeile;
@@ -45,7 +45,7 @@ begin
        begin
                if sys_res_n = '0' then
                        -- internal
-                       state_int <= SIDLE;
+                       state_int <= S_INIT;
                        -- out
                        d_zeile_int <= (others => '0');
                        d_spalte_int <= (others => '0');
@@ -71,6 +71,8 @@ begin
                state_next <= state_int;
 
                case state_int is
+                       when S_INIT =>
+                               state_next <= SIDLE;
                        when SIDLE =>
                                if d_new_eingabe = '1' then
                                        state_next <= S_NEW_INPUT;
@@ -129,6 +131,9 @@ begin
                command_data_next <= command_data_int;
 
                case state_int is
+                       when S_INIT =>
+                               d_spalte_next <= (others => '0');
+                               d_zeile_next <= (others => '0');
                        when SIDLE =>
                                null;
                        when S_NEW_INPUT =>