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;

0

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

another way is to use $finish. initial #10000 $finish;

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.