|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
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 |
|
|||
|
בתאריך יום ראשון, 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 |
|
|||
|
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 |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|