Clock domain renaming should support new == old to allow programmatically determined clock domain renaming.
def rename_clock_domain(f, old, new):
rename_clock_domain_expr(f, old, new)
- 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]
+ if new != 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: