Papilio Plus/Buttons To Lights

From Hamsterworks Wiki!

Jump to: navigation, search

This Papilio Plus project just tests that the buttons and the LEDs work.

ButtonsToLights.vhd

----------------------------------------------------------------------------------
-- Engineer: Mike Field <hamster@snap.net.nz>
-- 
-- Create Date:    19:57:13 09/29/2011 
--
-- Description: Simple design to join the buttons to the LEDs.
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity ButtonsToLights is
    Port ( Button : in  STD_LOGIC_VECTOR (3 downto 0);
           LED : out  STD_LOGIC_VECTOR (3 downto 0));
end ButtonsToLights;

architecture Behavioral of ButtonsToLights is
begin
	LED <= Button;
end Behavioral;

ButtonsToLights.ucf

CONFIG PROHIBIT=P144;
CONFIG PROHIBIT=P69;
CONFIG PROHIBIT=P60;

NET LED(0)    LOC="P75"  | IOSTANDARD=LVTTL; # A7  LED1
NET LED(1)    LOC="P67"  | IOSTANDARD=LVTTL; # A6  LED2
NET LED(2)    LOC="P66"  | IOSTANDARD=LVTTL; # A5  LED3
NET LED(3)    LOC="P61"  | IOSTANDARD=LVTTL; # A4  LED3

NET Button(0) LOC="P74"  | IOSTANDARD=LVTTL; # B8   Left
NET Button(1) LOC="P95"  | IOSTANDARD=LVTTL; # B9   Up
NET Button(2) LOC="P62"  | IOSTANDARD=LVTTL; # B10  Down
NET Button(3) LOC="P59"  | IOSTANDARD=LVTTL; # B11  Right

Personal tools