Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - shift/rotate operator for std_logic_vector

 
Thread Tools Search this Thread
Old 06-12-2007, 09:49 PM   #1
Default shift/rotate operator for std_logic_vector


I mean operators like ror, rol, sla, sra, srl, sll.
Are they overloaded for std_logic_vector type in any 'standard' package?

I use Altera Quartus 6.1, and I recieive a message:
"Error (10327): VHDL error at vector_selector.vhd(191): can't determine
definition of operator ""srl"" -- found 0 possible definitions".

MR


Marteno Rodia
  Reply With Quote
Old 06-12-2007, 10:24 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: shift/rotate operator for std_logic_vector
Marteno Rodia wrote:
> I mean operators like ror, rol, sla, sra, srl, sll.
> Are they overloaded for std_logic_vector type in any 'standard' package?


Let's have a look at the source:
http://www.eda.org/rassp/vhdl/models...umeric_std.vhd

The shifts work differently for
signed vs unsigned. Thats also why sla and sra are
not defined. The vector type covers it.

But it's not hard to cast out the
numeric interpretation when the math is done:

my_slv <= std_logic_vector(my_uns_vec srl 1);

> I use Altera Quartus 6.1, and I recieive a message:
> "Error (10327): VHDL error at vector_selector.vhd(191): can't determine
> definition of operator ""srl"" -- found 0 possible definitions".


That the right answer. There is no srl defined for std_logic_vector.

-- Mike Treseler


Mike Treseler
  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




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