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 PROBLEM ,how to create shift left operation without register in vhdl

Status
Not open for further replies.

shifter2013

Newbie level 4
Joined
Apr 14, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
Hi!
I have problem to create shift left operation with 4 bit input to 4bitni output?
So, I have to create shiftleft component for my ALU but that shifter must have 4bitni input and 4 bit output.
Does vhdl have some operation for shift ? I try to put sll operation but does not work.
I also try 4bit input to multiply with 2 but does not work correctly for all combinations.
I know that component can create with register but that does not work because i have to have 4 bit input and 4 output.
 

try this:
if A is your input and B your output:
B<='0' & A(3 downto 1) ;
 

Use SLL
I think your operands are "std_logic_vector"
SLL is defined for "bit" type
first convert your input to "bit" type and then use SLL
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top