data/full_repos/permissive/458935738/common/edge_detectors.v
1: b'%Warning-MULTITOP: data/full_repos/permissive/458935738/common/edge_detectors.v:18: Multiple top level modules\n                                                                                  : ... Suggest see manual; fix the duplicates, or use --top-module to select top.\n                   ... Use "/* verilator lint_off MULTITOP */" and lint_on around source to disable this message.\n                                                                                  : ... Top module \'rising\'\nmodule rising (\n       ^~~~~~\n                                                                                  : ... Top module \'falling\'\nmodule falling (\n       ^~~~~~~\n                                                                                  : ... Top module \'debouncer\'\nmodule debouncer (\n       ^~~~~~~~~\n%Error: Exiting due to 1 warning(s)\n'
module debouncer (
    input clk,
    input signal,
    output reg stable
);

    parameter delay = 32'd16;

    reg [31:0] counter;

    always @(posedge clk) begin
        counter <= (signal == stable) ? 32'd0 : (counter + 32'd1);
        stable <= (counter >= delay) ? signal : stable;
    end

endmodule
module debouncer (
    input clk,
    input signal,
    output reg stable
);


    parameter delay = 32'd16;

    reg [31:0] counter;

    always @(posedge clk) begin
        counter <= (signal == stable) ? 32'd0 : (counter + 32'd1);
        stable <= (counter >= delay) ? signal : stable;
    end

endmodule