cores/frequency_meter: allow passing clk to be measured as a parameter

This commit is contained in:
Florent Kermarrec 2019-06-20 09:02:08 +02:00
parent 408d3f1f7c
commit 73dbffe8f2
1 changed files with 2 additions and 2 deletions

View File

@ -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)
# # # # # #