Exporting a constant from component to it's parent

A

avishorp

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
 
K

KJ

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
 
A

avishorp

בת×ריך ×™×•× ×¨×שון, 22 ביולי 2012 15:43:15 UTC+3, מ×ת (e-mail address removed):
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top