From ef9a9b35574dbffc7d10bbb2c48c28f69f6c8a9a Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Sun, 16 May 2010 23:12:40 +0200 Subject: [PATCH] display: nul-byte schreiben ist boese. gehoert noch schoener gefixt --- src/display.vhd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/display.vhd b/src/display.vhd index 432c07a..3a3aac1 100644 --- a/src/display.vhd +++ b/src/display.vhd @@ -65,7 +65,8 @@ begin end process; -- next state - process(state_int, d_new_result, d_new_eingabe, d_done, free, d_spalte_int) + process(state_int, d_new_result, d_new_eingabe, d_done, free, d_spalte_int, + d_char) begin state_next <= state_int; @@ -86,7 +87,7 @@ begin state_next <= S_PUTCH; end if; when S_PUTCH => - if free = '0' then + if free = '0' or (free = '1' and d_char = x"00") then state_next <= S_WAIT; end if; when S_WAIT => @@ -131,8 +132,10 @@ begin when S_GETCH => d_get_next <= '1'; when S_PUTCH => - command_next <= COMMAND_SET_CHAR; - command_data_next <= x"ffffff" & std_logic_vector(d_char); + if d_char /= x"00" then + command_next <= COMMAND_SET_CHAR; + command_data_next <= x"ffffff" & std_logic_vector(d_char); + end if; when S_WAIT | S_NOP1 => command_next <= COMMAND_NOP; command_data_next <= x"00000000"; -- 2.25.1