cores/frequency_meter: allow passing clk to be measured as a parameter
This commit is contained in:
parent
408d3f1f7c
commit
73dbffe8f2
|
@ -32,8 +32,8 @@ class Sampler(Module):
|
|||
|
||||
|
||||
class FrequencyMeter(Module, AutoCSR):
|
||||
def __init__(self, period, width=6):
|
||||
self.clk = Signal()
|
||||
def __init__(self, period, width=6, clk=None):
|
||||
self.clk = Signal() if clk is None else clk
|
||||
self.value = CSRStatus(32)
|
||||
|
||||
# # #
|
||||
|
|
Loading…
Reference in New Issue