shift left/shift right in VHDL

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

  1. deepak21

    deepak21

    Joined:
    May 6, 2012
    Messages:
    1
    Likes Received:
    0
    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.