define family_acex1k_strict(x) = (((x == "ACEX1K") # (x == "ACEX 1K")) ? 1 : 0);
define family_apex20k_strict(x) = (((x == "APEX20K") # (x == "APEX 20K") # (x == "RAPHAEL")) ? 1 : 0);
define family_apex20kc_strict(x) = (((x == "APEX20KC") # (x == "APEX 20KC")) ? 1 : 0);
define family_apex20ke_strict(x) = (((x == "APEX20KE") # (x == "APEX 20KE")) ? 1 : 0);
define family_apexii_strict(x) = (((x == "APEX II") # (x == "APEXII") # (x == "APEX 20KF") # (x == "APEX20KF")) ? 1 : 0);
define family_excalibur_arm_strict(x) = (((x == "EXCALIBUR_ARM") # (x == "Excalibur ARM") # (x == "ARM-BASED EXCALIBUR") # (x == "ARM_BASED_EXCALIBUR")) ? 1 : 0);
define family_flex10ke_strict(x) = (((x == "FLEX10KE") # (x == "FLEX 10KE")) ? 1 : 0);
define family_flex10k_strict(x) = (((x == "FLEX10K") # (x == "FLEX 10K")) ? 1 : 0);
define family_flex10ka_strict(x) = (((x == "FLEX10KA") # (x == "FLEX 10KA")) ? 1 : 0);
define family_flex6000_strict(x) = (((x == "FLEX6000") # (x == "FLEX 6000") # (x == "FLEX6K")) ? 1 : 0);
define family_max7000b_strict(x) = (((x == "MAX7000B") # (x == "MAX 7000B")) ? 1 : 0);
define family_max7000ae_strict(x) = (((x == "MAX7000AE") # (x == "MAX 7000AE")) ? 1 : 0);
define family_max3000a_strict(x) = (((x == "MAX3000A") # (x == "MAX 3000A")) ? 1 : 0);
define family_max7000s_strict(x) = (((x == "MAX7000S") # (x == "MAX 7000S")) ? 1 : 0);
define family_max7000a_strict(x) = (((x == "MAX7000A") # (x == "MAX 7000A")) ? 1 : 0);
define family_mercury_strict(x) = (((x == "Mercury") # (x == "DALI")) ? 1 : 0);
define family_stratix_strict(x) = (((x == "Stratix") # (x == "Yeager")) ? 1 : 0);
define family_stratixgx_strict(x) = (((x == "Stratix GX") # (x == "Stratix-GX") # (x == "StratixGX") # (x == "Aurora")) ? 1 : 0);
define family_cyclone_strict(x) = (((x == "Cyclone") # (x == "ACEX2K") # (x == "ACEX 2K") # (x == "Tornado")) ? 1 : 0);
define family_maxii_strict(x) = (((x == "MAX II") # (x == "MAXII") # (x == "Tsunami")) ? 1 : 0);
define family_hardcopystratix_strict(x) = (((x == "HardCopy Stratix") # (x == "Stratix HC") # (x == "StratixHC") # (x == "HardcopyStratix")) ? 1 : 0);
define family_stratixii_strict(x) = (((x == "Stratix II") # (x == "StratixII") # (x == "Armstrong")) ? 1 : 0);
define family_stratixiigx_strict(x) = (((x == "Stratix II GX") # (x == "StratixIIGX")) ? 1 : 0);
define family_arriagx_strict(x) = (((x == "Arria GX") # (x == "ArriaGX") # (x == "Stratix II GX Lite") # (x == "StratixIIGXLite")) ? 1 : 0);
define family_cycloneii_strict(x) = (((x == "Cyclone II") # (x == "Cycloneii") # (x == "Magellan")) ? 1 : 0);
define family_hardcopyii_strict(x) = (((x == "HardCopy II") # (x == "HardCopyII") # (x == "Fusion")) ? 1 : 0);
define family_stratixiii_strict(x) = (((x == "Stratix III") # (x == "StratixIII") # (x == "Titan") # (x == "SIII")) ? 1 : 0);
define family_cycloneiii_strict(x) = (((x == "Cyclone III") # (x == "CycloneIII") # (x == "Barracuda") # (x == "Cuda") # (x == "CIII")) ? 1 : 0);
define family_stratixiv_strict(x) = (((x == "Stratix IV") # (x == "TGX") # (x == "StratixIV") # (x == "StratixIIIGX") # (x == "Stratix IV (GT/GX/E)") # (x == "StratixIV(GT/GX/E)") # (x == "Stratix IV (GX/E)") # (x == "StratixIV(GX/E)")) ? 1 : 0);
define family_arriaiigx_strict(x) = (((x == "Arria II GX") # (x == "ArriaIIGX") # (x == "Arria IIGX") # (x == "ArriaII GX") # (x == "Arria II") # (x == "ArriaII") # (x == "Arria II (GX/E)") # (x == "ArriaII(GX/E)") # (x == "PIRANHA")) ? 1 : 0);
define family_hardcopyiii_strict(x) = (((x == "HardCopy III") # (x == "HardCopyIII") # (x == "HCX")) ? 1 : 0);
define family_hardcopyiv_strict(x) = (((x == "HardCopy IV") # (x == "HardCopyIV") # (x == "HCXIV") # (x == "HardCopy IV (GX/E)") # (x == "HardCopyIV(GX/E)")) ? 1 : 0);
define family_cycloneiiils_strict(x) = (((x == "Cyclone III LS") # (x == "CycloneIIILS") # (x == "Cyclone III LPS") # (x == "Cyclone LPS") # (x == "CycloneLPS") # (x == "Tarpon") # (x == "Cyclone IIIE")) ? 1 : 0);
define family_flex6000_member(x) = ( ( (family_flex6000_strict(x) == 1) ) ? 1 : 0);
define family_flex6000() = family_flex6000_member(DEVICE_FAMILY);
define family_flex8000_member(x) = ( ( (x == "FLEX8000") ) ? 1 : 0);
define family_flex8000() = family_flex8000_member(DEVICE_FAMILY);
define family_flex10k_member(x) = ( ( (family_flex10k_strict(x) == 1) # (family_flex10ka_strict(x) == 1) ) ? 1 : 0);
define family_flex10k() = family_flex10k_member(DEVICE_FAMILY);
define family_flex10ke_member(x) = ( ( (family_flex10ke_strict(x) == 1) # (family_acex1k_strict(x) == 1) ) ? 1 : 0);
define family_flex10ke() = family_flex10ke_member(DEVICE_FAMILY);
define family_apex20k_member(x) = ( ( (family_apex20k_strict(x) == 1) ) ? 1 : 0);
define family_apex20k() = family_apex20k_member(DEVICE_FAMILY);
define family_apex20ke_member(x) = ( ( (family_apex20ke_strict(x) == 1) # (family_excalibur_arm_strict(x) == 1) # (family_apex20kc_strict(x) == 1) ) ? 1 : 0);
define family_apex20ke() = family_apex20ke_member(DEVICE_FAMILY);
define family_acex1k_member(x) = ( ( (family_acex1k_strict(x) == 1) ) ? 1 : 0);
define family_acex1k() = family_acex1k_member(DEVICE_FAMILY);
define family_apexii_member(x) = ( ( (family_apexii_strict(x) == 1) # (family_apexii_strict(x) == 1) ) ? 1 : 0);
define family_apexii() = family_apexii_member(DEVICE_FAMILY);
define family_mercury_member(x) = ( ( (family_mercury_strict(x) == 1) ) ? 1 : 0);
define family_mercury() = family_mercury_member(DEVICE_FAMILY);
define family_stratixgx_member(x) = ( ( (family_stratixgx_strict(x) == 1) ) ? 1 : 0);
define family_stratixgx() = family_stratixgx_member(DEVICE_FAMILY);
define family_cyclone_member(x) = ( ( (family_cyclone_strict(x) == 1) ) ? 1 : 0);
define family_cyclone() = family_cyclone_member(DEVICE_FAMILY);
define family_stratixiigx_member(x) = ( ( (family_stratixiigx_strict(x) == 1) # (family_arriagx_strict(x) == 1) ) ? 1 : 0);
define family_stratixiigx() = family_stratixiigx_member(DEVICE_FAMILY);
define family_stratixiii_member(x) = ( ( (family_stratixiii_strict(x) == 1) # (family_stratixiv_member(x) == 1) # (family_hardcopyiii_strict(x) == 1) ) ? 1 : 0);
define family_stratixiii() = family_stratixiii_member(DEVICE_FAMILY);
define family_stratixii_member(x) = ( ( (family_stratixii_strict(x) == 1) # (family_hardcopyii_strict(x) == 1) # (family_stratixiigx_member(x) == 1) # (family_stratixiii_member(x) == 1) ) ? 1 : 0);
define family_stratixii() = family_stratixii_member(DEVICE_FAMILY);
define family_cycloneiii_member(x) = ( ( (family_cycloneiii_strict(x) == 1) # (family_cycloneiiils_strict(x) == 1) ) ? 1 : 0);
define family_cycloneiii() = family_cycloneiii_member(DEVICE_FAMILY);
define family_stratix_hc_member(x) = ( ( (family_hardcopystratix_strict(x) == 1) ) ? 1 : 0);
define family_stratix_hc() = family_stratix_hc_member(DEVICE_FAMILY);
define family_hardcopyii_member(x) = ( ( (family_hardcopyii_strict(x) == 1) ) ? 1 : 0);
define family_hardcopyii() = family_hardcopyii_member(DEVICE_FAMILY);
define family_stratix_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_member(x) == 1) # (family_cyclone_member(x) == 1) # (family_stratixii_member(x) == 1) # (family_maxii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_stratix() = family_stratix_member(DEVICE_FAMILY);
define family_maxii_member(x) = ( ( (family_maxii_strict(x) == 1) ) ? 1 : 0);
define family_maxii() = family_maxii_member(DEVICE_FAMILY);
define family_cycloneii_member(x) = ( ( (family_cycloneii_strict(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_cycloneii() = family_cycloneii_member(DEVICE_FAMILY);
define family_excalibur_member(x) = ( ( (family_excalibur_arm_strict(x) == 1) ) ? 1 : 0);
define family_excalibur() = family_excalibur_member(DEVICE_FAMILY);
define family_stratixiv_member(x) = ( ( (family_stratixiv_strict(x) == 1) # (family_arriaiigx_strict(x) == 1) # (family_hardcopyiv_strict(x) == 1) ) ? 1 : 0);
define family_stratixiv() = family_stratixiv_member(DEVICE_FAMILY);
define family_stratixiii_only_member(x) = ( ( (family_stratixiii_strict(x) == 1) ) ? 1 : 0);
define family_stratixiii_only() = family_stratixiii_only_member(DEVICE_FAMILY);
define family_arriaiigx_member(x) = ( ( (family_arriaiigx_strict(x) == 1) ) ? 1 : 0);
define family_arriaiigx() = family_arriaiigx_member(DEVICE_FAMILY);
define family_hardcopyiii_member(x) = ( ( (family_hardcopyiii_strict(x) == 1) ) ? 1 : 0);
define family_hardcopyiii() = family_hardcopyiii_member(DEVICE_FAMILY);
define family_base_stratixii_member(x) = ( ( (family_stratixii_strict(x) == 1) # (family_hardcopyii_strict(x) == 1) # (family_stratixiigx_member(x) == 1) ) ? 1 : 0);
define family_base_stratixii() = family_base_stratixii_member(DEVICE_FAMILY);
define family_base_stratix_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_hardcopystratix_strict(x) == 1) ) ? 1 : 0);
define family_base_stratix() = family_base_stratix_member(DEVICE_FAMILY);
define family_base_cycloneii_member(x) = ( ( (family_cycloneii_strict(x) == 1) ) ? 1 : 0);
define family_base_cycloneii() = family_base_cycloneii_member(DEVICE_FAMILY);
define family_base_cyclone_member(x) = ( ( (family_cyclone_strict(x) == 1) ) ? 1 : 0);
define family_base_cyclone() = family_base_cyclone_member(DEVICE_FAMILY);
define family_base_cycloneiii_member(x) = ( ( (family_cycloneiii_strict(x) == 1) # (family_cycloneiiils_strict(x) == 1) ) ? 1 : 0);
define family_base_cycloneiii() = family_base_cycloneiii_member(DEVICE_FAMILY);
define family_base_stratixiii_member(x) = ( ( (family_stratixiii_strict(x) == 1) # (family_stratixiv_member(x) == 1) # (family_hardcopyiii_strict(x) == 1) ) ? 1 : 0);
define family_base_stratixiii() = family_base_stratixiii_member(DEVICE_FAMILY);
define family_stratix_nongx_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_hardcopystratix_strict(x) == 1) ) ? 1 : 0);
define family_stratix_nongx() = family_stratix_nongx_member(DEVICE_FAMILY);
define family_is_hardcopy_member(x) = ( ( (family_stratix_hc_member(x) == 1) # (family_hardcopyii_member(x) == 1) # (family_hardcopyiii_member(x) == 1) ) ? 1 : 0);
define family_is_hardcopy() = family_is_hardcopy_member(DEVICE_FAMILY);
define family_classic_member(x) = ( ( (x == "CLASSIC") ) ? 1 : 0);
define family_classic() = family_classic_member(DEVICE_FAMILY);
define family_max_member(x) = ( ( (x == "MAX5000") # (family_max3000a_strict(x) == 1) # (x == "MAX7000") # (family_max7000a_strict(x) == 1) # (family_max7000ae_strict(x) == 1) # (x == "MAX7000E") # (family_max7000s_strict(x) == 1) # (family_max7000b_strict(x) == 1) # (x == "MAX9000") ) ? 1 : 0);
define family_max() = family_max_member(DEVICE_FAMILY);
define family_flex_member(x) = ( ( (family_flex6000_member(x) == 1) # (family_flex8000_member(x) == 1) # (family_flex10k_member(x) == 1) # (family_flex10ke_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) ) ? 1 : 0);
define family_flex() = family_flex_member(DEVICE_FAMILY);
define family_has_eab_member(x) = ( ( (family_flex10k_member(x) == 1) # (family_has_dualport_eab_member(x) == 1) ) ? 1 : 0);
define family_has_eab() = family_has_eab_member(DEVICE_FAMILY);
define family_has_dualport_eab_member(x) = ( ( (family_flex10ke_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) & ! (family_maxii_member(x) == 1) ) ? 1 : 0);
define family_has_dualport_eab() = family_has_dualport_eab_member(DEVICE_FAMILY);
define family_has_pll_member(x) = ( ( (family_flex10k_member(x) == 1) # (family_flex10ke_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) & ! (family_maxii_member(x) == 1) ) ? 1 : 0);
define family_has_pll() = family_has_pll_member(DEVICE_FAMILY);
define family_has_altpll_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_stratixii_member(x) == 1) # (family_stratix_member(x) == 1) & ! (family_maxii_member(x) == 1) ) ? 1 : 0);
define family_has_altpll() = family_has_altpll_member(DEVICE_FAMILY);
define family_has_native_aload_member(x) = ( ( (family_flex6000_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_stratix_member(x) == 1) ) ? 1 : 0);
define family_has_native_aload() = family_has_native_aload_member(DEVICE_FAMILY);
define family_has_clearable_counter_mode_member(x) = ( ( ! (family_flex6000_member(x) == 1) & ! (family_apex20k_member(x) == 1) & ! (family_mercury_member(x) == 1) & ! (family_apexii_member(x) == 1) ) ? 1 : 0);
define family_has_clearable_counter_mode() = family_has_clearable_counter_mode_member(DEVICE_FAMILY);
define family_has_updown_counter_mode_member(x) = ( ( ! (family_flex6000_member(x) == 1) & ! (family_apex20k_member(x) == 1) & ! (family_mercury_member(x) == 1) & ! (family_apexii_member(x) == 1) ) ? 1 : 0);
define family_has_updown_counter_mode() = family_has_updown_counter_mode_member(DEVICE_FAMILY);
define family_has_enable_lut_input_member(x) = ( ( (family_flex10k_member(x) == 1) # (family_flex10ke_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) ) ? 1 : 0);
define family_has_enable_lut_input() = family_has_enable_lut_input_member(DEVICE_FAMILY);
define family_has_labwide_sclr_member(x) = ( ( (family_flex6000_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) ) ? 1 : 0);
define family_has_labwide_sclr() = family_has_labwide_sclr_member(DEVICE_FAMILY);
define family_has_labwide_sload_member(x) = ( ( (family_flex6000_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_mercury_member(x) == 1) # (family_apexii_member(x) == 1) # (family_stratix_member(x) == 1) ) ? 1 : 0);
define family_has_labwide_sload() = family_has_labwide_sload_member(DEVICE_FAMILY);
define need_dffea_for_async_member(x) = ( ( (family_flex10ke_member(x) == 1) # (family_stratix_member(x) == 1) # (family_flex10k_member(x) == 1) ) ? 1 : 0);
define need_dffea_for_async() = need_dffea_for_async_member(DEVICE_FAMILY);
define family_uses_altqpram_member(x) = ( ( (family_apexii_member(x) == 1) # (family_mercury_member(x) == 1) ) ? 1 : 0);
define family_uses_altqpram() = family_uses_altqpram_member(DEVICE_FAMILY);
define family_has_cascade_member(x) = ( ( (family_flex6000_member(x) == 1) # (family_flex8000_member(x) == 1) # (family_flex10k_member(x) == 1) # (family_flex10ke_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_apexii_member(x) == 1) ) ? 1 : 0);
define family_has_cascade() = family_has_cascade_member(DEVICE_FAMILY);
define family_has_dsp_block_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_stratixii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_dsp_block() = family_has_dsp_block_member(DEVICE_FAMILY);
define family_has_36_bit_multiplier_member(x) = ( ( (family_has_dsp_block_member(x) == 1) & ! (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_36_bit_multiplier() = family_has_36_bit_multiplier_member(DEVICE_FAMILY);
define family_dsp_has_two_level_reg_member(x) = ( ( (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_dsp_has_two_level_reg() = family_dsp_has_two_level_reg_member(DEVICE_FAMILY);
define family_dsp_stratixiii_member(x) = ( ( (family_stratixiii_member(x) == 1) ) ? 1 : 0);
define family_dsp_stratixiii() = family_dsp_stratixiii_member(DEVICE_FAMILY);
define family_has_megaram_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_stratixii_member(x) == 1) & ! (family_arriaiigx_member(x) == 1) ) ? 1 : 0);
define family_has_megaram() = family_has_megaram_member(DEVICE_FAMILY);
define family_has_m512_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_stratixii_strict(x) == 1) # (family_stratixiigx_member(x) == 1) ) ? 1 : 0);
define family_has_m512() = family_has_m512_member(DEVICE_FAMILY);
define family_has_m8k_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_m8k() = family_has_m8k_member(DEVICE_FAMILY);
define family_has_m4k_member(x) = ( ( (family_base_stratix_member(x) == 1) # (family_base_stratixii_member(x) == 1) # (family_base_cycloneii_member(x) == 1) # (family_cyclone_member(x) == 1) ) ? 1 : 0);
define family_has_m4k() = family_has_m4k_member(DEVICE_FAMILY);
define family_has_lutram_member(x) = ( ( (family_stratixiii_member(x) == 1) ) ? 1 : 0);
define family_has_lutram() = family_has_lutram_member(DEVICE_FAMILY);
define family_has_m144k_member(x) = ( ( (family_stratixiii_member(x) == 1) & ! (family_arriaiigx_member(x) == 1) ) ? 1 : 0);
define family_has_m144k() = family_has_m144k_member(DEVICE_FAMILY);
define family_has_smaller_mram_member(x) = ( ( (family_has_m144k_member(x) == 1) ) ? 1 : 0);
define family_has_smaller_mram() = family_has_smaller_mram_member(DEVICE_FAMILY);
define family_has_initializable_mram_member(x) = ( ( (family_has_m144k_member(x) == 1) ) ? 1 : 0);
define family_has_initializable_mram() = family_has_initializable_mram_member(DEVICE_FAMILY);
define family_has_stratix_style_ram_member(x) = ( ( (family_stratix_member(x) == 1) & ! (family_maxii_member(x) == 1) ) ? 1 : 0);
define family_has_stratix_style_ram() = family_has_stratix_style_ram_member(DEVICE_FAMILY);
define family_has_stratixi_style_ram_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_member(x) == 1) # (family_cyclone_member(x) == 1) ) ? 1 : 0);
define family_has_stratixi_style_ram() = family_has_stratixi_style_ram_member(DEVICE_FAMILY);
define family_has_stratixii_style_ram_member(x) = ( ( (family_stratixii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_stratixii_style_ram() = family_has_stratixii_style_ram_member(DEVICE_FAMILY);
define family_has_stratixiii_style_ram_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_stratixiii_style_ram() = family_has_stratixiii_style_ram_member(DEVICE_FAMILY);
define family_supports_ram_benchmarking_member(x) = ( ( (x == "NO_FAMILY") ) ? 1 : 0);
define family_supports_ram_benchmarking() = family_supports_ram_benchmarking_member(DEVICE_FAMILY);
define family_has_clearable_ram_address_reg_member(x) = ( ( (family_base_stratix_member(x) == 1) # (family_base_cyclone_member(x) == 1) # (family_base_stratixiii_member(x) == 1) # (family_base_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_clearable_ram_address_reg() = family_has_clearable_ram_address_reg_member(DEVICE_FAMILY);
define family_has_ram_addressstall_member(x) = ( ( (family_base_stratixii_member(x) == 1) # (family_base_cycloneii_member(x) == 1) # (family_base_stratixiii_member(x) == 1) # (family_base_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_ram_addressstall() = family_has_ram_addressstall_member(DEVICE_FAMILY);
define ram_block_type_is_lutram_member(x) = ( ( (x == "LUTRAM") # (x == "MLAB") ) ? 1 : 0);
define ram_block_type_is_lutram() = ram_block_type_is_lutram_member(DEVICE_FAMILY);
define family_has_stratix_style_pll_member(x) = ( ( (family_cyclone_member(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratix_strict(x) == 1) # (family_stratixgx_member(x) == 1) ) ? 1 : 0);
define family_has_stratix_style_pll() = family_has_stratix_style_pll_member(DEVICE_FAMILY);
define family_has_stratixii_style_pll_member(x) = ( ( (family_stratixii_member(x) == 1) & ! (family_stratixiii_member(x) == 1) # (family_cycloneii_member(x) == 1) & ! (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_stratixii_style_pll() = family_has_stratixii_style_pll_member(DEVICE_FAMILY);
define family_has_stratixiii_style_pll_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_stratixiii_style_pll() = family_has_stratixiii_style_pll_member(DEVICE_FAMILY);
define family_has_no_pll_enable_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_no_pll_enable() = family_has_no_pll_enable_member(DEVICE_FAMILY);
define family_uses_stratixiii_pll_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_uses_stratixiii_pll() = family_uses_stratixiii_pll_member(DEVICE_FAMILY);
define family_has_rublock_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_stratixii_strict(x) == 1) # (family_stratixiigx_member(x) == 1) # (family_cycloneiii_member(x) == 1) # (family_stratixiii_member(x) == 1) ) ? 1 : 0);
define family_has_rublock() = family_has_rublock_member(DEVICE_FAMILY);
define family_has_serdes_block_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratixgx_member(x) == 1) # (family_stratixii_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_apexii_member(x) == 1) # (family_mercury_member(x) == 1) # (family_stratix_hc_member(x) == 1) ) ? 1 : 0);
define family_has_serdes_block() = family_has_serdes_block_member(DEVICE_FAMILY);
define family_has_flexible_lvds_member(x) = ( ( (family_cyclone_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_flexible_lvds() = family_has_flexible_lvds_member(DEVICE_FAMILY);
define family_use_lvds_pll_in_source_synchronous_mode_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_use_lvds_pll_in_source_synchronous_mode() = family_use_lvds_pll_in_source_synchronous_mode_member(DEVICE_FAMILY);
define family_has_ddio_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratixgx_member(x) == 1) # (family_stratixii_member(x) == 1) # (family_cyclone_member(x) == 1) # (family_cycloneii_member(x) == 1) # (family_apexii_member(x) == 1) # (family_mercury_member(x) == 1) # (family_stratix_hc_member(x) == 1) ) ? 1 : 0);
define family_has_ddio() = family_has_ddio_member(DEVICE_FAMILY);
define family_has_inverted_output_ddio_member(x) = ( ( (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_inverted_output_ddio() = family_has_inverted_output_ddio_member(DEVICE_FAMILY);
define family_has_oe_out_member(x) = ( ( (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_oe_out() = family_has_oe_out_member(DEVICE_FAMILY);
define family_has_dq_member(x) = ( ( (family_base_stratixii_member(x) == 1) # (family_base_cycloneii_member(x) == 1) # (family_base_cycloneiii_member(x) == 1) # (family_base_stratix_member(x) == 1) ) ? 1 : 0);
define family_has_dq() = family_has_dq_member(DEVICE_FAMILY);
define family_has_asmi_member(x) = ( ( (family_cyclone_strict(x) == 1) # (family_cycloneii_strict(x) == 1) # (family_stratixii_strict(x) == 1) # (family_stratixiigx_member(x) == 1) # (family_stratixiii_member(x) == 1) # (family_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_asmi() = family_has_asmi_member(DEVICE_FAMILY);
define family_has_altoct_member(x) = ( ( (family_stratixii_member(x) == 1) ) ? 1 : 0);
define family_has_altoct() = family_has_altoct_member(DEVICE_FAMILY);
define family_has_clkctrl_block_member(x) = ( ( (family_stratixii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_clkctrl_block() = family_has_clkctrl_block_member(DEVICE_FAMILY);
define family_has_clkctrl_block_with_glitch_free_implementation_support_member(x) = ( ( (family_stratixii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_clkctrl_block_with_glitch_free_implementation_support() = family_has_clkctrl_block_with_glitch_free_implementation_support_member(DEVICE_FAMILY);
define family_has_dqs_support_in_ddio_bidir_member(x) = ( ( (family_stratix_strict(x) == 1) # (family_stratix_hc_member(x) == 1) # (family_stratixgx_strict(x) == 1) ) ? 1 : 0);
define family_has_dqs_support_in_ddio_bidir() = family_has_dqs_support_in_ddio_bidir_member(DEVICE_FAMILY);
define family_has_gxb_member(x) = ( ( (family_stratixiigx_member(x) == 1) # (family_stratixiv_member(x) == 1) ) ? 1 : 0);
define family_has_gxb() = family_has_gxb_member(DEVICE_FAMILY);
define family_has_gxb_reconfig_member(x) = ( ( (family_stratixiigx_member(x) == 1) # (family_stratixiv_member(x) == 1) ) ? 1 : 0);
define family_has_gxb_reconfig() = family_has_gxb_reconfig_member(DEVICE_FAMILY);
define family_has_gxb_reconfig_in_wizard_member(x) = ( ( (family_has_gxb_reconfig_member(x) == 1) ) ? 1 : 0);
define family_has_gxb_reconfig_in_wizard() = family_has_gxb_reconfig_in_wizard_member(DEVICE_FAMILY);
define family_has_stratix_le_member(x) = ( ( (family_stratix_member(x) == 1) & ! (family_stratixii_member(x) == 1) & ! (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_stratix_le() = family_has_stratix_le_member(DEVICE_FAMILY);
define family_has_diff_reg_lut_primitives_member(x) = ( ( (family_stratixii_member(x) == 1) # (family_cycloneii_member(x) == 1) ) ? 1 : 0);
define family_has_diff_reg_lut_primitives() = family_has_diff_reg_lut_primitives_member(DEVICE_FAMILY);
define family_lut_has_inverta_member(x) = ( ( (family_base_stratix_member(x) == 1) # (family_cyclone_member(x) == 1) # (family_maxii_member(x) == 1) # (family_base_stratixii_member(x) == 1) # (family_base_stratixiii_member(x) == 1) ) ? 1 : 0);
define family_lut_has_inverta() = family_lut_has_inverta_member(DEVICE_FAMILY);
define family_has_jtag_accessible_extensions_member(x) = ( ( (family_maxii_member(x) == 1) # (family_apex20k_member(x) == 1) # (family_apex20ke_member(x) == 1) # (family_apexii_member(x) == 1) # (family_mercury_member(x) == 1) # (family_base_stratix_member(x) == 1) # (family_base_stratix_member(x) == 1) # (family_base_cyclone_member(x) == 1) # (family_base_stratixii_member(x) == 1) # (family_base_cycloneii_member(x) == 1) # (family_base_stratixiii_member(x) == 1) # (family_base_cycloneiii_member(x) == 1) ) ? 1 : 0);
define family_has_jtag_accessible_extensions() = family_has_jtag_accessible_extensions_member(DEVICE_FAMILY);
define family_has_signaltap_support_member(x) = ( ( (family_has_jtag_accessible_extensions_member(x) == 1) & ! (family_maxii_member(x) == 1) ) ? 1 : 0);
define family_has_signaltap_support() = family_has_signaltap_support_member(DEVICE_FAMILY);
define family_supports_metastability_analysis_member(x) = ( ( (family_stratixiii_only_member(x) == 1) # (family_cycloneiii_member(x) == 1) # (family_arriaiigx_member(x) == 1) # (family_stratixiv_strict_member(x) == 1) ) ? 1 : 0);
define family_supports_metastability_analysis() = family_supports_metastability_analysis_member(DEVICE_FAMILY);
CONSTANT le_ram_max_num_words = 2048;
CONSTANT le_ram_max_num_bits = 8192;
CONSTANT ram_max_address_width = 25;
CONSTANT lutram = "MLAB";
CONSTANT m9k = "M9K" ;
CONSTANT m144k = "M144K" ;
CONSTANT m4k = "M4K" ;
CONSTANT m512 = "M512" ;
CONSTANT mram = "M-RAM";
CONSTANT auto = "AUTO" ;
CONSTANT periphery_clock = "Periphery clock" ;
define family_is_known_member(x) = ( ((family_hardcopystratix_strict(x) == 1) # (family_stratixgx_strict(x) == 1) # (family_apex20ke_strict(x) == 1) # (family_flex6000_strict(x) == 1) # (family_hardcopyii_strict(x) == 1) # (family_cycloneiii_strict(x) == 1) # (family_max7000a_strict(x) == 1) # (family_apex20kc_strict(x) == 1) # (family_apexii_strict(x) == 1) # (family_apex20k_strict(x) == 1) # (family_stratixiigx_strict(x) == 1) # (family_cycloneiiils_strict(x) == 1) # (family_flex10ke_strict(x) == 1) # (family_hardcopyiii_strict(x) == 1) # (family_stratixii_strict(x) == 1) # (family_arriaiigx_strict(x) == 1) # (family_arriagx_strict(x) == 1) # (family_hardcopyiv_strict(x) == 1) # (family_max7000b_strict(x) == 1) # (family_stratix_strict(x) == 1) # (family_max7000s_strict(x) == 1) # (family_flex10ka_strict(x) == 1) # (family_cycloneii_strict(x) == 1) # (family_max3000a_strict(x) == 1) # (family_maxii_strict(x) == 1) # (family_acex1k_strict(x) == 1) # (family_cyclone_strict(x) == 1) # (family_excalibur_arm_strict(x) == 1) # (family_mercury_strict(x) == 1) # (family_flex10k_strict(x) == 1) # (family_stratixiv_strict(x) == 1) # (family_max7000ae_strict(x) == 1) # (family_stratixiii_strict(x) == 1)) ? 1 : 0);
define family_is_known() = family_is_known_member(DEVICE_FAMILY);
define family_is_same_member(x, y) = ( (((family_hardcopystratix_strict(x) == 1) & (family_hardcopystratix_strict(y) == 1)) # ((family_stratixgx_strict(x) == 1) & (family_stratixgx_strict(y) == 1)) # ((family_apex20ke_strict(x) == 1) & (family_apex20ke_strict(y) == 1)) # ((family_flex6000_strict(x) == 1) & (family_flex6000_strict(y) == 1)) # ((family_hardcopyii_strict(x) == 1) & (family_hardcopyii_strict(y) == 1)) # ((family_cycloneiii_strict(x) == 1) & (family_cycloneiii_strict(y) == 1)) # ((family_max7000a_strict(x) == 1) & (family_max7000a_strict(y) == 1)) # ((family_apex20kc_strict(x) == 1) & (family_apex20kc_strict(y) == 1)) # ((family_apexii_strict(x) == 1) & (family_apexii_strict(y) == 1)) # ((family_apex20k_strict(x) == 1) & (family_apex20k_strict(y) == 1)) # ((family_stratixiigx_strict(x) == 1) & (family_stratixiigx_strict(y) == 1)) # ((family_cycloneiiils_strict(x) == 1) & (family_cycloneiiils_strict(y) == 1)) # ((family_flex10ke_strict(x) == 1) & (family_flex10ke_strict(y) == 1)) # ((family_hardcopyiii_strict(x) == 1) & (family_hardcopyiii_strict(y) == 1)) # ((family_stratixii_strict(x) == 1) & (family_stratixii_strict(y) == 1)) # ((family_arriaiigx_strict(x) == 1) & (family_arriaiigx_strict(y) == 1)) # ((family_arriagx_strict(x) == 1) & (family_arriagx_strict(y) == 1)) # ((family_hardcopyiv_strict(x) == 1) & (family_hardcopyiv_strict(y) == 1)) # ((family_max7000b_strict(x) == 1) & (family_max7000b_strict(y) == 1)) # ((family_stratix_strict(x) == 1) & (family_stratix_strict(y) == 1)) # ((family_max7000s_strict(x) == 1) & (family_max7000s_strict(y) == 1)) # ((family_flex10ka_strict(x) == 1) & (family_flex10ka_strict(y) == 1)) # ((family_cycloneii_strict(x) == 1) & (family_cycloneii_strict(y) == 1)) # ((family_max3000a_strict(x) == 1) & (family_max3000a_strict(y) == 1)) # ((family_maxii_strict(x) == 1) & (family_maxii_strict(y) == 1)) # ((family_acex1k_strict(x) == 1) & (family_acex1k_strict(y) == 1)) # ((family_cyclone_strict(x) == 1) & (family_cyclone_strict(y) == 1)) # ((family_excalibur_arm_strict(x) == 1) & (family_excalibur_arm_strict(y) == 1)) # ((family_mercury_strict(x) == 1) & (family_mercury_strict(y) == 1)) # ((family_flex10k_strict(x) == 1) & (family_flex10k_strict(y) == 1)) # ((family_stratixiv_strict(x) == 1) & (family_stratixiv_strict(y) == 1)) # ((family_max7000ae_strict(x) == 1) & (family_max7000ae_strict(y) == 1)) # ((family_stratixiii_strict(x) == 1) & (family_stratixiii_strict(y) == 1))) ? 1 : 0);
define family_is_same() = family_is_same_member(DEVICE_FAMILY, INTENDED_DEVICE_FAMILY);
DEFINE FAMILY_EAB_MAX_DEPTH() = (FAMILY_HAS_EAB()==0 ? 1 : (FAMILY_MERCURY() # FAMILY_APEXII() # FAMILY_STRATIX() ? 4096 : 2048));
DEFINE FAMILY_EAB_BITS() = ((FAMILY_FLEX10K()!=0 # FAMILY_APEX20K()!=0 # FAMILY_APEX20KE()!=0)	
								?  2048 : 
								(FAMILY_FLEX10KE()!=0 # FAMILY_MERCURY()!=0 # FAMILY_APEXII()!=0 # FAMILY_STRATIX()!=0 ? 4096 : 1));
DEFINE FAMILY_HAS_PRESET() = (1);
DEFINE MAXPIA_SIZE() = (DEVICE_FAMILY=="MAX9000") ? 33 : 36;

DEFINE USE_CARRY_CHAINS() = (IGNORE_CARRY_BUFFERS == "OFF" & CARRY_CHAIN != "IGNORE");
DEFINE USE_CASCADE_CHAINS() = (IGNORE_CASCADE_BUFFERS == "OFF" & CASCADE_CHAIN != "IGNORE" & FAMILY_HAS_CASCADE());


PARAMETERS
(
--	DEVICE_FAMILY,
	AUTO_CARRY_CHAINS = "ON",
	IGNORE_CARRY_BUFFERS = "OFF",
	AUTO_CASCADE_CHAINS = "ON",
	IGNORE_CASCADE_BUFFERS = "OFF"
);

