xref: /openbmc/openbmc/poky/meta/conf/machine/include/microblaze/arch-microblaze.inc (revision 82c905dc58a36aeae40b1b273a12f63fb1973cf4)
1eb8dc403SDave Cobbley# MicroBlaze architecture tune feature configuration
2eb8dc403SDave Cobbley
3eb8dc403SDave Cobbley# Architecture feature and override
4eb8dc403SDave CobbleyTUNEVALID[microblaze] = "MicroBlaze"
5eb8dc403SDave CobbleyMACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}"
6eb8dc403SDave Cobbley
7*82c905dcSAndrew Geissler# 64-bit
8*82c905dcSAndrew GeisslerTUNEVALID[64-bit] = "64-bit MicroBlaze"
9*82c905dcSAndrew GeisslerTUNECONFLICTS[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"
10*82c905dcSAndrew GeisslerMACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "microblaze64:", "", d)}"
11*82c905dcSAndrew Geissler
12eb8dc403SDave Cobbley# Endian
13eb8dc403SDave CobbleyTUNEVALID[bigendian] = "Use Microblaze Big Endian"
14*82c905dcSAndrew GeisslerTUNECONFLICTS[bigendian] = "v10.0"
15eb8dc403SDave Cobbley
16eb8dc403SDave CobbleyMBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}"
17eb8dc403SDave Cobbley
18*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mbig-endian", " -mlittle-endian", d)}"
19eb8dc403SDave Cobbley
20eb8dc403SDave Cobbley# General features
21eb8dc403SDave CobbleyTUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter"
22eb8dc403SDave CobbleyTUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions"
23eb8dc403SDave CobbleyTUNEVALID[reorder] = "Enable Reorder Instructions"
24*82c905dcSAndrew GeisslerTUNECONFLICTS[reorder] = "v8.00 v8.10 v8.20"
25eb8dc403SDave Cobbley
26eb8dc403SDave Cobbley# Core configuration tune optimizations
27eb8dc403SDave CobbleyTUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)"
28*82c905dcSAndrew GeisslerTUNECONFLICTS[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"
29eb8dc403SDave Cobbley
30eb8dc403SDave Cobbley# Feature compiler args
31*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", " -mxl-barrel-shift", " -mno-xl-barrel-shift", d)}"
32*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", " -mxl-pattern-compare", " -mno-xl-pattern-compare", d)}"
33*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", " -mxl-frequency", "", d)}"
34*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "64-bit", " -m64", "", d)}"
35eb8dc403SDave Cobbley
36eb8dc403SDave Cobbley# Disable reorder for v8.30 if pattern-compare is not enabled
37*82c905dcSAndrew GeisslerTUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", \
38eb8dc403SDave Cobbley        bb.utils.contains("TUNE_FEATURES", "v8.30", \
39eb8dc403SDave Cobbley            bb.utils.contains("TUNE_FEATURES", "pattern-compare", \
40eb8dc403SDave Cobbley                " -mxl-reorder", " -mno-xl-reorder", d), \
41eb8dc403SDave Cobbley            " -mxl-reorder", d), " -mno-xl-reorder", d)}"
42eb8dc403SDave Cobbley
43eb8dc403SDave Cobbley# Feature package architecture formatting
44eb8dc403SDave CobbleyMBPKGARCH_TUNE = ""
45eb8dc403SDave CobbleyMBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}"
46eb8dc403SDave CobbleyMBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}"
47eb8dc403SDave CobbleyMBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}"
48eb8dc403SDave CobbleyMBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}"
49eb8dc403SDave Cobbley
50eb8dc403SDave Cobbley# Additional features
51eb8dc403SDave Cobbleyrequire conf/machine/include/microblaze/feature-microblaze-versions.inc
52eb8dc403SDave Cobbleyrequire conf/machine/include/microblaze/feature-microblaze-math.inc
53eb8dc403SDave Cobbley
54*82c905dcSAndrew Geissler# Architecture name, either 'microblaze' or 'microblazeel' depending on endianess
55*82c905dcSAndrew GeisslerTUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}"
56*82c905dcSAndrew Geissler
57*82c905dcSAndrew Geissler# Add 64-bit to the PKGARCH if enabled.
58*82c905dcSAndrew GeisslerMBPKGARCH_SIZE = "${@bb.utils.contains("TUNE_FEATURES", "64-bit", "64", "", d)}"
59eb8dc403SDave Cobbley
60eb8dc403SDave Cobbley# Package Architecture formatting
61*82c905dcSAndrew GeisslerTUNE_PKGARCH = "microblaze${MBPKGARCH_SIZE}${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}"
62eb8dc403SDave Cobbley
63