Mapping entity and components

J

Jan

Dear all,

I have the following VHDL which gives me some problems.

entity pixel_bufferX3 is
Port (
R_0 : in STD_LOGIC_VECTOR (7 downto 0);
G_0 : in STD_LOGIC_VECTOR (7 downto 0);
B_0 : in STD_LOGIC_VECTOR (7 downto 0);
R_1 : in STD_LOGIC_VECTOR (7 downto 0);
G_1 : in STD_LOGIC_VECTOR (7 downto 0);
B_1 : in STD_LOGIC_VECTOR (7 downto 0);
R_2 : in STD_LOGIC_VECTOR (7 downto 0);
G_2 : in STD_LOGIC_VECTOR (7 downto 0);
B_2 : in STD_LOGIC_VECTOR (7 downto 0));
end pixel_bufferX3;

architecture Behavioral of pixel_bufferX3 is

component BLOCKRAM512x72
port (
dina: IN std_logic_VECTOR(71 downto 0);
end component;

begin
dp_pixbuf : BLOCKRAM512x72
port map (
dina => R_0(7 downto 0) & G_0(7 downto 0),
);


end Behavioral;

I'm trying to map all the inputs from the entity to one large bus and
map it to the dina. How to do that? Am I forced to make a local signal
and first map the inputs to that and then map dina with it?

Thank you in advance!

Regards
Jan
 
T

Tricky

Dear all,

I have the following VHDL which gives me some problems.

entity pixel_bufferX3 is
     Port (
            R_0 : in  STD_LOGIC_VECTOR (7 downto 0);
            G_0 : in  STD_LOGIC_VECTOR (7 downto 0);
            B_0 : in  STD_LOGIC_VECTOR (7 downto 0);
            R_1 : in  STD_LOGIC_VECTOR (7 downto 0);
            G_1 : in  STD_LOGIC_VECTOR (7 downto 0);
            B_1 : in  STD_LOGIC_VECTOR (7 downto 0);
            R_2 : in  STD_LOGIC_VECTOR (7 downto 0);
            G_2 : in  STD_LOGIC_VECTOR (7 downto 0);
            B_2 : in  STD_LOGIC_VECTOR (7 downto 0));
end pixel_bufferX3;

architecture Behavioral of pixel_bufferX3 is

component BLOCKRAM512x72
        port (
        dina: IN std_logic_VECTOR(71 downto 0);
end component;

begin
        dp_pixbuf : BLOCKRAM512x72
                port map (
                        dina => R_0(7 downto 0) & G_0(7 downto 0),
                );

end Behavioral;

I'm trying to map all the inputs from the entity to one large bus and
map it to the dina. How to do that? Am I forced to make a local signal
and first map the inputs to that and then map dina with it?

Thank you in advance!

Regards
   Jan

You have to do the latter, ie. make a temporary signal that's as long
as dina and connect to to dina. Only type conversions are allowed on
port maps.

Im sure in the new VHDL spec, the first method will be allowed.
 
N

none

Jan said:
Dear all,

I have the following VHDL which gives me some problems.

entity pixel_bufferX3 is
Port (
R_0 : in STD_LOGIC_VECTOR (7 downto 0);
G_0 : in STD_LOGIC_VECTOR (7 downto 0);
B_0 : in STD_LOGIC_VECTOR (7 downto 0);
R_1 : in STD_LOGIC_VECTOR (7 downto 0);
G_1 : in STD_LOGIC_VECTOR (7 downto 0);
B_1 : in STD_LOGIC_VECTOR (7 downto 0);
R_2 : in STD_LOGIC_VECTOR (7 downto 0);
G_2 : in STD_LOGIC_VECTOR (7 downto 0);
B_2 : in STD_LOGIC_VECTOR (7 downto 0));
end pixel_bufferX3;

architecture Behavioral of pixel_bufferX3 is

component BLOCKRAM512x72
port (
dina: IN std_logic_VECTOR(71 downto 0);
end component;

begin
dp_pixbuf : BLOCKRAM512x72
port map (
dina => R_0(7 downto 0) & G_0(7 downto 0),
);


end Behavioral;

I'm trying to map all the inputs from the entity to one large bus and
map it to the dina. How to do that? Am I forced to make a local signal
and first map the inputs to that and then map dina with it?

Thank you in advance!

Regards
Jan

How about doing this?

dp_pixbuf : BLOCKRAM512x72
port map (
dina(71 downto 64) => R_0(7 downto 0)
dina(63 downto 56) => G_0(7 downto 0),
);

and so on..

Ron
 
J

Jan

none said:
Jan wrote:
How about doing this?

dp_pixbuf : BLOCKRAM512x72
port map (
dina(71 downto 64) => R_0(7 downto 0)
dina(63 downto 56) => G_0(7 downto 0),
);
and so on..
Ron
I just tried it, and the syntax does not work. I get the following error
"An index or element of the formal port dina of BLOCKRAM512x72 is
missing in instantiation."
But it works with using the local signal.

Regards
Jan
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top