mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc/cores/clock: allow ClockSignal to be used for clkin
This commit is contained in:
parent
387ee04130
commit
1b23890e0d
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue