CONSTANTc_diag_wg_gain_w:NATURAL:=1;-- Normalized range [0 1> maps to fixed point range [0:2**c_diag_wg_ampl_w>
-- . use gain 2**0 = 1 to have fulle scale without clipping
-- . use gain 2**g_calc_gain_w > 1 to cause clipping
-- For c_diag_wg_gain_w = 1 there is clipping from [1 2> For normalized values >= 2**c_diag_wg_gain_w = 2
-- the behaviour becomes more or less undefined. Due to wrapping it appears that normalized values [2 3>
-- result in a sinus again. Therefore use normalized range [0 2**c_diag_wg_gain_w>.
CONSTANTc_diag_wg_ampl_unit:REAL:=2**REAL(c_diag_wg_ampl_w-c_diag_wg_gain_w)*c_diag_wg_ampl_norm;-- ^= Full Scale range [-c_wg_full_scale +c_wg_full_scale] without clipping
CONSTANTc_diag_wg_freq_unit:REAL:=2**REAL(c_diag_wg_freq_w);-- ^= c_clk_freq = Fs (sample frequency), assuming one sinus waveform in the buffer