Commit 73dbffe8 authored by Florent Kermarrec's avatar Florent Kermarrec

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

parent 408d3f1f
......@@ -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)
# # #
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment