Can port Maps be expressions?

Discussion in 'VHDL' started by Shannon, Sep 24, 2008.

  1. Shannon

    Shannon Guest

    Does VHDL allow expressions in port maps? For example see 'cnt_en'
    below:

    lockout_count: ENTITY work.counter_16
    PORT MAP(
    clock => MClk,
    cnt_en => lockout_cnt_en AND NOT lockout_eq0,
    data => STD_LOGIC_VECTOR(LOCKOUT_TIME),
    sload => lockout_sload,
    q => lockout_cnt
    );

    Shannon
     
    Shannon, Sep 24, 2008
    #1
    1. Advertising

  2. Shannon

    Shannon Guest

    On Sep 24, 9:08 am, Alan Fitch <> wrote:
    > Shannon wrote:
    > > Does VHDL allow expressions in port maps?  For example see 'cnt_en'
    > > below:

    >
    > > lockout_count: ENTITY work.counter_16
    > >    PORT MAP(
    > >    clock           => MClk,
    > >    cnt_en          => lockout_cnt_en AND NOT lockout_eq0,
    > >    data            => STD_LOGIC_VECTOR(LOCKOUT_TIME),
    > >    sload           => lockout_sload,
    > >    q               => lockout_cnt
    > >    );

    >
    > > Shannon

    >
    > No, not currently
    >
    > Alan
    >
    > P.S. The feature is introduced in VHDL2008 which should be standardised
    > by the IEEE this year.
    >
    > --
    > Alan Fitch
    > Douloshttp://www.doulos.com


    Thank you.
     
    Shannon, Sep 24, 2008
    #2
    1. Advertising

  3. Shannon

    Andy Guest

    On Sep 25, 3:48 am, Alan Fitch <> wrote:

    The "type conversion" need not be just a type conversion. It must be a
    function with exactly one argument, and the return type of the
    function must be constrained.

    For example, invert(lockout_time) would also work, if invert() returns
    a constrained type. The data type need not actually change.

    The same restriction applies to a type conversion, unless it is an
    implicit conversion (e.g. from numeric_std.unsigned to SLV).

    I saw a paper several years ago that used conversion functions in
    configuration port maps to allow substitution of integer vs vector
    based models.

    Andy
     
    Andy, Sep 26, 2008
    #3
    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. Jay Douglas
    Replies:
    0
    Views:
    641
    Jay Douglas
    Aug 15, 2003
  2. Simon Elliott
    Replies:
    4
    Views:
    1,190
    Simon Elliott
    Mar 10, 2005
  3. Marcus
    Replies:
    2
    Views:
    620
    Marcus
    Dec 9, 2005
  4. Sam Roberts
    Replies:
    11
    Views:
    275
    GOTOU Yuuzou
    Mar 23, 2005
  5. Noman Shapiro
    Replies:
    0
    Views:
    258
    Noman Shapiro
    Jul 17, 2013
Loading...

Share This Page