Fix status checks: lint, format, typecheck, and tests (#8)

* Initial plan

* Initial assessment - identifying issues to fix

Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>

* Fix type check and test issues to pass all status checks

Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>

* Add coverage.xml to .gitignore and remove from tracking

Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>

* Use more specific pattern for coverage.xml in .gitignore

Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arnavsacheti <36746504+arnavsacheti@users.noreply.github.com>
This commit is contained in:
Copilot
2025-10-23 23:22:09 -07:00
committed by GitHub
parent 26a69a2286
commit 8cfd2a86c1
10 changed files with 21 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
from collections import deque
from enum import Enum
from typing import cast
from systemrdl.node import AddressableNode
from systemrdl.walker import WalkerAction
@@ -101,7 +102,8 @@ class DecodeLogicGenerator(BusDecoderListener):
self._decode_stack.append(IfBody())
elif isinstance(self._decode_stack[-1], IfBody):
# non-arrayed component with if-body
with self._decode_stack[-1].cm(condition) as b:
ifb = cast(IfBody, self._decode_stack[-1])
with ifb.cm(condition) as b:
b += f"{self._flavor.cpuif_select}.{get_indexed_path(self._ds.top_node, node)} = 1'b1;"
else:
raise RuntimeError("Invalid decode stack state")
@@ -128,7 +130,8 @@ class DecodeLogicGenerator(BusDecoderListener):
continue
if isinstance(self._decode_stack[-1], IfBody):
with self._decode_stack[-1].cm(self._cond_stack.pop()) as parent_b:
ifb = cast(IfBody, self._decode_stack[-1])
with ifb.cm(self._cond_stack.pop()) as parent_b:
parent_b += b
else:
self._decode_stack[-1] += b