summaryrefslogtreecommitdiff
path: root/rtl/gfx/gfx_frag.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-11-10 21:32:15 -0600
committerAlejandro Soto <alejandro@34project.org>2023-11-11 00:14:14 -0600
commita979554f1f69b1a3a28e0fa38a26736fbab082da (patch)
tree3c722f82134c3adfafd60c20d3855661fbc45f5e /rtl/gfx/gfx_frag.sv
parent152a3970fc3d0d55823840cf45edcf84c5b471fd (diff)
rtl/gfx: implement fragment address linearization
Diffstat (limited to 'rtl/gfx/gfx_frag.sv')
-rw-r--r--rtl/gfx/gfx_frag.sv38
1 files changed, 38 insertions, 0 deletions
diff --git a/rtl/gfx/gfx_frag.sv b/rtl/gfx/gfx_frag.sv
new file mode 100644
index 0000000..21f111f
--- /dev/null
+++ b/rtl/gfx/gfx_frag.sv
@@ -0,0 +1,38 @@
+`include "gfx/gfx_defs.sv"
+
+module gfx_frag
+(
+ input logic clk,
+ rst_n,
+
+ input frag_xy_lanes fragments,
+ input paint_lanes in_valid,
+ output logic in_ready,
+
+ input logic out_ready,
+ output logic out_valid,
+ output frag_paint out
+);
+
+ logic addr_stall;
+
+ gfx_pipeline_flow #(.STAGES(`GFX_FRAG_ADDR_STAGES)) addr_flow
+ (
+ .stall(addr_stall),
+ .in_valid(0),
+ .in_ready(),
+ .out_ready(1),
+ .out_valid(),
+ .*
+ );
+
+ gfx_frag_addr addr
+ (
+ .stall(addr_stall),
+
+ .frag(),
+ .linear(),
+ .*
+ );
+
+endmodule