Design of Serial IN - Parallel OUT Shift Register using D-Flip Flop (Structural Modeling Style).
Output Waveform : Serial IN - Parallel OUT Shift Register |
VHDL Code-
-------------------------------------------------------------------------------
--
-- Title : sipo
-- Design : upload_design1
-- Author : Naresh Singh Dobal
-- Company : nsd
--
-------------------------------------------------------------------------------
--
-- File : Design of Serial in - parallel out using d_flip_flop.vhd
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity sipo is
port(
din : in STD_LOGIC;
clk : in STD_LOGIC;
reset : in STD_LOGIC;
dout : out STD_LOGIC_VECTOR(3 downto 0)
);
end sipo;
architecture sipo_arc of sipo is
component d_flip_flop is
port(
clk : in STD_LOGIC;
din : in STD_LOGIC;
reset : in STD_LOGIC;
dout : out STD_LOGIC
);
end component d_flip_flop;
signal s : std_logic_vector (3 downto 0);
begin
u0 : d_flip_flop port map (clk => clk,
din => din,
reset => reset,
dout => s(0));
u1 : d_flip_flop port map (clk => clk,
din => s(0),
reset => reset,
dout => s(1));
u2 : d_flip_flop port map (clk => clk,
din => s(1),
reset => reset,
dout => s(2));
u3 : d_flip_flop port map (clk => clk,
din => s(2),
reset => reset,
dout => s(3));
dout <= s;
end sipo_arc;
-------------------- D Flip Flop Design ---------------------
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity d_flip_flop is
port(
clk : in STD_LOGIC;
din : in STD_LOGIC;
reset : in STD_LOGIC;
dout : out STD_LOGIC
);
end d_flip_flop;
architecture d_flip_flop_arc of d_flip_flop is
begin
dff : process (din,clk,reset) is
begin
if (reset='1') then
dout <= '0';
elsif (rising_edge (clk)) then
dout <= din;
end if;
end process dff;
end d_flip_flop_arc;
out put not came
ReplyDeletehellos
ReplyDeleteI need help
I want to implement a pipo register in vhdl (input 128 bit to output 8 bit)
I do not know how to do it
Hello
ReplyDeleteI want to implement 16*16 memory (sram) in vhdl code