From 081a8a3ba8bfe036f31da53f9c041a2caa30fce2 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 5 May 2024 17:34:22 -0600 Subject: rtl/legacy_gfx: rename gfx -> legacy_gfx --- rtl/legacy_gfx/gfx_pipes.sv | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 rtl/legacy_gfx/gfx_pipes.sv (limited to 'rtl/legacy_gfx/gfx_pipes.sv') diff --git a/rtl/legacy_gfx/gfx_pipes.sv b/rtl/legacy_gfx/gfx_pipes.sv new file mode 100644 index 0000000..09b1d43 --- /dev/null +++ b/rtl/legacy_gfx/gfx_pipes.sv @@ -0,0 +1,24 @@ +module gfx_pipes +#(parameter WIDTH=0, 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 -- cgit v1.2.3