motote
Newbie level 3
Hello, I'm getting mad trying to know why the data<= "000000001" assigment doen't work.
data is shifted in the right way, but it never get reassigned.
I should be a very stupid issue.... but I really can't see it.
Thanks!
data is shifted in the right way, but it never get reassigned.
I should be a very stupid issue.... but I really can't see it.
Thanks!
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; library UNISIM; use UNISIM.VComponents.all; entity shifter is port ( Clk : in std_logic; led : out std_logic_vector(7 downto 0) ); end shifter ; architecture Behavioral of shifter is signal data : std_logic_vector(8 downto 0) := "000000101"; signal hc : std_logic_vector(9 downto 0) := (others => '0'); begin process (clk) begin if rising_edge(clk) then if (hc(2 downto 0) = "000") then data<= "000000001"; --<--- The problem is here end if; led <= data(8 downto 1); data(8 downto 1) <= data(7 downto 0); data(0) <= '0'; hc <= hc + 1; end if; end process; end behavioral;