From 7fca5f6c50297c452a263f7da958cf47e3c29ec5 Mon Sep 17 00:00:00 2001 From: Pascal Engeler <engelerp@phys.ethz.ch> Date: Wed, 11 Sep 2024 11:43:06 +0200 Subject: [PATCH] Cleaned stray code --- stitch_project/stitch/DistanceUnwrapper.vhd | 54 --------------------- 1 file changed, 54 deletions(-) diff --git a/stitch_project/stitch/DistanceUnwrapper.vhd b/stitch_project/stitch/DistanceUnwrapper.vhd index 869bd9c..7f64de8 100644 --- a/stitch_project/stitch/DistanceUnwrapper.vhd +++ b/stitch_project/stitch/DistanceUnwrapper.vhd @@ -157,59 +157,5 @@ begin end process; - - - - - - - - - -signal cmd_received_sig : STD_LOGIC := '0'; -signal rxs : STD_LOGIC := '0'; -signal rx_delay_line: STD_LOGIC_VECTOR(5 downto 0); -signal serial_data : STD_LOGIC_VECTOR(9 downto 0) := (others => '0'); -signal serial_counter : STD_LOGIC_VECTOR (9 downto 0) := (others => '0'); ---baud rate: 115200 -signal serial_counter_max : STD_LOGIC_VECTOR(9 downto 0) := "1101100011"; --change this for baud rate change -signal serial_counter_offset : STD_LOGIC_VECTOR(9 downto 0) := "0110110001"; --change this for baud rate change - -begin - -sanitize_input: process(clk100) -begin - if rising_edge(clk100) then - rx_delay_line(5) <= s_data_in; - rx_delay_line(4 downto 0) <= rx_delay_line(5 downto 1); - rxs <= rx_delay_line(0); - end if; -end process; - -receive_serial: process(clk100) -begin - if rising_edge(clk100) then - if(rxs = '1') AND (serial_data(0) = '0') then - serial_data <= "1111111111"; - cmd_received_sig <= '0'; - serial_counter <= serial_counter_offset; - else - if (serial_counter = serial_counter_max) AND (serial_data(0) = '1') then - serial_counter <= (others => '0'); - serial_data(8 downto 0) <= serial_data(9 downto 1); - serial_data(9) <= NOT rxs; - cmd_received_sig <= not serial_data(1); --this should maybe be serial_data(0) update: no, i think this is correct. - else - serial_counter <= serial_counter + 1; - cmd_received_sig <= '0'; - serial_data <= serial_data; - end if; - end if; - end if; -end process; - -data <= serial_data(8 downto 1); -cmd_received <= cmd_received_sig; - end Behavioral; -- GitLab