Skip to content

Commit

Permalink
Fix missing array check on top-level export explode decision
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Aug 7, 2019
1 parent ccfda65 commit 98d5fae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Pass the elaborated output of the [SystemRDL Compiler](http://systemrdl-compiler
to the exporter.

```python
from ralbot.ipxact import RDLCompiler, IPXACTExporter
import sys
from systemrdl import RDLCompiler, RDLCompileError
from ralbot.ipxact import IPXACTExporter

rdlc = RDLCompiler()

Expand Down
2 changes: 1 addition & 1 deletion ralbot/ipxact/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.2.0"
__version__ = "1.2.1"
9 changes: 6 additions & 3 deletions ralbot/ipxact/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ def export(self, node, path):
# addressBlock groups
explode = False

# If top node is an addrmap, and it contains 1 or more children that are
# exclusively addrmap or mem, then it makes more sense to "explode" the
# If top node is an addrmap, and it contains 1 or more children that
# are:
# - exclusively addrmap or mem
# - and None of them are arrays
# ... then it makes more sense to "explode" the
# top-level node and make each of it's children their own addressBlock
# (explode --> True)
#
Expand All @@ -89,7 +92,7 @@ def export(self, node, path):
if not isinstance(child, AddressableNode):
continue

if isinstance(child, (AddrmapNode, MemNode)):
if isinstance(child, (AddrmapNode, MemNode)) and not child.is_array:
addrblockable_children += 1
else:
non_addrblockable_children += 1
Expand Down

0 comments on commit 98d5fae

Please sign in to comment.