data/full_repos/permissive/445737817/btn_led.v
data/verilator_xmls/f31fb7dd-9d9e-45d8-bb61-d7b5e2ebb055.xml
module toggle_led (
    input sysclk,
    input [1:0]btn,
    output [1:0]led
);

    reg btn_aligned;
    reg led_state;
    reg toggle_flag;

    always @ (posedge sysclk) begin
        btn_aligned <= btn[0];

        toggle_flag <= btn[0] & ~btn_aligned;
        if (toggle_flag) begin

            led_state <= ~led_state;
        end
    end


    assign led[0] = led_state;
endmodule
module toggle_led (
    input sysclk,
    input [1:0]btn,
    output [1:0]led
);


    reg btn_aligned;
    reg led_state;
    reg toggle_flag;

    always @ (posedge sysclk) begin
        btn_aligned <= btn[0];

        toggle_flag <= btn[0] & ~btn_aligned;
        if (toggle_flag) begin

            led_state <= ~led_state;
        end
    end


    assign led[0] = led_state;
endmodule