Guest
#4407274
i want to convert 8 bit serial data into 8 bit parallel data my code is
here
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity PAR2SER is
port(
din : in STD_LOGIC;
clk : in STD_LOGIC;
reset : in STD_LOGIC;
dout : out STD_LOGIC_VECTOR(7 downto 0)
);
end PAR2SER;
architecture sipo_behavior_arc of PAR2SER is
begin
sipo : process (clk,din,reset) is
variable s : std_logic_vector(7 downto 0) := "00000000" ;
begin
if (reset='1') then
s := "00000000";
elsif (rising_edge (clk)) then
s := (din & s(7 downto 1));
end if;
dout <= s;
end process sipo;
end sipo_behavior_arc ;
but i am not getting correct data. here image is i have uploaded
