Open
Description
I hate repeating strings, because typos happen. And with the global-by-default of clock domains, typos can hit something existing. So it would be nice that where a DomainRenamer takes the name of an existing domain, it can alternatively take a ClockDomain object.
That's probably a valid request for ClockSignal/ResetSignal too.
Activity
whitequark commentedon Mar 7, 2023
If you have the domain, you don't need
ClockSignal
, since you can usecd.clk
.galibert commentedon Mar 7, 2023
Ah nice, is cd.reset available too?
whitequark commentedon Mar 7, 2023
Yes. Also, now that I think about it: can you use
cd.name
instead of passingcd
directly toDomainRenamer
?DomainRenamer
is often used in cases where you don't have the clock domain yet, which is why it takes a name.galibert commentedon Mar 7, 2023
Oh sure, I can do that. In my case I create the domains and a pll which generates their clocks, then rename then as sync for a couple of submodules (hdmi video and audio).