soc/do_finalize: check that crg.rst is a Signal before connecting to ctrl._reset.

This commit is contained in:
Florent Kermarrec 2021-01-26 17:08:35 +01:00
parent cafe0944f1
commit 2f89e0aecf
1 changed files with 2 additions and 1 deletions

View File

@ -939,6 +939,7 @@ class SoC(Module):
# Connect SoCController's reset to CRG's reset if presents.
if hasattr(self, "ctrl") and hasattr(self, "crg"):
if hasattr(self.ctrl, "_reset") and hasattr(self.crg, "rst"):
if isinstance(self.crg.rst, Signal):
self.comb += self.crg.rst.eq(self.ctrl._reset.re)
# SoC CSR bridge ---------------------------------------------------------------------------