NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Interrupt Latency Checker

From Texas Instruments Wiki
Jump to: navigation, search

Interrupt Latency Checker (ILC)[edit]

Interrupt Latency checker is a trace feature on simulator, which provide users a deterministic measure of the worst-case interrupt latency of the application code.

  • Interrupt Latency - Duration between receiving an interrupt and processing the interrupt.

Why we need ILC?[edit]

  • Possibility of missing interrupt due to programmatic errors or long non-interruptible loops that may not be caught before system integration
  • Interrupt latency reported by customer and algorithm supplier are different. Need a deterministic way to calculate latency.

Existing method to calculate Interrupt Latency[edit]

  • Modify the application, by adding a periodic interrupt. Due to application interrupt latency, the execution of this periodic interrupt can be delayed.
  • This delay should be measured. E.g., the associated interrupt service routine (ISR) could implement either of the following two approaches:
    • Record the maximum difference between (actual time of invocation - expected time of invocation).
    • Record the maximum skid in cycles from the time the interrupt was executed last to the time the ISR is executed this time.
(Make sure no other interrupts can preempt this ISR, as they could otherwise distort the measurements.)
  • Run the code on the target, and retrieve the recorded maximum delay at the end of the test run.
  • Depending on the periodic interrupt period, and when the ISR happened to occur at run-time in relationship to application sections of disabled interrupts, this recorded maximum delay is an indication for the interrupt latency.

Problem with existing method[edit]

  • Intrusive
    • The act of measuring changes the application behavior.
  • Measurement Time is high since
    • Code keeps jumping to the ISR.
  • Needs a lot of automation support to be built. Not very trivial to do this

Advantage[edit]

  • Provide the users a deterministic measure of the worst-case interrupt latency of the code.
  • Based on the approach of monitoring sources of interrupt enables/disables
    • Non-intrusive: Monitor GIE writes, branch delay slots, NMI writes in c6000 for example.
    • Get the worst case latency for a test vector.
    • Characterize the interrupt latency of the algorithm.

Usage[edit]

Follow the steps given below to get ILC traces.

  • Load GEL file "interruptlatencydetector.gel" located in "<CCS install dir>/cc/gel". (Note: Threshold is set to 500 by default.)

ILC pic gel.jpg

  1. Load the application on the simulator
  2. Identify “Start Profile Point” and “End Profile point
  3. Set the Threshold latency.
  4. Run the application until the “Start Profile Point”.
  5. Run GEL command 'Start profiling'
  6. Run the application until the “End Profile Point
  7. Run GEL command 'Stop profiling'
  8. Quit the CCS to observe the Interrupt Latency Profile. [For efficiency reason, the log is interrupt latency profile log is complete only on simulation quit]
  9. The older ILC generated a CSV file, but the newer tool generates an XML file that will be present in the same folder as the executable (*.out file). File name of the XML file is same as the .out file but with a .xml extention.
  • Note: In case of multiple Start and End Profile Points, repeat step 4 to 7 for every {Start Profile Point, End Profile Point} set

CCSv4 Usage[edit]

Simulators which support ILC will have GEL menu under scipts tab in CCSv4. If the menu is not available load the GEL file (tisim_ilc.gel) from <CCSv4 Install Dir>\ccsv4\simulation\env\ccs\import\tisim_ilc.gel

Ilc ccsv4.jpg

To generate the ILC trace follow the steps given in Usage section above.

Supported configuration[edit]

ILC is supported on all C6000 simulator configuration in CCSv3.3 or above.

ILC is also supported on following list of ARM configuration.

  • ARM9e Simulator
  • Cortex-M3 CPU Simulator
  • Cortex-R4 CPU Simulator

FAQ[edit]

  • Q: How can I change the threshold value?

Open the "interruptlatencydetector.gel" GEL file in the CCS editor & change the threshold to the desired value. The change will take effect on upon reloading the GEL file and running the set threshold gel command.

  • Q: Is it possible to get ILC information on hardware?

Yes. You can get ILC information on hardware through XDS560 trace. For more information check the link.

Addtional information[edit]

Training presentation on ILC link.

  • XDS560 Trace on selected devices (e.g. 64x+) can be utilized for interrupt profiing on hardware targets. This would allow for true interrupt latency measurement on hardware.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Interrupt Latency Checker here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Interrupt Latency Checker here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Interrupt Latency Checker here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Interrupt Latency Checker here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Interrupt Latency Checker here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Interrupt Latency Checker here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Interrupt Latency Checker here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Interrupt Latency Checker here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Interrupt Latency Checker here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity