data/full_repos/permissive/168234415/A6_Processor_Hardware_Validation/Lab 6 Materials/basys3_single_cycle_mips_validation/button_debouncer.v
1: b'%Error: Cannot find file containing module: 6\n        ... Looked in:\n             data/full_repos/permissive/168234415/A6_Processor_Hardware_Validation/Lab/6\n             data/full_repos/permissive/168234415/A6_Processor_Hardware_Validation/Lab/6.v\n             data/full_repos/permissive/168234415/A6_Processor_Hardware_Validation/Lab/6.sv\n             6\n             6.v\n             6.sv\n             obj_dir/6\n             obj_dir/6.v\n             obj_dir/6.sv\n%Error: Cannot find file containing module: Materials/basys3_single_cycle_mips_validation,data/full_repos/permissive/168234415\n%Error: Cannot find file containing module: data/full_repos/permissive/168234415/A6_Processor_Hardware_Validation/Lab\n%Error: Cannot find file containing module: Materials/basys3_single_cycle_mips_validation/button_debouncer.v\n%Error: Exiting due to 4 error(s)\n'
module button_debouncer #(parameter depth = 16) (
        input  wire clk,
        input  wire button,
        output reg  debounced_button
    );
    
    localparam history_max = (2**depth)-1;


    reg [depth-1:0] history;

    always @ (posedge clk) begin

        history <= { button, history[depth-1:1] };
        

        debounced_button <= (history == history_max) ? 1'b1 : 1'b0;
    end
    
endmodule
module button_debouncer #(parameter depth = 16) (
        input  wire clk,
        input  wire button,
        output reg  debounced_button
    );

    
    localparam history_max = (2**depth)-1;


    reg [depth-1:0] history;

    always @ (posedge clk) begin

        history <= { button, history[depth-1:1] };
        

        debounced_button <= (history == history_max) ? 1'b1 : 1'b0;
    end
    
endmodule