Analog.com Analog Dialogue Wiki English
Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Site
  • User
  • Site
  • Search
  • User
EngineerZone
EngineerZone
  • Log in
  • Site
  • Search
  • Log in
  • Home
  • Blogs ⌵
    • EngineerZone Spotlight
    • The Engineering Mind
  • Browse ⌵
    • All Groups
    • All Members
  • Support ⌵
    • 3D ToF Depth Sensing
    • Amplifiers
    • Analog Microcontrollers
    • Audio
    • Clock and Timing
    • Data Converters
    • Design Tools and Calculators
    • Direct Digital Synthesis (DDS)
    • Embedded Vision Sensing
    • Energy Monitoring and Metering
    • FPGA Reference Designs
    • Industrial Ethernet
    • Interface and Isolation
    • Low Power RF Transceivers
    • MEMS Inertial Sensors
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Power By Linear
    • Processors and DSP
    • Reference Circuits
    • RF and Microwave
    • Switches/Multiplexers
    • Temperature Sensors
    • Video
    • Wide Band RF Transceivers
    • Wireless Sensor Networks Reference Library
  • My EZ
  • More
  • Cancel
  • 主页
  • 浏览 ⌵
    • 收件箱
    • 个人设置
    • 会员
    • 专区列表
  • 论坛专区 ⌵
    • 放大器专区
    • 精密转换器专区
    • 音频专区
    • ADE电能计量专区
    • MEMS和传感器专区
    • 接口和隔离专区
    • Power 中文专区
    • ADUC微处理器专区
    • 锁相环专区
    • 开关和多路复用器专区
    • 温度传感器
    • 基准电压源专区
    • 资源库
    • 论坛使用指南
    • 技术支持参考库
    • 在线研讨会
    • 论坛社群活动
    • 论坛激励活动
  • More
  • Cancel
SigmaDSP Processors and SigmaStudio Development Tool
  • Processors and DSP
  • More
SigmaDSP Processors and SigmaStudio Development Tool
Documents What are the number formats for SigmaDSP?
  • Q&A
  • Discussions
  • Documents
  • File Uploads
  • Video/Images
  • Tags
  • Reports
  • Managers
  • More
  • Cancel
  • New
SigmaDSP Processors and SigmaStudio Development Tool requires membership for participation - click to join
  • Documents
  • 96 kHz operation for ADAU1452 serial ports
  • ADAU1701 Input and Output Signal Routing
  • ADAU1701: ADC resistor values for higher sample rates
  • Booting a SigmaDSP from a microcontroller with no C compiler
  • Calculating Filter Coefficients to Store in a Microcontroller
  • Can ADI provide or support the USB interface firmware code for my self-assembled PCB or end product?
  • Can ADI provide or support the USB interface firmware code for my self-assembled PCB or end product? - 2
  • Can I program multiple SigmaDSPs in parallel using one USBi?
  • Can I use SigmaDSP to decode MP3/WAV/AAC?
  • Can SigmaDSP do frequency-domain processing like FFT or pitch shift?
  • Can the ADAU1772 be used with a TDM output stream that has an odd number of channels?
  • Compressor Table Format - Changing compressors at run-time
  • Creating a delay after startup
  • Creating a simple balance crossfade control
  • E2PROM Selfboot problem
  • Empty Cells
  • EVAL-ADAU144XEBZ Evaluation Board Schematics
  • EVAL-ADAU1781Z GPIO Mapping in SigmaStudio
  • EVAL-ADAU1781Z GPIO Mapping in SigmaStudio - 2
  • Example Project: Using the Stopwatch to Count Successive Samples over a Threshold
  • Excluding Cells from the Exported System Files
  • FAQ: After downloading self-boot code to my target EEPROM, my USBi isn't recognized anymore by my computer. What's wrong and how do I fix it?
  • FAQ: Can I write C or assembly code for SigmaDSP in SigmaStudio?
  • FAQ: Can we bundle SigmaStudio with our product design?
  • FAQ: Developing custom algorithms and/or using 3rd party algorithms
  • FAQ: How can I change parameters on-the-fly in an application without SigmaStudio?
  • FAQ: How can I estimate MIPS/Memory resource on SigmaDSP?
  • FAQ: How do I change the sample rate of my SigmaStudio system?
  • FAQ: What operating systems are supported to run SigmaStudio?
  • FAQ: What types of capacitors are good to use in the analog audio signal path?
  • FAQ: Where can I send my questions I don't want to post in a public forum?
  • FAQ: Why can't I control any of the knobs or sliders in my SigmaStudio project?
  • FAQ:  Can I have multiple versions of SigmaStudio installed simultaneously?
  • FAQ:  Where can I download SigmaStudio?
  • FAQ:  Where can I find a description of the changes made in the latest version of SigmaStudio?
  • FAQ:  Which SigmaDSP ICs support selfbooting from an EEPROM?
  • FAQ:  Why isn't a software/documentation CD included with my evaluation board?
  • How are the audio inputs routed in SigmaStudio's Input cell?
  • How do I create the microcontroller code to interface to my SigmaDSP?
  • How do I execute a software safeload write?
  • How do I implement external volume control using GPIOs or Aux ADCs?
  • How do I report a SigmaStudio bug?
  • How do I start a timer after power-on, or when the input signal goes away?
  • How do I use a GPIO button to select different audio processing paths?
  • How many instructions can be executed per sample in SigmaDSP?
  • How to avoid distortion or clipping on the ADC inputs for the ADAU144x evaluation board
  • How to avoid distortion or clipping on the ADC inputs for the ADAU144x evaluation board - 2
  • How to calculate index table values in 28.0 format
  • How to create a crossover with more than 3 bands
  • How to self-boot the EVAL-ADAU1401AEBZ (evaluation board for ADAU1701, ADAU1702, and ADAU1401A)
  • How to self-boot the EVAL-ADAU1701MINIZ (evaluation board for ADAU1701, ADAU1702, and ADAU1401A)
  • Implementing Safeload Writes on the ADAU1701
  • Memory requirements for booting a SigmaDSP with a microcontroller
  • Monitoring average and instantaneous signal levels
  • My 2IN4OUT Proto with SPDIF based on ADAU1701
  • My IIR filter is outputting a value, even when the input goes to zero. Is this a bug?
  • New Sigma300 Family Products:  ADAU1451 & ADAU1450
  • New SigmaStudio 3.3 Beta Version Available
  • New SigmaStudio Download Site
  • Peak Full Range Compressor
  • Playing audio samples in SigmaDSP
  • Preserving "Ear-candy" in a mono mix
  • Problems with Push Button Volume w/Mute module
  • Setting the PLL mode for the ADAU1701 at different sample rates
  • Sigma 300 (ADAU145x) Exponential Slewing
  • SigmaDSP PCB Layout Best Practices
  • SigmaDSP Products and Evaluation Boards - ROHS and REACH Compliance
  • SigmaStudio 3.4 Released
  • SigmaStudio consulting services...
  • Slow rate random number generator
  • Stimulus-Probe Capability and Limitations
  • Testing USB communications between the PC and SigmaDSP
  • The ADAU1372 is not on the list of compatible processors or under Processors/DSPs on Sigmastudio 3.11.1 or 3.11. Can you please tell me how I can use the EVAL board with ADAU1372?
  • Third Party Algorithm Plugins in SigmaStudio
  • Thoughts on using index selectable filters...
  • True peak-to-peak detection in SigmaStudio
  • Truncating bits using bitwise logic
  • Updated self-boot EEPROM image generation / download
  • Updating SigmaDSP Parameter with a Microcontroller
  • Using compressors to avoid output clipping
  • Using hardware data capture (trap) registers with the DSP Readback cell (AD1940, ADAU1701)
  • Using stopwatch with feedback loop to create periodic test signal
  • Using the ADAU145x's Slew Ext Volume Block
  • Using the DSP Control mode of the ADAU1761 PGA / ALC
  • Using two SigmaDSP evaluation boards simultaneously with one USBi board
  • Welcome to the SIGMADSP Processors and SIGMASTUDIO Development tool community
  • What are the mute ramp times in the AD193x codecs?
  • What are the number formats for SigmaDSP?
  • What is the step size for audio delay in a SigmaDSP?
  • When should I use single precision or double precision filters?
  • Where can I buy a SigmaDSP Evaluation Board or USBi (EVAL-ADUSB2EBZ)?
  • Which SPI Mode is used by SigmaDSP Devices?
  • Workaround: Creating constant-dB envelope decay using an existing linear decay algorithm
  • [bug report] False frequency response displayed in a parametric equalizer window for an IIR coefficient filter
  • [Tutorial] Using Hierarchy Boards to create re-usable code

What are the number formats for SigmaDSP?

Question:

In the SigmaStudio help file, some of the algorithms have input and outputs specified as integer or decimal. Also, in the SigmaDSP datasheets, there are references to 28.0 and 5.23. Also, in SigmaStudio, sometimes cells will have other formats like 5.19. What does this mean?

Answer:

SigmaDSP systems use a standardized fixed-point number format. Fixed-point numbers are formatted A.B, where A is the number of bits to the left of the decimal point (the integer part) and B is the number of bits to the right of the decimal point (the fractional part).

Inputs to the SigmaDSP cores are 24 bits. In the core, the DSP adds 4 additional zeros for additional headroom. The result is a 28 bit number representation.

So, in the case of most SigmaDSPs, audio representation is represented with A = 5 and B = 23. In other words, the number format is 5.23. Control signals and index table values generally require integer representation, and are therefore represented with A = 28 and B = 0. In other words, the format is 28.0.

28.0 (Integer) Format

Signals that are in integer format follow standard binary rules for representation.
0 = 0, 1 = 1, 10 = 2, 11 = 3, 100 = 4, et cetera.
Including zero padding (and 4 extra bits to make a 4-byte, 32-bit word for the control port), positive integers in the DSP are represented as follows:

0000 0000 0000 0000 0000 0000 0000 0000 = 0
0000 0000 0000 0000 0000 0000 0000 0001 = 1
0000 0000 0000 0000 0000 0000 0000 0010 = 2
0000 0000 0000 0000 0000 0000 0000 0011 = 3
0000 0000 0000 0000 0000 0000 0000 0100 = 4
...
0000 0000 1000 0000 0000 0000 0000 0000 = 8388608 (0 dB full scale represented in 28.0 format)
...
0000 0111 1111 1111 1111 1111 1111 1111 = 134217727 (2^27 - 1)

Negative numbers are represented in two's complement. For more information on two's complement, please read the very comprehensive article on Wikipedia here: http://en.wikipedia.org/wiki/Two%27s_complement

The corresponding 28-bit two's complement integers (with 4 bits added on top for the control port) are represented as follows:

1111 1000 0000 0000 0000 0000 0000 0000 = -134217728 (2^27)
...
1111 1111 1111 1111 1111 1111 1111 1100 = -4
1111 1111 1111 1111 1111 1111 1111 1101 = -3
1111 1111 1111 1111 1111 1111 1111 1110 = -2
1111 1111 1111 1111 1111 1111 1111 1111 = -1

In general, negative integers are not used in SigmaStudio or SigmaDSP algorithms.

When outputting to the serial ports or DACs, signals will saturate at 0 dBFS. This means any signal exceeding 8388608 in 28.0 format will be limited to full-scale on the outputs.

5.23 (Decimal) Format

Audio, unlike control signals, is not represented as an integer, but rather as a decimal value. A full-scale audio signal has an amplitude of 1. If -3 dB of gain is applied, it should have an amplitude of approximately 0.707. If -6 dB of gain is applied, the signal has an amplitude of 0.5. So, it is easy to see that audio signals need to be represented as decimal numbers.

A full scale 24-bit input signal would have a positive peak of 1000 0000 0000 0000 0000 0000 in unsigned, 24-bit representation. If we add 4 bits of headroom, the 28-bit representation becomes 0000 1000 0000 0000 0000 0000 0000. There is also an additional nibble (4 bits) added on top to make the total word length 4 bytes, which makes the 32-bit representation 0000 0000 1000 0000 0000 0000 0000 0000. If two's-complement representation is used, then the negative peak of a full-scale signal becomes 1111 1111 1000 0000 0000 0000 0000 0000.

The top 4 bits, used to make a whole number of bytes for the control port, are actually ignored inside the DSP. So, the top 4 bits are effectively "don't care."

Moving the leading '1' to the left or right will double or halve the value, respectively.

0000 0000 0000 0000 0000 0000 0000 0000 =  0.0
0000 0000 0010 0000 0000 0000 0000 0000 =  0.25
0000 0000 0100 0000 0000 0000 0000 0000 =  0.5
0000 0000 1000 0000 0000 0000 0000 0000 =  1.0 (0 dB full scale)
0000 0001 0000 0000 0000 0000 0000 0000 =  2.0
0000 0010 0000 0000 0000 0000 0000 0000 =  4.0
0000 0111 1111 1111 1111 1111 1111 1111 =  (16.0 - 1 LSB)

For negative numbers, signed two's-complement is used.

1111 1000 0000 0000 0000 0000 0000 0000 =  -16.0
1111 1110 0000 0000 0000 0000 0000 0000 =  -4.0

1111 1111 0000 0000 0000 0000 0000 0000 =  -1.0
1111 1111 1000 0000 0000 0000 0000 0000 =  -1.0
1111 1111 1100 0000 0000 0000 0000 0000 =  -0.5
1111 1111 1110 0000 0000 0000 0000 0000 =  -0.25
1111 1111 1111 1111 1111 1111 1111 1111 =  (1 LSB below 0.0)

When outputting to the serial ports or DACs, signals will saturate at 0 dBFS. This means any signal with a peak exceeding 1.0 in 5.23 format will be limited to full-scale on the outputs.

5.27 (Decimal) Format (ADAU1772)

A full scale 24-bit input signal would have a positive peak of 1000 0000 0000 0000 0000 0000 in unsigned, 24-bit representation. If we add 4 bits of headroom, the 28-bit representation becomes 0000 1000 0000 0000 0000 0000 0000. The ADAU1772 has an additional four bits for extended precision so this then becomes 0000 1000 0000 0000 0000 0000 0000 0000. If two's-complement representation is used, then the negative peak of a full-scale signal becomes 1111 1000 0000 0000 0000 0000 0000 0000.

Moving the leading '1' to the left or right will double or halve the value, respectively.

0000 0000 0000 0000 0000 0000 0000 0000 =  0.0
0000 0010 0000 0000 0000 0000 0000 0000 =  0.25
0000 0100 0000 0000 0000 0000 0000 0000 =  0.5
0000 1000 0000 0000 0000 0000 0000 0000 =  1.0 (0 dB full scale)
0001 0000 0000 0000 0000 0000 0000 0000 =  2.0
0010 0000 0000 0000 0000 0000 0000 0000 =  4.0
0111 1111 1111 1111 1111 1111 1111 1111 =  (16.0 - 1 LSB)

For negative numbers, signed two's-complement is used.

1000 0000 0000 0000 0000 0000 0000 0000 =  -16.0
1110 0000 0000 0000 0000 0000 0000 0000 =  -4.0
1111 0000 0000 0000 0000 0000 0000 0000 =  -1.0
1111 1000 0000 0000 0000 0000 0000 0000 =  -1.0
1111 1100 0000 0000 0000 0000 0000 0000 =  -0.5
1111 1110 0000 0000 0000 0000 0000 0000 =  -0.25
1111 1111 1111 1111 1111 1111 1111 1111 =  (1 LSB below 0.0)

5.19 (Hardware readback) Format

Some cells in SigmaStudio may use slightly different number formats. For example, since the hardware-based DSP readback registers in the ADAU1701 only have 24 bits, the lower 4 bits from the 5.23 signal are truncated and the number is represented in 5.19 format.

So, a full-scale signal that was represented in 5.23 format as
0000 1000 0000 0000 0000 0000 0000
would have its lower 4 bits truncated for 5.19 representation:
0000 1000 0000 0000 0000 0000

The result is that very small amplitude signals will be truncated and therefore cannot be read back from the DSP on the older generation of SigmaDSP cores.

Newer cores, such as the ADAU1761 and ADAU144x, have full 5.23 readback capabilities implemented in software.

Question:

From the datasheet:

The parameter RAM is 32 bits wide and occupies Address 0 to Address 1023. Each parameter is padded with four 0s before the MSB to extend the 28-bit word to a full 4-byte width.

If writing these values from a microcontroller, do we have to ensure that these padding bits are always 0, or is their value ignored?

Answer:

The value of the top 4 bits will be ignored. Only the 28 LSBs matter. So, you can write 0x0FFFFFFF or 0xFFFFFFFF to the control port, and the DSP will regard them as the same number.

This FAQ was generated from the following discussion: What are the number formats for SigmaDSP?

  • format
  • fixed_point
  • number
  • sigmadsp
  • Share
  • History
  • More
  • Cancel
Comments
Anonymous
  • KJBob
    KJBob
    •  Super User 
    over 2 years ago

         The Sigma 300 and 350 DSPs (1452, 1466, etc.) introduce a 8.24 decimal format with a range from -128 to +127.99...  The corresponding integer format is 32.0.  

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Related
 
社交网络
快速链接
  • 关于ADI
  • Partners
  • 模拟对话
  • 职业
  • 联系我们
  • 投资信息
  • 新闻中心
  • 质量和可靠性
  • 办事处与代理商
  • Analog Garage
语言
  • English
  • 简体中文
  • 日本語
  • Руccкий
电子快讯

欲获得最新ADI产品、设计工具、培训与活动的相关新闻与文章,请从我们的在线快讯中选出您感兴趣的产品类别,每月或每季度都会发送至您的收件箱。

订阅
Switch to mobile view
Analog Logo
© 1995 - 2021 Analog Devices, Inc. All Rights Reserved 沪ICP备09046653号-1
  • ©
  • 1995 - 2021 Analog Devices, Inc. All Rights Reserved
  • 沪ICP备09046653号-1
  • 网站地图
  • 隐私和保密政策
  • 隐私设置
  • 使用条款
 
Social
Quick Links
  • About ADI
  • Partners
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Analog Garage
Languages
  • English
  • 简体中文
  • 日本語
  • Руccкий
Newsletters

Interested in the latest news and articles about ADI products, design tools, training and events? Choose from one of our 12 newsletters that match your product area of interest, delivered monthly or quarterly to your inbox.

Sign Up
Switch to mobile view
Analog Logo
© 1995 - 2021 Analog Devices, Inc. All Rights Reserved 沪ICP备09046653号-1
  • ©
  • 1995 - 2021 Analog Devices, Inc. All Rights Reserved
  • 沪ICP备09046653号-1
  • Sitemap
  • Privacy & Security
  • Privacy Settings
  • Terms of use
EngineerZone Uses cookies to ensure you get the best experience in our community. For more information on cookies, please read our Privacy & Security Statement.