Lösung
Die zusätzlichen Signale werden in die Entity eingebaut:
entity SimpleLed_R1 is
port (
Button : in std_logic; --! Button input, high acitve
SW1 : in std_logic; --! Switch 1 input, high acitve
SW2 : in std_logic; --! Switch 2 input, high acitve
SW3 : in std_logic; --! Switch 3 input, high acitve
SW4 : in std_logic; --! Switch 4 input, high acitve
LED1 : out std_logic; --! LED1 output, high acitve
LED2 : out std_logic; --! LED2 output, high acitve
LED3 : out std_logic; --! LED3 output, high acitve
LED4 : out std_logic --! LED4 output, high acitve
);
end SimpleLed_R1;
Die Switches werden auf die LEDs ausgegeben aber mit dem Taster verknüpft.
architecture RTL of SimpleLed_R1 is
begin
LED1 <= SW1 xor Button;
LED2 <= SW2 xor Button;
LED3 <= SW3 xor Button;
LED4 <= SW4 xor Button;
end RTL;
Constraints
Natürlich müssen die neuen Signale auch noch mit der Außenwelt verbunden werden.
Für ZYBO schaut das folgendermaßen aus:
set_property PACKAGE_PIN R18 [get_ports {Button}]
set_property IOSTANDARD LVCMOS33 [get_ports {Button}]
set_property PACKAGE_PIN G15 [get_ports {SW1}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW1}]
set_property PACKAGE_PIN P15 [get_ports {SW2}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW2}]
set_property PACKAGE_PIN W13 [get_ports {SW3}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW3}]
set_property PACKAGE_PIN T16 [get_ports {SW4}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW4}]
set_property PACKAGE_PIN M14 [get_ports {LED1}]
set_property IOSTANDARD LVCMOS33 [get_ports {LED1}]
set_property PACKAGE_PIN M15 [get_ports {LED2}]
set_property IOSTANDARD LVCMOS33 [get_ports {LED2}]
set_property PACKAGE_PIN G14 [get_ports {LED3}]
set_property IOSTANDARD LVCMOS33 [get_ports {LED3}]
set_property PACKAGE_PIN D18 [get_ports {LED4}]
set_property IOSTANDARD LVCMOS33 [get_ports {LED4}]
Für das ARTY-Board sind die Pins entsprechend der Tabelle anzupassen.