summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_fix_floats.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-11-22 02:23:50 -0600
committerAlejandro Soto <alejandro@34project.org>2023-11-22 02:31:52 -0600
commit2aff861d026009e2783c51f72a54a4b9f92d3117 (patch)
treef39b3c2e48e9887dbab07cedd98ed26812dfa009 /rtl/gfx/gfx_fix_floats.sv
parent11231e7173d16415d45f809dc570cba0a2aae0cd (diff)
rtl/gfx: implement floating-point fix stage
Diffstat (limited to '')
-rw-r--r--rtl/gfx/gfx_fix_floats.sv49
1 files changed, 49 insertions, 0 deletions
diff --git a/rtl/gfx/gfx_fix_floats.sv b/rtl/gfx/gfx_fix_floats.sv
new file mode 100644
index 0000000..fe3ab21
--- /dev/null
+++ b/rtl/gfx/gfx_fix_floats.sv
@@ -0,0 +1,49 @@
+`include "gfx/gfx_defs.sv"
+
+module gfx_fix_floats
+(
+ input logic clk,
+ rst_n,
+
+ input vec4 in_vertex_a,
+ in_vertex_b,
+ in_vertex_c,
+ input logic in_valid,
+ output logic in_ready,
+
+ input logic out_ready,
+ output logic out_valid,
+ output raster_xyzw out_vertex_a,
+ out_vertex_b,
+ out_vertex_c
+);
+
+ logic stall;
+
+ gfx_pipeline_flow #(.STAGES(`FP_FIX_STAGES + 1)) flow
+ (
+ .*
+ );
+
+ gfx_fix_vertex fix_a
+ (
+ .in_vertex(in_vertex_a),
+ .out_vertex(out_vertex_a),
+ .*
+ );
+
+ gfx_fix_vertex fix_b
+ (
+ .in_vertex(in_vertex_b),
+ .out_vertex(out_vertex_b),
+ .*
+ );
+
+ gfx_fix_vertex fix_c
+ (
+ .in_vertex(in_vertex_c),
+ .out_vertex(out_vertex_c),
+ .*
+ );
+
+endmodule