Hi, all
I have to use multiple clocks in my simulation, for example clk_1Mhz, clk_2Mhz. how should I generate these three clock in top module?
initial begin
clk_2Mhz = 1'b0;
forever begin
#0.5us clk_2Mhz = ~clk_2Mhz;
// or use this: #0.5us clk_2Mhz <= ~clk_2Mhz;
end // forever
end // initial
and for the other one, which puzzled me a lot, seems caused cdc problem
initial begin
clk_1Mhz = 1'b0;
forever begin
#1us clk_1Mhz = ~clk_1Mhz;
// or use this: #1us clk_1Mhz <= ~clk_1Mhz;
// or use this: @(posedge clk_2Mhz) clk_1Mhz <= ~clk_1Mhz;
end // forever
end // initial