video: align hsync and vsync generated by the vtg
This commit is contained in:
parent
26c44af3f7
commit
25152fe4de
|
@ -244,18 +244,20 @@ class VideoTimingGenerator(Module, AutoCSR):
|
||||||
# Generate HActive / HSync.
|
# Generate HActive / HSync.
|
||||||
If(source.hcount == 0, NextValue(hactive, 1)), # Start of HActive.
|
If(source.hcount == 0, NextValue(hactive, 1)), # Start of HActive.
|
||||||
If(source.hcount == hres, NextValue(hactive, 0)), # End of HActive.
|
If(source.hcount == hres, NextValue(hactive, 0)), # End of HActive.
|
||||||
If(source.hcount == hsync_start, NextValue(source.hsync, 1)), # Start of HSync.
|
If(source.hcount == hsync_start,
|
||||||
|
NextValue(source.hsync, 1), # Start of HSync.
|
||||||
|
NextValue(source.vsync, 1), # Start of VSync.
|
||||||
|
NextValue(source.vcount, vsync_start)
|
||||||
|
),
|
||||||
If(source.hcount == hsync_end, NextValue(source.hsync, 0)), # End of HSync.
|
If(source.hcount == hsync_end, NextValue(source.hsync, 0)), # End of HSync.
|
||||||
|
If(source.hcount == hscan, NextValue(source.hcount, 0)), # Reset HCount.
|
||||||
# End of HScan.
|
# End of HScan.
|
||||||
If(source.hcount == hscan,
|
If(source.hcount == hsync_start,
|
||||||
# Reset HCount.
|
|
||||||
NextValue(source.hcount, 0),
|
|
||||||
# Increment VCount.
|
# Increment VCount.
|
||||||
NextValue(source.vcount, source.vcount + 1),
|
NextValue(source.vcount, source.vcount + 1),
|
||||||
# Generate VActive / VSync.
|
# Generate VActive / VSync.
|
||||||
If(source.vcount == 0, NextValue(vactive, 1)), # Start of VActive.
|
If(source.vcount == 0, NextValue(vactive, 1)), # Start of VActive.
|
||||||
If(source.vcount == vres, NextValue(vactive, 0)), # End of HActive.
|
If(source.vcount == vres, NextValue(vactive, 0)), # End of HActive.
|
||||||
If(source.vcount == vsync_start, NextValue(source.vsync, 1)), # Start of VSync.
|
|
||||||
If(source.vcount == vsync_end, NextValue(source.vsync, 0)), # End of VSync.
|
If(source.vcount == vsync_end, NextValue(source.vsync, 0)), # End of VSync.
|
||||||
# End of VScan.
|
# End of VScan.
|
||||||
If(source.vcount == vscan,
|
If(source.vcount == vscan,
|
||||||
|
|
Loading…
Reference in New Issue