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):
|
class FrequencyMeter(Module, AutoCSR):
|
||||||
def __init__(self, period, width=6):
|
def __init__(self, period, width=6, clk=None):
|
||||||
self.clk = Signal()
|
self.clk = Signal() if clk is None else clk
|
||||||
self.value = CSRStatus(32)
|
self.value = CSRStatus(32)
|
||||||
|
|
||||||
# # #
|
# # #
|
||||||
|
|
Loading…
Reference in New Issue