Continue to Site

Welcome to EDAboard.com

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.

vhdl code help shift registers asap!

Status
Not open for further replies.

1lm234

Newbie level 1
Newbie level 1
Joined
Nov 25, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
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.
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top