@@ -22,9 +22,9 @@ entity UART_RX is
2222 UART_CLK_EN : in std_logic ; -- oversampling (16x) UART clock enable
2323 UART_RXD : in std_logic ; -- serial receive data
2424 -- USER DATA OUTPUT INTERFACE
25- DATA_OUT : out std_logic_vector (7 downto 0 ); -- output data
26- DATA_VLD : out std_logic ; -- when DATA_VLD = 1, output data are valid
27- FRAME_ERROR : out std_logic -- when FRAME_ERROR = 1, stop bit was invalid
25+ DOUT : out std_logic_vector (7 downto 0 ); -- data received via UART
26+ DOUT_VLD : out std_logic ; -- when DOUT_VLD = 1, DOUT is valid (is assert only for one clock cycle)
27+ FRAME_ERROR : out std_logic -- when FRAME_ERROR = 1, stop bit was invalid (is assert only for one clock cycle)
2828 );
2929end UART_RX;
3030
@@ -117,7 +117,7 @@ begin
117117 end if ;
118118 end process ;
119119
120- DATA_OUT <= rx_data;
120+ DOUT <= rx_data;
121121
122122 -- -------------------------------------------------------------------------
123123 -- UART RECEIVER PARITY GENERATOR AND CHECK
@@ -158,14 +158,14 @@ begin
158158 begin
159159 if (rising_edge (CLK)) then
160160 if (RST = '1' ) then
161- DATA_VLD <= '0' ;
161+ DOUT_VLD <= '0' ;
162162 FRAME_ERROR <= '0' ;
163163 else
164164 if (rx_clk_en = '1' AND rx_output_reg_en = '1' ) then
165- DATA_VLD <= NOT rx_parity_error AND UART_RXD;
165+ DOUT_VLD <= NOT rx_parity_error AND UART_RXD;
166166 FRAME_ERROR <= NOT UART_RXD;
167167 else
168- DATA_VLD <= '0' ;
168+ DOUT_VLD <= '0' ;
169169 FRAME_ERROR <= '0' ;
170170 end if ;
171171 end if ;
@@ -194,9 +194,9 @@ begin
194194 case rx_pstate is
195195
196196 when idle =>
197- rx_output_reg_en <= '0' ;
198- rx_receiving_data <= '0' ;
199- rx_clk_divider_en <= '0' ;
197+ rx_output_reg_en <= '0' ;
198+ rx_receiving_data <= '0' ;
199+ rx_clk_divider_en <= '0' ;
200200 rx_parity_check_en <= '0' ;
201201
202202 if (UART_RXD = '0' ) then
@@ -206,9 +206,9 @@ begin
206206 end if ;
207207
208208 when startbit =>
209- rx_output_reg_en <= '0' ;
210- rx_receiving_data <= '0' ;
211- rx_clk_divider_en <= '1' ;
209+ rx_output_reg_en <= '0' ;
210+ rx_receiving_data <= '0' ;
211+ rx_clk_divider_en <= '1' ;
212212 rx_parity_check_en <= '0' ;
213213
214214 if (rx_clk_en = '1' ) then
@@ -218,9 +218,9 @@ begin
218218 end if ;
219219
220220 when databits =>
221- rx_output_reg_en <= '0' ;
222- rx_receiving_data <= '1' ;
223- rx_clk_divider_en <= '1' ;
221+ rx_output_reg_en <= '0' ;
222+ rx_receiving_data <= '1' ;
223+ rx_clk_divider_en <= '1' ;
224224 rx_parity_check_en <= '0' ;
225225
226226 if ((rx_clk_en = '1' ) AND (rx_bit_count = "111" )) then
@@ -234,9 +234,9 @@ begin
234234 end if ;
235235
236236 when paritybit =>
237- rx_output_reg_en <= '0' ;
238- rx_receiving_data <= '0' ;
239- rx_clk_divider_en <= '1' ;
237+ rx_output_reg_en <= '0' ;
238+ rx_receiving_data <= '0' ;
239+ rx_clk_divider_en <= '1' ;
240240 rx_parity_check_en <= '1' ;
241241
242242 if (rx_clk_en = '1' ) then
@@ -246,10 +246,10 @@ begin
246246 end if ;
247247
248248 when stopbit =>
249- rx_receiving_data <= '0' ;
250- rx_clk_divider_en <= '1' ;
249+ rx_receiving_data <= '0' ;
250+ rx_clk_divider_en <= '1' ;
251251 rx_parity_check_en <= '0' ;
252- rx_output_reg_en <= '1' ;
252+ rx_output_reg_en <= '1' ;
253253
254254 if (rx_clk_en = '1' ) then
255255 rx_nstate <= idle;
@@ -258,9 +258,9 @@ begin
258258 end if ;
259259
260260 when others =>
261- rx_output_reg_en <= '0' ;
262- rx_receiving_data <= '0' ;
263- rx_clk_divider_en <= '0' ;
261+ rx_output_reg_en <= '0' ;
262+ rx_receiving_data <= '0' ;
263+ rx_clk_divider_en <= '0' ;
264264 rx_parity_check_en <= '0' ;
265265 rx_nstate <= idle;
266266
0 commit comments