2

It has some error in my code, but I can't find anything wrong with my code. EDA Playground says:

Execution interrupted or reached maximum runtime.

Here is my code:

forever #5 clk = ~clk;

toolic
  • 57,801
  • 17
  • 75
  • 117

1 Answers1

3

Your testbench includes these lines:

forever
#5 clk = ~clk;

This code will keep executing forever. (The clue is in the syntax.) Therefore, your simulation will never stop. EDA Playground's maximum run time is 1 minute, so your simulation is killed after that. Hence your error message.

You need to stop this code executing when you are finished with it. You need something like this:

  reg clk, clear, go;

  ...

  initial 
  begin  
    go = 1'b1;
    ...
    while (go)
    #5 clk = ~clk;
  end

  initial begin
    $dumpfile("systolic_array1.vcd");
    $dumpvars(1,systolic_array);
    #10
    ...
    go = 1'b0;
  end

https://www.edaplayground.com/x/4BCg

Matthew Taylor
  • 13,365
  • 3
  • 17
  • 44