VHDL problem with variables

Discussion in 'Hardware' started by krkrkr, Oct 16, 2009.

  1. krkrkr

    krkrkr

    Joined:
    Jun 14, 2009
    Messages:
    3
    Hello,
    I've a problem when calling a procedure a passing variable to it, I tried my code in Quartus and compiled without errors but when I tried xilinx XPS which I have to use, I got the following error (undefined signal "aprio")
    The code is down, any help???

    architecture rtl of mylogic is

    signal x : integer range 0 to 15 := 0;
    signal y : integer range 0 to 15 := 0;

    procedure add_prio (variable aprio: in integer;
    variable aout: inout integer) is
    begin
    aout := aout + aprio;
    end procedure add_prio;

    begin

    add_proc: process(clk) is
    variable prio : integer range 0 to 15 :=0;
    variable out : integer range 0 to 15 :=0;

    if clk'event and clk = '1' then
    prio := x;
    add_prio(prio, out);
    y <= out;
    end if;
    end process add_proc;

    end rtl;
    krkrkr, Oct 16, 2009
    #1
    1. Advertising

  2. krkrkr

    vipinlal

    Joined:
    Feb 25, 2010
    Messages:
    1
    you signals prio and out are declared as integers with range 0 to 15.
    but in the declaration of your procedure
    "add_prio (variable aprio: in integer; variable aout: inout integer) " you are giving integers with full or different range. i think this is the problem.Just change the range of the inputs and tell me whether it is working or not.


    ------------------------------
    vhdlguru.blogspot.com --VHDL tuto site.
    vipinlal, Mar 6, 2010
    #2
    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. Anthony Boor

    "about:" variables

    Anthony Boor, Jul 8, 2004, in forum: Firefox
    Replies:
    2
    Views:
    620
    Jan Steffen
    Jul 8, 2004
  2. dt1649651@yahoo.com

    variables in ACL ?

    dt1649651@yahoo.com, May 23, 2005, in forum: Cisco
    Replies:
    2
    Views:
    608
    Barry Margolin
    May 24, 2005
  3. Peter Guhl
    Replies:
    4
    Views:
    2,308
    Peter Guhl
    Jul 5, 2005
  4. Dmitriy Lapshin [C# / .NET MVP]

    Variables in catch(...) clauses?

    Dmitriy Lapshin [C# / .NET MVP], Feb 26, 2004, in forum: MCSD
    Replies:
    9
    Views:
    514
    The Poster Formerly Known as Kline Sphere
    Mar 2, 2004
  5. becool_nikks
    Replies:
    0
    Views:
    1,915
    becool_nikks
    Mar 6, 2009
Loading...

Share This Page