From a14fc04f3b9f5bcef941ea79c794532d7ca0e7fc Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sat, 21 Oct 2023 15:37:45 -0600 Subject: ip: downgrade to 16-bit floats --- rtl/gfx/gfx_defs.sv | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'rtl/gfx/gfx_defs.sv') diff --git a/rtl/gfx/gfx_defs.sv b/rtl/gfx/gfx_defs.sv index e52f243..d01822a 100644 --- a/rtl/gfx/gfx_defs.sv +++ b/rtl/gfx/gfx_defs.sv @@ -1,14 +1,16 @@ `ifndef GFX_DEFS_SV `define GFX_DEFS_SV -`define FP_ADD_STAGES 13 -`define FP_MUL_STAGES 6 - +`define FLOAT_BITS 16 `define FLOATS_PER_VEC 4 `define VECS_PER_MAT 4 -typedef logic[31:0] fp; -typedef fp vec4[`FLOATS_PER_VEC]; -typedef vec4 mat4[`VECS_PER_MAT]; +// Target de 100MHz con float16, rounding aproximado +`define FP_ADD_STAGES 4 // ~325 LUTs +`define FP_MUL_STAGES 3 // ~119 LUTs ~1 bloque DSP + +typedef logic[`FLOAT_BITS - 1:0] fp; +typedef fp vec4[`FLOATS_PER_VEC]; +typedef vec4 mat4[`VECS_PER_MAT]; `endif -- cgit v1.2.3