Skip to content

Commit 9680f23

Browse files
author
Robert Muchsel
authored
Update SDK to rev 2021/04/30; Pylint 2.8.2 (#129)
1 parent 9ac58fc commit 9680f23

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

.github/linters/.python-lint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[MESSAGES CONTROL]
2-
disable=invalid-name,fixme,import-error
2+
disable=invalid-name, consider-using-with, fixme, import-error
33
[TYPECHECK]
4-
ignored-modules = numpy, matplotlib.cm, torch, distiller
4+
ignored-modules = numpy, matplotlib.cm, torch
55
ignored-classes = ModelProto
66
[FORMAT]
77
max-line-length = 99
@@ -18,4 +18,4 @@ max-public-methods=35
1818
max-bool-expr=8
1919
max-parents=15
2020
[MASTER]
21-
ignore=CMSIS_5,distiller,sdk
21+
ignore=CMSIS_5,sdk

.pylintrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[MESSAGES CONTROL]
2-
disable=invalid-name
2+
disable=invalid-name, consider-using-with
33
[TYPECHECK]
4-
ignored-modules = numpy, matplotlib.cm, torch, distiller
4+
ignored-modules = numpy, matplotlib.cm, torch
55
ignored-classes = ModelProto
66
[FORMAT]
77
max-line-length = 99
@@ -18,4 +18,4 @@ max-public-methods=35
1818
max-bool-expr=8
1919
max-parents=15
2020
[MASTER]
21-
ignore=CMSIS_5,distiller
21+
ignore=CMSIS_5,sdk

assets/rtlsim-verify-output/verify-output.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
# Go through all the files in 'data-expected' and read them. For each, make sure there is a
4848
# corresponding file in 'data-output'. Open that file and make sure that the information matches.
49-
for _, _, fnames in sorted(os.walk('data-expected')):
49+
for _, _, fnames in sorted(os.walk('data-expected')): # type: ignore
5050
for fname in sorted(fnames):
5151
outname = fname.replace('DRAM_', 'DRAM_out_')
5252
if not os.path.isfile(os.path.join('data-output', outname)):
@@ -66,23 +66,23 @@
6666
sys.exit(-3)
6767

6868
try:
69-
addr = int(addr[1:], base=16)
69+
addr = int(addr[1:], base=16) # type: ignore
7070
val = val.strip().lower()
7171
mask = ''
72-
for _, m in enumerate(val):
72+
for _, m in enumerate(val): # type: ignore
7373
mask += '0' if m == 'x' else 'f'
74-
mask = int(mask, base=16)
75-
val = int(val.replace('x', '0'), base=16)
74+
mask = int(mask, base=16) # type: ignore
75+
val = int(val.replace('x', '0'), base=16) # type: ignore
7676
except ValueError:
7777
log.error('Malformed line %s in file data-expected/%s!', e.strip(), fname)
7878
sys.exit(-3)
7979

80-
if addr > len(data):
80+
if addr > len(data): # type: ignore
8181
log.error('Address from %s not present in file data-output/%s!',
8282
e.strip(), outname)
8383
failures += 1
8484
else:
85-
result = data[addr].strip().lower()
85+
result = data[addr].strip().lower() # type: ignore
8686
if result == 'x' * len(result):
8787
log.error('Output is %s at address %04x in file data-output/%s!',
8888
result, addr, outname)
@@ -93,11 +93,14 @@
9393
resultf = int(result.replace('x', 'f'), base=16)
9494
except ValueError:
9595
log.error('Malformed line %04x: %s in file data-output/%s!',
96-
addr, data[addr].strip(), fname)
96+
addr, data[addr].strip(), fname) # type: ignore
9797
sys.exit(-3)
9898

9999
log.debug('Found address %04x, val %08x, comp %s', addr, val, result)
100-
if result0 & mask != val & mask or resultf & mask != val & mask:
100+
if (
101+
result0 & mask != val & mask # type: ignore
102+
or resultf & mask != val & mask # type: ignore
103+
):
101104
log.error('Data mismatch at address %04x in file data-output/%s. '
102105
'Expected: %08x, got %s (mask %08x)!',
103106
addr, outname, val, result, mask)

sdk

Submodule sdk updated from 59fdffa to de233e1

0 commit comments

Comments
 (0)