Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Question about shifting

Thread Tools

Question about shifting
Posts: n/a
Hello Folks,

I would like to shift some set of bits in a std_logic_vector array

signal REG_S: std_logic_vector (15 downto 0);


if (CLK = '1' and CLK'event) then
REG_S(15 to 13) <= REG_S(14 to 12);
REG_S(11 to 6) <= REG_S(10 to 5);
REG_S(4 to 1) <= REG_S(3 to 0);
end if;
end process CALC;

I am getting an warning message as "The range is "null range" and error
message as "Direction of the discrete range must be the same as that of
the prefix of the slice name"

I didnt understand the error ? Can anyone explain this prob ?

Thanks in advance,

Reply With Quote
Posts: n/a
I guess I should use as below :

REG_S(15 downto 13) <= REG_S(14 downto 12);
REG_S(11 downto 6) <= REG_S(10 downto 5);
REG_S(4 downto 1) <= REG_S(3 downto 0);


Reply With Quote

Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bit shifting versus architecture question. Charles Sullivan C Programming 20 02-08-2007 09:42 PM
Question about Data Types and Shifting? salsipius C Programming 2 01-20-2006 05:51 PM
Question about shifting return values Hannes Allmaier C++ 5 07-08-2005 11:32 PM
Basic shifting question Stefan Duenser VHDL 4 12-08-2004 11:00 AM
bit shifting question David Stockwell Python 6 05-18-2004 11:12 AM