📄 app_data.s
字号:
/*============================================================================*\
DSP application data module
D.B.White 2000-11-1
\*============================================================================*/
#define ENABLE_DEBUG 1
/*============================================================================*\
general use data declare (use for store special registers)
\*----------------------------------------------------------------------------*/
.global app_command
.global app_status
.global app_misc
.global app_debug
.global PSM_DATA_PTR
// .global FRAME_COUNT_PTR
.global frame_count
.global EQUALIZER_DATA_PTR
.global sound_effect_flag
.global risc_flag1
// .global risc_flag2
// .global risc_flag3
.global MP3_DATA_PTR
.global r0_temp
.global r1_temp
.global r2_temp
.global r3_temp
.global r4_temp
.global r5_temp
.global r6_temp
.global r7_temp
.global r8_temp
.global r9_temp
.global r10_temp
.global r11_temp
.global BlockSize_temp
.global BlockSkip_temp
.global DMASize_temp
.global StartAddrHigh_temp
.global microphone_status // data 0x11111111 right
// 0x22222222 left
// 0x33333333 right and left
// else none
.global sound_effect_flag
/*############################################################################*/
/*============================================================================*\
debug data declare
\*----------------------------------------------------------------------------*/
#if ENABLE_DEBUG
.global debug_flag
.global debug_clear
.global debug_count
.global debug_r0
.global debug_r1
.global fft_trace
#endif
/*############################################################################*/
/*============================================================================*\
power spectrum meter data declare
\*----------------------------------------------------------------------------*/
#if ENABLE_PSM
.global psm_count
.global psm_on_off_flag
.global fft_stage
.global cos_table
.global pcm_buffer
.global local_temp
.global spectrum_buffer
#endif /* ENABLE_PSM */
/*############################################################################*/
/*============================================================================*\
equalizer data declare
\*----------------------------------------------------------------------------*/
#if ENABLE_EQUALIZER
.global equalizer_serial
// .global equalizer_buffer
.global equalizer_coeff_flag
.global equalizer_coeff_temp
.global equalizer_gain
.global equalizer_on_off_flag
.global mp3_data_prepared // this flag set for mp3 equalizer
#endif /* ENABLE_EQUALIZER */
/*############################################################################*/
/*============================================================================*\
re-reader data declare
\*----------------------------------------------------------------------------*/
#if ENABLE_REREAD
.global mic_data_buffer
.global output_data_buffer
.global play_debug_pcm
.global recording_flag
.global playing_flag
.global record_on_off_flag
.global play_on_off_flag
.global record_fifo_start_address
.global record_fifo_end_address
.global record_fifo_current_address
.global play_fifo_start_address
.global play_fifo_end_address
.global play_fifo_current_address
.global system_time
.global system_time_buffer
.global index_prev
.global val_prev
// .global frame_count
.global y0
.global se
.global sl
.global spl
.global szl
.global rlt
.global al
.global plt
.global dlt
.global bl
.global sg
.global out_buffer
.global in_buffer
.global out_bits
.global in_bits
.global mic_frame
.global pcm_fifo_frame
.global reset_fifo_flag1
.global reset_fifo_flag2
.global frame_data_buffer
.global record_mic_ptr
.global in_fifo_reg_temp
.global out_fifo_reg_temp
.global dump_data_flag
.global dump_reg_flag
#if !SVCD
.global down_sample_filter_history_data
.global up_sample_filter_history_data
#endif
#endif /* ENABLE_REREAD */
/*############################################################################*/
/*============================================================================*\
general use data define (use for store special registers)
\*----------------------------------------------------------------------------*/
.sdata
.align 9
app_command: .space 4
app_status: .space 4
app_misc: .space 4
app_debug: .space 4
PSM_DATA_PTR: .space 4
// FRAME_COUNT_PTR: .space 4
frame_count: .space 4
EQUALIZER_DATA_PTR: .space 4
sound_effect_flag: .space 4 // for three sound effect optoin
risc_flag1: .space 4
risc_dummy: .space 4*2
// risc_flag2: .space 4
// risc_flag3: .space 4
MP3_DATA_PTR: .space 4
dummy_comm: .space 0x10
r0_temp: .space 4
r1_temp: .space 4
r2_temp: .space 4
r3_temp: .space 4
r4_temp: .space 4
r5_temp: .space 4
r6_temp: .space 4
r7_temp: .space 4
r8_temp: .space 4
r9_temp: .space 4
r10_temp: .space 4
r11_temp: .space 4
BlockSize_temp: .space 4
BlockSkip_temp: .space 4
DMASize_temp: .space 4
StartAddrHigh_temp: .space 4
/*############################################################################*/
/*============================================================================*\
debug data define
\*----------------------------------------------------------------------------*/
#if ENABLE_DEBUG
.sdata
debug_flag: .space 4
debug_clear: .space 4
debug_count: .space 4
debug_r0: .space 4
debug_r1: .space 4
fft_trace: .space 4
#endif
/*############################################################################*/
/*============================================================================*\
power spectrum meter data define
\*----------------------------------------------------------------------------*/
#if ENABLE_PSM
.sdata
.align 2
psm_count: .space 4
psm_on_off_flag: .space 4
fft_stage: .space 4
spectrum_buffer: .space 8*4
#ifdef mp3
pcm_buffer: .space 512*4
local_temp: .space (512+32)*4
#else // ndef mp3
pcm_buffer: .space 256*4
#endif // def mp3
#endif // !ENABLE_PSM
/*############################################################################*/
/*============================================================================*\
equalizer data define
\*----------------------------------------------------------------------------*/
#if ENABLE_EQUALIZER
.sdata
.align 2
equalizer_coeff_flag: .space 4
equalizer_coeff_temp: .space 35*4 // this buffer for use now filter coefficient
// for use as inx1 inx2 inx3 outy1 outy2 outy3 all for two channel
equalizer_serial: .space 84*4
//equalizer_buffer: .space (128+32)*4 // for store local buffer add 128 bytes for cycle buffer
equalizer_on_off_flag: .space 4
equalizer_gain: .fill 8,1,0xc // reserve 1 byte
mp3_data_prepared: .space 1*4
#endif /* ENABLE_EQUALIZER */
/*############################################################################*/
/*============================================================================*\
re-reader data define
\*----------------------------------------------------------------------------*/
#if ENABLE_REREAD
.sdata
.align 4
recording_flag: .space 4
playing_flag: .space 4
record_on_off_flag: .fill 1,4,0x5555 //.space 4
play_on_off_flag: .fill 1,4,0x5555 //.space 4
reset_fifo_flag1: .space 4
reset_fifo_flag2: .space 4
// frame_count: .space 4
record_fifo_start_address: .space 4
record_fifo_end_address: .space 4
record_fifo_current_address:.space 4
play_fifo_start_address: .space 4
play_fifo_end_address: .space 4
play_fifo_current_address: .space 4
system_time: .space 4
system_time_buffer: .space 4
index_prev: .space 4
val_prev: .space 4
y0: .fill 1,4,544
se: .space 4
sl: .space 4
spl: .space 4
szl: .space 4
rlt: .space 3*4
al: .space 3*4
plt: .space 3*4
dlt: .space 7*4
bl: .space 7*4
sg: .space 7*4
out_buffer: .space 4
in_buffer: .space 4
out_bits: .space 4
in_bits: .space 4
mic_frame: .space 4
pcm_fifo_frame: .space 4
record_mic_ptr: .space 4
in_fifo_reg_temp: .space 4
out_fifo_reg_temp: .space 4
dump_data_flag: .space 4
dump_reg_flag: .space 4
microphone_status: .space 4
.sdata
.align 4
mic_data_buffer: .fill 256,4,0x0 // 128 dwords for for local buffer backup
frame_data_buffer: .fill 32,4,0 // all for two frame
output_data_buffer: .fill 4,4,0x0 // 128 dwords for for local buffer backup
play_debug_pcm: .fill 12,1,0x0 // 12 bytes for play
#if !SVCD
down_sample_filter_history_data: .space 16*4 // all 32 samples
up_sample_filter_history_data: .space 16*4 // all 32 samples
#endif
#endif
/*############################################################################*/
#if 0
/*============================================================================*\
data segment (large data)
\*============================================================================*/
.sdata
.align 8
#if ENABLE_PSM
#ifdef mp3
pcm_buffer: .space 512*4
local_temp: .space (512+32)*4
#else // ndef mp3
pcm_buffer: .space 256*4
#endif // def mp3
#endif // !ENABLE_PSM
#if ENABLE_EQUALIZER
equalizer_coeff_temp: .space 35*4 // this buffer for use now filter coefficient
// for use as inx1 inx2 inx3 outy1 outy2 outy3 all for two channel
equalizer_serial: .space 84*4
#endif /* ENABLE_EQUALIZER */
#endif
//----------------------------------------------------------------------------------------------------
//*****************************************************************************************
//----------------------------------------------------------------------------------------------------
.global mic_data_ptr1
.sdata
mic_data_ptr1: .align 2
.space 4 // set as microphone address buffer
//---------------------------------------------------------------------------------------------------
//****************************************************************************************
//---------------------------------------------------------------------------------------------------
.global stop_for_mic_flag
.sdata
stop_for_mic_flag: .align 2
.fill 1,4,0x00000000
.global debug_temp1
.sdata
debug_temp1: .align 2
.fill 1,4,0x00000000
//----------------------------------------------------------------------------------------------------
//*****************************************************************************************
//----------------------------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -