Help

Discussion in 'VHDL' started by jpaulobenevides, Jun 25, 2009.

  1. jpaulobenevides

    jpaulobenevides

    Joined:
    Jun 25, 2009
    Messages:
    2
    Hi, i'm working on a algorithm that will do Run-Length data compression. This is what i'm doing: i initialize a matrix and tranform it in a vector and, while doing that, i discover what will be the size of the compressed new vector. Then i try to declare another vector with that size.

    Look a small abstract of the algorithm:
    PROCESS

    TYPE line IS ARRAY (0 TO 3) OF INTEGER;
    TYPE matrix IS ARRAY (0 TO 3) OF linha;
    variable mat : matrix;

    BEGIN

    mat := ( (100, 99, 95, 94),
    ( 98, 96, 93, 0),
    ( 97, 92, 0, 0),
    ( 91, 0, 0, 0));

    -- THIS IS WHERE THE VECTOR (100, 99,98,97,96,95,94,93,92,91,0,0,0,0,0,0) IS CREATED AND VECTOR_SIZE IS FOUND OUT.


    PROCESS
    TYPE comp IS ARRAY (0 TO VECTOR_SIZE) OF INTEGER;

    variable COMPRESSED_VECTOR : comp;

    -- THIS IS WHERE THE VECTOR IS USED TO CREATE THE COMPRESSED VECTOR. THE PROBLEM IS QUARTUS WON'T LET ME CREATE AN ARRAY USING A VARIABLE (0 TO VECTOR_SIZE), IT NEED TO BE A CONSTANT.

    VECTOR_SIZE IS A SHARED VARIABLE AND I WAS THINKING ABOUT CONVERTING IT TO A CONSTANT, IF THAT'S POSSIBLE
     
    jpaulobenevides, Jun 25, 2009
    #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. =?Utf-8?B?dHJlbGxvdzQyMg==?=

    HELP! HELP! HELP! Opening Web Application Project Error

    =?Utf-8?B?dHJlbGxvdzQyMg==?=, Feb 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    792
    =?Utf-8?B?dHJlbGxvdzQyMg==?=
    Feb 20, 2004
  2. Harvey
    Replies:
    0
    Views:
    750
    Harvey
    Jul 16, 2004
  3. Harvey
    Replies:
    1
    Views:
    881
    Daniel
    Jul 16, 2004
  4. =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=

    HELP - HELP - HELP

    =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    703
    Eliyahu Goldin
    Mar 9, 2006
  5. Buster

    Help, Help, Help

    Buster, Oct 4, 2003, in forum: Java
    Replies:
    3
    Views:
    484
    Saager
    Oct 30, 2003
Loading...

Share This Page