Query on the user defined attributes
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Query on the user defined attributes

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA
Author Message
superman321



Joined: 20 Dec 2005
Posts: 4

Posted: Sat Jan 21, 2006 7:09 pm    Post subject: Query on the user defined attributes Reply with quote

Hi all,

I am a begineer in VHDL and i have been asked to write a VHDL code for ROM and there is template for 16x1 ROM which i have mapped to make it a 16X4 ROM. When i synthesize the code i get the following error message.

"Conflict on property <INIT> of instance <ROM_b0> between generic and attribute." and the synthesis tool generates a message as: "Generating a Black Box for component <ROM16X1>."

the code:

library IEEE;
library UNISIM;
use UNISIM.Vcomponents.All;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity ROM16X4 is
port( Addr: in std_logic_vector(3 downto 0);
o: out std_logic_vector(3 downto 0));
end ROM16X4;

architecture Behavioral of ROM16X4 is
component ROM16X1
generic(INIT: bit_vector := X"16");
port(
O: out std_logic;
A0: in std_logic;
A1: in std_logic;
A2: in std_logic;
A3: in std_logic);
end component ;

attribute INIT: string;
attribute INIT of ROM_b3: label is "fb73";
attribute INIT of ROM_b2: label is "d951";
attribute INIT of ROM_b1: label is "ea62";
attribute INIT of ROM_b0: label is "c840";

begin

ROM_b0: Rom16x1 generic map(INIT => x"c840")
port map(A3 => addr(3), A2 => addr(2), A1 => addr(1), A0 => addr(0), O => O(0));

ROM_b1: Rom16x1 generic map(INIT => x"ea62")
port map(A3 => addr(3), A2 => addr(2), A1 => addr(1), A0 => addr(0), O => O(1));

ROM_b2: Rom16x1 generic map(INIT => x"d951")
port map(A3 => addr(3), A2 => addr(2), A1 => addr(1), A0 => addr(0), O => O(2));

ROM_b3: Rom16x1 generic map(INIT => x"fb73")
port map(A3 => addr(3), A2 => addr(2), A1 => addr(1), A0 => addr(0), O => O(3));
end Behavioral;



I AM NOT ABLE TO DEBUG THIS ..PLZ HELP ME......it has driven me crazy for the past 2 days....ALSO EXPLAIN ME THE USE OF THE "ATTRIBUTES" (USER DEFINED) AS USED HERE.

CHEERS
Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> FPGA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB