![]() |
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 |
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. |
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 |
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.