Go Back   Velocity Reviews > General Computer Discussion > Hardware
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 10-16-2006, 04:07 PM   #1
Default VHDL sll shift question


I'm working on a small project, 16 bit shifter. When CODE = '10000', registe
r A must shift by integer value of register B -- this is why I made them bid
irectional ports. Here's some snippets:

libraries:
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity alu16 is
port (A,B: inout std_logic_vector(15 downto 0);
CODE: in std_logic_vector(4 downto 0);
C: out std_logic_vector(15 downto 0);
overflow: out std_logic);
end alu16;

I tried:

A <= A sll to_integer(signed(B)) when (CODE(4) = '1' and CODE(3) = '0' and C
ODE(2) = '0' and CODE(1) = '0' and CODE(0) = '0');

and get the same error:

** Error: alu16.vhd(40): No feasible entries for infix operator "sll".
** Error: alu16.vhd(40): Type error resolving infix expression "sll".

Any help for a VHDL newbie?


ohaqqi
ohaqqi is offline   Reply With Quote
Old 10-18-2006, 09:13 PM   #2
kadwadhp
Junior Member
 
Join Date: Oct 2006
Posts: 2
Default
Hi Ohaqqi,
Even I am new to VHDL...But still as far as I Know sll is a bit operator and doesn't operate on STD_LOGIC_VECTORS.Try converting all operands to bit_vector .
Best Regards,
Kadwadhp


kadwadhp
kadwadhp is offline   Reply With Quote
Old 10-21-2006, 02:08 PM   #3
srishankar
Junior Member
 
Join Date: Oct 2006
Posts: 1
Default
hi i am doing a pong game using vhdl. do you knw how to make the paddle and ball move simultaneously


srishankar
srishankar is offline   Reply With Quote
Old 11-11-2006, 06:56 AM   #4
Nirmala
Junior Member
 
Join Date: Nov 2006
Posts: 5
Default
u can manually perform left shift operation...but code will be lengthy


Nirmala
Nirmala is offline   Reply With Quote
Old 09-29-2009, 11:27 AM   #5
power_hf2005
Junior Member
 
Join Date: Sep 2009
Posts: 7
Default
instead of using "sll" operator, u can use another way to solve your problem.
I was in problem with it, and I made a function for shiftleft (sll) to replace opeator sll. here is the code for SL. Good luck!( I'm a Vietnamese so my E is not good )
subtype vao is std_logic_vector(7 downto 0);
function sl(input: vao) return vao is
variable k: std_logic_vector(7 downto 0);
begin
for i in 1 to 7 loop
k(i):=input(i-1);
end loop;
k(0):=input(7);
return k;
end sl;


power_hf2005
power_hf2005 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
Help on auto conversion from Matlab to vhdl on filter design hardheart Hardware 0 12-07-2007 09:19 AM
ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL freitass Hardware 0 11-01-2007 03:44 PM
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good God DVD Video 3 04-25-2005 04:19 PM
Re: Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good Filthy Mcnasty DVD Video 0 04-25-2005 04:29 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46