Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity SerialParallel is
Port (
DATA : in STD_LOGIC;
CLK : in STD_LOGIC;
STRB : int STD_LOGIC;
DATAOUT : out STD_LOGIC_VECTOR(7 downto 0);
);
end SerialParallel;
architecture Behavioral of SerialParallel is
signal pre_latch : std_logic_vector(7 downto 0);
begin
process (CLK) begin
if CLK'event and CLK='1' then
pre_latch(pre_latch'high downto 1)=pre_latch(pre_latch'high-1 downto 1);
pre_latch(0)=DATA;
end if;
end process;
process (STRB) begin
if STRB'event and STRB='1' then
DATAOUT(pre_latch'high downto 0)<=pre_latch(pre_latch'high downto 0);
end if;
end process;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.