diff --git a/libraries/base/diag/src/vhdl/diag_wg.vhd b/libraries/base/diag/src/vhdl/diag_wg.vhd index 9b43ac5482f501d011b1414154046c10e8946a1f..53ab3a2a5daf43706991a4e810991280920e5dc8 100644 --- a/libraries/base/diag/src/vhdl/diag_wg.vhd +++ b/libraries/base/diag/src/vhdl/diag_wg.vhd @@ -19,7 +19,26 @@ -- ------------------------------------------------------------------------------- --- Based on diag_waveproc from LOFAR +-- Purpose: Sine waveform generator +-- Description: +-- . Based on diag_waveproc from LOFAR. +-- Remarks: +-- . For WG sine periods that integer fit in the WG buffer size the carrier +-- wWave (CW) frequency is exact. For fractional WG frequencies, for which +-- the CW period does not fit the WG buffer size, the WG frequency is exact +-- only on average. +-- . The signal to noise ratio (SNR) of the carrier wave (CW) sine is: +-- SNR = g_calc_dat_w * 6.02 dB + 1.76 dB, +-- provided that the CW period fits the buffer size. +---. For fractional WG frequencies the effective number of bits of the WG is +-- g_buf_addr_w - 1, because the WG buffer contains a full sine period. The +-- -1 bit or factor 1/2 comes from that the rising slope and falling slope +-- of the WG buffer sine map the period resolution to the amplitude +-- resolution. Hence for fraction WG frequencies the effective SNR of the +-- CW becomes: +-- SNR = (g_buf_addr_w-1) * 6.02 dB + 1.76 dB. +-- Hence for g_buf_addr_w = 10, the effective SNR of the generated +-- CW with fractional frequency is SNR ~= 56 dB, even if g_calc_dat_w > 9. LIBRARY IEEE, common_lib, common_mult_lib, technology_lib; USE IEEE.STD_LOGIC_1164.ALL; diff --git a/libraries/base/diag/src/vhdl/mms_diag_wg_wideband.vhd b/libraries/base/diag/src/vhdl/mms_diag_wg_wideband.vhd index 19a4f52c38c4bcb35f6ca1c20fac5739ec00df93..6c6b912bde048cc3c7897963943bbc0c694ae430 100644 --- a/libraries/base/diag/src/vhdl/mms_diag_wg_wideband.vhd +++ b/libraries/base/diag/src/vhdl/mms_diag_wg_wideband.vhd @@ -21,10 +21,11 @@ -- Purpose: Provides a wideband WG by using multiple diag_wg -- Description: --- Remarks: +-- . See diag.wg.vhd. -- Remarks: -- . For g_wideband_factor=1 this diag_wg_wideband defaults to diag_wg. Hence -- no need to make a mms_diag_wg.vhd. +-- LIBRARY IEEE, common_lib, technology_lib; USE IEEE.STD_LOGIC_1164.ALL;