diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2017-12-07 19:52:24 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-18 18:00:24 +0000 |
commit | 295a99a31ca147a271c0c76538c4fb27dbecab27 (patch) | |
tree | de86d49bf09844778d24ec07d7e32eed21c45dab /meta/conf/machine/include/microblaze/arch-microblaze.inc | |
parent | e9790a1f882c2b1ec349be374b03198da66bbb66 (diff) | |
download | openembedded-core-contrib-295a99a31ca147a271c0c76538c4fb27dbecab27.tar.gz |
conf/machine/include/microblaze: Add MicroBlaze architecture includes
Add architecture and tune includes for MicroBlaze. This covers
architecture configuration as well as tune configuration and features.
The Xilinx MicroBlaze architecture is a soft-core CPU architecture
designed for implementation on Xilinx FPGAs. Because the CPU is a
soft-core it can be configured differently depending on resource and
performance constraints which affect the ABI and supported instructions.
The architecture is also used in other Xilinx products where the core is
implemented as part of fixed silicon (e.g. Xilinx ZynqMP).
The default tune include 'tune-microblaze.inc' provides the baseline (no
features enabled) tune configuration for a target machine. This is
similar to other architectures such that the machine.conf includes a
tune-*.inc. However due to the customizability configuration is
specifically handled on a per machine basis. A machine should configure
the available tune features by setting the available features directly
by appending to the 'TUNE_FEATURES_tune-microblaze' variable.
This tune configuration approach is preferred to avoid the definition of
an otherwise large set of possible tune configurations for the available
features (14 CPU versions and 11 feature configurations), which would
otherwise require >1024 predefined tune configurations.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/conf/machine/include/microblaze/arch-microblaze.inc')
-rw-r--r-- | meta/conf/machine/include/microblaze/arch-microblaze.inc | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/conf/machine/include/microblaze/arch-microblaze.inc b/meta/conf/machine/include/microblaze/arch-microblaze.inc new file mode 100644 index 0000000000..eab7171cb2 --- /dev/null +++ b/meta/conf/machine/include/microblaze/arch-microblaze.inc @@ -0,0 +1,53 @@ +# MicroBlaze architecture tune feature configuration + +# Architecture feature and override +TUNEVALID[microblaze] = "MicroBlaze" +MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}" + +# Endian +TUNEVALID[bigendian] = "Use Microblaze Big Endian" +TUNECONFLICTS[bigendian] += "v10.0" + +MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" + +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}" + +# General features +TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter" +TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions" +TUNEVALID[reorder] = "Enable Reorder Instructions" +TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20" + +# Core configuration tune optimizations +TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)" +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" + +# Feature compiler args +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}" + +# Disable reorder for v8.30 if pattern-compare is not enabled +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \ + bb.utils.contains("TUNE_FEATURES", "v8.30", \ + bb.utils.contains("TUNE_FEATURES", "pattern-compare", \ + "-mxl-reorder", "-mno-xl-reorder", d), \ + "-mxl-reorder", d), "-mno-xl-reorder", d)}" + +# Feature package architecture formatting +MBPKGARCH_TUNE = "" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}" + +# Additional features +require conf/machine/include/microblaze/feature-microblaze-versions.inc +require conf/machine/include/microblaze/feature-microblaze-math.inc + +# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess +TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" + +# Package Architecture formatting +TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}" + |