data/full_repos/permissive/515264683/vending_machine_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/515264683/vending_machine_tb.v:18: Unsupported: Ignoring delay on this delayed statement.\n   forever #(T/2) clk = ~clk;\n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/515264683/vending_machine_tb.v:26: Unsupported: Ignoring delay on this delayed statement.\n #T;\n ^\n%Warning-STMTDLY: data/full_repos/permissive/515264683/vending_machine_tb.v:35: Unsupported: Ignoring delay on this delayed statement.\n #T;\n ^\n%Error: data/full_repos/permissive/515264683/vending_machine_tb.v:45: syntax error, unexpected \'@\'\n    @(negedge clk);\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/515264683/vending_machine_tb.v:56: Unsupported: Ignoring delay on this delayed statement.\n   #T;\n   ^\n%Error: data/full_repos/permissive/515264683/vending_machine_tb.v:59: Unsupported or unknown PLI call: $monitor\ninitial $monitor($time,"rst=%b,clk=%b,coin=%b,product=%b,change=%b",rst,clk,coin,product,change);\n        ^~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/515264683/vending_machine_tb.v:60: Unsupported: Ignoring delay on this delayed statement.\ninitial #200 $finish;\n        ^\n%Error: Exiting due to 2 error(s), 5 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module vending_machine_tb();

reg clk,rst;
reg [1:0]coin;
wire product,change;

parameter IDLE = 2'b00,
            S1 = 2'b01,
            S2 = 2'b10,
			T  = 10;
			
vending_machine DUT(clk,rst,coin,product,change);

initial 
  begin
   clk = 1'b0;  

   forever #(T/2) clk = ~clk;

 end
  

task initialise;
  begin
	coin = 2'b00;
	#T;
  end
endtask



task reset;
  begin
    rst = 1'b1;
	#T;

    rst = 1'b0;
  end
endtask			



task stimulus(input [1:0]p);
  begin
    @(negedge clk);
	coin = p;
  end
endtask

initial
 begin
 initialise;
 reset;
  repeat(12)
   stimulus({$random}%4); 
   #T;
 end
 
initial $monitor($time,"rst=%b,clk=%b,coin=%b,product=%b,change=%b",rst,clk,coin,product,change);
initial #200 $finish;

endmodule
module vending_machine_tb();


reg clk,rst;
reg [1:0]coin;
wire product,change;

parameter IDLE = 2'b00,
            S1 = 2'b01,
            S2 = 2'b10,
			T  = 10;
			
vending_machine DUT(clk,rst,coin,product,change);

initial 
  begin
   clk = 1'b0;  

   forever #(T/2) clk = ~clk;

 end
  

task initialise;
  begin
	coin = 2'b00;
	#T;
  end
endtask



task reset;
  begin
    rst = 1'b1;
	#T;

    rst = 1'b0;
  end
endtask			



task stimulus(input [1:0]p);
  begin
    @(negedge clk);
	coin = p;
  end
endtask

initial
 begin
 initialise;
 reset;
  repeat(12)
   stimulus({$random}%4); 
   #T;
 end
 
initial $monitor($time,"rst=%b,clk=%b,coin=%b,product=%b,change=%b",rst,clk,coin,product,change);
initial #200 $finish;

endmodule