#FPGA_PART=xc6slx9-2tqg144
CONFIG VCCAUX = 3.3;

###############################################################################
## SYSCLK/RESET Input
###############################################################################

NET "clk100_i" LOC = "P84" | IOSTANDARD = LVCMOS33 | TNM_NET = "clk100_i";
TIMESPEC TS_clk100_i = PERIOD "clk100_i" 100 MHz HIGH 50%;

NET "usb_clk_i" TNM_NET = "usb_clk_i";
TIMESPEC "TS_usb_clk_i" = PERIOD "usb_clk_i" 20.833 ns HIGH 50% INPUT_JITTER 208.33ps;

## Constraint for RX0
NET "dvi_decoder_0/rxclk" TNM_NET = DVI_CLOCK0;
TIMESPEC TS_DVI_CLOCK0 = PERIOD "DVI_CLOCK0" 100 MHz HIGH 50%;

## allow 
#PIN "dvi_decoder_0/pclkbufg.O" CLOCK_DEDICATED_ROUTE = FALSE;

################################################
### TMDS pairs
################################################
NET "rx0_tmds(3)"   LOC = "P132" |IOSTANDARD = TMDS_33 ; # CLK
NET "rx0_tmds_n(3)" LOC = "P131" |IOSTANDARD = TMDS_33 ;
NET "rx0_tmds(2)"   LOC = "P134" |IOSTANDARD = TMDS_33 ; # Red
NET "rx0_tmds_n(2)" LOC = "P133" |IOSTANDARD = TMDS_33 ;
NET "rx0_tmds(1)"   LOC = "P140" |IOSTANDARD = TMDS_33 ; # Green
NET "rx0_tmds_n(1)" LOC = "P139" |IOSTANDARD = TMDS_33 ;
NET "rx0_tmds(0)"   LOC = "P144"  |IOSTANDARD = TMDS_33 ; # Blue
NET "rx0_tmds_n(0)" LOC = "P143"  |IOSTANDARD = TMDS_33 ;
##NET "rx0_scl"       LOC = "C13" |IOSTANDARD = LVCMOS33 ;
##NET "rx0_sda"       LOC = "A13" |IOSTANDARD = LVCMOS33 ;

#######################################################################################
#### onBoard USB controller
#######################################################################################
NET "usb_clk_i"     LOC = "P16"  | IOSTANDARD = LVCMOS33;
NET "usb_flag_a_i"  LOC = "P10"  | IOSTANDARD = LVCMOS33;
NET "usb_flag_b_i"  LOC = "P9"   | IOSTANDARD = LVCMOS33;
NET "usb_flag_c_i"  LOC = "P8"   | IOSTANDARD = LVCMOS33;
NET "usb_cs_io"     LOC = "P142" | IOSTANDARD = LVCMOS33;
NET "usb_oe_o"      LOC = "P6"   | IOSTANDARD = LVCMOS33;
NET "usb_rd_o"      LOC = "P116" | IOSTANDARD = LVCMOS33;
NET "usb_wr_o"      LOC = "P117" | IOSTANDARD = LVCMOS33;
NET "usb_pktend_o"  LOC = "P1"   | IOSTANDARD = LVCMOS33;
NET "usb_adr_o<0>"  LOC = "P5"   | IOSTANDARD = LVCMOS33;
NET "usb_adr_o<1>"  LOC = "P2"   | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<0>" LOC = "P23"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<1>" LOC = "P22"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<2>" LOC = "P21"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<3>" LOC = "P17"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<4>" LOC = "P15"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<5>" LOC = "P14"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<6>" LOC = "P12"  | IOSTANDARD = LVCMOS33;
NET "usb_dat_io<7>" LOC = "P11"  | IOSTANDARD = LVCMOS33;

#########################################
## VMC header
#########################################
NET "vmc_clk_o"      LOC = "P55" | IOSTANDARD = LVCMOS33;
NET "vmc_hsync_o"    LOC = "P61" | IOSTANDARD = LVCMOS33;
NET "vmc_vsync_o"    LOC = "P62" | IOSTANDARD = LVCMOS33;
NET "vmc_de_o"       LOC = "P66" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<0>"   LOC = "P59" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<1>"   LOC = "P51" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<2>"   LOC = "P58" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<3>"   LOC = "P50" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<4>"   LOC = "P57" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<5>"   LOC = "P48" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<6>"   LOC = "P56" | IOSTANDARD = LVCMOS33;
NET "vmc_red_o<7>"   LOC = "P47" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<0>" LOC = "P46" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<1>" LOC = "P41" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<2>" LOC = "P45" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<3>" LOC = "P40" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<4>" LOC = "P44" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<5>" LOC = "P39" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<6>" LOC = "P43" | IOSTANDARD = LVCMOS33;
NET "vmc_green_o<7>" LOC = "P38" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<0>"  LOC = "P35" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<1>"  LOC = "P30" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<2>"  LOC = "P34" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<3>"  LOC = "P29" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<4>"  LOC = "P33" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<5>"  LOC = "P27" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<6>"  LOC = "P32" | IOSTANDARD = LVCMOS33;
NET "vmc_blue_o<7>"  LOC = "P26" | IOSTANDARD = LVCMOS33;

#########################################
## Reset button and LEDs and Mechanical Switches (SW)
#########################################
#PIN "rstbtn_n" TIG;
#NET "rstbtn_n" LOC = "" |IOSTANDARD = LVCMOS33;
NET "led_o<0>"   LOC = "P75" | IOSTANDARD = LVCMOS33;
NET "led_o<1>"   LOC = "P78" | IOSTANDARD = LVCMOS33;
NET "led_o<2>"   LOC = "P79" | IOSTANDARD = LVCMOS33;
NET "led_o<3>"   LOC = "P80" | IOSTANDARD = LVCMOS33;
