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