Super Harvard
Architecture(超级哈佛架构,SHARC),由ADI开发,具体解释见下方
BLACKFIN / SHARC。
Why Floating-Point DSP?
A digital signal processor’s data format determines its ability to
handle signals of differing precision, dynamic range,
and signal-to-noise ratios. Because floating-point DSP math
reduces the need for scaling and probability of overflow, using a
floating-point DSP can ease algorithm and software development.
The extent to which this is true depends on the floating-point
processor’s architecture.
Consistency with IEEE workstation simulations and the elimination
of scaling are two clear ease-of-use advantages. High-level language
programmability, large address spaces, and wide dynamic range allow
system development time to be spent on algorithms and signal processing
concerns, rather than assembly language coding, code paging, and error
handling.
--<ADSP-21160 SHARC® DSP Hardware Reference>
总结一下就是:
(The data format is) Suitable to handle various kind of
task (like differing precision, dynamic
range, and signal-to-noise ratios).
(F-P DSP math) Reduces the need of scaling and probability
of overflow.
High-level language programmability, large address spaces,
wide dynamic range.
/* * File: SigmaStudioFW.h * * Description: SigmaStudio System Framwork macro definitions. These * macros should be implemented for your system's software. * * This software is distributed in the hope that it will be useful, * but is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * This software may only be used to program products purchased from * Analog Devices for incorporation by you into audio products that * are intended for resale to audio product end users. This software * may not be distributed whole or in any part to third parties. * * Copyright � 2008 Analog Devices, Inc. All rights reserved. */ #ifndef __SIGMASTUDIOFW_H__ #define __SIGMASTUDIOFW_H__
/* * TODO: Update for your system's data type */ typedefunsignedshort ADI_DATA_U16; typedefunsignedchar ADI_REG_TYPE;
/* * Parameter data format */ #define SIGMASTUDIOTYPE_FIXPOINT 0 #define SIGMASTUDIOTYPE_INTEGER 1
/* * Write to a single Device register */ #define SIGMA_WRITE_REGISTER( devAddress, address, dataLength, data ) {/*TODO: implement macro or define as function*/}
/* * TODO: CUSTOM MACRO IMPLEMENTATION * Write to multiple Device registers */ #define SIGMA_WRITE_REGISTER_BLOCK( devAddress, address, length, pData ) {/*TODO: implement macro or define as function*/}
/* * TODO: CUSTOM MACRO IMPLEMENTATION * Writes delay (in ms) */ #define SIGMA_WRITE_DELAY( devAddress, length, pData ) {/*TODO: implement macro or define as function*/}
/* * Read device registers */ #define SIGMA_READ_REGISTER( devAddress, address, length, pData ) {/*TODO: implement macro or define as function*/}
/* * Set a register field's value */ #define SIGMA_SET_REGSITER_FIELD( regVal, fieldVal, fieldMask, fieldShift ) \ { (regVal) = (((regVal) & (~(fieldMask))) | (((fieldVal) << (fieldShift)) && (fieldMask))) } /* * Get the value of a register field */ #define SIGMA_GET_REGSITER_FIELD( regVal, fieldMask, fieldShift ) \ { ((regVal) & (fieldMask)) >> (fieldShift) } /* * Convert a floating-point value to SigmaDSP (5.23) fixed point format * This optional macro is intended for systems having special implementation * requirements (for example: limited memory size or endianness) */ #define SIGMASTUDIOTYPE_FIXPOINT_CONVERT( _value ) {/*TODO: IMPLEMENT MACRO*/}
/* * Convert integer data to system compatible format * This optional macro is intended for systems having special implementation * requirements (for example: limited memory size or endianness) */ #define SIGMASTUDIOTYPE_INTEGER_CONVERT( _value ) {/*TODO: IMPLEMENT MACRO*/}
HP即Headphone缩写,HP输出有两个输出端,分别是DAC0 和 DAC1,分别对应为
EVAL板 上的 OUT R(HP Right) 和 OUT L(HP Left)。
输出静音
输出断电
关于HP输出的寄存器 HP_EN_R 及 HP_EN_L
说明:
0x31 即 0011 0001 ,最后两位
01 即 HP_PDN_L 中的 01 。
输出音量控制
对输出音量进行控制需要先对S5、S6进行跳针。
TALKTHRU / DSP BYPASS
DSP BYPASS MODE When DSP bypass mode is enabled, a direct path from
the ADC outputs to the DACs is set up to enable bypassing the core
processing to listen to environmental sounds.
This is useful for listening to someone speaking without having to
remove the noise cancelling headphones. The DSP bypass path is
enabled by setting an MPx pin low.
Figure 92 shows the DSP bypass path disabled, and Figure 93 shows the
DSP bypass path enabled by pressing the push-button switch.
image-20210427144110884
The DSP bypass feature works for both analog and digital microphone
inputs.
Enabled when a switch connected to an MPx
pin that is set to DSP bypass mode is closed and the MPx pin signal is
pulled low.
Pressing and holding the switch closed enables the DSP bypass signal
path as defined in the TALKTHRU register (Address 0x002A).
The DAC volume control setting is switched from the default gain
setting to the new TALKTHRU_GAINx register setting (Address 0x002B and
Address 0x002C).
DSP bypass is enabled only on ADC0 and ADC1.
The DSP bypass signal path is from the output of ADCx to the input of
the DAC(s). When DSP bypass is enabled, the current DAC volume setting
is ramped down to −95.625 dB and the DSP bypass volume setting is ramped
up to avoid pops when switching paths.
CHIP-ADSP21479
芯片及评估板资料
关于芯片特性:《ADSP-21477 / ADSP-21478 /
ADSP-21479》
关于评估板:《ADSP-21479 EZ-Board® Evaluation System
Manual》
仿真器配置
与《HPUSB, USB, and HPPCI Emulators User’s
Guide》所描述的并不完全一致。
void SIGMA_WRITE_REGISTER_BLOCK(byte IC_address, word subAddress, int dataLength, byte pdata[]) {
// start I2C transfer if (!i2c_start((IC_address)|I2C_WRITE)) { Serial.println("I2C device busy for WRITE REGISTER BLOCK"); return; }
// write subAddresses. (ADAU1761 needs the 16 bit subAddress written as two 8 bit bytes with an "ACK" inbetween uint8_t addressLowByte = subAddress & 0xff; uint8_t addressHighByte = (subAddress >> 8);
if (dataLength < 50 ) { for (int i=0; i<dataLength; i++) { i2c_write(pdata[i]); //write data bytes } } else { for (int i=0; i<dataLength; i++) { i2c_write(pgm_read_byte_near(pdata + i)); //write data bytes from PROGMEM (for param and program data) } } i2c_stop(); // stop the I2C communication