Cirrus Logic AN333 User Manual

Mid-Processor O ver l ay
PCM Out p ut s
Post-Processor Overlay (wit h APP loaded)
ID = 0x83
ID = 0xD9
ID = 0xD5ID = 0xD 4
Tone Control Module
Re-EQ™
Module
Bass
Management
Module
Parametric
EQ
Module
Delay
Module
Audio Man age r
Module
Includes:
Ga in (mas ter) Mute ( mas ter) Channel Trim Channel Remap
Up-sampler
Matri x Pr ocessor Modul e
Crossbar
Virtual i z er Processor
Module
Dolby Headphone®
Virtual izer Processor Overlay
Matri x Process or Overlay
PCM inputs
Down-
sampler
AN333
CS470xx Firmware User’s Manual:
General Overview and Common Firmware Modules
Contents
Overview
This document provides a description of the operation of firmware for the CS470xx family of DSPs and attempts to explain frequently used terminology and, at the same time, systematically explains the OS operation and communication for the CS470xx.
This document is a general overview to the family of CS470xx Firmware User’s Manuals designated by the general name AN333[X][Y]; where [X] = MPM (matrix processing module), VPM (virtual processing module), PPM (post processing module), and [Y] = A,B,C. The CS470xx family of DSPs does not contain a compressed data decoder.
http://www.cirrus.com
CS470xx Block Diagram
Copyright Cirrus Logic, Inc. 2014
(All Rights Reserved)
AN333
APR '14

1 Document Strategy

1 Document Strategy
The CS470xx has been designed with inherently flexibility in terms of firmware usage. Each instance of operation of the CS470xx can potentially use a different mix of DSP firmware, depending on the needs of the end user. The strategy adopted to document the various DSP firmware is based on a single general overview firmware user’s manual coupled with an individual application note for each DSP firmware module offered by Cirrus Logic.
The individual application notes each follow as an extension of AN333. These manuals have been named in such a way so as to classify them into one of the following cate g or ies:
Operating system and general overview
Matrix processing module (MPM)
Virtual processing module (VPM)
Post-processing module (PPM)
Furthermore, since each classification (such as post-processing module) may contain several associated DSP firmware modules, an incremental letter assignment (such as A, B, C) was given to index each DSP firmware document within a given category. As an example, the table below outlines the ge neral naming conventions for several firmware documents.
Table 1-1. Naming Conventions
DSP Firmware Module Base Name Overlay Type Index Document Reference Number
General Overview, Operati ng System
and Common Firmware Modules
Delay Module AN333 Post Processing Module (PPM) a AN333PPMA
Crossbar Mixer Module AN333 Matrix Processing Module (MPM) c AN333MPMC
Dolby Headphone 2 AN333 Virtual Processing Module (VPM) a AN333VPMA
AN333 (General) AN333
For a further breakdown of the available CS470xx firmware modules and their respective application note document numbers, see Section 2.3. Contact your local field applications engineer (FAE) for the latest code updates and availability.
2 AN333

2 Overview

2 Overview
The firmware that runs on this device expects a stereo or multichannel PCM input source. This section describes the overlays.
The DSP program memory is divided into five functional segments called overlays that can be thought of as the locations for the firmware modules that are accessed and implemented by the DSP. Firmware modules are downloaded into their respective overlays either from internal ROM, or from the host.
•OS Overlay Manages the overall operation of the DSP. Also handles host communication, data inputs and outputs, and other
critical internal tasks.
Decoder Overlay The decoder overlay on CS47xx only supports the Do lby Dig ita l
Matrix Processing Overlay Performs additional channel generation, upmixing, and downmixing. This overlay is where algorithms such as
®
Dolby
Virtual Processing Overlay Performs stereo virtualizing to simulate multichannel systems, such as Dolby
Dolby Virtual Surround
Post-processing Overlay This overlay specifically caters to firmware that performs post-processing tasks. It allows the system designer
flexibility in tweaking the system for optimal audio performance and effects. This is also the segment in which firmware modules such as the Audio Manager, Bass Manager, Tone Control, Delay, and Parametric EQ Module reside.
Pro Logic® IIx and Cirrus Original Multichannel Surround 2™ (COMS-2) reside.
.
®
decoder in certain memory maps.
®
Audistry®, Dolby Headphone®, and

2.1 Code Image (.uld) Files

Each overlay is a separate code image file (.uld) that is loaded individually into the DSP. To ch ange the functionality of the application, only the overlay of interest needs to be loaded. For example the post-processing overlay can be exchanged from SPP to APP by reloading only the post-processing overlay. This reduces the system response time to user changes, as well as the code image storage requirements.
There are four different memory configuration s of the program RAM size, denoted by p2, p4, p6, and p8 (p for program memory; 2, 4, 6, and 8 are the number of kilowords; 1 word = 32 bits). Increasi ng P RAM decreases Y RAM, while X RAM remains the same. Each overlay is denoted as p2, p4, p6, or p8 in the .uld file name to indicate which memory configuration is used. For example, “ac3_p2_xxx.uld”.
Memory configuration must be consistent across all overlays (OS, decoder, MPM, VPM, and PPM).

2.2 Download Sequence

A standard procedure to download firmware to the DSP follows this structure at system power-up:
AN333 3
Step 2 (optional): Download a matrix processing module
(Examples: Crossbar Mixer, Pro Logic IIx, DTS Neo:6®)
Automatically fills the matrix processing overlay.
Step 3 (optional): Download a virtual processing module
(Examples: Dolby Headphone, Dolby Virtual Speaker™) Automatically fills the virtual processing overlay.
Step 4: Download a post -processor module group
(Exa mples : SPP, APP) Automatically fills the post-processing overlay. If SPP or APP is not required, then the bare
requirement f or t his overlay is the Audio Manager module.
Step 1: Download the firmware OS _p*_**.uld
Automatically fills the OS over lay. (*2, 4, 6, or 8 for mem or y ma p; **device and version)
2.2 Download Sequence
Figure 2-1. Download Sequence
4 AN333
AN333 5

2.3 Firmware Modules and Associated Application Notes

Table 2-1. Firmware Module Read and Write Addresses with Associated Application Note Reference
DSP Firmware Module / (Application Note Name)
General OS Manager (AN333) Matrix Processing Overlay Dolby Pro Logic IIx (AN333MPMA) 01, 07 0xBF00HHHH 0xhhhhhhhh 0xBFC0HHHH 0x3FC0HHHH 0xhhhhhhhh DTS Neo:6 (AN333MPMB) Crossbar (AN333MPMC)
®
SRS
Circle Surround
®
SRS Circle Surround II SRS Circle Surround Auto (AN333MPMG) Signal Generator (AN333MPMH) Cirrus Original Multichannel Surround 2 (COMS-2) (AN333MPMJ) Virtual Processor Overlay SRS TruSurround XT
®
(AN333VPMH) Dolby Headphone 2 (AN333VPMK) Dolby Virtual Speaker 2 (AN333VPML)
®
SRS
TruSurround HD4™ Modules (with SRS WOW
®
) (AN333VPMM)
HD
Supported Memory Map(s)
(Firmware Version)
Write Request Read Request Read Response
01, 03, 05, 07, 09 0x8100HHHH 0xhhhhhhhh 0x81C0HHHH 0x01C0HHHH 0xhhhhhhhh
01 0xB500HHHH 0xhhhhhhhh 0xB5C0HHHH 0x35C0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0xDB00HHHH 0xhhhhhhhh 0xDBC0HHHH; 0x5BC0HHHH 0xhhhhhhhh
03, 05 0xB300HHHH 0xhhhhhhhh 0xB3C0HHHH 0x33C0HHHH 0xhhhhhhhh
01, 03 0x9A00HHHH 0xhhhhhhhh 0x9AC0HHHH 0x1AC0HHHH 0xhhhhhhhh
03 0xD300HHHH 0xhhhhhhhh 0xD3C0HHHH 0x53C0HHHH 0xhhhhhhhh
01 0xBA00HHHH 0xhhhhhhhh 0xBAC0HHHH 0x3AC0HHHH 0xhhhhhhhh
01 0xC000HHHH 0xhhhhhhhh 0xC0C0HHHH 0x40C0HHHH 0xhhhhhhhh
01 0xC100HHHH 0xhhhhhhhh 0xC1C0HHHH 0x41C0HHHH 0xhhhhhhhh
05 0xB300HHHH 0xhhhhhhhh 0xB3C0HHHH 0x33C0HHHH 0xhhhhhhhh
6 AN333
DSP Firmware Module / (Application Note Name)
Cirrus Virtualization Technology (CVT) - Virtualizer Processor Module (AN333VPMN)
Post-processing Overlays Audio Manager (AN333) PCM Manager (AN333) Delay (AN333PPMA) Bass Manager (AN333PPMB) Cirrus Band XpandeR (BXR) (AN333PPMC) 01 0xE700HHHH 0xhhhhhhhh 0xE7C0HHHH 0x67C0HHHH 0xhhhhhhhh Cirrus Dynamic Volume Leveler (DVL) (AN333PPMD) EQ Module with PEQ and Direct Coefficient Mode
(11-bands) (AN333PPME) Tone Control (AN333PPMF) Cinema Re-EQ™ (AN333PPMK)
Table 2-1. Firmware Module Read and Write Addresses with Associated Application Note Reference (Cont.)
Supported Memory Map(s)
(Firmware Version)
Virtual Processor Overlay (continued)
09 0xC100HHHH 0xhhhhhhhh 0xC1C0HHHH 0x41C0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0x8300HHHH 0xhhhhhhhh 0x83c0HHHH 0x03c0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0x9B00HHHH 0xhhhhhhhh 0x9BC0HHHH 0x1BC0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0xD900HHHH 0xhhhhhhhh 0xD9C0HHHH 0x59C0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0xD700HHHH 0xhhhhhhhh 0xD7C0HHHH 0x57C0HHHH 0xhhhhhhhh
01 0xE600HHHH 0xhhhhhhhh 0xE6C0HHHH 0x67C0HHHH 0xhhhh hhhh
01, 03, 05, 07, 09 0xD500HHHH 0xhhhhhhhh 0xD5C0HHHH 0x55C0HHHH 0xhhhhhhhh
01, 03, 05, 07, 09 0xD400HHHH 0xhhhhhhhh 0xD4C0HHHH 0x54C0HHHH 0xhhhhhhhh
01, 03 0xDC00HHHH 0xhhhhhhhh 0xDCC0HHHH 0x5CC0HHHH 0xhhhhhhhh
Write Request Read Request Read Response
7 AN333
Table 2-1. Firmware Module Read and Write Addresses with Associated Application Note Reference (Cont.)
DSP Firmware Module / (Application Note Name)
SPP (Standard Post Processing) in DSP Composer Module Processing Order:
1. Tone Control
2. BM
3. Delay
4. AM See individual module application notes. APP (Advanced Post Processing) in DSP Composer Mod­ule Processing Order:
1. Tone Control
2. ReEQ
3. BM
4. EQ
5. Delay
6. AM See individual module application notes.
Supported Memory Map(s)
(Firmware Version)
Post-processing Overlays (continued)
01, 03, 05, 07, 09
01, 03
Write Request Read Request Read Response

3 Firmware Messaging

3 Firmware Messaging
While using the CS470xx, it is necessary to communicate with the DSP in order to control or monitor the various downloaded firmware modules. We refer to this process of communication as firmware messaging. The purpose of this section is to describe the types and formats of these firmware messages. In general, the user can control the firmware module running on the DSP with firmware messaging, and subsequently perform various tasks including the following:
Configure the module after firmware download (such as kick-starting the DSP)
Change runtime parameters (such as adjusting the volume or switching Pro Logic II modes)
Obtain information from the DSP (such as the current state of the firmware registers or data stream information)

3.1 Communication Overview

From a microprogramming point of view, the CS470xx firmware modules can be thought of as blocks of several 32-bit registers (variables) that either control the behavior of the firmware or store information about the state of the firmware at the time of operation. Each register has a unique index. Access to the register involves a combination of a specified opcode for that firmware module together with the register index. For each firmware module, the followin g opcod es are ava ilable :
Write Opcode—Issues a command to write to a specific module.
Read Opcode—Issues a command to read from a specific module.
Read-response Opcode—Indicates the modul e and index that have been read.
These available opcodes permit the following types of communication with the CS470xx DSP:
Writing to the DSP
Solicited read from the DSP
Unsolicited read from the DSP

3.1.1 Writing to the DSP

A write session with the CS470xx consists of one 8-byte message from the host to the CS470xx. The write message consists of a 32-bit command word followed by a 32-bit data word (that is, data to be written to the register ). The command word is formed by combining the write opcode for that module with the index of the register that needs to be written. The 32-bit data word is the value of the data intended to fill that register.
Fig. 3-1 shows the format of a write message:
Write Command Word:
313029282726252423222120191817161514131211109876543210
OPCODE[31:16] INDEX[15:0]
Write Data Word:
313029282726252423222120191817161514131211109876543210
DATA WORD[31:0]
Figure 3-1. Write Command and Write Data W ord s

3.1.2 Solicited Read

A solicited read can be thought of as a request to read the contents of a specific register. A solicited read is composed of a 32-bit solicited read-command word, which is a request to read a specific index (register) in a given module or read up to sixteen consecutive indices. The DSP, upon receiving this message, responds by sending back a 32-b it read-response opcode and the requested 32-bit data word(s) contained in each of the indices read.
8 AN333
3.1 Communication Overview
Fig. 3-2 provides the format of a solicited read message:
Read Command Word:
313029282726252423222120191817161514131211109876543210 OPCODE[31:16] (Bits 31:24 = Module ID+0x80, bits 23:20 =
0xc, bits 19:16 = <num of indices – 1>)
Figure 3-2. Read Command Data Word
Fig. 3-3 provides the format of a solicited read message:
Read-Response Command Word:
313029282726252423222120191817161514131211109876543210
OPCODE[31:16] (Bits 31:24= Module ID, Bits 23:20 =0xc,
Bits 19:16= <num of indices – 1>)
Read-Response Data Word(s):
313029282726252423222120191817161514131211109876543210
DATA WORD[31:0]
Figure 3-3. Read-Response Command and Read-response Data Words
INDEX[15:0] (First index to be read)
INDEX[15:0] (First index to be read)

3.1.3 Unsolicited Message

The DSP needs to inform the host when the PLL is out of lock or there is a runtime memory allocation error (malloc failure). This type of message is considered an unsolicited message because it was initiated by the CS470xx rather than the host.
This message comes from the CS470xx to indicate a change in the system that must be addressed. The 8- byte unsolicited read messages from the CS470xx consists of a 4-byte read command word, which defines the type of unsolicited message, and an associated 4-byte data word that contains more information describing a system condition. When the IRQ pin for the port being used goes low (SCP1_IRQ to be read. Every time a message is detected, the host reads out the 8-byte unsolicited read message.
or PCP_IRQ), the host senses that an unsolicited message is ready
AN333 9
Loading...
+ 19 hidden pages