Locale Icon
English
  • Forums

    Popular Forums

    • LTspice
    • Video
    • Power Management
    • RF & Microwave
    • Precision ADCs
    • FPGA Reference Designs

    Product Forums

    • Amplifiers
    • Clocks & Timers
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Power Management
    • Processors & DSP
    • Processors & Microcontrollers
    • Switches & Multiplexers
    • Sensors
    • Voltage References
    View All

    Application Forums

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

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools & Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Precision Studio
    • Power Studio Designer
    • Power Studio Planner
    • Reference Designs
    • Robot Operating System (ROS) SDK
    • Signal Chain Designer
    • Software Interface Tools
  • Learn

    Highlighted Webinar

    Fast-Track Certification: Leveraging IC Safety App Notes for Functional Safety Designs

    Stop guessing, start certifying. Learn how to use IC safety application notes to streamline your FMEDA and meet IEC 61508 and ISO 13849 standards with...

    Places

    • ADI Academy
    • ADI Webinars
    • EZ Blogs
    • Video Annex
    • Virtual Classroom

    Libraries

    • 3D ToF Depth Sensing Library
    • Continuous-Wave CMOS Time of Flight (TOF) Library
    • Embedded Vision Sensing Library
    • Gigabit Multimedia Serial Link (GMSL) Library
    • Optical Sensing Library
    • Other Products Library
    • Precision Technology Signal Chains Library
    • Software Modules and SDKs Library
    • Supervisory Circuits Library
    • Wireless Sensor Networks Library

    Upcoming Learning & Events

    • COTS SoMs & Phased Array Solutions for Rapid RF Subsystem Integration
    • LEO Satcom: Application of RF, Mixed-Signal, & Beamforming ICs
    • 3 Real World Methods to Make Your Power Supply More Intelligent
    • Revolutionizing Flow Cytometry: 20-Bit Precision Signal Chain
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quiz AQQ300 about Divisibility by 6

      1. Quote of the month: " Friendship is like money - easier made than kept " - Samuel Butler 2. New quiz AQQ300 about a divisibility by 6 puzzle ...

    View All

    What's Brewing

      Read a Blog, Take this Quiz for Another Chance to Win a Gift Card!

      Important: Read the blog first . The quiz questions are all based on the content of the blog: Taming the AI Power Storm: Part 2 of 3 Test your...

    View All

    Places

    • Community Help
    • Analog Dialogue Quiz
    • Logic Lounge
    • Super User Program

    Resources

    • EZ Code of Conduct
    • EZ How To Help Articles
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • ContentZone

    Visit ContentZone

    Search content by industry or technology.
    • Blogs
    • Technical Articles
    • Tutorials
    • Videos
    • Webinars
    Your ADI content all in one place.
    View ContentZone

    The Latest Read

    Clock Tree Design and Why “PLL Locked” Is Not Enough

    In high-performance RF systems, clocking architecture is a foundational element that directly governs signal integrity, synchronization, and overall system...

    New Release

    Signal Chain Designer: DC Error Simulation
    Signal Chain Designer: DC Error Simulation

    This video covers the DC error calculation capabilities of Signal Chain Designer. DC error is unique in that often requires calibration and has so many...

    Recent Technical Insights

    Latest Technical Article from Analog.com
    Improving Industrial Functional Safety Compliance with High Performance Supervisory CircuitsPart 5: Sequencers Eliminate Systematic Failures

    This article shifts focus from managing the quantitative metrics of functional safety toward mastering the qualitative yet equally critical challenge:...

EngineerZone
EngineerZone
ADSP-SC5xx/ADSP-215xx
  • Log In
  • User
  • Site
  • Search
OR
Ask a Question
ADSP-SC5xx/ADSP-215xx
  • Processors & DSP
  • SHARC Processors
  • ADSP-SC5xx/ADSP-215xx
  • Cancel
ADSP-SC5xx/ADSP-215xx
Documents How to handle Self modifying codes in SHARC+ Core?
  • Q&A
  • Files
  • Documents
  • Members
  • Tags
  • Cancel
  • +ADSP-SC57x/2157x: FAQ
  • +ADSP-SC58x: FAQ
  • +PMU registers: FAQ
  • +SC58x: FAQ
  • -SHARC+: FAQ
    • How many cycles does it take for a branch in SHARC+ ? How can I improve?
    • Does BTB affect the performance of the SHARC+ core when there is a branch misprediction?
    • Does hardware loops exist in SHARC+ Core ? Are they different from SHARC Core ?
    • How to handle Self modifying codes in SHARC+ Core?
    • In SHARC+ Core, does the external instruction fetch get cached in the Instruction Conflict Cache ?
    • In SHARC+ Core, for which interrupt does the status push happens automatically?
    • Is self-nesting of Interrupts allowed in SHARC+ Core?
    • Is Software Interrupt for Cortex A5 and SHARC core common?
    • Is the Core interrupt priority programmable in SHARC+ Core as in SHARC Core?
    • Is the Interrupt Vector table in SHARC+ core same as that in SHARC core?
    • Is there a scenario which results in a pipeline stall when the SHARC+ core is accessing L1 memory?
    • How does the DMA (Peripheral and Memory DMA) view SHARC’s L1 memory?
    • Is there any way that an Interrupt processing can be delayed in SHARC+ Core?
    • What is the difference between SHARC and SHARC+ Core pipeline?
    • What is the minimum latency between a Core interrupt and the branch to the IVT?
    • Are the branch operations impacted by the increase in the number of pipeline stages in SHARC+ Core? If so, how are they mitigated?
    • Are the CCES Run-time libraries optimized for SHARC+ Core?
    • Are the registers used to program the core interrupts in SHARC+ same as in SHARC Core?
    • Are there any new Core interrupts in SHARC+ Core?
    • Can all the core interrupts be masked in SHARC+ Core?
    • Is there any change in the L1 memory map of SHARC+ Core of ADSP-SC589when compared to SHARC Core in ADSP-214xx family of processors?
    • What are the different stages of pipeline in SHARC+ Core ?
    • What is the number of MAC operations that can be done in parallel in SHARC+ Core?
    • Where is the default IVT of SHARC+ Core located? Can it be changed?
    • Which L1 memory alias should the peripherals use to access the SHARC+ L1 Memory?
    • Will Boot streams generated for SPI master for SHARC+ core only boot on Power on Reset?
  • +TMU: FAQ
  • +215XX: FAQ
  • +ADC Control Module: FAQ
  • +ADSP-21584: FAQ
  • +ADSP-215xxl: FAQ
  • +ADSP-SC573: FAQ
  • +ADSP-SC5xx/215xx: FAQ
  • +ADSP-SC5xx: FAQ
  • +CCES default startup routine: FAQ
  • +EMAC: FAQ
  • +HADC: FAQ
  • +Hardware Counter based Loops: FAQ
  • +L1 block: FAQ
  • +Preload code customization: FAQ
  • +RDEN bit: FAQ
  • +RGMII/RMII: FAQ
  • +SHARC EE-377: FAQ
  • +Sharc SC584: FAQ
  • +SMMR using MDMA2: FAQ
  • +UCOS: FAQ
  • +USBCLKSEL in CGU_CLKOUT: FAQ
  • ADSP-21569 SPORT single-transmitter multi-receiver example
  • ADSP-SC584 SSL Booting via ROM API from the ARM Cortex A5 (core0), SHARC0 and SHARC1
  • +adsp-sc584: FAQ
  • ADSP-SC594 SPDIF Example
  • ADSP-SC835 SPI Slave transmitter and Master Receiver example code
  • Are code segments placed in block1 and block2, when data caches are enabled?
  • ASRC TDM8/TDM16 Example for ADSP-SC59x
  • Can we use internal pull down resistor for ADSP-SC59x/ADSP-2159x LP_CLK and LP_ACK pins instead of external pull down?
  • +CDU: FAQ
  • Custom Error Handler in Booting for SC594
  • DAI Interrupt example for ADSP-SC573
  • Do ADSP-SC58x/ADSP-SC57x support adi_pkte.h and adi_pka.h?
  • Does QUAD SPI open-drain mode need external pull-up resistors for each of these signals (MISO, MOSI, D2 & D3) in ADSP-21569
  • Does the LRCLK support 50% duty cycle in TDM mode?
  • Does the TMREXP(Timer Expired) pin support in latest SHARC processor?
  • Driver file support for the ADSP-SC584/SC589 custom board, which utilizes the same flash and DDR as Ez-kit.
  • Flash write example for ADSP-SC573 Ez-Kit
  • How many cycles for a cache hit/miss?
  • How many times the DAI can be routed using SRU?
  • How to configure DAI interrupt in ADSP-21569?
  • How to use Assembly to Control Core Flags?
  • How to use PCG trigger event
  • How to use PC_07 instead of SYS_FAULT in ADSP-2156x/ADSP-SC59x/ADSP-2159x ?
  • +IDLE: FAQ
  • Is it possible to change the sampling/driving edges of the ASRC?
  • Is it possible to configure the DSP as Master and Host as Slave once SPI slave booting done?
  • Is it possible to disable/halt/pause the SHARC0/SHARC1 cores from ARM core?
  • Is it possible to verify Secure Booting without programming Keys into OTP Memory?
  • Is the SPIx_RDY signal necessary for SPI slave boot?
  • JEDEC thermal Resistance Data estimation for "θJA, θJC, ΨJT" in ADSP-SC5xx/ADSP-215xx processor.
  • +Local Oscillator: FAQ
  • +MLB channels: FAQ
  • +MSI IDMAC: FAQ
  • Once the processor is locked, is it possible to debug or flash a new application?
  • +Program the CBS parameters: FAQ
  • +SC57x: FAQ
  • SCB arbitration/priority scheme
  • +Sign and encrypt a normal bootstream: FAQ
  • SPI example for ADSP-SC584
  • SPI secure slave boot
  • +SPORT with ACM: FAQ
  • +SWU: FAQ
  • Understanding Halt feature in ACM Mode
  • Usage of flush_data_buffer api
  • Using MCAPI/MDMA for ADSP-SC594 Dual-SHARC Audio Talkthrough
  • What is "Multiplexed Function Input Tap" available in the "Signal Multiplexing" table in the datasheet.
  • What is the clock configuration (HFCLK, BCLK) required to transmit SPDIF?
  • What is the difference between ENUM_DMA_CFG_XCNT_INT and ENUM_DMA_CFG_PERIPH_INT?
  • What is the recommended TMU_GAIN and TMU_OFFSET value for Calibration?
  • What is the SPORT Latency using DMA between the SHARC cores(Core1 & Core2) for ADSP-SC58x?
  • What is the supported SLCK0 divisor value for ADSP-2156x

How to handle Self modifying codes in SHARC+ Core?

There is a difference in the way the self-modifying codes has to be written in SHARC and SHARC+ core , and if you are porting the ‘asm’ code from previous SHARC , it is worth taking care of this new restriction in SHARC+ Core.

 

SHARC + core  is a 11 stage pipeline and it has 4 fetch stages

Say that an instruction executing from address ‘x’ is trying to modify the binary data present in the address range [a,b] . ‘a’ is the present PC value and ‘b’ is some address in the vicinity[a < x < b].  All the instruction present in the range [a,a+11] would have been fetched already

Now if ‘x’ is between a < x < a+11 , this implies that we are trying to modifying the memory location of the instruction which has already been fetched. In this case, the memory location will be updated with the new value but the execution happens with the old value which was fetched earlier.

 

This means that , in SHARC+ core, there is a minimum distance (in terms of memory location ) between the address of the ‘modifying’ instruction and the memory location to be ‘modified’

There should also be a ‘SYNC’ instruction after a self-modifying instruction.

 

Eg . I am executing from L1 Block 0 and one of the instruction writes to the same memory location, thereby changing the opcode

The expectation is that , now the execution should take place based on the new opcodes written . For this to happen , there should be a ‘SYNC’ instruction followed by certain number of ‘nop’ instructions between that self-modifying instruction and the address to be modified.

Refer to the ADSP-SC58x Programming reference manual for the exact number of ‘NOPS’ required .

Also when self-modifying codes are used, Conflict cache, BTB and L1 Cache should be flushed and invalidated.

 

 

 

Tags: sharc+ adsp-sc58x
  • Share
  • History
  • More
  • Cancel
analog-devices logo

About Analog Devices

  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
  • Instagram page
  • Twitter page
  • Linkedin page
  • Youtube page
  • Facebook
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved

analog-devices

About Analog Devices

Down Up
  • Who We Are
  • Careers
  • Newsroom
  • What We Do (Signals+)
  • Investor RelationsExternalLink
  • Quality & Reliability
  • Sales and Distribution
  • What's New on Analog.com
  • Contact Us

Find Help

Down Up
  • Support
  • Resources
  • WikiExternalLink
  • Analog Dialogue
  • ADI Developer PortalExternalLink

myAnalog

Interested in the latest news and articles about ADI products, design tools, training, and events?

Go to myAnalog
Instagram page Facebook Twitter page Linkedin page Youtube page
  • Legal and Risk
  • Accessibility
  • Privacy Policy
  • Privacy Settings
  • Cookie Settings

©2026 Analog Devices, Inc. All Rights Reserved