164 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
		
		
			
		
	
	
			164 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| 
								 | 
							
								/****************************************************************************
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
							 | 
						||
| 
								 | 
							
								be copied by any method or incorporated into another program without
							 | 
						||
| 
								 | 
							
								the express written consent of Aerospace C.Power. This Information or any portion
							 | 
						||
| 
								 | 
							
								thereof remains the property of Aerospace C.Power. The Information contained herein
							 | 
						||
| 
								 | 
							
								is believed to be accurate and Aerospace C.Power assumes no responsibility or
							 | 
						||
| 
								 | 
							
								liability for its use in any way and conveys no license or title under
							 | 
						||
| 
								 | 
							
								any patent or copyright and makes no representation or warranty that this
							 | 
						||
| 
								 | 
							
								Information is free from patent or copyright infringement.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								****************************************************************************/
							 | 
						||
| 
								 | 
							
								#ifndef __PHY_DUMP_HW_H
							 | 
						||
| 
								 | 
							
								#define __PHY_DUMP_HW_H
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#include "os_types.h"
							 | 
						||
| 
								 | 
							
								#include "phy_tools.h"
							 | 
						||
| 
								 | 
							
								#include "phy_dump.h"
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								extern "C" {
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								#define PHY_CHN_EST_AI_FULL_PWR         (0x8000)
							 | 
						||
| 
								 | 
							
								/* define power maximum limit */
							 | 
						||
| 
								 | 
							
								#define PHY_CHN_EST_PWR_LIMIT           (82)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								 /**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_snr_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * SNR raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_snr_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    int32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_softbit_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * softbit raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_softbit_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    int32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_csi_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * csi raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_csi_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    uint32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_spur_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * spur raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_spur_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    uint32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_noise_floor_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * noise floor raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_noise_floor_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    uint32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt, \
							 | 
						||
| 
								 | 
							
								    phy_snr_dump_mode_t mode);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_rx_sound_snr_get.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * SNR raw data dump.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param start              [start tone number.]
							 | 
						||
| 
								 | 
							
								 *@param end                [end tone number.]
							 | 
						||
| 
								 | 
							
								 *@param buf                [dump buffer pointer.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								uint32_t phy_rx_sound_snr_get( \
							 | 
						||
| 
								 | 
							
								    uint32_t start, \
							 | 
						||
| 
								 | 
							
								    uint32_t end, \
							 | 
						||
| 
								 | 
							
								    int32_t *buf, \
							 | 
						||
| 
								 | 
							
								    uint32_t dly_cnt);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_sound_dump_cond_set.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * sound SNR raw data dump condition.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@param snid_en            [snid rule en.]
							 | 
						||
| 
								 | 
							
								 *@param snid               [snid value.]
							 | 
						||
| 
								 | 
							
								 *@param dtei_en            [dtei rule en.]
							 | 
						||
| 
								 | 
							
								 *@param dtei               [dtei value.]
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								void phy_sound_dump_cond_set( \
							 | 
						||
| 
								 | 
							
								    bool_t snid_en, \
							 | 
						||
| 
								 | 
							
								    uint8_t snid, \
							 | 
						||
| 
								 | 
							
								    bool_t dtei_en, \
							 | 
						||
| 
								 | 
							
								    uint8_t dtei);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 *@brief phy_snr_dump_wait_done.
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 * sound SNR dump .
							 | 
						||
| 
								 | 
							
								 *
							 | 
						||
| 
								 | 
							
								 *@exception                [none.]
							 | 
						||
| 
								 | 
							
								 *@return                   [0 true and other false.]
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								bool_t phy_snr_dump_wait_done();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#ifdef __cplusplus
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								#endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#endif
							 |