Re: Generic, Ports, this '=>' is optional?

Discussion in 'VHDL' started by goouse99@gmail.com, Aug 15, 2013.

  1. Guest

    Am Donnerstag, 15. August 2013 02:11:53 UTC+2 schrieb Christiano:
    > In some codes that exist component instantiation, sometimes it's like this:
    >
    > X: Gate generic map (N => 5) port map (a, b);
    >
    > and other times as well:
    >
    > X: Gate generic map (5) port map (a, b);
    >
    >
    >
    > Is there any difference or particular reason to use one or the other?


    Hi Christiano,
    so you already learned about Positional assignment and Named assignment. :)
    While Positional assignment saves you some typing (which emacs would do automatically) it is error prone and badly maintainable.

    See what you can do with named association.
    (Most of this can be done wit positional association too, but imagine Models with high numbers of generics and ports. Can you handle all these anonymous values.)

    X: Gate
    generic map (-- select by comment and document differrent usages this way
    --N => 5 -- use for simulation
    N => 54 -- use in implementation
    --N => 65 -- use in some special case
    )
    port map (putout_this => b -- place for usefull comments
    something_in => a); -- don't worry about the order

    This is just to give you an idea what's possible.

    Have a nice synthesis
    Eilert
    , Aug 15, 2013
    #1
    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. Mario Trams

    Re: unused input ports

    Mario Trams, Jul 22, 2003, in forum: VHDL
    Replies:
    0
    Views:
    1,090
    Mario Trams
    Jul 22, 2003
  2. Murat Tasan
    Replies:
    1
    Views:
    8,021
    Chaitanya
    Feb 3, 2009
  3. Replies:
    2
    Views:
    418
  4. minlearn
    Replies:
    2
    Views:
    443
    red floyd
    Mar 13, 2009
  5. mreister
    Replies:
    1
    Views:
    3,112
    mreister
    May 25, 2010
Loading...

Share This Page