Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > trouble connecting an out std_logic_vector port to aggregate of signals

Reply
Thread Tools

trouble connecting an out std_logic_vector port to aggregate of signals

 
 
ihk
Guest
Posts: n/a
 
      09-01-2011
Hello,

Can a VHDL guru help me explaining why for a component defined like
this

component nios is
port (
pio_in : in std_logic_vector(15 downto 0),
pio_out : out std_logic_vector(7 downto 0)
);

I can do the following assignment:

nios_1 : nios
port map (
pio_in => (
0 => pll_locked,
1 => pll_clkswitch,
others => '0')
);

but the following gives syntax error (in Altera Quartus)

nios_1 : nios
port map (
pio_out => (
0 => led1,
1 => led2,
others => open)
);

The only way I can make this works is if I do the assignment to
pio_out like this:
nios_1 : nios
port map (
pio_out(0) => led1,
pio_out(1) => led2
);


Thanks and best regards,
Ivo
 
Reply With Quote
 
 
 
 
Pontus
Guest
Posts: n/a
 
      09-01-2011
Not beeing a guru, I should perhaps not attempt an answer...
(Gurus usually have several limo's, I don't)

I have been bitten by similar issues before, portmaps
where parts of a vector should connect, others stay open, etc.

I think this is an effect of the language trying to limit
the missuses rather than to allow non-precise statements
to be accepted. Or perhaps it's some vendors non-compliance
to the standard.

Your solution seems pretty clean and expressive, your
problem was probably getting the compiler to accept the code.

When I struggled with this, I got some informative compile
errors from the simulator (modelsim or riviera, can't remember witch).

HTH -- Pontus

On 1 Sep, 10:48, ihk <ivokassama...@gmail.com> wrote:
> Hello,
>
> Can a VHDL guru help me explaining why for a component defined like
> this
>
> component nios is
> * *port (
> * * * *pio_in * : in *std_logic_vector(15 downto 0),
> * * * *pio_out : out std_logic_vector(7 downto 0)
> );
>
> I can do the following assignment:
>
> nios_1 : nios
> * *port map (
> * * * *pio_in * => (
> * * * * * * * * 0 * * * * * => pll_locked,
> * * * * * * * * 1 * * * * * => pll_clkswitch,
> * * * * * * * * others * * *=> '0')
> * );
>
> but the following gives syntax error (in Altera Quartus)
>
> nios_1 : nios
> * *port map (
> * * * *pio_out * => (
> * * * * * * * * 0 * * * * * => led1,
> * * * * * * * * 1 * * * * * => led2,
> * * * * * * * * others * *=> open)
> * );
>
> The only way I can make this works is if I do the assignment to
> pio_out like this:
> nios_1 : nios
> * *port map (
> * * * *pio_out(0) *=> led1,
> * * * *pio_out(1) *=> led2
> * );
>
> Thanks and best regards,
> Ivo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interface between floating-point and std_logic_vector signals. Rain VHDL 4 04-30-2008 04:16 PM
std_logic_vector signals in sensitivity list process Steven Kauffmann VHDL 21 01-09-2008 02:01 PM
inout std_logic_vector to array of std_logic_vector of generic length conversion... Thomas Rouam VHDL 6 11-09-2007 11:49 AM
connecting std_logic inout ports and std_logic_vector inout port =?ISO-8859-15?Q?Fr=E9d=E9ric_Lochon?= VHDL 3 11-08-2007 03:55 AM
Connecting std_logic to std_logic_vector in component declaration Chris Jones VHDL 2 01-29-2004 11:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57