data/full_repos/permissive/48330045/test/tb_button_debounce.v
1: b'%Error: data/full_repos/permissive/48330045/test/tb_button_debounce.v:1: Cannot find include file: ../rtl/button_debounce.v\n`include "../rtl/button_debounce.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/48330045/test,data/full_repos/permissive/48330045/../rtl/button_debounce.v\n             data/full_repos/permissive/48330045/test,data/full_repos/permissive/48330045/../rtl/button_debounce.v.v\n             data/full_repos/permissive/48330045/test,data/full_repos/permissive/48330045/../rtl/button_debounce.v.sv\n             ../rtl/button_debounce.v\n             ../rtl/button_debounce.v.v\n             ../rtl/button_debounce.v.sv\n             obj_dir/../rtl/button_debounce.v\n             obj_dir/../rtl/button_debounce.v.v\n             obj_dir/../rtl/button_debounce.v.sv\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:28: Unsupported: Ignoring delay on this delayed statement.\nalways #(CLK_PERIOD/2) clk = ~clk;\n       ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/48330045/test/tb_button_debounce.v:31: Unsupported or unknown PLI call: $dumpfile\n  $dumpfile("tb_button_debounce.vcd");\n  ^~~~~~~~~\n%Error: data/full_repos/permissive/48330045/test/tb_button_debounce.v:32: Unsupported or unknown PLI call: $dumpvars\n  $dumpvars(0, tb_button_debounce);\n  ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:33: Unsupported: Ignoring delay on this delayed statement.\n  #1 rst_n=1\'bx;clk=1\'bx;btn_in=1\'bx;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:34: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD) rst_n=1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:35: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD) rst_n=0;clk=0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:36: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD) rst_n=1;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:37: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD) btn_in=0;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:38: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD*50);\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:43: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD*10)  btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:44: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:45: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:46: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:47: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:48: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:49: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:50: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Warning-STMTDLY: data/full_repos/permissive/48330045/test/tb_button_debounce.v:51: Unsupported: Ignoring delay on this delayed statement.\n  #(CLK_PERIOD/100) btn_in=~btn_in;\n  ^\n%Error: Exiting due to 3 error(s), 16 warning(s)\n'
module tb_button_debounce;

parameter CLK_FREQ    = 1_000;
parameter DEBOUNCE_HZ = 40;

reg  clk;
reg  rst_n;
reg  btn_in;
wire btn_out;

button_debounce
#(
  .CLK_FREQ(CLK_FREQ),
  .DEBOUNCE_HZ(DEBOUNCE_HZ)
) _button_debounce
(
  .clk     ( clk     ),
  .rst_n   ( rst_n   ),
  .btn_in  ( btn_in  ),
  .btn_out ( btn_out )
);

parameter CLK_PERIOD = 10.0;
always #(CLK_PERIOD/2) clk = ~clk;

initial begin
  $dumpfile("tb_button_debounce.vcd");
  $dumpvars(0, tb_button_debounce);
  #1 rst_n=1'bx;clk=1'bx;btn_in=1'bx;
  #(CLK_PERIOD) rst_n=1;
  #(CLK_PERIOD) rst_n=0;clk=0;
  #(CLK_PERIOD) rst_n=1;
  #(CLK_PERIOD) btn_in=0;
  #(CLK_PERIOD*50);
  $finish(2);
end

always begin
  #(CLK_PERIOD*10)  btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
end

endmodule
module tb_button_debounce;


parameter CLK_FREQ    = 1_000;
parameter DEBOUNCE_HZ = 40;

reg  clk;
reg  rst_n;
reg  btn_in;
wire btn_out;

button_debounce
#(
  .CLK_FREQ(CLK_FREQ),
  .DEBOUNCE_HZ(DEBOUNCE_HZ)
) _button_debounce
(
  .clk     ( clk     ),
  .rst_n   ( rst_n   ),
  .btn_in  ( btn_in  ),
  .btn_out ( btn_out )
);

parameter CLK_PERIOD = 10.0;
always #(CLK_PERIOD/2) clk = ~clk;

initial begin
  $dumpfile("tb_button_debounce.vcd");
  $dumpvars(0, tb_button_debounce);
  #1 rst_n=1'bx;clk=1'bx;btn_in=1'bx;
  #(CLK_PERIOD) rst_n=1;
  #(CLK_PERIOD) rst_n=0;clk=0;
  #(CLK_PERIOD) rst_n=1;
  #(CLK_PERIOD) btn_in=0;
  #(CLK_PERIOD*50);
  $finish(2);
end

always begin
  #(CLK_PERIOD*10)  btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
  #(CLK_PERIOD/100) btn_in=~btn_in;
end

endmodule