Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Constant port map in component instantiation

596 views
Skip to first unread message

Chi Fung

unread,
Aug 16, 1999, 3:00:00 AM8/16/99
to
I understand that the standard format for component instantiation
using port map is

U1: comp1
port map(component_pin=>signal_node);

where signal_node has been declared previously right
below the currrent architecture.

My problem is, let say, if I want to port map component_pin
to a constant, e.g. '1' instead of signal_node, how am I
suppose to code that? I have tried

port map(component_pin=>'1');

but it doesn't seem to work.

Thanks for any hints.

mjen...@iastate.edu

unread,
Aug 16, 1999, 3:00:00 AM8/16/99
to
On Mon, 16 Aug 1999 09:52:36 +0800, "Chi Fung" <cff...@sp.edu.sg>
wrote:

>
> port map(component_pin=>'1');
>
>but it doesn't seem to work.
>
>Thanks for any hints.
>
>

constant assignments at the port map are a feature of VHDL '93.

MJ


Richard Wilkinson

unread,
Aug 16, 1999, 3:00:00 AM8/16/99
to
Chi Fung wrote:
>
> I understand that the standard format for component instantiation
> using port map is
>
> U1: comp1
> port map(component_pin=>signal_node);
>
> where signal_node has been declared previously right
> below the currrent architecture.
>
> My problem is, let say, if I want to port map component_pin
> to a constant, e.g. '1' instead of signal_node, how am I
> suppose to code that? I have tried
>
> port map(component_pin=>'1');
>
> but it doesn't seem to work.
>
> Thanks for any hints.

Define a constant of type std_logic equalling '1':

constant ConstantValue : std_logic := '1';
U1: comp1 port map(component_pin => ConstantValue);

Cheers,

Rich

Andy Peters

unread,
Aug 16, 1999, 3:00:00 AM8/16/99
to
Richard Wilkinson wrote in message <37B7C06B...@art-render.com>...

>Define a constant of type std_logic equalling '1':
>
>constant ConstantValue : std_logic := '1';
>U1: comp1 port map(component_pin => ConstantValue);

Hmmm ... I've tried that before; doesn't work. Maybe it's an FPGA
Express/VHDL'87 thing.

I create a "constant signal" instead:

signal vcc : STD_LOGIC;

begin -- architecture

vcc <= '1';

u1 : meshugga (pin1 => vcc ... );

works for me. ymmv.


--
-----------------------------------------
Andy Peters
Sr Electrical Engineer
National Optical Astronomy Observatories
950 N Cherry Ave
Tucson, AZ 85719
apeters (at) noao.edu

The Republican Party: "We've upped our standards. Now, up yours!"


0 new messages