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. Advertisements

  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. Advertisements

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. avnrao
    Replies:
    0
    Views:
    3,560
    avnrao
    May 7, 2004
  2. Replies:
    1
    Views:
    1,121
  3. dwok
    Replies:
    7
    Views:
    906
    Hal Rosser
    Mar 4, 2005
  4. Replies:
    10
    Views:
    36,720
    jporter892
    Jun 6, 2011
  5. sagejoshua
    Replies:
    16
    Views:
    788
    Michael Winter
    Nov 9, 2005
  6. iwl
    Replies:
    3
    Views:
    791
  7. Replies:
    9
    Views:
    1,309
  8. Replies:
    4
    Views:
    202
    Peter Scott
    Sep 16, 2004
Loading...