You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(x,y) and (h,v) have both been replaced with (sx,sy).
The use of sx and sy is designed to make it easy to distinguish screen coordinates from world or model coordinates.
Copy file name to clipboardExpand all lines: doc/modules.md
+4-10Lines changed: 4 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ The display timings generator turns timing parameters into appropriately timed s
81
81
82
82
### Inputs
83
83
84
-
*`i_pixclk` - pixel clock
84
+
*`i_pix_clk` - pixel clock
85
85
*`i_rst` - reset (active high)
86
86
87
87
The pixel clock must be suitable for the timings given in the parameters (see display clocks, above).
@@ -92,19 +92,13 @@ The pixel clock must be suitable for the timings given in the parameters (see di
92
92
*`o_vs` - vertical sync
93
93
*`o_de` - display enable: high during active video
94
94
*`o_frame` - high for one tick at the start of each frame
95
-
*`o_h [15:0]` - horizontal beam position (including blanking)
96
-
*`o_v [15:0]` - vertical beam position (including blanking)
97
-
*`o_x [15:0]` - horizontal screen position (active pixels)
98
-
*`o_y [15:0]` - vertical screen position (active pixels)
95
+
*`o_sx [15:0]` - horizontal screen position (signed)
96
+
*`o_sy [15:0]` - vertical screen position (signed)
99
97
100
-
The positional outputs `(h,v)` and `(x,y)` allow you to determine the current pixel AKA "beam position". The values provided by `h` & `v `include the blanking interval, while `x` & `y` only include valid on-screen positions. For simple drawing or bitmap display you can use `(x,y)` and safely ignore `(h,v)`. However, if you're doing calculations in real time "racing the beam", then you'll want to perform actions in the blanking interval, which is where (h,v) comes in.
101
-
102
-
Project F considers blanking intervals to occur _before_ active pixels. At the start of a frame (indicated by the `o_frame` signal), you have the blanking intervals in which to work before active pixel drawing occurs. The following sketch this for 1280x720p60 (other resolutions work in the same way):
98
+
The current beam position is given by `(sx, sy)`. `sx` and `sy` are *signed* 16-bit values. When display enable (`o_de`) is high these values indicate the active drawing pixel and are always positive. During the blanking interval one or both of `sx` and `sy` will be negative. This allows you to prepare for drawing, e.g. if you have a two cycle latency to retrieve a pixel's colour you can request the data for the first pixel of a line when `sx == -2`.
103
99
104
100

105
101
106
-
NB. `x` and `y` are 0 during the blanking interval.
107
-
108
102
Horizontal and vertical sync may be active high or low depending on the display mode; this is controlled using the `H_POL` and `V_POL` parameters (below).
0 commit comments