1# MicroBlaze architecture tune feature configuration 2 3# Architecture feature and override 4TUNEVALID[microblaze] = "MicroBlaze" 5MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}" 6 7# Endian 8TUNEVALID[bigendian] = "Use Microblaze Big Endian" 9TUNECONFLICTS[bigendian] += "v10.0" 10 11MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" 12 13TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}" 14 15# General features 16TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter" 17TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions" 18TUNEVALID[reorder] = "Enable Reorder Instructions" 19TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20" 20 21# Core configuration tune optimizations 22TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)" 23TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6" 24 25# Feature compiler args 26TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}" 27TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}" 28TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}" 29 30# Disable reorder for v8.30 if pattern-compare is not enabled 31TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \ 32 bb.utils.contains("TUNE_FEATURES", "v8.30", \ 33 bb.utils.contains("TUNE_FEATURES", "pattern-compare", \ 34 "-mxl-reorder", "-mno-xl-reorder", d), \ 35 "-mxl-reorder", d), "-mno-xl-reorder", d)}" 36 37# Feature package architecture formatting 38MBPKGARCH_TUNE = "" 39MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}" 40MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}" 41MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}" 42MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}" 43 44# Additional features 45require conf/machine/include/microblaze/feature-microblaze-versions.inc 46require conf/machine/include/microblaze/feature-microblaze-math.inc 47 48# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess 49TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" 50 51# Package Architecture formatting 52TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}" 53 54