-1

this is the code and saved it as IR.vhd, while the name of the project is saved as "8051"

when i try to compile a vhdl program in altera it is showing "Error (12007): Top-level design entity "8051" is undefined " ... what does it mean ?

library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all;

use ieee.std_logic_arith.all;



entity IR is

port(clk,rst,pb1:in std_logic;

irreg:in std_logic_vector(15 downto 0);

ops:out std_logic_vector(2 downto 0);

modes:out std_logic;

loc1:out std_logic_vector(3 downto 0);

loc2ordata:out std_logic_vector(7 downto 0));

end IR;



architecture rtl of IR is



signal ireg: std_logic_vector(15 downto 0);



begin



process (pb1)

begin

if(pb1='0')then --I am going to set up to feed in one instruction at a time

ireg<=irreg;    --the instruction is executed when pb1 is pressed

end if;

end process;

ops<=ireg(15 downto 13);

modes<=ireg(12);

loc1<=ireg(11 downto 8);

loc2ordata<=ireg(7 downto 0);

end rtl;
varun
  • 1
  • 1
  • 3
  • 2
    Possible duplicate of [Altera Quartus Error (12007): Top-level design entity "alt\_ex\_1" is undefined](http://stackoverflow.com/questions/25832326/altera-quartus-error-12007-top-level-design-entity-alt-ex-1-is-undefined) – Qiu Jun 20 '16 at 18:08
  • Check the link of @Qiu or if you are using Tcl console you can execute the following command to set your top level entity: `set_global_assignment -name TOP_LEVEL_ENTITY IR` – michi.b Jun 20 '16 at 18:35

1 Answers1

0

Something I have noticed is that the top level entity name needs to be the same as the file name and module name. So if you called the top level IR, the file probably needs to be IR.v. Now I never capitalize my file names so I don't actually know if capitalization matching is important.

Rich Maes
  • 1,204
  • 1
  • 12
  • 29