From: Sebastien Bourdeauducq Date: Fri, 21 Nov 2014 22:51:05 +0000 (-0800) Subject: fhdl/tools: do not attempt to rename sync clock domain if it does not exist X-Git-Tag: 24jan2021_ls180~2099^2~261 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5801e5746b637194bce6517e9bffb9c01da761c0;p=litex.git fhdl/tools: do not attempt to rename sync clock domain if it does not exist --- diff --git a/migen/fhdl/tools.py b/migen/fhdl/tools.py index 6596b30c..ed74ab0e 100644 --- a/migen/fhdl/tools.py +++ b/migen/fhdl/tools.py @@ -233,11 +233,12 @@ def rename_clock_domain_expr(f, old, new): def rename_clock_domain(f, old, new): rename_clock_domain_expr(f, old, new) - if new in f.sync: - f.sync[new].extend(f.sync[old]) - else: - f.sync[new] = f.sync[old] - del f.sync[old] + if old in f.sync: + if new in f.sync: + f.sync[new].extend(f.sync[old]) + else: + f.sync[new] = f.sync[old] + del f.sync[old] for special in f.specials: special.rename_clock_domain(old, new) try: