superman321
Joined: 20 Dec 2005
Posts: 4
|
Posted:
Sat Jan 21, 2006 7:09 pm Post subject:
Query on the user defined attributes |
|
|
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 |
|