• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "hal_config.h"
16 #include "fft_hal.h"
17 #include "fft_ll_macro_def.h"
18 
19 #if CFG_HAL_DEBUG_FFT
20 
fft_struct_dump(void)21 void fft_struct_dump(void)
22 {
23 	SOC_LOGI("\r\nbase=%x\r\n", (uint32_t)FFT_LL_REG_BASE);
24 
25 	/* REG_0x00 */
26 	SOC_LOGI("  fft_config=0x%x value=0x%x\n", FFT_FFT_CONFIG_ADDR, fft_ll_get_fft_config_value());
27 	SOC_LOGI("    fft_mode: %x\n", fft_ll_get_fft_config_fft_mode());
28 	SOC_LOGI("    ifft:    %x\n", fft_ll_get_fft_config_ifft());
29 	SOC_LOGI("    fft_int_en:    %x\n", fft_ll_get_fft_config_fft_int_en());
30 	SOC_LOGI("    fft_enable:   %x\n", fft_ll_get_fft_config_fft_enable());
31 	SOC_LOGI("    fft_gat_off:   %x\n", fft_ll_get_fft_config_fft_gat_off());
32 
33 	/* REG_0x01 */
34 	SOC_LOGI("\n");
35 	SOC_LOGI("  fir_config0=0x%x value=0x%x\n", FFT_FIR_CONFIG_ADDR, fft_ll_get_fir_config_value());
36 	SOC_LOGI("    fir_length:     %x\n", fft_ll_get_fir_config_fir_length());
37 	SOC_LOGI("    fir_mode:        %x\n", fft_ll_get_fir_config_fir_mode());
38 	SOC_LOGI("    fir_int_en:  %x\n", fft_ll_get_fir_config_fir_int_en());
39 	SOC_LOGI("    fir_enable: %x\n", fft_ll_get_fir_config_fir_enable());
40 
41 	/* REG_0x06 */
42 	SOC_LOGI("\n");
43 	SOC_LOGI("  status=0x%x value=0x%x\n", FFT_STATUS_ADDR, fft_ll_get_status_value());
44 	SOC_LOGI("    fft_done:   %x\n", fft_ll_get_status_fft_done());
45 	SOC_LOGI("    fir_done:   %x\n", fft_ll_get_status_fir_done());
46 	SOC_LOGI("    self_proc_done: %x\n", fft_ll_get_status_self_proc_done());
47 	SOC_LOGI("    bit_ext: %x\n", fft_ll_get_status_bit_ext());
48 
49 	/* REG_0x07 */
50 	SOC_LOGI("\n");
51 	SOC_LOGI("  start_trigger=0x%x value=0x%x\n", FFT_START_TRIGGER_ADDR, fft_ll_get_start_trigger_value());
52 	SOC_LOGI("    start_trigger:   %x\n", fft_ll_get_start_trigger_start_trigger());
53 
54 	/* REG_0x09 */
55 	SOC_LOGI("\n");
56 	SOC_LOGI("  memory_config=0x%x value=0x%x\n", FFT_MEMORY_CONFIG_ADDR, fft_ll_get_memory_config_value());
57 	SOC_LOGI("    memory_config_mode: %x\n", fft_ll_get_memory_config_memory_config_mode());
58 
59 }
60 
61 #endif
62 
63