#============================================================
# Build by Terasic System Builder
#============================================================

set_global_assignment -name FAMILY "Stratix IV"
set_global_assignment -name DEVICE EP4SGX230KF40C2
set_global_assignment -name TOP_LEVEL_ENTITY "TR4_XTS"
set_global_assignment -name ORIGINAL_QUARTUS_VERSION "11.1 SP1"
set_global_assignment -name LAST_QUARTUS_VERSION 11.0
set_global_assignment -name PROJECT_CREATION_TIME_DATE "17:47:59 NOVEMBER 07,2011"
set_global_assignment -name DEVICE_FILTER_PACKAGE FBGA
set_global_assignment -name DEVICE_FILTER_PIN_COUNT 1517
set_global_assignment -name DEVICE_FILTER_SPEED_GRADE 2
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "2.5 V"

#============================================================
# CLOCK
#============================================================
set_location_assignment PIN_AB34 -to OSC_50_BANK1
set_instance_assignment -name IO_STANDARD "2.5 V" -to OSC_50_BANK1
set_location_assignment PIN_AW22 -to OSC_50_BANK3
set_instance_assignment -name IO_STANDARD "2.5 V" -to OSC_50_BANK3
set_location_assignment PIN_AV19 -to OSC_50_BANK4
set_instance_assignment -name IO_STANDARD "2.5 V" -to OSC_50_BANK4
set_location_assignment PIN_A21 -to OSC_50_BANK7
set_instance_assignment -name IO_STANDARD 1.5V -to OSC_50_BANK7
set_location_assignment PIN_B23 -to OSC_50_BANK8
set_instance_assignment -name IO_STANDARD 1.5V -to OSC_50_BANK8

#============================================================
# Loop
#============================================================
set_location_assignment PIN_B22 -to LOOP_CLKIN0
set_instance_assignment -name IO_STANDARD 1.5V -to LOOP_CLKIN0
set_location_assignment PIN_B20 -to LOOP_CLKIN1
set_instance_assignment -name IO_STANDARD 1.5V -to LOOP_CLKIN1
set_location_assignment PIN_M20 -to LOOP_CLKOUT0
set_instance_assignment -name IO_STANDARD 1.5V -to LOOP_CLKOUT0
set_location_assignment PIN_L20 -to LOOP_CLKOUT1
set_instance_assignment -name IO_STANDARD 1.5V -to LOOP_CLKOUT1

#============================================================
# LED x 4
#============================================================
set_location_assignment PIN_B19 -to LED[0]
set_instance_assignment -name IO_STANDARD 1.5V -to LED[0]
set_location_assignment PIN_A18 -to LED[1]
set_instance_assignment -name IO_STANDARD 1.5V -to LED[1]
set_location_assignment PIN_D19 -to LED[2]
set_instance_assignment -name IO_STANDARD 1.5V -to LED[2]
set_location_assignment PIN_C19 -to LED[3]
set_instance_assignment -name IO_STANDARD 1.5V -to LED[3]

#============================================================
# BUTTON x 4
#============================================================
set_location_assignment PIN_L19 -to BUTTON[0]
set_instance_assignment -name IO_STANDARD 1.5V -to BUTTON[0]
set_location_assignment PIN_M19 -to BUTTON[1]
set_instance_assignment -name IO_STANDARD 1.5V -to BUTTON[1]
set_location_assignment PIN_A19 -to BUTTON[2]
set_instance_assignment -name IO_STANDARD 1.5V -to BUTTON[2]
set_location_assignment PIN_P20 -to BUTTON[3]
set_instance_assignment -name IO_STANDARD 1.5V -to BUTTON[3]

#============================================================
# SWITCH x 4
#============================================================
set_location_assignment PIN_AH18 -to SW[0]
set_instance_assignment -name IO_STANDARD "2.5 V" -to SW[0]
set_location_assignment PIN_AH19 -to SW[1]
set_instance_assignment -name IO_STANDARD "2.5 V" -to SW[1]
set_location_assignment PIN_D6 -to SW[2]
set_instance_assignment -name IO_STANDARD "2.5 V" -to SW[2]
set_location_assignment PIN_C6 -to SW[3]
set_instance_assignment -name IO_STANDARD "2.5 V" -to SW[3]

#============================================================
# Temperature
#============================================================
set_location_assignment PIN_AR14 -to TEMP_SMCLK
set_instance_assignment -name IO_STANDARD "2.5 V" -to TEMP_SMCLK
set_location_assignment PIN_AP14 -to TEMP_SMDAT
set_instance_assignment -name IO_STANDARD "2.5 V" -to TEMP_SMDAT
set_location_assignment PIN_AH13 -to TEMP_INT_n
set_instance_assignment -name IO_STANDARD "2.5 V" -to TEMP_INT_n
set_location_assignment PIN_AK14 -to TEMP_OVERT_n
set_instance_assignment -name IO_STANDARD "2.5 V" -to TEMP_OVERT_n

#============================================================
# Fan
#============================================================
set_location_assignment PIN_B17 -to FAN_CTRL
set_instance_assignment -name IO_STANDARD 1.5V -to FAN_CTRL

#============================================================
# Flash and SRAM Address/Data/OE/WM Share Bus
#============================================================
set_location_assignment PIN_B32 -to FSM_D[0]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[0]
set_location_assignment PIN_C32 -to FSM_D[1]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[1]
set_location_assignment PIN_C31 -to FSM_D[2]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[2]
set_location_assignment PIN_F32 -to FSM_D[3]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[3]
set_location_assignment PIN_J30 -to FSM_D[4]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[4]
set_location_assignment PIN_K29 -to FSM_D[5]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[5]
set_location_assignment PIN_K30 -to FSM_D[6]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[6]
set_location_assignment PIN_L29 -to FSM_D[7]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[7]
set_location_assignment PIN_M29 -to FSM_D[8]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[8]
set_location_assignment PIN_N29 -to FSM_D[9]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[9]
set_location_assignment PIN_P29 -to FSM_D[10]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[10]
set_location_assignment PIN_T27 -to FSM_D[11]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[11]
set_location_assignment PIN_AM17 -to FSM_D[12]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[12]
set_location_assignment PIN_AL17 -to FSM_D[13]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[13]
set_location_assignment PIN_AK16 -to FSM_D[14]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[14]
set_location_assignment PIN_AJ16 -to FSM_D[15]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[15]
set_location_assignment PIN_AK17 -to FSM_D[16]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[16]
set_location_assignment PIN_T28 -to FSM_D[17]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[17]
set_location_assignment PIN_R27 -to FSM_D[18]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[18]
set_location_assignment PIN_R28 -to FSM_D[19]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[19]
set_location_assignment PIN_R29 -to FSM_D[20]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[20]
set_location_assignment PIN_N30 -to FSM_D[21]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[21]
set_location_assignment PIN_N28 -to FSM_D[22]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[22]
set_location_assignment PIN_M28 -to FSM_D[23]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[23]
set_location_assignment PIN_H31 -to FSM_D[24]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[24]
set_location_assignment PIN_G31 -to FSM_D[25]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[25]
set_location_assignment PIN_D31 -to FSM_D[26]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[26]
set_location_assignment PIN_E31 -to FSM_D[27]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[27]
set_location_assignment PIN_F31 -to FSM_D[28]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[28]
set_location_assignment PIN_E32 -to FSM_D[29]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[29]
set_location_assignment PIN_C33 -to FSM_D[30]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[30]
set_location_assignment PIN_D33 -to FSM_D[31]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_D[31]
set_location_assignment PIN_L31 -to FSM_A[1]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[1]
set_location_assignment PIN_F34 -to FSM_A[2]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[2]
set_location_assignment PIN_D35 -to FSM_A[3]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[3]
set_location_assignment PIN_D34 -to FSM_A[4]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[4]
set_location_assignment PIN_E34 -to FSM_A[5]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[5]
set_location_assignment PIN_C35 -to FSM_A[6]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[6]
set_location_assignment PIN_C34 -to FSM_A[7]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[7]
set_location_assignment PIN_F33 -to FSM_A[8]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[8]
set_location_assignment PIN_G35 -to FSM_A[9]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[9]
set_location_assignment PIN_H35 -to FSM_A[10]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[10]
set_location_assignment PIN_J32 -to FSM_A[11]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[11]
set_location_assignment PIN_J33 -to FSM_A[12]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[12]
set_location_assignment PIN_K32 -to FSM_A[13]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[13]
set_location_assignment PIN_K31 -to FSM_A[14]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[14]
set_location_assignment PIN_AH17 -to FSM_A[15]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[15]
set_location_assignment PIN_AH16 -to FSM_A[16]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[16]
set_location_assignment PIN_AE17 -to FSM_A[17]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[17]
set_location_assignment PIN_AG16 -to FSM_A[18]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[18]
set_location_assignment PIN_H32 -to FSM_A[19]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[19]
set_location_assignment PIN_H34 -to FSM_A[20]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[20]
set_location_assignment PIN_G33 -to FSM_A[21]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[21]
set_location_assignment PIN_F35 -to FSM_A[22]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[22]
set_location_assignment PIN_N31 -to FSM_A[23]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[23]
set_location_assignment PIN_M31 -to FSM_A[24]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[24]
set_location_assignment PIN_M30 -to FSM_A[25]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_A[25]
set_location_assignment PIN_AT16 -to FSM_OE_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_OE_n
set_location_assignment PIN_AL16 -to FSM_WE_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FSM_WE_n

#============================================================
# Flash Control
#============================================================
set_location_assignment PIN_A23 -to FLASH_RDY_BSY_n
set_instance_assignment -name IO_STANDARD 1.5V -to FLASH_RDY_BSY_n
set_location_assignment PIN_AU15 -to FLASH_CLK
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FLASH_CLK
set_location_assignment PIN_AV16 -to FLASH_RESET_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FLASH_RESET_n
set_location_assignment PIN_AT15 -to FLASH_ADV_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FLASH_ADV_n
set_location_assignment PIN_AP16 -to FLASH_CE_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to FLASH_CE_n
set_location_assignment PIN_A20 -to FLASH_WP_n
set_instance_assignment -name IO_STANDARD 1.5V -to FLASH_WP_n

#============================================================
# SSRAM Control
#============================================================
set_location_assignment PIN_AG17 -to SSRAM_CLK
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_CLK
set_location_assignment PIN_AP17 -to SSRAM_ADSC_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_ADSC_n
set_location_assignment PIN_AR17 -to SSRAM_ADSP_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_ADSP_n
set_location_assignment PIN_AW16 -to SSRAM_ADV_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_ADV_n
set_location_assignment PIN_AF17 -to SSRAM_CE1_n
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_CE1_n
set_location_assignment PIN_AN16 -to SSRAM_BE_n[0]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_BE_n[0]
set_location_assignment PIN_AN17 -to SSRAM_BE_n[1]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_BE_n[1]
set_location_assignment PIN_AR16 -to SSRAM_BE_n[2]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_BE_n[2]
set_location_assignment PIN_AU16 -to SSRAM_BE_n[3]
set_instance_assignment -name IO_STANDARD "3.0-V PCI-X" -to SSRAM_BE_n[3]

#============================================================
# MAX2
#============================================================
set_location_assignment PIN_C20 -to MAX2_SCL
set_instance_assignment -name IO_STANDARD 1.5V -to MAX2_SCL
set_location_assignment PIN_A17 -to MAX2_SDA
set_instance_assignment -name IO_STANDARD 1.5V -to MAX2_SDA

#============================================================
# Programming PLL
#============================================================
set_location_assignment PIN_AA2 -to HSMA_REFCLK_p
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to HSMA_REFCLK_p
set_location_assignment PIN_AA38 -to HSME_REFCLK_p
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to HSME_REFCLK_p
set_location_assignment PIN_J2 -to PGM_GXB_CLK_p1
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to PGM_GXB_CLK_p1

#============================================================
# HSMC-A, HSMC-A connect to XTS - Transceiver to SMA
#============================================================
set_location_assignment PIN_P4 -to ATX_P[3]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ATX_P[3]
set_location_assignment PIN_R2 -to ARX_P[3]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ARX_P[3]
set_location_assignment PIN_T4 -to ATX_P[2]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ATX_P[2]
set_location_assignment PIN_U2 -to ARX_P[2]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ARX_P[2]
set_location_assignment PIN_AB4 -to ATX_P[1]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ATX_P[1]
set_location_assignment PIN_AC2 -to ARX_P[1]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ARX_P[1]
set_location_assignment PIN_AD4 -to ATX_P[0]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ATX_P[0]
set_location_assignment PIN_AE2 -to ARX_P[0]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ARX_P[0]
set_location_assignment PIN_D10 -to ACLKOUT0
set_instance_assignment -name IO_STANDARD "2.5 V" -to ACLKOUT0
set_location_assignment PIN_C10 -to ACLKIN0
set_instance_assignment -name IO_STANDARD "2.5 V" -to ACLKIN0
set_location_assignment PIN_R12 -to ACLKOUT_P[1]
set_instance_assignment -name IO_STANDARD LVDS -to ACLKOUT_P[1]
set_location_assignment PIN_AF6 -to ACLKIN_P[1]
set_instance_assignment -name IO_STANDARD LVDS -to ACLKIN_P[1]
set_location_assignment PIN_H10 -to ACLKOUT_P[2]
set_instance_assignment -name IO_STANDARD LVDS -to ACLKOUT_P[2]
set_location_assignment PIN_AC6 -to ACLKIN_P[2]
set_instance_assignment -name IO_STANDARD LVDS -to ACLKIN_P[2]

#============================================================
# HSMC-E, HSMC-E connect to XTS - Transceiver to SMA
#============================================================
set_location_assignment PIN_P36 -to ETX_P[3]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ETX_P[3]
set_location_assignment PIN_R38 -to ERX_P[3]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ERX_P[3]
set_location_assignment PIN_T36 -to ETX_P[2]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ETX_P[2]
set_location_assignment PIN_U38 -to ERX_P[2]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ERX_P[2]
set_location_assignment PIN_AB36 -to ETX_P[1]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ETX_P[1]
set_location_assignment PIN_AC38 -to ERX_P[1]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ERX_P[1]
set_location_assignment PIN_AD36 -to ETX_P[0]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ETX_P[0]
set_location_assignment PIN_AE38 -to ERX_P[0]
set_instance_assignment -name IO_STANDARD "1.4-V PCML" -to ERX_P[0]
set_location_assignment PIN_C12 -to ECLKOUT0
set_instance_assignment -name IO_STANDARD "2.5 V" -to ECLKOUT0
set_location_assignment PIN_C13 -to ECLKIN0
set_instance_assignment -name IO_STANDARD "2.5 V" -to ECLKIN0
set_location_assignment PIN_W12 -to ECLKOUT_P[1]
set_instance_assignment -name IO_STANDARD LVDS -to ECLKOUT_P[1]
set_location_assignment PIN_W6 -to ECLKIN_P[1]
set_instance_assignment -name IO_STANDARD LVDS -to ECLKIN_P[1]
set_location_assignment PIN_R14 -to ECLKOUT_P[2]
set_instance_assignment -name IO_STANDARD LVDS_E_1R -to ECLKOUT_P[2]
set_location_assignment PIN_AB6 -to ECLKIN_P[2]
set_instance_assignment -name IO_STANDARD LVDS -to ECLKIN_P[2]

#============================================================
# HSMC A/B/C I2C
#============================================================
set_location_assignment PIN_AE16 -to HSMC_ABC_SCL
set_instance_assignment -name IO_STANDARD "2.5 V" -to HSMC_ABC_SCL
set_location_assignment PIN_AF16 -to HSMC_ABC_SDA
set_instance_assignment -name IO_STANDARD "2.5 V" -to HSMC_ABC_SDA

#============================================================
# End of pin assignments by Terasic System Builder
#============================================================


set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION "23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name VERILOG_FILE rtl/reset_ctrl.v
set_global_assignment -name VERILOG_FILE rtl/rx_data_verify.v
set_global_assignment -name VERILOG_FILE rtl/xcvr_test.v
set_global_assignment -name VERILOG_FILE rtl/tx_pattern.v
set_global_assignment -name SDC_FILE TR4_XTS.SDC
set_global_assignment -name QIP_FILE rtl/gx.qip
set_global_assignment -name QIP_FILE rtl/cal_pll0.qip
set_global_assignment -name QIP_FILE rtl/pll.qip
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top