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,7 +939,8 @@ 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"):
self.comb += self.crg.rst.eq(self.ctrl._reset.re)
if isinstance(self.crg.rst, Signal):
self.comb += self.crg.rst.eq(self.ctrl._reset.re)
# SoC CSR bridge ---------------------------------------------------------------------------
# FIXME: for now, use registered CSR bridge when SDRAM is present; find the best compromise.