
#NET "main_clk" LOC = "AF14";
#NET "pll_clk_fpga" LOC = "C14";
 
#NET "pll_clk" LOC = "AE14";
NET "pll_clk" LOC = "AF14";
NET pll_clk PERIOD = 20.000 ;
OFFSET = OUT : 20.000 : AFTER pll_clk ;
OFFSET = IN : 16.000 : BEFORE pll_clk ;

NET phy_rx_clk PERIOD = 40.000 ;
OFFSET = IN : 10.000 : BEFORE phy_rx_clk ;
NET phy_tx_clk PERIOD = 40.000 ;
OFFSET = OUT : 18.000 : AFTER phy_tx_clk ;
OFFSET = IN : 10.000 : BEFORE phy_tx_clk ;

# Enable for ISE-10
#NET "phy_tx_clk" CLOCK_DEDICATED_ROUTE = FALSE;

INST "clkgen0_v_dll0" LOC = DCM_X1Y0;
INST "clkgen0_v_dll1" LOC = DCM_X1Y1;
INST "clkgen0/v/dll0" LOC = DCM_X1Y0;
INST "clkgen0/v/dll1" LOC = DCM_X1Y1;
INST "clkgen0/xc2v.v/dll0" LOC = DCM_X1Y0;
INST "clkgen0/xc2v.v/sd0.dll1" LOC = DCM_X1Y1;
INST "clkgen0_xc2v_v_dll0" LOC = DCM_X1Y0;
INST "clkgen0_xc2v_v_sd0_dll1" LOC = DCM_X1Y1;

NET "phy_tx_clk" CLOCK_DEDICATED_ROUTE = FALSE;
INST "etxc_pad/xcv2.u0/g1.ttl0.bf" LOC = BUFGMUX3;
INST "etxc_pad_xcv2.u0_g1.ttl0.bf" LOC = BUFGMUX3;
INST "erxc_pad/xcv2.u0/g1.ttl0.bf" LOC = BUFGMUX2;
INST "erxc_pad_xcv2.u0_g1.ttl0.bf" LOC = BUFGMUX2;

# Pushbutton switches (4)
NET "pb_sw(1)" LOC = "W22" | IOSTANDARD = LVTTL;
NET "pb_sw(2)" LOC = "W24" | IOSTANDARD = LVTTL;
NET "pb_sw(3)" LOC = "W25" | IOSTANDARD = LVTTL;
NET "pb_sw(4)" LOC = "W26" | IOSTANDARD = LVTTL;

NET "pb_sw(4)" TIG;

# leds (active low)
NET "led(1)" LOC = "M6" | IOSTANDARD = LVTTL;
NET "led(2)" LOC = "M7" | IOSTANDARD = LVTTL;
NET "led(3)" LOC = "M8" | IOSTANDARD = LVTTL;
NET "led(4)" LOC = "N2" | IOSTANDARD = LVTTL;
NET "led(5)" LOC = "N3" | IOSTANDARD = LVTTL;
NET "led(6)" LOC = "N4" | IOSTANDARD = LVTTL;
NET "led(7)" LOC = "N5" | IOSTANDARD = LVTTL;
NET "led(8)" LOC = "N6" | IOSTANDARD = LVTTL;

###  LCD_DISPLAY ###
#NET "lcd_data(0)" LOC = "T22" | IOSTANDARD = LVTTL;
NET "gpio(8)" LOC = "T22" | IOSTANDARD = LVTTL;
#NET "lcd_data(1)" LOC = "T23" | IOSTANDARD = LVTTL;
NET "gpio(9)" LOC = "T23" | IOSTANDARD = LVTTL;
#NET "lcd_data(2)" LOC = "T25" | IOSTANDARD = LVTTL;
NET "gpio(10)" LOC = "T25" | IOSTANDARD = LVTTL;
#NET "lcd_data(3)" LOC = "T26" | IOSTANDARD = LVTTL;
NET "gpio(11)" LOC = "T26" | IOSTANDARD = LVTTL;
#NET "lcd_data(4)" LOC = "U20" | IOSTANDARD = LVTTL;
NET "gpio(12)" LOC = "U20" | IOSTANDARD = LVTTL;
#NET "lcd_data(5)" LOC = "U22" | IOSTANDARD = LVTTL;
NET "gpio(13)" LOC = "U22" | IOSTANDARD = LVTTL;
#NET "lcd_data(6)" LOC = "U23" | IOSTANDARD = LVTTL;
NET "gpio(14)" LOC = "U23" | IOSTANDARD = LVTTL;
#NET "lcd_data(7)" LOC = "U24" | IOSTANDARD = LVTTL;
NET "gpio(15)" LOC = "U24" | IOSTANDARD = LVTTL;
#NET "lcd_rs" LOC = "T19" | IOSTANDARD = LVTTL;
NET "gpio(0)" LOC = "T19" | IOSTANDARD = LVTTL;
#NET "lcd_rw" LOC = "T20" | IOSTANDARD = LVTTL;
NET "gpio(1)" LOC = "T20" | IOSTANDARD = LVTTL;
#NET "lcd_en" LOC = "T21" | IOSTANDARD = LVTTL;
NET "gpio(2)" LOC = "T21" | IOSTANDARD = LVTTL;
#NET "lcd_backl" LOC = "Y25" | IOSTANDARD = LVTTL;
NET "gpio(3)" LOC = "Y25" | IOSTANDARD = LVTTL;

###  UART1 ###
NET "uart1_rxd" LOC = "V20" | IOSTANDARD = LVTTL; 
NET "uart1_txd" LOC = "U26" | IOSTANDARD = LVTTL;
NET "uart1_cts" LOC = "V21" | IOSTANDARD = LVTTL;
NET "uart1_rts" LOC = "U25" | IOSTANDARD = LVTTL;

###  UART2 ###
NET "uart2_rxd" LOC = "AB14" | IOSTANDARD = LVTTL; 
NET "uart2_txd" LOC = "AA12" | IOSTANDARD = LVTTL;
NET "uart2_cts" LOC = "AD17" | IOSTANDARD = LVTTL;
NET "uart2_rts" LOC = "AF16" | IOSTANDARD = LVTTL;

### CAN ###
NET "can_txd" LOC = "AB23" | IOSTANDARD = LVTTL; 
NET "can_rxd" LOC = "Y26" | IOSTANDARD = LVTTL;

### CAN PS2 ###
NET "ps2_data" LOC = "V23" ; 
NET "ps2_clk" LOC = "V24" ;

### CAN PS2 ###
NET "cod_auxclk" LOC = "N7" ; 
NET "cod_mclk" LOC = "N8" ;
NET "cod_fs" LOC = "G15" ;
NET "cod_dr" LOC = "F15" ;
NET "cod_dx" LOC = "E15" ;
NET "cod_cclk" LOC = "B15" ;
NET "cod_co" LOC = "A15" ;
NET "cod_ci" LOC = "H14" ;
NET "cod_cs" LOC = "T8" ;

### ADC ###
NET "adc_sdi" LOC = "M3" ;
NET "adc_sdo" LOC = "M2" ;
NET "adc_conv" LOC = "R21" ;
NET "adc_sck" LOC = "M5" ;

### DAC ###
NET "dac_clock" LOC = "R19" ;
NET "dac_sdi" LOC = "R20" ;
NET "dac_sdo" LOC = "H1" ;
NET "dac_ld" LOC = "D1" ;

### SDRAM ###

NET "sdram_d(0)" LOC = "L19" | IOSTANDARD = LVTTL;
NET "sdram_d(1)" LOC = "L20" | IOSTANDARD = LVTTL;
NET "sdram_d(2)" LOC = "L21" | IOSTANDARD = LVTTL;
NET "sdram_d(3)" LOC = "L22" | IOSTANDARD = LVTTL;
NET "sdram_d(4)" LOC = "L23" | IOSTANDARD = LVTTL;
NET "sdram_d(5)" LOC = "L25" | IOSTANDARD = LVTTL;
NET "sdram_d(6)" LOC = "L26" | IOSTANDARD = LVTTL;
NET "sdram_d(7)" LOC = "M19" | IOSTANDARD = LVTTL;
NET "sdram_d(8)" LOC = "M20" | IOSTANDARD = LVTTL;
NET "sdram_d(9)" LOC = "M21" | IOSTANDARD = LVTTL;
NET "sdram_d(10)" LOC = "M22" | IOSTANDARD = LVTTL;
NET "sdram_d(11)" LOC = "M24" | IOSTANDARD = LVTTL;
NET "sdram_d(12)" LOC = "M26" | IOSTANDARD = LVTTL;
NET "sdram_d(13)" LOC = "N19" | IOSTANDARD = LVTTL;
NET "sdram_d(14)" LOC = "N20" | IOSTANDARD = LVTTL;
NET "sdram_d(15)" LOC = "N21" | IOSTANDARD = LVTTL;
NET "sdram_d(16)" LOC = "N22" | IOSTANDARD = LVTTL;
NET "sdram_d(17)" LOC = "N23" | IOSTANDARD = LVTTL;
NET "sdram_d(18)" LOC = "N24" | IOSTANDARD = LVTTL;
NET "sdram_d(19)" LOC = "N25" | IOSTANDARD = LVTTL;
NET "sdram_d(20)" LOC = "D25" | IOSTANDARD = LVTTL;
NET "sdram_d(21)" LOC = "H24" | IOSTANDARD = LVTTL;
NET "sdram_d(22)" LOC = "K21" | IOSTANDARD = LVTTL;
NET "sdram_d(23)" LOC = "M25" | IOSTANDARD = LVTTL;
NET "sdram_d(24)" LOC = "N26" | IOSTANDARD = LVTTL;
NET "sdram_d(25)" LOC = "P19" | IOSTANDARD = LVTTL;
NET "sdram_d(26)" LOC = "P20" | IOSTANDARD = LVTTL;
NET "sdram_d(27)" LOC = "P21" | IOSTANDARD = LVTTL;
NET "sdram_d(28)" LOC = "P22" | IOSTANDARD = LVTTL;
NET "sdram_d(29)" LOC = "P23" | IOSTANDARD = LVTTL;
NET "sdram_d(30)" LOC = "P24" | IOSTANDARD = LVTTL;
NET "sdram_d(31)" LOC = "P25" | IOSTANDARD = LVTTL;
NET "sdram_a(0)" LOC = "J20" | IOSTANDARD = LVTTL;
NET "sdram_a(1)" LOC = "J21" | IOSTANDARD = LVTTL;
NET "sdram_a(2)" LOC = "J22" | IOSTANDARD = LVTTL;
NET "sdram_a(3)" LOC = "J23" | IOSTANDARD = LVTTL;
NET "sdram_a(4)" LOC = "J24" | IOSTANDARD = LVTTL;
NET "sdram_a(5)" LOC = "J25" | IOSTANDARD = LVTTL;
NET "sdram_a(6)" LOC = "K20" | IOSTANDARD = LVTTL;
NET "sdram_a(7)" LOC = "K22" | IOSTANDARD = LVTTL;
NET "sdram_a(8)" LOC = "K23" | IOSTANDARD = LVTTL;
NET "sdram_a(9)" LOC = "K24" | IOSTANDARD = LVTTL;
NET "sdram_a(10)" LOC = "K25" | IOSTANDARD = LVTTL;
NET "sdram_a(11)" LOC = "K26" | IOSTANDARD = LVTTL;
NET "sdram_ba(0)" LOC = "D26" | IOSTANDARD = LVTTL;
NET "sdram_ba(1)" LOC = "E23" | IOSTANDARD = LVTTL;
NET "sdram_ba(2)" LOC = "E24" | IOSTANDARD = LVTTL;
NET "sdram_ba(3)" LOC = "G26" | IOSTANDARD = LVTTL;
NET "sdram_dqm(0)" LOC = "AA19" | IOSTANDARD = LVTTL;
NET "sdram_dqm(1)" LOC = "AC18" | IOSTANDARD = LVTTL;
NET "sdram_dqm(2)" LOC = "AC19" | IOSTANDARD = LVTTL;
NET "sdram_dqm(3)" LOC = "AD18" | IOSTANDARD = LVTTL;
NET "sdram_clk"    LOC = "H21" | IOSTANDARD = LVTTL;
NET "sdram_cke"    LOC = "H20" | IOSTANDARD = LVTTL;
NET "sdram_csn"    LOC = "H25" | IOSTANDARD = LVTTL;
NET "sdram_rasn"   LOC = "H22" | IOSTANDARD = LVTTL;
NET "sdram_casn"   LOC = "H23" | IOSTANDARD = LVTTL;
NET "sdram_wen"    LOC = "H26" | IOSTANDARD = LVTTL;

### FLASH ###
NET "flash_a(0)" LOC = "AC20" | IOSTANDARD = LVTTL;
NET "flash_a(1)" LOC = "AC21" | IOSTANDARD = LVTTL;
NET "flash_a(2)" LOC = "AD15" | IOSTANDARD = LVTTL;
NET "flash_a(3)" LOC = "AD21" | IOSTANDARD = LVTTL;
NET "flash_a(4)" LOC = "AD23" | IOSTANDARD = LVTTL;
NET "flash_a(5)" LOC = "AE15" | IOSTANDARD = LVTTL;
NET "flash_a(6)" LOC = "AE19" | IOSTANDARD = LVTTL;
NET "flash_a(7)" LOC = "AE20" | IOSTANDARD = LVTTL;
NET "flash_a(8)" LOC = "AE21" | IOSTANDARD = LVTTL;
NET "flash_a(9)" LOC = "AE22" | IOSTANDARD = LVTTL;
NET "flash_a(10)" LOC = "AE23" | IOSTANDARD = LVTTL;
NET "flash_a(11)" LOC = "AE24" | IOSTANDARD = LVTTL;
NET "flash_a(12)" LOC = "AF15" | IOSTANDARD = LVTTL;
NET "flash_a(13)" LOC = "AF19" | IOSTANDARD = LVTTL;
NET "flash_a(14)" LOC = "AF20" | IOSTANDARD = LVTTL;
NET "flash_a(15)" LOC = "AF21" | IOSTANDARD = LVTTL;
NET "flash_a(16)" LOC = "AF22" | IOSTANDARD = LVTTL;
NET "flash_a(17)" LOC = "AF23" | IOSTANDARD = LVTTL;
NET "flash_a(18)" LOC = "AF24" | IOSTANDARD = LVTTL;
NET "flash_a(19)" LOC = "Y17" | IOSTANDARD = LVTTL;
NET "flash_a(20)" LOC = "AD22" | IOSTANDARD = LVTTL;
NET "flash_d(0)" LOC = "AB22" | IOSTANDARD = LVTTL;
NET "flash_d(1)" LOC = "AC22" | IOSTANDARD = LVTTL;
NET "flash_d(2)" LOC = "W14" | IOSTANDARD = LVTTL;
NET "flash_d(3)" LOC = "Y14" | IOSTANDARD = LVTTL;
NET "flash_d(4)" LOC = "AA14" | IOSTANDARD = LVTTL;
NET "flash_d(5)" LOC = "W15" | IOSTANDARD = LVTTL;
NET "flash_d(6)" LOC = "W16" | IOSTANDARD = LVTTL;
NET "flash_d(7)" LOC = "Y16" | IOSTANDARD = LVTTL;
NET "flash_d(8)" LOC = "Y18" | IOSTANDARD = LVTTL;
NET "flash_d(9)" LOC = "Y19" | IOSTANDARD = LVTTL;
NET "flash_d(10)" LOC = "AA15" | IOSTANDARD = LVTTL;
NET "flash_d(11)" LOC = "AA16" | IOSTANDARD = LVTTL;
NET "flash_d(12)" LOC = "AA17" | IOSTANDARD = LVTTL;
NET "flash_d(13)" LOC = "AA18" | IOSTANDARD = LVTTL;
NET "flash_d(14)" LOC = "AA20" | IOSTANDARD = LVTTL;
NET "flash_d(15)" LOC = "AB15" | IOSTANDARD = LVTTL;
NET "flash_wen" LOC = "AC16" | IOSTANDARD = LVTTL;
NET "flash_oen" LOC = "AB16" | IOSTANDARD = LVTTL;
NET "flash_rpn" LOC = "AB17" | IOSTANDARD = LVTTL;
NET "flash_wpn" LOC = "AC17" | IOSTANDARD = LVTTL;
NET "flash_cen" LOC = "AB20" | IOSTANDARD = LVTTL;
NET "flash_ready" LOC = "AB21" | IOSTANDARD = LVTTL;
NET "flash_byte" LOC = "AF17" | IOSTANDARD = LVTTL;

### 10/100 Ethernet MAC###
NET "phy_rst_n" LOC = "Y13";
#  PIN PHY_MDINT  = phy_mii_int_n, UCF_NET_STRING=("LOC=" | IOSTANDARD = LVCMOS33)
NET "phy_crs" LOC = "AA8" | IOSTANDARD = LVTTL;
NET "phy_col" LOC = "AA7" | IOSTANDARD = LVTTL;
NET "phy_tx_data(3)" LOC = "Y11" | IOSTANDARD = LVTTL;
NET "phy_tx_data(2)" LOC = "Y9" | IOSTANDARD = LVTTL;
NET "phy_tx_data(1)" LOC = "Y8" | IOSTANDARD = LVTTL;
NET "phy_tx_data(0)" LOC = "W13" | IOSTANDARD = LVTTL;
NET "phy_tx_en" LOC = "W12" | IOSTANDARD = LVTTL;
NET "phy_tx_clk" LOC = "W11" | IOSTANDARD = LVTTL ;
#  PIN PHY_TX_ER  = phy_tx_er" LOC = "";
NET "phy_rx_er" LOC = "AA6" | IOSTANDARD = LVTTL;
NET "phy_rx_clk" LOC = "AE13" | IOSTANDARD = LVTTL;
NET "phy_dv" LOC = "AC13" | IOSTANDARD = LVTTL;
NET "phy_rx_data(0)" LOC = "AC5" | IOSTANDARD = LVTTL;
NET "phy_rx_data(1)" LOC = "AB13" | IOSTANDARD = LVTTL;
NET "phy_rx_data(2)" LOC = "AB12" | IOSTANDARD = LVTTL;
NET "phy_rx_data(3)" LOC = "AB5" | IOSTANDARD = LVTTL;
NET "phy_mii_clk" LOC = "AA9" | IOSTANDARD = LVTTL;
NET "phy_mii_data" LOC = "AA10" | IOSTANDARD = LVTTL;

NET "phy_100" LOC = "H7" | IOSTANDARD = LVTTL;

NET "smsc_addr(0)" LOC = "AF13" | IOSTANDARD = LVTTL;
NET "smsc_addr(1)" LOC = "P2" | IOSTANDARD = LVTTL;
NET "smsc_addr(2)" LOC = "P3" | IOSTANDARD = LVTTL;
NET "smsc_addr(3)" LOC = "P4" | IOSTANDARD = LVTTL;
NET "smsc_addr(4)" LOC = "P5" | IOSTANDARD = LVTTL;
NET "smsc_addr(5)" LOC = "P6" | IOSTANDARD = LVTTL;
NET "smsc_addr(6)" LOC = "P7" | IOSTANDARD = LVTTL;
NET "smsc_addr(7)" LOC = "P8" | IOSTANDARD = LVTTL;
NET "smsc_addr(8)" LOC = "R1" | IOSTANDARD = LVTTL;
NET "smsc_addr(9)" LOC = "R3" | IOSTANDARD = LVTTL;
NET "smsc_addr(10)" LOC = "R5" | IOSTANDARD = LVTTL;
NET "smsc_addr(11)" LOC = "R6" | IOSTANDARD = LVTTL;
NET "smsc_addr(12)" LOC = "R7" | IOSTANDARD = LVTTL;
NET "smsc_addr(13)" LOC = "R8" | IOSTANDARD = LVTTL;
NET "smsc_addr(14)" LOC = "T1" | IOSTANDARD = LVTTL;
NET "smsc_data(0)" LOC = "AB6" | IOSTANDARD = LVTTL;
NET "smsc_data(1)" LOC = "AB7" | IOSTANDARD = LVTTL;
NET "smsc_data(2)" LOC = "AB9" | IOSTANDARD = LVTTL;
NET "smsc_data(3)" LOC = "AB10" | IOSTANDARD = LVTTL;
NET "smsc_data(4)" LOC = "AB11" | IOSTANDARD = LVTTL;
NET "smsc_data(5)" LOC = "AC6" | IOSTANDARD = LVTTL;
NET "smsc_data(6)" LOC = "AC7" | IOSTANDARD = LVTTL;
NET "smsc_data(7)" LOC = "AC8" | IOSTANDARD = LVTTL;
NET "smsc_data(8)" LOC = "AC9" | IOSTANDARD = LVTTL;
NET "smsc_data(9)" LOC = "AC10" | IOSTANDARD = LVTTL;
NET "smsc_data(10)" LOC = "AC11" | IOSTANDARD = LVTTL;
NET "smsc_data(11)" LOC = "AD4" | IOSTANDARD = LVTTL;
NET "smsc_data(12)" LOC = "AD5" | IOSTANDARD = LVTTL;
NET "smsc_data(13)" LOC = "AD6" | IOSTANDARD = LVTTL;
NET "smsc_data(14)" LOC = "AD10" | IOSTANDARD = LVTTL;
NET "smsc_data(15)" LOC = "AD12" | IOSTANDARD = LVTTL;
NET "smsc_data(16)" LOC = "AE4" | IOSTANDARD = LVTTL;
NET "smsc_data(17)" LOC = "AE5" | IOSTANDARD = LVTTL;
NET "smsc_data(18)" LOC = "AE6" | IOSTANDARD = LVTTL;
NET "smsc_data(19)" LOC = "AE8" | IOSTANDARD = LVTTL;
NET "smsc_data(20)" LOC = "AF4" | IOSTANDARD = LVTTL;
NET "smsc_data(21)" LOC = "AF6" | IOSTANDARD = LVTTL;
NET "smsc_data(22)" LOC = "AF8" | IOSTANDARD = LVTTL;
NET "smsc_data(23)" LOC = "U3" | IOSTANDARD = LVTTL;
NET "smsc_data(24)" LOC = "U5" | IOSTANDARD = LVTTL;
NET "smsc_data(25)" LOC = "U6" | IOSTANDARD = LVTTL;
NET "smsc_data(26)" LOC = "U7" | IOSTANDARD = LVTTL;
NET "smsc_data(27)" LOC = "V2" | IOSTANDARD = LVTTL;
NET "smsc_data(28)" LOC = "V3" | IOSTANDARD = LVTTL;
NET "smsc_data(29)" LOC = "V4" | IOSTANDARD = LVTTL;
NET "smsc_data(30)" LOC = "V5" | IOSTANDARD = LVTTL;
NET "smsc_data(31)" LOC = "V6" | IOSTANDARD = LVTTL;
NET "smsc_nbe(0)" LOC = "T2" | IOSTANDARD = LVTTL;
NET "smsc_nbe(1)" LOC = "T4" | IOSTANDARD = LVTTL;
NET "smsc_nbe(2)" LOC = "T5" | IOSTANDARD = LVTTL;
NET "smsc_nbe(3)" LOC = "T6" | IOSTANDARD = LVTTL;
NET "smsc_resetn" LOC = "Y12" | IOSTANDARD = LVTTL;
NET "smsc_ardy" LOC = "AA13" | IOSTANDARD = LVTTL;
#NET "smsc_intr" LOC = "AF5" | IOSTANDARD = LVTTL;
NET "gpio(4)" LOC = "AF5" | IOSTANDARD = LVTTL;
NET "smsc_nldev" LOC = "AF12" | IOSTANDARD = LVTTL;
NET "smsc_nrd" LOC = "AA11" | IOSTANDARD = LVTTL;
NET "smsc_nwr" LOC = "T7" | IOSTANDARD = LVTTL;
NET "smsc_ncs" LOC = "AE12" | IOSTANDARD = LVTTL;
NET "smsc_aen" LOC = "Y10" | IOSTANDARD = LVTTL;
NET "smsc_lclk" LOC = "L8" | IOSTANDARD = LVTTL;
NET "smsc_wnr" LOC = "N1" | IOSTANDARD = LVTTL;
NET "smsc_rdyrtn" LOC = "U2" | IOSTANDARD = LVTTL;
NET "smsc_cycle" LOC = "U1" | IOSTANDARD = LVTTL;
NET "smsc_nads" LOC = "R26" | IOSTANDARD = LVTTL;

