numeric_std, std_logic_vector to integer

OP #2741201
Rate this post
useful
not useful
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
Rate this post
useful
not useful
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

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now