Matrix to vector conversion

Discussion in 'VHDL' started by Moises, Sep 23, 2005.

  1. Moises

    Moises Guest

    Hello,
    My name is Moises Paniagua and I am designing a communication interface
    in VHDL. I would be grateful if any of you could help me.

    My problem is that I have a matrix and I would like to pick up its rows
    and register them in a vector of vectors. Find attached the types used
    and the part of code, which I am designing.

    Many thanks for advance,
    Moises Paniagua

    type data_out is array(0 to MAT_LENGTH-1,0 to MAT_WIDTH-1) of
    std_logic_vector(MAX_BIT-1 downto 0);

    type sum_c is array(0 to MAT_LENGTH-1) of
    std_logic_vector(MAX_BIT-1 downto 0);

    type conv is array(0 to MAT_WIDTH-1) of sum_c;
    library IEEE;


    use IEEE.STD_LOGIC_1164.ALL;
    use IEEE.STD_LOGIC_ARITH.ALL;
    use IEEE.STD_LOGIC_UNSIGNED.ALL;

    use work.librairie.all;

    entity convert is
    Generic(
    length : natural := MAT_LENGTH;
    width : natural := MAT_WIDTH);

    Port ( input : in data_out;
    output : out conv);
    end convert;

    architecture behaviour of convert is
    signal aux : conva;
    begin

    L1: for i in 0 to width-1 generate
    L2: for j in 0 to length-1 generate
    aux(i) of sum_c(j) <= input(j, i);
    end generate;
    end generate;

    output <= aux;

    end behaviour;
    Moises, Sep 23, 2005
    #1
    1. Advertising

  2. Weng Tianxiang, Sep 26, 2005
    #2
    1. Advertising

  3. Moises

    Moises Guest

    Many thanks for your help Weng!

    Moises
    Moises, Sep 27, 2005
    #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. CD
    Replies:
    2
    Views:
    795
    Victor Bazarov
    Oct 5, 2004
  2. pmatos
    Replies:
    6
    Views:
    23,727
  3. Replies:
    8
    Views:
    1,890
    Csaba
    Feb 18, 2006
  4. Javier
    Replies:
    2
    Views:
    543
    James Kanze
    Sep 4, 2007
  5. Holgerson

    Matrix*Vector and Vector*Matrix

    Holgerson, Oct 25, 2007, in forum: C++
    Replies:
    3
    Views:
    398
    Holgerson
    Oct 26, 2007
Loading...

Share This Page