Can port Maps be expressions?

S

Shannon

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
 
A

Andy

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top