Skip to main content
Post Reopened by Cody Gray
added 95 characters in body
Source Link
Cody Gray
  • 246.3k
  • 53
  • 514
  • 591

I need 2 clocks running at different frequencies. I tried:

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

With this code, clk2 will generate after clk1 is done, but they wontwon't generate at the same time. Is there anyway

How can I write the Verilog code to make it workensure that the two clocks (clk1 and clk2) will generate at the same time?

I need 2 clocks running at different frequencies. I tried:

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

clk2 will generate after clk1 is done, but they wont generate at the same time. Is there anyway to make it work?

I need 2 clocks running at different frequencies. I tried:

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

With this code, clk2 will generate after clk1 is done, but they won't generate at the same time.

How can I write the Verilog code to ensure that the two clocks (clk1 and clk2) will generate at the same time?

deleted 4 characters in body; edited title
Source Link
toolic
  • 63.2k
  • 21
  • 81
  • 130

how could How can I generate 2 clocks in testbench with systemverilog?

I need 2 clock working withclocks running at different frequencyfrequencies.

but if I wrote like I tried:

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

clk2clk2 will generate after clk1clk1 is done, but they wont generate at the same time. is Is there anyway to make it work?

how could I generate 2 clocks in testbench with systemverilog

I need 2 clock working with different frequency.

but if I wrote like

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

clk2 will generate after clk1 is done, they wont generate at the same time. is there anyway to make it work?

How can I generate 2 clocks in testbench with systemverilog?

I need 2 clocks running at different frequencies. I tried:

forever
begin
 #5ns clk1=~clk1;
 #4ns clk2=~clk2;
end

clk2 will generate after clk1 is done, but they wont generate at the same time. Is there anyway to make it work?

Post Closed as "Not suitable for this site" by Josh Darnell, Mario S, Matt Bryant, Salvador Dali, user1118321
edited tags
Link
toolic
  • 63.2k
  • 21
  • 81
  • 130
added 22 characters in body
Source Link
toolic
  • 63.2k
  • 21
  • 81
  • 130
Loading
Source Link
Loading