Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   VHDL (http://www.velocityreviews.com/forums/f18-vhdl.html)
-   -   Mapping entity and components (http://www.velocityreviews.com/forums/t640338-mapping-entity-and-components.html)

Jan 10-17-2008 02:58 PM

Mapping entity and components
 
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

Tricky 10-17-2008 03:12 PM

Re: Mapping entity and components
 
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.

none 10-17-2008 04:02 PM

Re: Mapping entity and components
 
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

Jan 10-17-2008 08:20 PM

Re: Mapping entity and components
 
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


All times are GMT. The time now is 12:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


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