blob: 4f58076ac9e2b624f5f00dca5d5d5c87c927babe [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001# MicroBlaze architecture tune feature configuration
2
3# Architecture feature and override
4TUNEVALID[microblaze] = "MicroBlaze"
5MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}"
6
Andrew Geissler82c905d2020-04-13 13:39:40 -05007# 64-bit
8TUNEVALID[64-bit] = "64-bit MicroBlaze"
9TUNECONFLICTS[64-bit] = "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 v10.0"
10MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "microblaze64:", "", d)}"
11
Brad Bishop316dfdd2018-06-25 12:45:53 -040012# Endian
13TUNEVALID[bigendian] = "Use Microblaze Big Endian"
Andrew Geissler82c905d2020-04-13 13:39:40 -050014TUNECONFLICTS[bigendian] = "v10.0"
Brad Bishop316dfdd2018-06-25 12:45:53 -040015
16MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
17
Andrew Geissler82c905d2020-04-13 13:39:40 -050018TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040019
20# General features
21TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
22TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
23TUNEVALID[reorder] = "Enable Reorder Instructions"
Andrew Geissler82c905d2020-04-13 13:39:40 -050024TUNECONFLICTS[reorder] = "v8.00 v8.10 v8.20"
Brad Bishop316dfdd2018-06-25 12:45:53 -040025
26# Core configuration tune optimizations
27TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)"
Andrew Geissler82c905d2020-04-13 13:39:40 -050028TUNECONFLICTS[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"
Brad Bishop316dfdd2018-06-25 12:45:53 -040029
30# Feature compiler args
Andrew Geissler82c905d2020-04-13 13:39:40 -050031TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", " -mxl-barrel-shift", " -mno-xl-barrel-shift", d)}"
32TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", " -mxl-pattern-compare", " -mno-xl-pattern-compare", d)}"
33TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", " -mxl-frequency", "", d)}"
34TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "64-bit", " -m64", "", d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040035
36# Disable reorder for v8.30 if pattern-compare is not enabled
Andrew Geissler82c905d2020-04-13 13:39:40 -050037TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
Brad Bishop316dfdd2018-06-25 12:45:53 -040038 bb.utils.contains("TUNE_FEATURES", "v8.30", \
39 bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
Andrew Geissler82c905d2020-04-13 13:39:40 -050040 " -mxl-reorder", " -mno-xl-reorder", d), \
41 " -mxl-reorder", d), " -mno-xl-reorder", d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040042
43# Feature package architecture formatting
44MBPKGARCH_TUNE = ""
45MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}"
46MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}"
47MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}"
48MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}"
49
50# Additional features
51require conf/machine/include/microblaze/feature-microblaze-versions.inc
52require conf/machine/include/microblaze/feature-microblaze-math.inc
53
Andrew Geissler82c905d2020-04-13 13:39:40 -050054# Architecture name, either 'microblaze' or 'microblazeel' depending on endianess
55TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}"
56
57# Add 64-bit to the PKGARCH if enabled.
58MBPKGARCH_SIZE = "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "64", "", d)}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040059
60# Package Architecture formatting
Andrew Geissler82c905d2020-04-13 13:39:40 -050061TUNE_PKGARCH = "microblaze${MBPKGARCH_SIZE}${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040062