diff options
Diffstat (limited to 'rtl/gfx/gfx_fp_fix.sv')
| -rw-r--r-- | rtl/gfx/gfx_fp_fix.sv | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/rtl/gfx/gfx_fp_fix.sv b/rtl/gfx/gfx_fp_fix.sv new file mode 100644 index 0000000..b38e0e3 --- /dev/null +++ b/rtl/gfx/gfx_fp_fix.sv @@ -0,0 +1,34 @@ +`include "gfx/gfx_defs.sv" + +module gfx_fp_fix +( + input logic clk, + + input fp in, + input logic stall, + + output fixed out +); + +`ifndef VERILATOR + ip_fp_fix ip_fix + ( + .a(in), + .q(out), + .en(!stall), + .areset(0), + .* + ); +`else + fp pop; + + assign out = $c("taller::fp_fix(", pop, ")"); + + gfx_pipes #(.WIDTH($bits(in)), .DEPTH(`FP_FIX_STAGES)) pipes + ( + .out(pop), + .* + ); +`endif + +endmodule |
