diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-05 17:34:22 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-05 17:38:27 -0600 |
| commit | 081a8a3ba8bfe036f31da53f9c041a2caa30fce2 (patch) | |
| tree | 7d712b67d3dc1ad3d37041562774ba3c4e5a7f49 /rtl/legacy_gfx/gfx_persp_vertex.sv | |
| parent | e5b64ea353678baabd16d245fcfaa3384e1acf8f (diff) | |
rtl/legacy_gfx: rename gfx -> legacy_gfx
Diffstat (limited to 'rtl/legacy_gfx/gfx_persp_vertex.sv')
| -rw-r--r-- | rtl/legacy_gfx/gfx_persp_vertex.sv | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/rtl/legacy_gfx/gfx_persp_vertex.sv b/rtl/legacy_gfx/gfx_persp_vertex.sv new file mode 100644 index 0000000..f7434f0 --- /dev/null +++ b/rtl/legacy_gfx/gfx_persp_vertex.sv @@ -0,0 +1,52 @@ +`include "gfx/gfx_defs.sv" + +module gfx_persp_vertex +( + input logic clk, + + input raster_xyzw in_vertex, + input logic stall, + + output raster_xyzw out_vertex +); + + raster_xyzw skid_vertex; + + gfx_fixed_div x_div + ( + .z(in_vertex.xy.x), + .d(in_vertex.zw.w), + .q(skid_vertex.xy.x), + .* + ); + + gfx_fixed_div y_div + ( + .z(in_vertex.xy.y), + .d(in_vertex.zw.w), + .q(skid_vertex.xy.y), + .* + ); + + gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(`FIXED_DIV_STAGES)) z_pipes + ( + .in(in_vertex.zw.z), + .out(skid_vertex.zw.z), + .* + ); + + gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(`FIXED_DIV_STAGES)) w_pipes + ( + .in(in_vertex.zw.w), + .out(skid_vertex.zw.w), + .* + ); + + gfx_skid_buf #(.WIDTH($bits(out_vertex))) vertex_skid + ( + .in(skid_vertex), + .out(out_vertex), + .* + ); + +endmodule |
