summaryrefslogtreecommitdiff
path: root/platform/wavelet3d/gfx_pipes.sv
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-03-15 21:57:34 -0600
committerAlejandro Soto <alejandro@34project.org>2024-03-15 21:57:34 -0600
commitf1270a246570eacc093c836337dc55546aabd399 (patch)
treea76af6972b4aeff883bea74045ee1a2bf947bdac /platform/wavelet3d/gfx_pipes.sv
parenteb49b6d871825eaea4e93d47a4368df368b7101a (diff)
platform/wavelet3d: implement rasterizer
Diffstat (limited to 'platform/wavelet3d/gfx_pipes.sv')
-rw-r--r--platform/wavelet3d/gfx_pipes.sv24
1 files changed, 24 insertions, 0 deletions
diff --git a/platform/wavelet3d/gfx_pipes.sv b/platform/wavelet3d/gfx_pipes.sv
new file mode 100644
index 0000000..2fa875a
--- /dev/null
+++ b/platform/wavelet3d/gfx_pipes.sv
@@ -0,0 +1,24 @@
+module gfx_pipes
+#(int WIDTH=0, int DEPTH=0)
+(
+ input logic clk,
+
+ input logic[WIDTH - 1:0] in,
+ input logic stall,
+
+ output logic[WIDTH - 1:0] out
+);
+
+ logic[WIDTH - 1:0] pipes[DEPTH];
+
+ assign out = pipes[DEPTH - 1];
+
+ always_ff @(posedge clk)
+ if (~stall) begin
+ pipes[0] <= in;
+
+ for (integer i = 1; i < DEPTH; ++i)
+ pipes[i] <= pipes[i - 1];
+ end
+
+endmodule