Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Support

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing
    • Optical Sensing
    • Precision Technology Signal Chains
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Recent Discussions

    • Pluto + GNURADIO frequency change
    • Pluto SDR
    • pluto sdr pyadi-iio continous iq recording
    • attribute error
    • gps-sdr-sim is not working with my ADALM-PLUTO

    Places

    • ADI Education Home
    • ADI Education China
    • ADI Education India
    • ADI Education Philippines
    • StudentZone (Analog Dialogue)
    • Virtual Classroom

    Latest Webinars

    • Webinar Biasing Circuits for GaN and GaAs RF Amplifiers
    • Webinar Improving Switch-Mode Power Supplies Using Noise Cancelling Technology
    • Webinar Accelerate Your Design With a 2 to 24 GHz Wideband Transceiver Reference Design
    • How to Design an Optimized Motion Control System for Intelligent Edge Based Surveillance Camera
    • How to Enhance High Precision Current Sensing Systems
    View All
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes: Buffers and Fan Out
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

     

    How To Design Fieldbus Agnostic Smart Factory Sensors

     

    You Passed EMC Testing… But Wait, Is There More?

    Latest Blogs

    • The 5 Things You Need to Know about RF Matching Networks
    • Does Reliability Prediction Uncertainty Justify Mandating Two Channel Safety?
    • An Inside Look at 2022
    • Meet the Person Behind the Quizzes
    • Updates Required: Why Newer is Better
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
SHARC Processors
  • Processors and DSP
SHARC Processors
Documents 214xx IIR Accelerator -  how to use the save state operation ?
  • Forums
  • Documents
  • Members
  • Tags
  • More
  • Cancel
  • Documents
  • -214xx IIR AcceleratorL FAQ
    • 214xx IIR Accelerator -  how to use the save state operation ?
  • +214xx processors: FAQ
  • +ADSP-21364: FAQ
  • +ADSP-21369: FAQ
  • +ADSP-21371: FAQ
  • +ADSP-21469: FAQ
  • +ADSP-21479: FAQ
  • +ADSP-21489: FAQ
  • +ADSP-2148x: FAQ
  • +ADSP-SC58x: FAQ
  • +Breakpoint: FAQ
  • +Debug an Application: FAQ
  • FIR Accelerator performance degrades when modifier(ADI_FIR_CHANNEL_INFO structure) are other than 1
  • +I2S PCG: FAQ
  • +JTAG: FAQ
  • +SHARC family: FAQ
  • +SHARC processor: FAQ
  • +SPI serial flash driver: FAQ
  • +SSL: FAQ
  • +USB VID/PID: FAQ

214xx IIR Accelerator -  how to use the save state operation ?

The IIR_SS bit (IIRCTL1 register) completely stores the current biquad states in local memory (writes all the DK1 and DK2 states back into the

internal memory states). This is useful in applications that require fast switching to another high priority accelerator task—a required IIR to FIR

processing transition for example. After resuming these states can be reloaded and IIR processing can be continued.

Having said that, there are following few important points which need to be taken care of when using this feature:

1. Once the save state operation has started, it can’t be stopped even by clearing the IIR_EN or IIR_DMAEN bits.  Setting IIR_EN and IIR_DMAEN bits would be complete from the core’s side, but will take effect only after the save state operation is complete. Thus, before trying to disable the IIR accelerator, one must poll the corresponding status bits in the IIRDMASTAT register(refer to the table A-53 at page A-91) to make sure that the save state operation is completed successfully. The latency involved (with no other higher priority DMA ON) due to save state operation is given by the following expression: 

For 32 bit mode:

14*N + ((8*M)+2)*N)

For 40 bit mode:

14*N + ((15*M)+2)*N)

where N = number of channels, M = number of biquads per channel

2. A write access to any of the IIR accelerator registers which are loaded by chaining method (such as CPIIR, IIRCTL2 etc. as listed in table 3-20 in the I/O Processor chapter) is not allowed when save state operation is going on.   A write access to these registers when the save state operation is ON, might result in blocking of IOP core reads until the save state operation completes.  Assume a case where the accelerator is configured to generate the interrupt when all channels are done. Inside the ISR, one wants to disable the accelerator and re-enable it again as shown in the code below:

IIR_DMA_ISR:

*pIIRCTL=0;  // Disables the accelerator (clears IIR_EN and IIR_DMAEN bits) without waiting for save state operation to complete

*pCPIIR = <New TCB Address>; //Write access to the CPIIR DMA parameter register

<IOP core read access e.g. r0 = dm(IISPI); > //This IOP access will be blocked till the save state operation is complete.

3.  It has to be noted that in case of more than one channel (IIR_NCH>0), the IIR_DMASVDk toggles between ‘0’ and ‘1’ as it starts and completes the save state operation of each channel one by one. Thus, one should not rely only on this bit to become zero to ensure that the save state operation is complete for all the channels. To ensure a graceful completion of the save state operation, one must poll both IIR_DMACPL and IIR_DMASVDk bits and make sure that (IIR_DMACPL OR IIR_DMASVDk) = 0 after the IIR_DMAACDONE bit is set. To minimize the core intervention, the recommended method would be to configure the accelerator to generate an interrupt when the processing of all the channels is complete (IIR_CCINTR bit of IIRCTL1 register is set) and wait till (IIR_DMACPL OR IIR_DMASVDk) = 0 inside the interrupt service routine. To minimize the interrupt service time, the core can perform some unrelated tasks before it starts polling for the save state operation completion.  For example, the above code can be modified as follows to ensure graceful completion of the save state operation:

#define SAVE_STATE_COMPLETE (IIR_DMACPL|IIR_DMASVDk)

IIR_DMA_ISR:

<do some unrelated core tasks>

while((SAVE_STATE_COMPLETE&*pIIRDMASTAT)!=0)

{

    asm("nop;");

}

*pIIRCTL=0;  // Disables the accelerator (clears IIR_EN and IIR_DMAEN bits) without waiting for save state operation to complete

*pCPIIR = <New TCB Address>; //Write access to the CPIIR DMA parameter register

<IOP core read access e.g. r0 = dm(IISPI); > //This IOP access will NOT be blocked till the save state operation is complete.

4. General guidelines to avoid performance loss:

When IIR accelerator is used in a system, disabling the accelerator and re-enabling it by setting and clearing the IIR_EN bit is not recommended unless really required as it reloads the coefficients as well.   Clearing and setting the IIR_DMAEN bit should be sufficient most of the times if the coefficients are not going to change. The accelerator has local memory sufficient to store the coefficients for up to 24 channels and 12 biquads each channel. Also, the save state feature is designed for some rare cases where it is really required. To avoid performance loss, one should carefully analyze the system requirements and use the save state feature only if really required.

  • Share
  • History
  • More
  • Cancel
Related
Recommended
 
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 - 2023 Analog Devices, Inc. All Rights Reserved 沪ICP备09046653号-1
  • ©
  • 1995 - 2023 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.