Added planahead script and fixed conversion

This commit is contained in:
Jojojoppe
2025-10-06 16:49:28 +02:00
parent 06ef70e1ee
commit 324bb108e3
5 changed files with 24 additions and 15 deletions

11
rtl/util/conv.vh Normal file
View File

@@ -0,0 +1,11 @@
// =============================================================================
// Convert Q1.15 to a biased UQ0.16 signal
// =============================================================================
function [15:0] q15_to_uq16;
input [15:0] q15;
reg [16:0] biased;
begin
biased = q15 + 17'sd32768;
q15_to_uq16 = biased[15:0];
end
endfunction