Closed jburks closed 1 year ago
After more debug, this happens on every line 0-10, possibly 11 and 12 also. It appears to be due to the y counter in the composer being 9 bits instead of the 10 needed to count all 525 lines of the frame. Fixing this line in composer.v might solve the issue:
reg [8:0] y_counter_r, y_counter_rr;
It appears that around the rollover point from line 511 to line 512, there is an opportunity for the IRQ signal to glitch and generate an interrupt in the middle of the back porch, ahead of line 0.
As seen in the above sequence of images, the unexpected line IRQ happens at roughly line 480 + 10 + 2 + 20 = 512. This erroneous IRQ appears to happen during every frame while a line IRQ is set for line 0.
It isn't obvious to me why this is happening.
y_counter
andline_irq
are both registers in composer.v; they should be safe. Needs further investigation.