Forum Discussion
sstrell
Super Contributor
4 years agoCan you show some code?
Also, it's recommended to use actual registers instead of building latches out of logic gates.
- Lera_Dyakova4 years ago
New Contributor
This is interesting , because the simulation shows the correct result. This is the code:library ieee;use ieee.std_logic_1164.all;use IEEE.std_logic_unsigned.all;entity running_LEDs isport (clk : in std_logic;led : out std_logic_vector(7 downto 0));end running_LEDs;architecture rtl of running_LEDs issignal count : std_logic_vector(25 downto 0) := (others => '0');signal temp : std_logic_vector(7 downto 0) := (0 => '1', others => '0');signal rst : std_logic := '0';beginprocess (clk)beginif (rst = '1') thencount <= (others => '0');elsif (rising_edge(clk)) thencount <= count + 1;end if;end process;process (count)beginif count = 50000000 thenrst <= '1';temp(7 downto 0) <= temp (6 downto 0) & temp(7);elserst <= '0';end if;end process;led <= temp;end rtl;