Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Mapping entity and components

Reply
Thread Tools

Mapping entity and components

 
 
Jan
Guest
Posts: n/a
 
      10-17-2008
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
 
Reply With Quote
 
 
 
 
Tricky
Guest
Posts: n/a
 
      10-17-2008
On 17 Oct, 15:58, Jan <webpjat@future-design_DELETE.dk> wrote:
> 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.
 
Reply With Quote
 
 
 
 
none
Guest
Posts: n/a
 
      10-17-2008
Jan wrote:
> 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
 
Reply With Quote
 
Jan
Guest
Posts: n/a
 
      10-17-2008
none wrote:
> 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
 
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
Entity, problem with entity key ThatsIT.net.au ASP .Net 1 09-07-2009 02:20 AM
Entity Framework - Reassigning child entity's parent Norm ASP .Net 3 07-06-2009 07:28 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla ASP .Net 1 10-06-2008 09:42 AM
Entity Name or Entity Number? Samuel van Laere HTML 4 02-24-2007 10:11 PM
SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution Bluetears76 Java 1 07-01-2004 09:01 PM



Advertisments