Skip to content

Conversation

@JayR-360
Copy link

No description provided.

Implement VGA timing module with pixel clock generation and coordinate tracking.
@@ -1,0 +1,57 @@
`timescale 1ns / 1ps
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compatibility Fix: Avoid adding "timescale" in commits to ensure all simulators process SV files correctly

Deleted 'timescale' line to ensure file was compatible with all simulators
@@ -1,0 +1,56 @@
module VGA_timing(
input clk,
input reset,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistic Error:
"clk" -> "clk_i"
"reset" -> "rst_ni" (Use low reset for consistency with other files)

Copy link
Collaborator

@Meowcaroni Meowcaroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JayR-360 I erased the "timescale" line since not all simulators use that keyword the same. Please add comments to your code (+ add description to PR) and review any comments that I made. After that, the PR (pull request) should be ready to fulfill.

(P.S. Add one-pager if available)

Refactor VGA timing module to add position tracking and improve reset handling.

Also handled changes listed in comments
@JayR-360 JayR-360 dismissed Meowcaroni’s stale review November 23, 2025 23:42

resolved items listed in comments

Added documentation for VGA timing module including parameters, interfaces, behavior, and dependencies.
Copy link
Author

@JayR-360 JayR-360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review for merge

Comment on lines +36 to +48
initial begin
counter = 0;
end

always@ (posedge clk_i) begin
if (counter == 2'd2) begin
pixel_clk <= ~pixel_clk;
counter <= 0;
end
else begin
counter <= counter + 1;
end
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality Issue: For the counter, initial blocks usually are not synthesizable and reset signals are preferred. For the internal clock pixel_clk, you need to have an initial value or simulations won't have a definite signal (1 or 0) to show it as. Please use a reset signal instead as follows:

always @(posedge clk_i or negedge rst_ni) begin
    if (!rst_ni) begin
        pixel_clk <= 0;
        counter <= 0;
    end
    // Rest of logic goes here
end

Comment on lines +59 to +64
always@ (posedge pixel_clk) begin
if (rst_ni) begin
x <= 0;
y <= 0;
active_video <= 0;
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality Issue: To match other subsystems, please treat rst_ni as an asynchronous (independent of clock) reset (see previous comment for example).

Copy link
Collaborator

@Meowcaroni Meowcaroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far, just need to fix some basic functionality issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants