Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

need vhdl code for 16 bit serial-in, serial-out shift register

652 views
Skip to first unread message

Mohamed Daffe

unread,
Oct 23, 2002, 8:09:45 PM10/23/02
to
i need a vhdl code for 16 bit serial-in, serial-out shift register


Spam Hater

unread,
Oct 23, 2002, 11:34:27 PM10/23/02
to

Serial in, serial out?

How about:

out <= in;

I think you wanted to ask a different question.

SH7

M Pedley

unread,
Oct 24, 2002, 11:55:31 AM10/24/02
to
A 16 bit fifo??

Niv

unread,
Oct 25, 2002, 8:30:59 AM10/25/02
to
How about (but ignore syntax just a very quick stab at it);

ENTITY shift_register IS
PORT (clock IN;
ser_in IN;
ser_out OUT);
END shift register;

ARCHITECTURE rtl OF shift_register IS

SIGNAL shiftreg STD_LOGIC_VECTOR(15 DOWNTO 0);

BEGIN -- Architecture

ser_out <= shiftreg(0); -- Shift bit out.

shifter : PROCESS (clock)
BEGIN
IF rising_edge(clock) THEN
IF reset THEN
-- sync reset stuff here, i.e. shiftreg <= (OTHERS => '0');
ELSE
shift_reg <= ser_in & shiftreg(15 DOWNTO 1); -- Shift into top bit.
END IF;
END IF;
END PROCESS;

END rtl;

"Mohamed Daffe" <mda...@triad.rr.com> wrote in message
news:dTGt9.17224$ku2.7...@twister.southeast.rr.com...

0 new messages