diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-05 17:34:22 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-05 17:38:27 -0600 |
| commit | 081a8a3ba8bfe036f31da53f9c041a2caa30fce2 (patch) | |
| tree | 7d712b67d3dc1ad3d37041562774ba3c4e5a7f49 /rtl/gfx/gfx_frag_bary.sv | |
| parent | e5b64ea353678baabd16d245fcfaa3384e1acf8f (diff) | |
rtl/legacy_gfx: rename gfx -> legacy_gfx
Diffstat (limited to 'rtl/gfx/gfx_frag_bary.sv')
| -rw-r--r-- | rtl/gfx/gfx_frag_bary.sv | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/rtl/gfx/gfx_frag_bary.sv b/rtl/gfx/gfx_frag_bary.sv deleted file mode 100644 index 4f4f452..0000000 --- a/rtl/gfx/gfx_frag_bary.sv +++ /dev/null @@ -1,78 +0,0 @@ -`include "gfx/gfx_defs.sv" - -module gfx_frag_bary -( - input logic clk, - - input fixed_tri bary, - ws, - input logic stall, - - output fixed b1, - b2 -); - - fixed area, b0_w0, b1_w1, b2_w2, b1_w1_b2_w2, hold_b0_w0, hold_b1_w1, hold_b2_w2; - fixed_tri bs_ws, orthographic_bs; - - assign b0_w0 = bs_ws[0]; - assign b1_w1 = bs_ws[1]; - assign b2_w2 = bs_ws[2]; - - assign orthographic_bs[0] = bary[`EDGE_P1_TO_P2]; - assign orthographic_bs[1] = bary[`EDGE_P2_TO_P0]; - assign orthographic_bs[2] = bary[`EDGE_P0_TO_P1]; - - genvar i; - generate - for (i = 0; i < 3; ++i) begin: vertices - gfx_fixed_div div_b_w - ( - .z(orthographic_bs[i]), - .d(ws[i]), - .q(bs_ws[i]), - .* - ); - end - endgenerate - - localparam AREA_STAGES = 2; - - gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(AREA_STAGES)) b1_w1_pipes - ( - .in(b1_w1), - .out(hold_b1_w1), - .* - ); - - gfx_pipes #(.WIDTH($bits(fixed)), .DEPTH(AREA_STAGES)) b2_w2_pipes - ( - .in(b2_w2), - .out(hold_b2_w2), - .* - ); - - gfx_fixed_div norm_b1 - ( - .z(hold_b1_w1), - .d(area), - .q(b1), - .* - ); - - gfx_fixed_div norm_b2 - ( - .z(hold_b2_w2), - .d(area), - .q(b2), - .* - ); - - always_ff @(posedge clk) - if (!stall) begin - area <= hold_b0_w0 + b1_w1_b2_w2; - hold_b0_w0 <= b0_w0; - b1_w1_b2_w2 <= b1_w1 + b2_w2; - end - -endmodule |
