Exporting a constant from component to it's parent

Discussion in 'VHDL' started by avishorp@gmail.com, Jul 22, 2012.

  1. Guest

    Is it possible to export a constant from a component to be used by it's parent component? I have a component that calculates its own latency (based one generics). This information should be used by its parent component to adjust pipeline depths, but I can't find a way to propagate the calculation tothe parent. An output port cannot be used because I need a constant in theparent component.

    Thanks,
    Avishay
     
    , Jul 22, 2012
    #1
    1. Advertising

  2. KJ Guest

    On Sunday, July 22, 2012 8:43:15 AM UTC-4, wrote:
    > Is it possible to export a constant from a component to be used by it's parent component? I have a component that calculates its own latency (based one generics). This information should be used by its parent component to adjust pipeline depths, but I can't find a way to propagate the calculation to the parent. An output port cannot be used because I need a constant in the parent component.
    >


    No, but the calculation you do inside your component can be put into a function (or maybe it already is) and you put that function into a package. The parent of the component and the component itself would then call the function that is inside the package. The generic that you are currently using inside the component to do your calculation, would be the input parameter to the function. Since both the component and the parent of the component have visibility to that generic, they can each call the same function and get the same result.

    Kevin Jennings
     
    KJ, Jul 22, 2012
    #2
    1. Advertising

  3. Guest

    בת×ריך ×™×•× ×¨×שון, 22 ביולי 2012 15:43:15 UTC+3, מ×ת :
    > Is it possible to export a constant from a component to be used by it's parent component? I have a component that calculates its own latency (based one generics). This information should be used by its parent component to adjust pipeline depths, but I can't find a way to propagate the calculation to the parent. An output port cannot be used because I need a constant in the parent component.
    >
    > Thanks,
    > Avishay


    I'm aware of this method, it cumbersome and requires a lot entity internals(constant, functions, typedefs) to move to the package. I hoped there is abetter way.

    Avishay
     
    , Jul 23, 2012
    #3
  4. Guest

    , Jul 25, 2012
    #4
    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. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,136
  2. Martin Magnusson
    Replies:
    2
    Views:
    537
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    594
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    359
    Keith Thompson
    Dec 14, 2006
  5. JackRazz

    Finding a Component's (ComponentModel.Component) Parent Form

    JackRazz, Mar 4, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    491
    John Saunders
    Mar 4, 2004
Loading...

Share This Page