LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
USE ieee.std_logic_unsigned.all;
ENTITY lights IS
PORT (
SW : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
KEY : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
CLOCK_50 : IN STD_LOGIC;
LEDG : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)
);
END lights;
ARCHITECTURE Structure OF lights IS
COMPONENT nios_system
PORT (
clk : IN STD_LOGIC;
reset_n : IN STD_LOGIC;
out_port_from_the_LEDs : OUT STD_LOGIC_VECTOR (7 DOWNTO 0);
in_port_to_the_Switches : IN STD_LOGIC_VECTOR (7 DOWNTO 0)
);
END COMPONENT;
BEGIN
-- Instantiate the Nios II system entity generated by the SOPC Builder
nios_system_inst : nios_system
port map(
out_port_from_the_LEDs => LEDG,
clk => CLOCK_50,
in_port_to_the_switches => SW,
reset_n => KEY(0)
);
END Structure;
this is the top level code but getting error
--- Quote Start ---
Oh... is it the _inst file generated by sopc builder? In that case this is just an example of how the SOPC design can be instantiated in a project. You need to copy-paste its contents to your top-level vhdl file.
--- Quote End ---