Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Software (http://www.velocityreviews.com/forums/f6-software.html)
-   -   shift left/shift right in VHDL (http://www.velocityreviews.com/forums/t946006-shift-left-shift-right-in-vhdl.html)

deepak21 05-06-2012 09:01 AM

shift left/shift right in VHDL
 
Dear

Question: how to shift left or shift right

Rough program as follows

library IEEE
...
...

Package matrix_types Is
Type matrix_4x1 Is Array (1 to 4) Of std_logic_vector (7 downto 0);
Type matrix_1x4 Is Array (1 to 4) Of std_logic_vector (7 downto 0);
Type matrix_4x4 Is Array (1 to 4, 1 to 4) Of std_logic_vector (7 downto
0);
End Package matrix_types ;
...
...
architecture.......
begin
.....
process
.......

Variable x : matrix_4x1 :=
("000000100",
"0000000000",
"0011110000",
"0010110001");

begin

QUERY: Now i have to shift left or shift right EACH ROW of variable x either TWICE or
THRICE etc.

Please reply me dear...

Thanks and Best Regards,


All times are GMT. The time now is 03:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, 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 47 48 49 50 51 52 53 54 55 56 57