exporting variables

Discussion in 'VHDL' started by AB, Mar 9, 2006.

  1. AB

    AB Guest

    Hi all,

    I have a variable in one component:

    constant number : bus7 := "0001000";

    But, is there any way of using this variale in another a component of my
    circuit?

    I know how to connect components together, but the component with the
    variable, has no inputs or outputs just variables.

    Thanks,
    Kay
     
    AB, Mar 9, 2006
    #1
    1. Advertising

  2. AB wrote:

    > I have a variable in one component:
    > constant number : bus7 := "0001000";
    > But, is there any way of using this variale in another a component of my
    > circuit?


    That is a constant, not a variable.
    Constants can be shared by declaring
    them in a package and adding a USE statement
    to each unit that needs it.

    > I know how to connect components together, but the component with the
    > variable, has no inputs or outputs just variables.


    A structural design can
    only share register values using signals.

    The only way to share variables across
    a design entity is to use a single process
    style.


    -- Mike Treseler
     
    Mike Treseler, Mar 9, 2006
    #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. SD
    Replies:
    5
    Views:
    14,476
    Kai Harrekilde-Petersen
    Feb 23, 2005
  2. Ravindra
    Replies:
    0
    Views:
    773
    Ravindra
    Dec 14, 2005
  3. Dennis Redfield
    Replies:
    1
    Views:
    431
    Ozzy Knox
    Aug 4, 2003
  4. Replies:
    9
    Views:
    957
  5. Replies:
    4
    Views:
    130
    Peter Scott
    Sep 16, 2004
Loading...

Share This Page