Skip to content

Pixel output 0#4

Open
ipburbank wants to merge 8 commits into
masterfrom
pixel_output-0
Open

Pixel output 0#4
ipburbank wants to merge 8 commits into
masterfrom
pixel_output-0

Conversation

@ipburbank
Copy link
Copy Markdown
Owner

Just take a look at that pixel output logic commit, the other one is machine generated.

Copy link
Copy Markdown
Collaborator

@majorbonghits420 majorbonghits420 left a comment

Choose a reason for hiding this comment

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

Maybe it is away somewhere, but I also can't see where CLOCK_PIXEL is set. Fix you variable names since I talked to you about. Fix overflow issues.

Comment thread src/RasterLaserProjector.v Outdated

// laser output
reg [1:0] laser_intensity;
reg [8:0] pixel_column; // what pixel we are projecting now
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fix comment, just the column of the pixel does not indicate what pixel is being projected, just the column of it.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in e2ed7a3

Comment thread src/RasterLaserProjector.v Outdated
// keep track of prev y axis position so we can reset the x axis when y axis changes lines
reg [7:0] y_axis_position_prev;
always @(posedge CLOCK_PIXEL)
y_axis_position_prev <= y_axis_position_prev;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why are you setting a thing to itself?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Comment thread src/RasterLaserProjector.v Outdated
if (reset) begin
pixel_column <= 0;
end
else if (y_axis_position_prev != y_axis_position_prev) begin
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will never be true?
I assume something will always be equal to itself

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Comment thread src/RasterLaserProjector.v Outdated

// assign the address and receive the pixel.
// The pixel will be two cycles delayed, but that is OK.
assign framebuffer_address = (y_axis_position * 640) + pixel_column;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will always overflow.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

what overflows?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wait nevermind, I'm not sure how large framebuffer_address, I assume it is large enough
Thought something was wrong because 640 is more than y_axis_position can hold, but multiplication should(?) still work
Though note that this will only get up the bottom [OUR_ROWS, OUR_COLS] of the framebuffer it looks like

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

yeah I think its all good size wise. what is get up the bottom?


always @(posedge CLOCK_PIXEL or posedge reset) begin
if (reset) begin
pixel_column <= 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also want to reset y_axis_position?

Copy link
Copy Markdown
Owner Author

@ipburbank ipburbank Apr 18, 2017

Choose a reason for hiding this comment

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

thats in the above state machine (line 359 at the time of authoring)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But it is on a different clock

Comment thread src/RasterLaserProjector.v Outdated
// assign the address and receive the pixel.
// The pixel will be two cycles delayed, but that is OK.
assign framebuffer_address = (y_axis_position * 640) + pixel_column;
assign laser_intensity = (y_axis_state == y_axis_state_return) ? 0 : // blank on reset
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We probably want it to be off in the reset state too

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

2 participants