diff options
author | Sipke Vriend <sipke.vriend@xilinx.com> | 2013-03-26 15:07:21 +1000 |
---|---|---|
committer | Sipke Vriend <sipke.vriend@xilinx.com> | 2013-03-26 15:08:21 +1000 |
commit | d3d260098ec9c39d14de72b9dda3e4853550b08b (patch) | |
tree | 884244de90be638ba0615de944b852aad7490251 | |
parent | a7296dcbf65798e40c4ed7626da07ab7d25adeca (diff) | |
download | meta-xilinx-d3d260098ec9c39d14de72b9dda3e4853550b08b.tar.gz |
tune-microblaze: Refactored
* Added features with CFLAG mappings
* Added version features for v7.3-.a to v8.50.a
* Added MicroBlaze PACKAGE_ARCH expansion e.g. "microblazeel-v830-cmp"
Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com>
15 files changed, 131 insertions, 48 deletions
diff --git a/conf/machine/include/microblaze/feature-microblaze-barrel-shift.inc b/conf/machine/include/microblaze/feature-microblaze-barrel-shift.inc new file mode 100644 index 00000000..57ba03d9 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-barrel-shift.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | TUNEVALID[barrel-shift] = "Enable Microblaze Hardware Barrel Shift." | ||
2 | MBCCARGSBARRELSHIFT += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "" ,d)}" | ||
3 | MBPKGBARRELSHIFT .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-divide.inc b/conf/machine/include/microblaze/feature-microblaze-divide.inc new file mode 100644 index 00000000..fed9fb20 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-divide.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | TUNEVALID[divide-hard] = "Enable Microblaze hardware divider." | ||
2 | MBCCARGSDIV += "${@bb.utils.contains("TUNE_FEATURES", "divide-hard", "-mno-xl-soft-div", "" ,d)}" | ||
3 | MBPKGDIV .= "${@bb.utils.contains("TUNE_FEATURES", "divide-hard", "-div", "" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-endian.inc b/conf/machine/include/microblaze/feature-microblaze-endian.inc new file mode 100644 index 00000000..80567611 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-endian.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | # This feature file must be included/required FIRST as it defines the start of the PKGARCH bitbake variable | ||
2 | MBCCARGSENDIAN = "" | ||
3 | MBPKGENDIAN = "" | ||
4 | |||
5 | TUNEVALID[little-endian] = "Use Microblaze Little Endian." | ||
6 | MBCCARGSENDIAN += "${@bb.utils.contains("TUNE_FEATURES", "little-endian", "-mlittle-endian", "" ,d)}" | ||
7 | MBPKGENDIAN .= "${@bb.utils.contains("TUNE_FEATURES", "little-endian", "el", "eb" ,d)}" | ||
8 | |||
9 | TUNEVALID[big-endian] = "Use Microblaze Big Endian." | ||
10 | MBCCARGSENDIAN += "${@bb.utils.contains("TUNE_FEATURES", "big-endian", "-mbig-endian", "" ,d)}" | ||
11 | MBPKGENDIAN .= "${@bb.utils.contains("TUNE_FEATURES", "big-endian", "eb", "" ,d)}" | ||
12 | |||
13 | TUNECONFLICTS[little-endian] = "big-endian" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-fpu.inc b/conf/machine/include/microblaze/feature-microblaze-fpu.inc new file mode 100644 index 00000000..07f9ba93 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-fpu.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | TARGET_FPU = "fpu-other" | ||
2 | |||
3 | TUNEVALID[fpu-soft] = "Use Microblaze software FPU" | ||
4 | TUNEVALID[fpu-hard] = "Enable Microblaze hardware FPU in basic mode." | ||
5 | TUNEVALID[fpu-hard-extended] = "Enable Microblaze hardware FPU in extended mode - conversion and square root instructions." | ||
6 | |||
7 | # Establish which fpu is configured in TUNE_FEATURES. Soft is the default for gcc. | ||
8 | MBCCARGSFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-mhard-float", "", d)}" | ||
9 | MBCCARGSFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-mhard-float -mxl-float-convert -mxl-float-sqrt", "${MBCCARGSFPU_BASIC}" ,d)}" | ||
10 | |||
11 | MBPKGFPU_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "-fb", "", d)}" | ||
12 | MBPKGFPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard-extended", "-fe", "${MBPKGFPU_BASIC}", d)}" | ||
13 | |||
14 | TUNECONFLICTS[fpu-hard] = "fpu-soft" | ||
15 | TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-multiply.inc b/conf/machine/include/microblaze/feature-microblaze-multiply.inc new file mode 100644 index 00000000..3f6d8c1a --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-multiply.inc | |||
@@ -0,0 +1,9 @@ | |||
1 | TUNEVALID[multiply-low] = "Enable Microblaze Hardware Multiply with low (32 bit) result." | ||
2 | TUNEVALID[multiply-high] = "Enable Microblaze Hardware Multiply with high (64 bit) result." | ||
3 | |||
4 | # Establish which Multiply output result size to use | ||
5 | MBCCARGSMUL_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "multiply-low", "-mno-xl-soft-mul", "" ,d)}" | ||
6 | MBCCARGSMUL = "${@bb.utils.contains("TUNE_FEATURES", "multiply-high", "-mno-xl-soft-mul -mxl-multiply-high", "${MBCCARGSMUL_BASIC}" ,d)}" | ||
7 | |||
8 | MBPKGMUL_BASIC = "${@bb.utils.contains("TUNE_FEATURES", "multiply-low", "-ml", "" ,d)}" | ||
9 | MBPKGMUL = "${@bb.utils.contains("TUNE_FEATURES", "multiply-high", "-mh", "${MBPKGMUL_BASIC}" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-pattern-compare.inc b/conf/machine/include/microblaze/feature-microblaze-pattern-compare.inc new file mode 100644 index 00000000..9ed88977 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-pattern-compare.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | TUNEVALID[pattern-compare] = "Enable Microblaze Pattern Compare Instructions." | ||
2 | MBCCARGSPATTERNCOMPARE = "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "" ,d)}" | ||
3 | MBPKGSPATTERNCOMPARE = "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-reorder.inc b/conf/machine/include/microblaze/feature-microblaze-reorder.inc new file mode 100644 index 00000000..e68fbb3a --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-reorder.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | TUNEVALID[reorder] = "Enable Microblaze Reorder Instructions." | ||
2 | MBCCARGSREORDER = "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-mxl-reorder", "" ,d)}" | ||
3 | MBPKGREORDER = "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-v7.inc b/conf/machine/include/microblaze/feature-microblaze-v7.inc new file mode 100644 index 00000000..f716c67b --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-v7.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | # Setup version 'feature set' for supported Microblaze version 7 versions | ||
2 | TUNEVALID[v730] = "Use Microblaze version 7.30" | ||
3 | |||
4 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v730", "-mcpu=v7.30.a", "" ,d)}" | ||
5 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v730", "-v730", "" ,d)}" | ||
6 | |||
7 | TUNECONFLICTS[v730] += "reorder little-endian" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-v8.inc b/conf/machine/include/microblaze/feature-microblaze-v8.inc new file mode 100644 index 00000000..43f68086 --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-v8.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | # Setup version 'feature set' for supported Microblaze version 8 versions | ||
2 | TUNEVALID[v850] = "Use Microblaze version 8.50" | ||
3 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v850", "-mcpu=v8.50.a", "" ,d)}" | ||
4 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v850", "-v850", "" ,d)}" | ||
5 | |||
6 | TUNEVALID[v840] = "Use Microblaze version 8.40" | ||
7 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v840", "-mcpu=v8.40.a", "" ,d)}" | ||
8 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v840", "-v840", "" ,d)}" | ||
9 | |||
10 | TUNEVALID[v830] = "Use Microblaze version 8.30" | ||
11 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v830", "-mcpu=v8.30.a", "" ,d)}" | ||
12 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v830", "-v830", "" ,d)}" | ||
13 | |||
14 | TUNEVALID[v820] = "Use Microblaze version 8.20" | ||
15 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v820", "-mcpu=v8.20.a", "" ,d)}" | ||
16 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v820", "-v820", "" ,d)}" | ||
17 | |||
18 | TUNEVALID[v810] = "Use Microblaze version 8.10" | ||
19 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v810", "-mcpu=v8.10.a", "" ,d)}" | ||
20 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v810", "-v810", "" ,d)}" | ||
21 | |||
22 | TUNEVALID[v800] = "Use Microblaze version 8.00" | ||
23 | MBCCARGSVERSION += "${@bb.utils.contains("TUNE_FEATURES", "v800", "-mcpu=v8.00.a", "" ,d)}" | ||
24 | MBPKGVERSION .= "${@bb.utils.contains("TUNE_FEATURES", "v800", "-v800", "" ,d)}" | ||
diff --git a/conf/machine/include/microblaze/feature-microblaze-versions.inc b/conf/machine/include/microblaze/feature-microblaze-versions.inc new file mode 100644 index 00000000..b6ff708a --- /dev/null +++ b/conf/machine/include/microblaze/feature-microblaze-versions.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | # Microblaze Versions are defined as features sets, each containing | ||
2 | # a set of hardware features. | ||
3 | |||
4 | MBCCARGSVERSION = "" | ||
5 | MBPKGVERSION = "" | ||
6 | require conf/machine/include/microblaze/feature-microblaze-v8.inc | ||
7 | require conf/machine/include/microblaze/feature-microblaze-v7.inc | ||
8 | |||
9 | # Setup a 'feature set' conflict list which ensures only one version is selected | ||
10 | # when defining the TUNE_FEATURES_tune-<> in local.conf file. | ||
11 | TUNECONFLICTS[v850] += "v730 v800 v810 v820 v830 v840" | ||
12 | TUNECONFLICTS[v840] += "v730 v800 v810 v820 v830 v850" | ||
13 | TUNECONFLICTS[v830] += "v730 v800 v810 v820 v840 v850" | ||
14 | TUNECONFLICTS[v820] += "v730 v800 v810 v830 v840 v850" | ||
15 | TUNECONFLICTS[v810] += "v730 v800 v820 v830 v840 v850" | ||
16 | TUNECONFLICTS[v800] += "v730 v810 v820 v830 v840 v850" | ||
17 | TUNECONFLICTS[v730] += "v800 v810 v820 v830 v840 v850" | ||
diff --git a/conf/machine/include/tune-microblaze-features.inc b/conf/machine/include/tune-microblaze-features.inc new file mode 100644 index 00000000..f12508ae --- /dev/null +++ b/conf/machine/include/tune-microblaze-features.inc | |||
@@ -0,0 +1,9 @@ | |||
1 | # The order of these files defines the order of sections in the PKGARCH variable | ||
2 | require conf/machine/include/microblaze/feature-microblaze-endian.inc | ||
3 | require conf/machine/include/microblaze/feature-microblaze-versions.inc | ||
4 | require conf/machine/include/microblaze/feature-microblaze-barrel-shift.inc | ||
5 | require conf/machine/include/microblaze/feature-microblaze-multiply.inc | ||
6 | require conf/machine/include/microblaze/feature-microblaze-divide.inc | ||
7 | require conf/machine/include/microblaze/feature-microblaze-fpu.inc | ||
8 | require conf/machine/include/microblaze/feature-microblaze-pattern-compare.inc | ||
9 | require conf/machine/include/microblaze/feature-microblaze-reorder.inc | ||
diff --git a/conf/machine/include/tune-microblaze.inc b/conf/machine/include/tune-microblaze.inc index e6dd2295..6479afbf 100644 --- a/conf/machine/include/tune-microblaze.inc +++ b/conf/machine/include/tune-microblaze.inc | |||
@@ -1,18 +1,17 @@ | |||
1 | # Tune options for microblaze big endian | 1 | # Tune options for microblaze |
2 | # The only tune 'feature' defined here is the microblaze tune. | ||
3 | # See the machine file (microblaze[el].conf) for details. | ||
2 | 4 | ||
3 | DEFAULTTUNE ?= "microblaze" | 5 | DEFAULTTUNE ?= "microblaze" |
4 | TUNE_ARCH = "microblaze" | ||
5 | TUNE_PKGARCH = "${TUNE_ARCH}" | ||
6 | 6 | ||
7 | AVAILTUNES += "microblaze" | 7 | TUNE_ARCH = "microblazeel" |
8 | TUNE_FEATURES_tune-microblaze ?= "fpu-soft" | ||
9 | PACKAGE_EXTRA_ARCHS_tune-microblaze = "" | ||
10 | 8 | ||
11 | # FPU Configuration | 9 | require conf/machine/include/tune-microblaze-features.inc |
12 | TUNEVALID[fpu-soft] = "Use software FPU." | ||
13 | TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}" | ||
14 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}" | ||
15 | 10 | ||
16 | # CPU Version Configuration | 11 | AVAILTUNES += "microblaze" |
17 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "-mcpu=v8.30.a", "", d)}" | 12 | TUNEVALID[microblaze] = "Microblaze" |
13 | TUNE_FEATURES_tune-microblaze += "microblaze" | ||
18 | 14 | ||
15 | TUNE_CCARGS += "${MBCCARGSENDIAN} ${MBCCARGSVERSION} ${MBCCARGSBARRELSHIFT} ${MBCCARGSMUL} ${MBCCARGSDIV} ${MBCCARGSFPU} ${MBCCARGSPATTERNCOMPARE} ${MBCCARGSREORDER}" | ||
16 | TUNE_PKGARCH = "microblaze${MBPKGENDIAN}${MBPKGVERSION}${MBPKGBARRELSHIFT}${MBPKGMUL}${MBPKGDIV}${MBPKGFPU}${MBPKGSPATTERNCOMPARE}${MBPKGREORDER}" | ||
17 | PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}" | ||
diff --git a/conf/machine/include/tune-microblazeel.inc b/conf/machine/include/tune-microblazeel.inc deleted file mode 100644 index f27dc5e1..00000000 --- a/conf/machine/include/tune-microblazeel.inc +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | # Tune options for microblaze endian little | ||
2 | DEFAULTTUNE ?= "microblazeel" | ||
3 | |||
4 | #TUNEVALID[m32] = "Microblaze ELF32 standard ABI" | ||
5 | #TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "", "", d)}" | ||
6 | TUNE_ARCH = "microblazeel" | ||
7 | #"${@bb.utils.contains("TUNE_FEATURES", "m32", "microblazeel", "", d)}" | ||
8 | |||
9 | TUNEVALID[fpu-soft] = "Use software FPU." | ||
10 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}" | ||
11 | TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}" | ||
12 | |||
13 | TUNE_PKGARCH = "${TUNE_ARCH}" | ||
14 | |||
15 | AVAILTUNES += "microblazeel" | ||
16 | TUNE_FEATURES_tune-microblazeel ?= "fpu-soft" | ||
17 | PACKAGE_EXTRA_ARCHS_tune-microblazeel = "" | ||
18 | |||
19 | TARGET_FPU = "soft" | ||
20 | TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "microblazeel", "-mcpu=v8.30.a", "", d)}" | ||
21 | |||
22 | #MACHINEOVERRIDES .= "microblaze" | ||
diff --git a/conf/machine/microblaze.conf b/conf/machine/microblaze.conf deleted file mode 100644 index 46c61888..00000000 --- a/conf/machine/microblaze.conf +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: microblaze | ||
3 | #@DESCRIPTION: microblaze | ||
4 | |||
5 | TARGET_CPU = "microblaze" | ||
6 | MACHINE_FEATURES := "" | ||
7 | |||
8 | require conf/machine/include/tune-microblaze.inc | ||
9 | |||
10 | KERNEL_IMAGETYPE = "uImage" | ||
11 | |||
12 | SERIAL_CONSOLE = "115200 ttyS0" | ||
diff --git a/conf/machine/microblazeel.conf b/conf/machine/microblazeel.conf index 10d4b870..5ca9b100 100644 --- a/conf/machine/microblazeel.conf +++ b/conf/machine/microblazeel.conf | |||
@@ -1,11 +1,23 @@ | |||
1 | #@TYPE: Machine | 1 | #@TYPE: Machine |
2 | #@NAME: microblazeel | 2 | #@NAME: microblazeel |
3 | #@DESCRIPTION: microblazeel | 3 | #@DESCRIPTION: Microblaze (Little Endian) |
4 | |||
5 | # The Microblaze machine differ from those of 'fixed' architectures like | ||
6 | # arm as Microblaze can have each of its hardware tune features configured | ||
7 | # independently. | ||
8 | # For this reason the user must define the TUNE_FEATURES_tune-microblaze | ||
9 | # in the local.conf file. | ||
10 | # An example is: | ||
11 | # TUNE_FEATURES_tune-microblaze += "little-endian v830 barrel-shift multiply-high multiply-low pattern-compare reorder divide-hard fpu-hard fpu-hard-extended" | ||
12 | # If no other feature is defined in local.conf, then no hardware | ||
13 | # features will be enabled. | ||
4 | 14 | ||
5 | TARGET_CPU = "microblazeel" | 15 | TARGET_CPU = "microblazeel" |
6 | MACHINE_FEATURES := "" | 16 | MACHINE_FEATURES := "" |
7 | 17 | ||
8 | require conf/machine/include/tune-microblazeel.inc | 18 | require conf/machine/include/tune-microblaze.inc |
19 | |||
20 | TUNE_FEATURES_tune-microblaze += "little-endian v830" | ||
9 | 21 | ||
10 | KERNEL_IMAGETYPE = "uImage" | 22 | KERNEL_IMAGETYPE = "uImage" |
11 | 23 | ||