Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > incremental generic association

Reply
Thread Tools

incremental generic association

 
 
sebs
Guest
Posts: n/a
 
      11-28-2011
Hi,

In my toplevel testbench I'd like to only change one generic of a
component somewhere in my design. This component has many generics
that have no default binding. They are all set by the hierarchy
above.

so in my testbench I want to do something like the following in order
to change only the generic g_Segment, but leave the rest alone.

configuration blub of my_tb is

for tb
for C_data_src: data_src
for behav
for C_segment : segment
use entity work.segment
generic map (g_Segments => 10);
end for;
end for;
end for;
end configuration blub;


Unfortunately Modelsim complains about all generics that have no
default value ... "Formal generic ... has OPEN or no actual
association with it." Although all generics are defined in the
architecture where C_segment is instantiated. Why would i need to
define all generics in the generic map of the configuration, when I
want to only override one of them?

 
Reply With Quote
 
 
 
 
hssig
Guest
Posts: n/a
 
      11-29-2011
>Although all generics are defined in the architecture

1. Generics are defined in the entity, not in the architecture
2. Do you provide default values for the generics ? They are
necessary if you do not want to map them in "generic map".

Cheers,
hssig
 
Reply With Quote
 
 
 
 
KJ
Guest
Posts: n/a
 
      11-29-2011
On Nov 29, 8:24*am, hssig <(E-Mail Removed)> wrote:
> >Although all generics are defined in the architecture

>
> 1. Generics are defined in the entity, not in the architecture
> 2. Do you provide default values for the generics ? They are
> necessary if you do not want to map them in "generic map".
>
> Cheers,
> hssig


What sebs meant to say is that the *values for* all generics are
defined in the architecture where C_segment is instantiated. There is
more than one generic being mapped, sebs wants to override only one of
them in the testbench (or more generally speaking, he wants to
override a subset of all of the generics and can't rely on entity
defined defaults, if they happen to have defaults).

I don't think this can be done.

Kevin Jennings
 
Reply With Quote
 
JimLewis
Guest
Posts: n/a
 
      12-13-2011
Hi Sebs,
See Peter Ashenden's book. Below is my paraphrase.

With component instantiation, you are creating a local object
with local ports and local generics. By default, component
name binds to entity name, local ports map to entity formal
ports, and local generics map to entity formal generics.
When you choose to map the entity formal generics, you must
specify a value for each formal generic - either a new value
or the value from a component.

Hence change your generic map to:

generic map (
g_Segments => 10, -- formal generic getting new value
g_One => g_One, -- formal generic getting local
generic
... -- map all of the formal generics
);


Thanks for posting this as it clarified my understanding of this.
I had thought it was as easy as what you posted, but I do remember
having done it as above.

Best,
Jim
 
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
Incremental search Mark Goldin ASP .Net 6 08-25-2010 06:52 PM
not just generic type programming,but also parallism generic syntaxprogramming?? minlearn C++ 2 03-13-2009 05:17 PM
generic interfaces with generic methods Murat Tasan Java 1 02-03-2009 12:17 PM
Generic class in a non generic class nramnath@gmail.com Java 2 07-04-2006 07:24 AM
Incremental WAN Migration from Frame to Point to Point VPN krw1968 Cisco 6 04-07-2005 04:08 PM



Advertisments