module vsync(
    input clk,
    input line_clk,
    output reg [15:0] v_val = 0
    );
    
    always @(posedge line_clk)
    begin
        if (v_val == 525) v_val = 0;
        else v_val = v_val + 1;
    end
endmodule