I am trying to verify a flash-based design using Cocotb (a Python-based framework) which I am new to it. I have always used verilog, SystemVerilog in the past. I am trying to generate the clock for a testbench.
I have tried going through the documentation. I see in the cocotb website where they have a clock class. I also see that I can use,something like, cocotb.fork(clock(dut.clk,5000).start())
to generate the clock.
def directed_test(dut):
cocotb.fork(Clock(dut.clk, 1000).start())
Is that all I need to do to generate a clock? The class Clock available on the cocotb documentation, should I simply import it and generate the clock by writing a statement as above inside a coroutine ?
Any help is much appreciated.
Learner.