2

When trying to get the Clock waveform to display in EDA Playground I get the error

Execution interrupted or reached maximum runtime.

How do I get the wave form to show?

Code on EDA Playground:

module test;
  reg clk;
  
  initial 
    begin
      $dumpfile("dump.vcd");
      $dumpvars(1);
      clk=0;
    end
  
  always
    begin
      #1 clk<=~clk;
    end
  
endmodule
toolic
  • 57,801
  • 17
  • 75
  • 117
Abhi
  • 31
  • 3

1 Answers1

3

There was no $finish so as the sim ran indefinitely and was killed by the server. Adding #100 $finish; to your main test program would give you 50 clocks example on EDA Playground.

module test;
  reg clk;

  initial 
    begin
      $dumpfile("dump.vcd");
      $dumpvars(1);
      clk=0;
      #100 $finish; //<-- End simulation
    end

  always
    begin
      #1 clk<=~clk;
    end

endmodule
Morgan
  • 19,934
  • 8
  • 58
  • 84