Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Exporting a constant from component to it's parent

Reply
Thread Tools

Exporting a constant from component to it's parent

 
 
avishorp@gmail.com
Guest
Posts: n/a
 
      07-22-2012
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
 
 
 
 
KJ
Guest
Posts: n/a
 
      07-22-2012
On Sunday, July 22, 2012 8:43:15 AM UTC-4, (E-Mail Removed) 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
 
 
 
 
avishorp@gmail.com
Guest
Posts: n/a
 
      07-23-2012
בתאריך יום ראשון, 22 ביולי 2012 15:43:15 UTC+3, מאת (E-Mail 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
 
Reply With Quote
 
pontus.stenstrom@gmail.com
Guest
Posts: n/a
 
      07-25-2012
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

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
len(var) is [CONSTANT] equal to len(var) == [CONSTANT]? Tor Erik Soenvisen Python 14 11-23-2006 09:57 PM
"Non-constant" constant can't be used as template argument Martin Magnusson C++ 2 10-08-2004 08:41 AM
Understanding How To Use #ifdef Constant #define Constant Sequence In Multible Files Christopher M. Lusardi C++ 1 09-02-2004 07:43 AM
Finding a Component's (ComponentModel.Component) Parent Form JackRazz ASP .Net Building Controls 1 03-04-2004 10:22 PM



Advertisments