diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-05 17:38:55 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-05 18:12:08 -0600 |
| commit | ca02833f22b08ceeeff501107371aa6667426115 (patch) | |
| tree | f864c5fc238a292082d2096ce546270badce9f1d /rtl/gfx/gfx_ctz.sv | |
| parent | 081a8a3ba8bfe036f31da53f9c041a2caa30fce2 (diff) | |
rtl/gfx: rename platform/wavelet3d -> rtl/gfx
Diffstat (limited to 'rtl/gfx/gfx_ctz.sv')
| -rw-r--r-- | rtl/gfx/gfx_ctz.sv | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rtl/gfx/gfx_ctz.sv b/rtl/gfx/gfx_ctz.sv new file mode 100644 index 0000000..2713f8a --- /dev/null +++ b/rtl/gfx/gfx_ctz.sv @@ -0,0 +1,18 @@ +// Count trailing zeros (ctz), clz al revés +module gfx_ctz +#(int WIDTH = 0) +( + input logic clk, + + input logic[WIDTH - 1:0] value, + output logic[$clog2(WIDTH):0] ctz +); + + gfx_clz #(WIDTH) clz + ( + .clk, + .value({<<{value}}), + .clz(ctz) + ); + +endmodule |
