Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use array index in identifiers #19

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions example/accelera_generic_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ how RDL can be utilized in various situations.</p>
|0x0010| myRegInst | — |
|0x0020| spi4_pkt_count | — |
|0x0024|gige_pkt_count_reg| — |
|0x0100| fifo_port[8] | — |
|0x0110| fifo_port[8] | — |
|0x0120| fifo_port[8] | — |
|0x0130| fifo_port[8] | — |
|0x0140| fifo_port[8] | — |
|0x0150| fifo_port[8] | — |
|0x0160| fifo_port[8] | — |
|0x0170| fifo_port[8] | — |
|0x1000|vc_pkt_count[8][2]| — |
|0x1004|vc_pkt_count[8][2]| — |
|0x1008|vc_pkt_count[8][2]| — |
|0x100C|vc_pkt_count[8][2]| — |
|0x1010|vc_pkt_count[8][2]| — |
|0x1014|vc_pkt_count[8][2]| — |
|0x1018|vc_pkt_count[8][2]| — |
|0x101C|vc_pkt_count[8][2]| — |
|0x1020|vc_pkt_count[8][2]| — |
|0x1024|vc_pkt_count[8][2]| — |
|0x1028|vc_pkt_count[8][2]| — |
|0x102C|vc_pkt_count[8][2]| — |
|0x1030|vc_pkt_count[8][2]| — |
|0x1034|vc_pkt_count[8][2]| — |
|0x1038|vc_pkt_count[8][2]| — |
|0x103C|vc_pkt_count[8][2]| — |
|0x0100| fifo_port[0] | — |
|0x0110| fifo_port[1] | — |
|0x0120| fifo_port[2] | — |
|0x0130| fifo_port[3] | — |
|0x0140| fifo_port[4] | — |
|0x0150| fifo_port[5] | — |
|0x0160| fifo_port[6] | — |
|0x0170| fifo_port[7] | — |
|0x1000|vc_pkt_count[0][0]| — |
|0x1004|vc_pkt_count[0][1]| — |
|0x1008|vc_pkt_count[1][0]| — |
|0x100C|vc_pkt_count[1][1]| — |
|0x1010|vc_pkt_count[2][0]| — |
|0x1014|vc_pkt_count[2][1]| — |
|0x1018|vc_pkt_count[3][0]| — |
|0x101C|vc_pkt_count[3][1]| — |
|0x1020|vc_pkt_count[4][0]| — |
|0x1024|vc_pkt_count[4][1]| — |
|0x1028|vc_pkt_count[5][0]| — |
|0x102C|vc_pkt_count[5][1]| — |
|0x1030|vc_pkt_count[6][0]| — |
|0x1034|vc_pkt_count[6][1]| — |
|0x1038|vc_pkt_count[7][0]| — |
|0x103C|vc_pkt_count[7][1]| — |
|0x2000| empty_addrmap |Empty addrmap with unsupported node.|

### chip_id_reg register
Expand Down Expand Up @@ -983,7 +983,7 @@ how RDL can be utilized in various situations.</p>

|Offset|Identifier|Name|
|------|----------|----|
| 0x0 | regs[1] | — |
| 0x0 | regs[0] | — |

### regs register

Expand Down
48 changes: 24 additions & 24 deletions example/accelera_generic_example_depth_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@ how RDL can be utilized in various situations.</p>
|0x0010| myRegInst | — |
|0x0020| spi4_pkt_count | — |
|0x0024|gige_pkt_count_reg| — |
|0x0100| fifo_port[8] | — |
|0x0110| fifo_port[8] | — |
|0x0120| fifo_port[8] | — |
|0x0130| fifo_port[8] | — |
|0x0140| fifo_port[8] | — |
|0x0150| fifo_port[8] | — |
|0x0160| fifo_port[8] | — |
|0x0170| fifo_port[8] | — |
|0x1000|vc_pkt_count[8][2]| — |
|0x1004|vc_pkt_count[8][2]| — |
|0x1008|vc_pkt_count[8][2]| — |
|0x100C|vc_pkt_count[8][2]| — |
|0x1010|vc_pkt_count[8][2]| — |
|0x1014|vc_pkt_count[8][2]| — |
|0x1018|vc_pkt_count[8][2]| — |
|0x101C|vc_pkt_count[8][2]| — |
|0x1020|vc_pkt_count[8][2]| — |
|0x1024|vc_pkt_count[8][2]| — |
|0x1028|vc_pkt_count[8][2]| — |
|0x102C|vc_pkt_count[8][2]| — |
|0x1030|vc_pkt_count[8][2]| — |
|0x1034|vc_pkt_count[8][2]| — |
|0x1038|vc_pkt_count[8][2]| — |
|0x103C|vc_pkt_count[8][2]| — |
|0x0100| fifo_port[0] | — |
|0x0110| fifo_port[1] | — |
|0x0120| fifo_port[2] | — |
|0x0130| fifo_port[3] | — |
|0x0140| fifo_port[4] | — |
|0x0150| fifo_port[5] | — |
|0x0160| fifo_port[6] | — |
|0x0170| fifo_port[7] | — |
|0x1000|vc_pkt_count[0][0]| — |
|0x1004|vc_pkt_count[0][1]| — |
|0x1008|vc_pkt_count[1][0]| — |
|0x100C|vc_pkt_count[1][1]| — |
|0x1010|vc_pkt_count[2][0]| — |
|0x1014|vc_pkt_count[2][1]| — |
|0x1018|vc_pkt_count[3][0]| — |
|0x101C|vc_pkt_count[3][1]| — |
|0x1020|vc_pkt_count[4][0]| — |
|0x1024|vc_pkt_count[4][1]| — |
|0x1028|vc_pkt_count[5][0]| — |
|0x102C|vc_pkt_count[5][1]| — |
|0x1030|vc_pkt_count[6][0]| — |
|0x1034|vc_pkt_count[6][1]| — |
|0x1038|vc_pkt_count[7][0]| — |
|0x103C|vc_pkt_count[7][1]| — |
|0x2000| empty_addrmap |Empty addrmap with unsupported node.|
4 changes: 2 additions & 2 deletions src/peakrdl_markdown/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def _addrnode_table_row(
offset = node.address_offset
identifier = node.inst_name
if node.is_array:
assert node.array_dimensions is not None
identifier += "".join(f"[{dim}]" for dim in node.array_dimensions)
assert node.current_idx is not None
identifier += "".join(f"[{idx}]" for idx in node.current_idx)
name = self._node_name_sanitized(node)

table_row: "OrderedDict[str, Union[str, int]]" = OrderedDict()
Expand Down