#############################################################
NET clk PERIOD = 40.000 ;
OFFSET = OUT : 12.000 : AFTER clk ;
OFFSET = IN : 8.000 : BEFORE clk ;

NET pci_clk PERIOD = 30.000 ;
OFFSET = IN : 7.000 : BEFORE pci_clk ;
OFFSET = OUT : 11.000 : AFTER pci_clk ;

NET "etx_clk" TNM_NET = "etx_clk";
TIMESPEC "TS_etx_clk" = PERIOD "etx_clk" 40 ns HIGH 50 %;
NET "erx_clk" TNM_NET = "erx_clk";
TIMESPEC "TS_erx_clk" = PERIOD "erx_clk" 40 ns HIGH 50 %;

#############################################################
#clk on 24.576 MHz
NET "clk" LOC = "D17";
# reset on pushbutton 3
NET "resetn" LOC = "AC32";#PushB0   "AE34";#push1
#error on LED 0
NET "errorn" LOC = "AB29";
# watchdog on LED 1
#NET "wdogn" LOC = "AA28"
#############################################################
# DSU UART
NET "dsutx" LOC = "D1";
NET "dsurx" LOC = "K9";
# switch 0
NET "dsuen" LOC = "AB34";
#NET "dsuen" PULLUP;
# switch 1
NET "dsubre" LOC = "Y28";
#NET "dsubre" PULLDOWN;
#dsuact on LED 2
NET "dsuact" LOC = "AC34";
#############################################################
# PIO on GEN_IO 0 -15
NET "pio(0)" LOC = "E27";
NET "pio(1)" LOC = "C28";
NET "pio(2)" LOC = "G26";
NET "pio(3)" LOC = "F26";
NET "pio(4)" LOC = "D27";
NET "pio(5)" LOC = "K24";
NET "pio(6)" LOC = "B28";
NET "pio(7)" LOC = "J24";
NET "pio(8)" LOC = "C27";
#NET "pio(9)" LOC = "G25"
NET "pio(10)" LOC = "B27";
NET "pio(11)" LOC = "A27";
NET "pio(12)" LOC = "G24";
NET "pio(13)" LOC = "H24";
#NET "pio(14)" LOC = "C26";
NET "rxd1" LOC = "C26"  ;
#NET "pio(15)" LOC = "K23";
NET "txd1" LOC = "K23"  ;
#NET "pio(0)" PULLDOWN;
#NET "pio(1)" PULLDOWN;
#NET "pio(10)" PULLUP;
#NET "pio(14)" PULLUP;
# UART 1
#NET "pio(15)" LOC = "D1"
#NET "pio(14)" LOC = "K9"
#############################################################
#############################################################
# ramsn on GEN_IO 16 - 20
NET "ramsn(0)" LOC = "B26";
NET "ramsn(1)" LOC = "F24";
NET "ramsn(2)" LOC = "C25";
NET "ramsn(3)" LOC = "A26";
NET "ramsn(4)" LOC = "E24";
# ramoen on GEN_IO 21 - 25
NET "ramoen(0)" LOC = "A25";
NET "ramoen(1)" LOC = "D24";
NET "ramoen(2)" LOC = "H23";
NET "ramoen(3)" LOC = "J22";
NET "ramoen(4)" LOC = "A24";
# rwen on GEN_IO 26 - 29
NET "rwen(0)" LOC = "K22";
NET "rwen(1)" LOC = "D23";
NET "rwen(2)" LOC = "H22";
NET "rwen(3)" LOC = "C23";
# bexcn on GEN_IO 30
NET "bexcn" LOC = "B23";
#NET "bexcn" PULLUP;
# brdyn on GEN_IO 31
NET "brdyn" LOC = "F22";
#NET "brdyn" PULLDOWN;
# iosn on GEN_IO 32
NET "iosn" LOC = "A23";
# oen on GEN_IO 33
NET "oen" LOC = "K21";
# read on GEN_IO 34
NET "read" LOC = "G22";
# writen on GEN_IO 35
NET "writen" LOC = "D22";
# romsn on GEN_IO 36 - 37
NET "romsn(0)" LOC = "C22";
NET "romsn(1)" LOC = "J21";
#############################################################
## SDRAM Interface
NET "sddqm(3)" LOC = "AJ7";
NET "sddqm(2)" LOC = "AN4";
NET "sddqm(1)" LOC = "AP4";
NET "sddqm(0)" LOC = "AH8";
#NET  "S_DQMU_P<3>"	LOC = "AK3"
#NET  "S_DQMU_P<2>"	LOC = "AF8"
#NET  "S_DQMU_P<1>"	LOC = "AJ7"
#NET  "S_DQMU_P<0>"	LOC = "AP4"
NET "sdcke(0)" LOC = "AG9";
NET "sdrasn" LOC = "AL6";
NET "sdclk" LOC = "AM6";
NET "sdwen" LOC = "AF10";
NET "sdcasn" LOC = "AN5";
NET "sdcsn(0)" LOC = "AE11";
#  GEN_IO 38 - 39
NET "sdcke(1)" LOC = "B22";
NET "sdcsn(1)" LOC = "A22";
#############################################################
NET "data(31)" LOC = "AJ14";
NET "data(30)" LOC = "AP12";
NET "data(29)" LOC = "AH14";
NET "data(28)" LOC = "AG13";
NET "data(27)" LOC = "AN13";
NET "data(26)" LOC = "AE14";
NET "data(25)" LOC = "AP13";
NET "data(24)" LOC = "AG14";
NET "data(23)" LOC = "AF15";
NET "data(22)" LOC = "AM13";
NET "data(21)" LOC = "AK14";
NET "data(20)" LOC = "AN14";
NET "data(19)" LOC = "AH15";
NET "data(18)" LOC = "AJ15";
NET "data(17)" LOC = "AK15";
NET "data(16)" LOC = "AP14";
NET "data(15)" LOC = "AF16";
NET "data(14)" LOC = "AN15";
NET "data(13)" LOC = "AH16";
NET "data(12)" LOC = "AL15";
NET "data(11)" LOC = "AK16";
NET "data(10)" LOC = "AM16";
NET "data(9)" LOC = "AJ16";
NET "data(8)" LOC = "AL16";
NET "data(7)" LOC = "AP16";
NET "data(6)" LOC = "AG17";
NET "data(5)" LOC = "AJ17";
NET "data(4)" LOC = "AM17";
NET "data(3)" LOC = "AH17";
NET "data(2)" LOC = "AN16";
NET "data(1)" LOC = "AN9";
NET "data(0)" LOC = "AH12";
NET "address(27)" LOC = "AF18";
NET "address(26)" LOC = "AP18";
NET "address(25)" LOC = "AJ19";
NET "address(24)" LOC = "AH19";
NET "address(23)" LOC = "AM19";
NET "address(22)" LOC = "AP19";
NET "address(21)" LOC = "AJ20";
NET "address(20)" LOC = "AN19";
NET "address(19)" LOC = "AK20";
NET "address(18)" LOC = "AH20";
NET "address(17)" LOC = "AL20";
NET "address(16)" LOC = "AN20";
NET "address(15)" LOC = "AE19";
NET "address(14)" LOC = "AP20";
NET "address(13)" LOC = "AK21";
NET "address(12)" LOC = "AF20";
NET "address(11)" LOC = "AL21";
NET "address(10)" LOC = "AH21";
NET "address(9)" LOC = "AE20";
NET "address(8)" LOC = "AP21";
NET "address(7)" LOC = "AJ21";
NET "address(6)" LOC = "AM22";
NET "address(5)" LOC = "AK22";
NET "address(4)" LOC = "AJ22";
NET "address(3)" LOC = "AL22";
NET "address(2)" LOC = "AF21";
####################################################
# unused pins
NET  "pci_host"         LOC = "AA30";

NET "pci_clk" LOC = "E17";
NET "pci_rst" LOC = "M8";
NET "pci_req" LOC = "U3";
NET "pci_idsel" LOC = "U5";
NET "pci_frame" LOC = "V3";
NET "pci_trdy" LOC = "T1";
NET "pci_irdy" LOC = "U9";
NET "pci_devsel" LOC = "U7";
NET "pci_gnt" LOC = "U8";
NET "pci_stop" LOC = "U4";
NET "pci_lock" LOC = "B20"; #GEN_IO_50
NET "pci_perr" LOC = "W5";
NET "pci_serr" LOC = "W7";
NET "pci_par" LOC = "W4";
NET "pci_cbe(3)" LOC = "U2";
NET "pci_cbe(2)" LOC = "V7";
NET "pci_cbe(1)" LOC = "V2";
NET "pci_cbe(0)" LOC = "V1";
NET "pci_ad(31)" LOC = "N10";
NET "pci_ad(30)" LOC = "K1";
NET "pci_ad(29)" LOC = "M7";
NET "pci_ad(28)" LOC = "N9";
NET "pci_ad(27)" LOC = "L2";
NET "pci_ad(26)" LOC = "N8";
NET "pci_ad(25)" LOC = "L1";
NET "pci_ad(24)" LOC = "M4";
NET "pci_ad(23)" LOC = "P10";
NET "pci_ad(22)" LOC = "M3";
NET "pci_ad(21)" LOC = "N7";
NET "pci_ad(20)" LOC = "M2";
NET "pci_ad(19)" LOC = "P9";
NET "pci_ad(18)" LOC = "N3";
NET "pci_ad(17)" LOC = "N6";
NET "pci_ad(16)" LOC = "N4";
NET "pci_ad(15)" LOC = "M1";
NET "pci_ad(14)" LOC = "P6";
NET "pci_ad(13)" LOC = "N2";
NET "pci_ad(12)" LOC = "P8";
NET "pci_ad(11)" LOC = "R10";
NET "pci_ad(10)" LOC = "P4";
NET "pci_ad(9)" LOC = "R9";
NET "pci_ad(8)" LOC = "P2";
NET "pci_ad(7)" LOC = "R8";
NET "pci_ad(6)" LOC = "P5";
NET "pci_ad(5)" LOC = "P1";
NET "pci_ad(4)" LOC = "R5";
NET "pci_ad(3)" LOC = "R2";
NET "pci_ad(2)" LOC = "T10";
NET "pci_ad(1)" LOC = "R6";
NET "pci_ad(0)" LOC = "T5";
#INST "pci_clk_in_ibuf"  LOC = "GCLKBUF3"
#NET "pci_frame_n" NODELAY;
#NET "pci_trdy_n" NODELAY;
#NET "pci_irdy_n" NODELAY;
#NET "pci_devsel_n" NODELAY;
#NET  "pci_gnt_in_n"     NODELAY
#NET "pci_stop_n" NODELAY;

#NET "pci_lock_n" PULLUP;
#NET "pci_stop_n" PULLUP;
#NET "pci_idsel_in" PULLUP;
#NET "pci_gnt_in_n" PULLDOWN;
#NET "pci_frame_n" PULLUP;
#NET "pci_irdy_n" PULLUP;
#NET "pci_rst_in_n" PULLUP;
#NET "pci_serr_n" PULLUP;

NET "etx_clk" LOC = "J3";
NET "etxd(0)" LOC = "E1";
NET "etxd(1)" LOC = "H6";
NET "etxd(2)" LOC = "G5";
NET "etxd(3)" LOC = "E2";
NET "etx_en"  LOC = "M9";
NET "etx_er"  LOC = "J4";
NET "erx_clk" LOC = "K6";
NET "erxd(0)" LOC = "J5";
NET "erxd(1)" LOC = "L9";
NET "erxd(2)" LOC = "H5";
NET "erxd(3)" LOC = "J6";
NET "erx_dv"  LOC = "L8";
NET "erx_er"  LOC = "G2";
NET "erx_col" LOC = "G3";
NET "erx_crs" LOC = "H3";
NET "emdc"    LOC = "J2";
NET "emdio"   LOC = "L5";
NET "emddis"  LOC = "L7";    
NET "epwrdwn" LOC = "J1";
NET "ereset"  LOC = "L4";
NET "esleep"  LOC = "G4";
NET "epause"  LOC = "K8";

CONFIG PROHIBIT = "A31";
CONFIG PROHIBIT = "D30";
CONFIG PROHIBIT = "D32";
CONFIG PROHIBIT = "J27";
CONFIG PROHIBIT = "P26";
CONFIG PROHIBIT = "M30";
CONFIG PROHIBIT = "N32";
CONFIG PROHIBIT = "AA33";
CONFIG PROHIBIT = "AB27";
CONFIG PROHIBIT = "AE33";
CONFIG PROHIBIT = "AK32";
CONFIG PROHIBIT = "AK31";
CONFIG PROHIBIT = "U1";
