aboutsummaryrefslogtreecommitdiff
path: root/src/uart_rx_shift.vhd
diff options
context:
space:
mode:
Diffstat (limited to 'src/uart_rx_shift.vhd')
-rw-r--r--src/uart_rx_shift.vhd4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uart_rx_shift.vhd b/src/uart_rx_shift.vhd
index 273931c..30a8403 100644
--- a/src/uart_rx_shift.vhd
+++ b/src/uart_rx_shift.vhd
@@ -11,6 +11,10 @@ entity uart_rx_shift is
end entity;
architecture rtl of uart_rx_shift is
+ signal sr, nsr : std_ulogic_vector(7 downto 0);
begin
+ sr <= "00000000" when rst_n = '0' else nsr when rising_edge(clk);
+ nsr <= ser_i & sr(7 downto 1) when shift_i = '1' else sr;
+ d_o <= sr;
end architecture rtl;