How to Input a matrix in VHDL

Discussion in 'VHDL' started by swati gupta, Oct 21, 2009.

  1. swati gupta

    swati gupta Guest

    Hello
    I am doing a college project which requires VHDL coding. My part
    requires me to do linear equation solver of the kind Ax = B. where A
    = [ N x N ] matrix and x and B are N x 1 and M x 1 column matrices
    respectively.

    I am unable to find a good tutorial online which could tell me how to
    input a matrix in VHDL.

    COuld someone please help me.

    Please i need to know this soon.

    Thanks,


    Swati
    swati gupta, Oct 21, 2009
    #1
    1. Advertising

  2. swati gupta

    Tricky Guest

    On 21 Oct, 14:00, swati gupta <> wrote:
    > Hello
    > I am doing a college project which requires VHDL coding. My part
    > requires me to do linear equation solver of the kind  Ax = B. where A
    > = [ N x N ] matrix and x and B are N x 1 and M x 1 column matrices
    > respectively.
    >
    > I am unable to find a good tutorial online which could tell me how to
    > input a  matrix in VHDL.
    >
    > COuld someone please help me.
    >
    > Please i need to know this soon.
    >
    > Thanks,
    >
    > Swati


    You can just use arrays of arrays or 2D (you can actually have N
    dimensions) arrays:

    so for array of arrays:
    type matrix_row_t is array(0 to N-1) of some_type;
    type matrix_t is array(0 to N-1) of matrix_row_t;
    signal matrix : matrix_t;


    and the 2D version:
    type my_matrix_t is array(0 to N-1, 0 to N-1) of some_type;
    signal my_matrix : my_matrix_t;
    Tricky, Oct 21, 2009
    #2
    1. Advertising

  3. swati gupta

    olliH Guest

    Hi,

    maybe this can help you:


    subtype double is std_logic_vector(63 downto 0);
    type double_6 is array (0 to 5) of double;
    type Matrix_d6x6 is array (0 to 5) of double_6;

    signal Matrix1: Matrix_d6x6;
    olliH, Oct 21, 2009
    #3
    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. lvcargnini

    Matrix composed by two matrix

    lvcargnini, Jul 4, 2006, in forum: VHDL
    Replies:
    3
    Views:
    2,671
    Jonathan Bromley
    Jul 5, 2006
  2. afd
    Replies:
    1
    Views:
    8,325
    Colin Paul Gloster
    Mar 23, 2007
  3. Holgerson

    Matrix*Vector and Vector*Matrix

    Holgerson, Oct 25, 2007, in forum: C++
    Replies:
    3
    Views:
    407
    Holgerson
    Oct 26, 2007
  4. Terry Reedy
    Replies:
    0
    Views:
    554
    Terry Reedy
    Apr 2, 2009
  5. Robert Kern
    Replies:
    0
    Views:
    593
    Robert Kern
    Apr 2, 2009
Loading...

Share This Page