ebenfalls so breit wie \emph{p\_zeile} sein (zumindest vereinfacht das die
Implementierung)
\item RS232: \emph{tx\_done} hinzugefuegt.
-\item PC-Kommunikation: auch die aktuelle Eingabe wird gesendet.
+\item PC-Kommunikation: der gesamte RAM fuer die berechnungen wird immer
+gedumpt. Auch wird der Dump bei einem beliebigen Zeichen gesendet, da es mit
+\emph{0x0a} nicht mit jedem Terminal funktionierte.
\end{itemize}
-
\end{document}
-
type STATE_PC is (IDLE, FETCH, FORWARD, UART_DONE, CR, CR_WAIT,
NL, NL_WAIT, PRINT_NO1, PRINT_NO1_WAIT, PRINT_NO2, PRINT_NO2_WAIT,
PRINT_NO3, PRINT_NO3_WAIT, PRINT_NO4, PRINT_NO4_WAIT, PRINT_NO5,
- PRINT_NO5_WAIT, PRINT_NO6, PRINT_NO0_WAIT);
+ PRINT_NO5_WAIT, PRINT_NO6);
signal state, state_next : STATE_PC ;
begin
pc_zeile <= hzeile(std_logic_vector(to_unsigned(zeile,7)));
state_next <= state;
case state is
when IDLE =>
- if (rx_new = '1' and rx_data = x"0a") or btn_a = '0' then
- state_next <= PRINT_NO0_WAIT;
- end if;
-
- when PRINT_NO0_WAIT =>
- if tx_done_i = '0' then
+ --if (rx_new = '1' and rx_data = x"0a") or btn_a = '0' then
+ if (rx_new = '1' or btn_a = '0') and tx_done_i = '0' then
state_next <= PRINT_NO1;
end if;
+
when PRINT_NO1 =>
tx_data_i_next <= x"28"; -- '('
new_i_next <= '1';
state_next <= NL_WAIT;
end if;
when NL_WAIT =>
- state_next <= CR;
+ if tx_done_i = '0' then
+ state_next <= CR;
+ end if;
when CR =>
tx_data_i_next <= x"0d";
new_i_next <= '1';
state_next <= CR_WAIT;
end if;
when CR_WAIT =>
- tmp := std_logic_vector(to_unsigned(zeile,7));
- if tmp(0) = '0' then
- -- es handelt sich um eingabe im naechsten schritt
- -- => print zeilennummer
- state_next <= PRINT_NO0_WAIT;
- else
- state_next <= FETCH;
+ if tx_done_i = '0' then
+ tmp := std_logic_vector(to_unsigned(zeile,7));
+ if tmp(0) = '0' then
+ -- es handelt sich um eingabe im naechsten schritt
+ -- => print zeilennummer
+ state_next <= PRINT_NO1;
+ else
+ state_next <= FETCH;
+ end if;
end if;
if zeile = HZEILE_MAX then
state_next <= IDLE;