I have created a ROM megafunction using the MegaWizard plug-in Manager. This created a new file which I named rom.vhd.
library ieee; use ieee.std_logic_1164.all; entity first is port( PC: in STD_LOGIC_VECTOR(7 downto 0); data : out STD_LOGIC_VECTOR(7 downto 0); clock : in STD_LOGIC ); end first; architecture behavioral of first is begin rom_inst : rom PORT MAP (PC, clock, data); end behavioral;
I get the error: Error (10482): VHDL error at first.vhd(15): object "rom" is used but not declared
How can I fix this problem so VHDL recognizes that I have a ROM in my external file named ROM.vhd?