Variable scope

Discussion in 'Hardware' started by toller, Apr 21, 2008.

  1. toller

    toller

    Joined:
    Apr 21, 2008
    Messages:
    2
    Hi,

    I'm writing a VHDL program consisting of multiple entities, using multiple packages that sometimes contain equal signal names.

    So, I must hide the declared signals from each other:

    Code:
    architecture behavioural of entity1 is
    use work.mypackage1.all;
    begin
    ..
    end package;
    
    architecture behavioural of entity2 is
    use work.mypackage2.all;
    begin
    ..
    end package;
    
    This doesnt work when compiling in Xilinx (it says the required filenames that should be known from the package cannot be recognized in the architecture) Is it impossible to use packages there? Some VHDL texts I've read say it well is possible..


    Yea, I know the cheap way would be to just put the signals there instead of including them by a package, but I'd like to make it work with packages.


    Addendum:
    Another possibility I've tried is just adding variable declarations in each source file before the entity, at the beginning of the file (each of my source files only contains one entity and one architecture). This compiles fine in ModelSim (scope of a package maybe only valid to the entity directly following the declaration). However, this fails when I try to do this in Xilinx ISE because such package inclusions are treated as global.
    toller, Apr 21, 2008
    #1
    1. Advertising

  2. toller

    toller

    Joined:
    Apr 21, 2008
    Messages:
    2
    Disregard this post, will repost in VHDL newsgroup. Sorry..
    toller, Apr 21, 2008
    #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. luke.us@gmail.com

    Global Scope

    luke.us@gmail.com, Jun 11, 2005, in forum: MCSE
    Replies:
    4
    Views:
    885
    doctordns@gmail.com
    Jun 14, 2005
  2. kcsteele

    changing group scope

    kcsteele, Apr 7, 2006, in forum: MCSE
    Replies:
    2
    Views:
    4,193
    kcsteele
    Apr 11, 2006
  3. hal@nospam.com

    Adding custom options to DHCP scope

    hal@nospam.com, Feb 7, 2006, in forum: VOIP
    Replies:
    4
    Views:
    55,056
    gsingle
    Jul 14, 2006
  4. Lars Bonnesen
    Replies:
    8
    Views:
    1,884
    Lars Bonnesen
    Jun 15, 2006
  5. jansi_rk

    Variable Scope in asp.Net

    jansi_rk, Sep 6, 2006, in forum: Software
    Replies:
    1
    Views:
    1,594
    BabuA
    Sep 18, 2006
Loading...

Share This Page