Skip to content

Commit

Permalink
Replace | dict operator with .update()
Browse files Browse the repository at this point in the history
This improves compatibility with Python 3.8

Internal-tag: [#53526]
Signed-off-by: Krzysztof Obłonczek <koblonczek@internships.antmicro.com>
  • Loading branch information
koblonczek committed Jan 9, 2024
1 parent 5e40dfd commit 5b466f7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fpga_topwrap/elaboratable_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ def get_ports_hier(self) -> SignalMapping:
"""Maps elaboratable's Signature to a nested dictionary of WrapperPorts.
See _gather_signature_ports for more details.
"""
return self._gather_signature_ports(self.elaboratable.signature) | {
"clk": self.clk,
"rst": self.rst,
}
ports = self._gather_signature_ports(self.elaboratable.signature)
ports.update(
{
"clk": self.clk,
"rst": self.rst,
}
)
return ports

@lru_cache(maxsize=None)
def _cached_wrapper(
Expand Down

0 comments on commit 5b466f7

Please sign in to comment.