Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

vhdl code help shift registers asap!

Status
Not open for further replies.

1lm234

Newbie level 1
Joined
Nov 25, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
i'm a newbie and I need some vhdl code help could you guys please help me with the code of a left and right shift register circuit ith left shift right sift and parallel load capacity? the hint is to use a control input s=1 if shift direction is right or s=0 if direction is left.
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
4,987
Helped
1,091
Reputation
2,192
Reaction score
1,075
Trophy points
1,393
Location
California, USA
Activity points
27,296
something like:


Code:
signal d: std_logic_vector (7 downto 0);
process(clk,load)
begin
if load='1' then 
        d<=input;
elsif clk='1' and clk'event then
       if s='1' then
              d(6 downto 0)<=d(7 downto 1);
              d(7)<=din;
      else
              d(7 downto 1)<=d(6 downto 0);
              d(0)<=din;
     end if;
end if;
end process;
I just scribbled this out, I haven't checked it thoroughly. That's left as an exercise for the student...
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top