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.

WTA VHDL shift left and shift right code different

Status
Not open for further replies.

alpha91

Full Member level 3
Full Member level 3
Joined
Sep 23, 2011
Messages
168
Helped
1
Reputation
2
Reaction score
2
Trophy points
1,298
Visit site
Activity points
2,625
Hi, i have learned the shift register code in VHDL as the following:


Code VHDL - [expand]
1
2
3
4
if (reset = '1') then
shift <= '0000" ;
else if (clock' event and (clock= '1')) then
shift <= shift (2 downto 0) & si;



can anyone tell me this is shift left or shift right? because now i need VHDL for both shift left and shift right.
 
Last edited by a moderator:

Remove right most element and add new element on left ? :D

shift <= si& shift (3 downto 1);
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top