Skip to content

Commit d68c36a

Browse files
committed
UART: Optimalization RX clock divider
1 parent 3134c52 commit d68c36a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

source/uart.vhd

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
library IEEE;
2727
use IEEE.STD_LOGIC_1164.ALL;
28-
use IEEE.STD_LOGIC_UNSIGNED.ALL;
28+
use IEEE.NUMERIC_STD.ALL;
2929

3030
entity UART is
3131
Generic (
@@ -236,10 +236,7 @@ begin
236236
rx_clk_divider : process (CLK)
237237
begin
238238
if (rising_edge(CLK)) then
239-
if (RST = '1') then
240-
rx_ticks <= half_divider_value;
241-
rx_clk_en <= '0';
242-
elsif (rx_clk_divider_en = '1') then
239+
if (rx_clk_divider_en = '1') then
243240
if (rx_ticks = divider_value-1) then
244241
rx_ticks <= 0;
245242
rx_clk_en <= '1';

0 commit comments

Comments
 (0)