numeric_std, std_logic_vector to integer

OP #2741201
code snipets:

use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity TEST is port (
    addr : in integer range 0 to 31;
end TEST;

component TEST port (
    addr : in integer range 0 to 31;
end component;



DBUS : inout std_logic_vector(15 downto 0);

Inst_TEST: TEST port map (
    addr => to_integer(unsigned(DBUS(4 downto 0))),
);

This is where I get the ISE error:
Actual, ParameterAssocOp, associated with
Formal Signal, Signal 'addr', is not a Signal. (LRM 2.1.1)


What am I doing wrong here?
Moderator (Company: Titel) #2741469
Try it with a local signal:
1
:
2
:
3

4
DBUS : inout std_logic_vector(15 downto 0);
5
addrhelp : integer range 0 to 31;
6

7

8

9
addrhelp <= to_integer(unsigned(DBUS(4 downto 0)));
10

11
Inst_TEST: TEST port map (
12
    addr => addrhelp
13
);

In this way no function or procedure is called within the port 
assignment...

Reply

A question of your own? This thread is over 14 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.