shift left/shift right in VHDL

Discussion in 'Software' started by deepak21, May 6, 2012.

  1. deepak21

    deepak21

    Joined:
    May 6, 2012
    Messages:
    1
    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,
     
    deepak21, May 6, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bun Mui
    Replies:
    1
    Views:
    1,418
  2. ohaqqi

    VHDL sll shift question

    ohaqqi, Oct 16, 2006, in forum: Hardware
    Replies:
    5
    Views:
    23,121
    tranhuuthu991990
    May 13, 2012
  3. siliconpi
    Replies:
    2
    Views:
    816
    Don B
    Nov 29, 2004
  4. becool_nikks
    Replies:
    0
    Views:
    2,038
    becool_nikks
    Mar 6, 2009
  5. kapsy_27
    Replies:
    0
    Views:
    1,392
    kapsy_27
    Sep 9, 2011
Loading...

Share This Page