From: Florent Kermarrec Date: Wed, 16 Jan 2019 21:05:52 +0000 (+0100) Subject: soc/cores/clock: allow ClockSignal to be used for clkin X-Git-Tag: 24jan2021_ls180~1408 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b23890e0d8022747061d805ac471e4ac73dc7b9;p=litex.git soc/cores/clock: allow ClockSignal to be used for clkin --- diff --git a/litex/soc/cores/clock.py b/litex/soc/cores/clock.py index a007bf74..44858447 100644 --- a/litex/soc/cores/clock.py +++ b/litex/soc/cores/clock.py @@ -33,7 +33,7 @@ class S7Clocking(Module, AutoCSR): def register_clkin(self, clkin, freq): self.clkin = Signal() - if isinstance(clkin, Signal): + if isinstance(clkin, (Signal, ClockSignal)): self.comb += self.clkin.eq(clkin) elif isinstance(clkin, Record): self.specials += DifferentialInput(clkin.p, clkin.n, self.clkin) @@ -224,7 +224,7 @@ class USClocking(Module, AutoCSR): def register_clkin(self, clkin, freq): self.clkin = Signal() - if isinstance(clkin, Signal): + if isinstance(clkin, (Signal, ClockSignal)): self.comb += self.clkin.eq(clkin) elif isinstance(clkin, Record): self.specials += DifferentialInput(clkin.p, clkin.n, self.clkin) @@ -413,7 +413,7 @@ class ECP5PLL(Module): assert freq >= clki_freq_min assert freq <= clki_freq_max self.clkin = Signal() - if isinstance(clkin, Signal): + if isinstance(clkin, (Signal, ClockSignal)): self.comb += self.clkin.eq(clkin) else: raise ValueError