Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.vhdl

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2012, 12:43 PM
avishorp@gmail.com
Guest
 
Posts: n/a
Default Exporting a constant from component to it's parent

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
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-22-2012, 03:53 PM
KJ
Guest
 
Posts: n/a
Default Re: Exporting a constant from component to it's parent

On Sunday, July 22, 2012 8:43:15 AM UTC-4, avis...@gmail.com 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
Reply With Quote
  #3 (permalink)  
Old 07-23-2012, 06:10 AM
avishorp@gmail.com
Guest
 
Posts: n/a
Default Re: Exporting a constant from component to it's parent

בתאריך יום ראשון, 22 ביולי 2012 15:43:15 UTC+3, מאת avis...@gmail.com:
> 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
Reply With Quote
  #4 (permalink)  
Old 07-25-2012, 12:04 AM
pontus.stenstrom@gmail.com
Guest
 
Posts: n/a
Default Re: Exporting a constant from component to it's parent

Hi,
this is slightly similar to something I was attempting, see:
http://groups.google.com/group/comp....051abe1269ac12

or search for "generic outputs"

I'm afraid you'll get the same answer, a package that goes with the component,
can return information about the component. There is no way the component can
provide this.

HTH -- Pontus
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 08:12 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.