incremental generic association

Discussion in 'VHDL' started by sebs, Nov 28, 2011.

  1. sebs

    sebs Guest

    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?
    sebs, Nov 28, 2011
    #1
    1. Advertising

  2. sebs

    hssig Guest

    >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
    hssig, Nov 29, 2011
    #2
    1. Advertising

  3. sebs

    KJ Guest

    On Nov 29, 8:24 am, hssig <> 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
    KJ, Nov 29, 2011
    #3
  4. sebs

    JimLewis Guest

    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
    JimLewis, Dec 13, 2011
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Goldin

    Incremental search

    Mark Goldin, Jul 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    2,914
    rxiong
    Aug 25, 2010
  2. Luis Ferrao

    DataGrid: iTunes-like incremental search

    Luis Ferrao, Jan 10, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    946
    Luis Ferrao
    Jan 10, 2005
  3. Kevin McMurtrie

    Need help with incremental GC failure

    Kevin McMurtrie, Jun 19, 2004, in forum: Java
    Replies:
    0
    Views:
    635
    Kevin McMurtrie
    Jun 19, 2004
  4. Kevin McMurtrie

    Need help with incremental GC failure

    Kevin McMurtrie, Jun 19, 2004, in forum: Java
    Replies:
    0
    Views:
    624
    Kevin McMurtrie
    Jun 19, 2004
  5. David
    Replies:
    0
    Views:
    346
    David
    Mar 1, 2005
Loading...

Share This Page