diff options
| author | Mark Hatle <mark.hatle@xilinx.com> | 2020-06-05 07:28:07 -0700 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@xilinx.com> | 2020-06-25 08:58:31 -0700 |
| commit | cdb92171e493a7054258391833e713e2899aef70 (patch) | |
| tree | 8c51177d08b2f9cb4e788c2f09e7547b78068ddf | |
| parent | a10f306b7e50d0b69cd55fae86e1a8376eea9ee1 (diff) | |
| download | meta-xilinx-cdb92171e493a7054258391833e713e2899aef70.tar.gz | |
meta-xilinx-standalone: microblaze_dtb fix config gen
The configuration generation had a typo in 'divide-hard'.
Fixed a logic error with '!' table operator. Before fpu-soft
was effectively always on, even when it shouldn't be.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
| -rw-r--r-- | meta-xilinx-standalone/scripts/microblaze_dtb.py | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/meta-xilinx-standalone/scripts/microblaze_dtb.py b/meta-xilinx-standalone/scripts/microblaze_dtb.py index aba72497..1c5ed835 100644 --- a/meta-xilinx-standalone/scripts/microblaze_dtb.py +++ b/meta-xilinx-standalone/scripts/microblaze_dtb.py | |||
| @@ -12,18 +12,21 @@ import sys | |||
| 12 | # if is not defined | 12 | # if is not defined |
| 13 | # | 13 | # |
| 14 | # Otherwise 'condition' and value are evaluated by type. | 14 | # Otherwise 'condition' and value are evaluated by type. |
| 15 | # | ||
| 16 | # If the condition is = then any value of condition_values will set it | ||
| 17 | # If the condition is ! then no value of condition_values will set it | ||
| 15 | 18 | ||
| 16 | microblaze_tune_features = { | 19 | microblaze_tune_features = { |
| 17 | 'microblaze' : (None, None, None), | 20 | 'microblaze' : (None, None, None), |
| 18 | 'bigendian': ('xlnx,endianness', '!', 1), | 21 | 'bigendian': ('xlnx,endianness', '!', 1), |
| 19 | '64-bit' : ('xlnx,data-size', '=', 64), | 22 | '64-bit' : ('xlnx,data-size', '=', 64), |
| 20 | 'barrel-shift': ('xlnx,use-barrel', '=', 1), | 23 | 'barrel-shift': ('xlnx,use-barrel', '=', 1), |
| 21 | 'pattern-compare': ('xlnx,use-pcmp-instr', '=', 1), | 24 | 'pattern-compare': ('xlnx,use-pcmp-instr', '=', 1), |
| 22 | 'reorder' : ('xlnx,use-reorder-instr', '!', 0), | 25 | 'reorder' : ('xlnx,use-reorder-instr', '!', 0), |
| 23 | 'frequency-optimized': ('xlnx,area-optimized', '=', 2), | 26 | 'frequency-optimized': ('xlnx,area-optimized', '=', 2), |
| 24 | 'multiply-low': ('xlnx,use-hw-mul', '=', 1), | 27 | 'multiply-low': ('xlnx,use-hw-mul', '=', 1), |
| 25 | 'multiply-high': ('xlnx,use-hw-mul', '=', 2), | 28 | 'multiply-high': ('xlnx,use-hw-mul', '=', 2), |
| 26 | 'divide-high': ('xlnx,use-div', '=', 1), | 29 | 'divide-hard': ('xlnx,use-div', '=', 1), |
| 27 | 'fpu-soft': ('xlnx,use-fpu', '!', [1,2]), | 30 | 'fpu-soft': ('xlnx,use-fpu', '!', [1,2]), |
| 28 | 'fpu-hard': ('xlnx,use-fpu', '=', 1), | 31 | 'fpu-hard': ('xlnx,use-fpu', '=', 1), |
| 29 | 'fpu-hard-extended':('xlnx,use-fpu', '=', 2), | 32 | 'fpu-hard-extended':('xlnx,use-fpu', '=', 2), |
| @@ -73,21 +76,14 @@ def processProperties(fdt, node): | |||
| 73 | else: | 76 | else: |
| 74 | raise TypeError('Unknown type %s' % ctype) | 77 | raise TypeError('Unknown type %s' % ctype) |
| 75 | 78 | ||
| 76 | if cop == '!': | 79 | if value == val: |
| 77 | if value != val: | 80 | result = True |
| 78 | result = True | 81 | break |
| 79 | else: | 82 | else: |
| 80 | result = False | 83 | result = False |
| 81 | continue | ||
| 82 | |||
| 83 | if cop == '=': | ||
| 84 | if value == val: | ||
| 85 | result = True | ||
| 86 | else: | ||
| 87 | result = False | ||
| 88 | continue | ||
| 89 | 84 | ||
| 90 | if result == True: | 85 | if (cop == '!' and result == False) or \ |
| 86 | (cop == '=' and result == True): | ||
| 91 | TUNE_FEATURES.append(feature) | 87 | TUNE_FEATURES.append(feature) |
| 92 | 88 | ||
| 93 | return TUNE_FEATURES | 89 | return TUNE_FEATURES |
