MSAKARIM
Full Member level 3
When i simulated a 4-bit serial shift register at Xillinx ISE 13.2 program, i get these wave forms. The problem is that all 4 bits are changed at the same time (no Shifting was happen ). I need to know the problem is in the code or the simulator ?
Code:
Code:
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 library ieee; use ieee.std_logic_1164.all; entity SR is port ( clk,rst,d : in std_logic; q:out std_logic_vector(3 downto 0)); end SR; architecture SR of SR is signal qs:std_logic_vector(3 downto 0); begin process(clk,rst) begin if rst='1' then qs<="0000"; elsif clk'event and clk='1' then qs(3)<=d; qs(2 downto 0)<=qs(3 downto 1); end if; end process; q<=qs; end SR;