Use array stride instead of array size
All checks were successful
build / test (3.11) (push) Successful in 1m14s
build / test (3.10) (push) Successful in 1m14s
build / test (3.12) (push) Successful in 1m16s
build / test (3.13) (push) Successful in 1m11s
build / test (3.9) (push) Successful in 25s
build / lint (push) Successful in 28s
build / mypy (push) Successful in 32s
build / Build distributions (push) Successful in 27s
build / deploy (push) Has been skipped
build / test (3.10) (release) Successful in 27s
build / test (3.12) (release) Successful in 23s
build / test (3.11) (release) Successful in 24s
build / test (3.13) (release) Successful in 26s
build / test (3.9) (release) Successful in 24s
build / lint (release) Successful in 26s
build / mypy (release) Successful in 28s
build / Build distributions (release) Successful in 25s
build / deploy (release) Successful in 25s
All checks were successful
build / test (3.11) (push) Successful in 1m14s
build / test (3.10) (push) Successful in 1m14s
build / test (3.12) (push) Successful in 1m16s
build / test (3.13) (push) Successful in 1m11s
build / test (3.9) (push) Successful in 25s
build / lint (push) Successful in 28s
build / mypy (push) Successful in 32s
build / Build distributions (push) Successful in 27s
build / deploy (push) Has been skipped
build / test (3.10) (release) Successful in 27s
build / test (3.12) (release) Successful in 23s
build / test (3.11) (release) Successful in 24s
build / test (3.13) (release) Successful in 26s
build / test (3.9) (release) Successful in 24s
build / lint (release) Successful in 26s
build / mypy (release) Successful in 28s
build / Build distributions (release) Successful in 25s
build / deploy (release) Successful in 25s
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
version_info = (0, 0, 4)
|
||||
version_info = (0, 0, 5)
|
||||
__version__ = ".".join([str(n) for n in version_info])
|
||||
|
||||
@@ -45,7 +45,7 @@ class Generator(RDLListener):
|
||||
assert child.array_dimensions is not None
|
||||
if len(child.array_dimensions) > 1:
|
||||
raise NotImplementedError("Multidimensional arrays not supported")
|
||||
self.f.write(f"{' '*self.indent_level*4} self.{child.inst_name} = [self.{child.inst_name}Class(self.addr + {child.raw_address_offset} + {child.size}*i) for i in range({child.n_elements})]\n")
|
||||
self.f.write(f"{' '*self.indent_level*4} self.{child.inst_name} = [self.{child.inst_name}Class(self.addr + {child.raw_address_offset} + {child.array_stride}*i) for i in range({child.n_elements})]\n")
|
||||
else:
|
||||
self.f.write(f"{' '*self.indent_level*4} self.{child.inst_name} = self.{child.inst_name}Class(self.addr + {child.address_offset})\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user