Skip to content

Commit

Permalink
examples/stripes: handle reset on vsync posedge
Browse files Browse the repository at this point in the history
  • Loading branch information
proppy authored and urish committed May 31, 2024
1 parent e47c69b commit 0a4f977
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/examples/stripes/project.v
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ module tt_um_vga_example(
assign G = video_active ? {moving_x[6], pix_y[2]} : 2'b00;
assign B = video_active ? {moving_x[7], pix_y[5]} : 2'b00;

always @(posedge clk) begin
always @(posedge vsync) begin
if (~rst_n) begin
counter <= 0;
end else begin
counter <= counter + 1;
end
end

always @(posedge vsync) begin
counter <= counter + 1;
end

endmodule

0 comments on commit 0a4f977

Please sign in to comment.