Analog.com Analog Dialogue Wiki English 简体中文 日本語
$EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Forums

    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 Library
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Precision Technology Signal Chains Library
    • 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

    Highlighted Webinar

    Digital Isolator Working Voltage Considerations for End Application Optimization

    Recent Discussions

    • ADALM-2000 SET A STATIC IP
    • Error in compiling program using libad9361 and libiio
    • Inconsistent receiver power between 2 transmissions of the same signal
    • DMA (from PS to PL) unexpected behavior
    • ADALM-PLUTO firmware upgrade crash

    Places

    • ADI Education Home
    • ADI Webinars
    • StudentZone (Analog Dialogue)
    • Video Annex
    • Virtual Classroom

    Latest Webinars

    • Digital Isolator Working Voltage Considerations for End Application Optimization
    • In-vehicle Networking Simplified with 10BASE-T1S
    • Design of Multi-Band Phased Array Systems for Space Applications
    • Designing Optimized Power Solutions for Precision Signal Chains (2023)
    • One Size Fits All - Power Your Applications with an Integrated Power IC
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes AQQ248 about a funny function
    View All

    Places

    • Community Help
    • Logic Lounge
    • The Weekly Brew

    Resources

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

    Highlighted Blogs

    Rediscovering Signal Chain µModule®︎

     

    Why AI Assisted/Enabled Buildings Need Intelligent Edge Devices

    Latest Blogs

    • Mastering Precision: A Guide to Setup Your Laboratory for IPn Measurement
    • A Visit to the EMC Lab: Radiated Vs. Conducted Emissions and Immunity
    • Finally, Batteries You Can Believe
    • Powering Your Drive - It's More Than Just Plugging It In
    • How Old Wires Are Bringing New Efficiencies to Building Retrofits
    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
ADSP-BF70x
  • Processors and DSP
  • Blackfin Processors
  • ADSP-BF70x
  • Cancel
ADSP-BF70x
Documents FAQ: Monitoring Cache Performance on the ADSP-BF70x
  • Q&A
  • FAQs/Docs
  • Members
  • Tags
  • More
  • Cancel
  • +Documents
  • ADSP BF706 Ezkit Mini SPI1 cannot be done in master mode.
  • +ADSP-BF707: FAQ
  • -ADSP-BF70X: FAQ
    • Different Wake-up Sources on BF70x
    • FAQ: ADSP-BF70x application cannot boot using Secure Boot
    • FAQ: CPLB enhancements in Blackfin+ Core
    • FAQ: Different Wake-up Sources on BF70x
    • FAQ: Digital watch code for RTC
    • FAQ: Enhancements in Hardware Loop in Blackfin+ core
    • FAQ: Enhancements in Supervisor Mode in Blackfin+ core
    • FAQ: HADC maximum bandwidth
    • FAQ: Highlights of MSI on BF70x
    • FAQ: How can I initialize DDR memory device connected to BF70x processor ?
    • FAQ: How do I access the full memory space of the SPI slave?
    • FAQ: How L2CTL in BF70x is different than BF60x ?
    • FAQ: How the System Cross Bar (SCB) in BF70x different than in BF60x ?
    • FAQ: How to configure MSI IDMAC for Dual Buffer Descriptor Ring mode operation
    • FAQ: How to re-enable the Core clock on BF70x after gating it
    • FAQ: How to send data using SPI READY signal
    • FAQ: How to take the core out of reset on BF70x
    • FAQ: How to use the Signtool Utility to encrypt and sign the unsigned bootstream (loader file generated for an application, example:bootstream.ldr)
    • FAQ: Is INIT Code supported in Secure Boot in ADSP-BF707
    • FAQ: Monitoring Cache Performance on the ADSP-BF70x
    • FAQ: Performance Enhancements in Blackfin+ core
    • FAQ: UART slave boot BF70x with Higher BAUD rate
    • FAQ: Sample code for HADC on BF70x?
    • FAQ: What are the salient features of SPI Host Port on BF70x?
    • FAQ: What is the effect of bus disabling (RDEN bit) on RTC functionality?
    • FAQ: What is the Encrypt-Hash and Hash-Decrypt mode in PKTE module
    • FAQ: What is the purpose of the ownership bit when programming the PKTE module for encryption/hashing?
    • FAQ: What modes of Encryption and Hashing are supported and how do they make an application secure
    • Getting Started with ADSP-BF70x Processors
    • How to re-enable the Core clock on BF70x after gating it
    • Known Errata Against ADSP-BF70x Blackfin+ Datasheet
    • the secret BF70x documentation
    • Where can I find power consumption data for BF70x processors?
    • FAQ: What are the major differences between DMC module of BF60x and BF70x ?
    • FAQ: Cache Enhancements in Blackfin+ core
    • FAQ: Can I pass the output generated from PKA directly to the PKTE module for encryption/decryption
    • FAQ: Configuring Timer in continuous/single pulse mode
  • Example for UART transmit and receive operation using Core Mode for BF707
  • FAQ: BF707 SPI Slave to Master loopback communication
  • FAQ: Hardware Reset using Watchdog in BF706

FAQ: Monitoring Cache Performance on the ADSP-BF70x

Question

How do I monitor cache performance on the ADSP-BF70x?

===========================================

Answer

The performance monitor can count events like cache misses non-intrusively. The following functions can be added to your program and used to start and stop monitoring events of interest.

#include <sys/platform.h>

typedef enum {
     /* BF70x cache related events.
     Refer to Programmers Reference for others.
     */
     pf_icache_hit = 0x81,
     pf_icache_miss = 0x82,
     pf_dcache_fill_completed = 0x98,
     pf_dcache_line_replaced = 0x99,
     pf_dcache_hit = 0x9a,
     pf_dcache_miss = 0x9b
} PFMonEvent;

void start_pfmon(PFMonEvent mon0, PFMonEvent mon1) {
     uint32_t ctl = 0;
     if (mon0)
          ctl |= BITM_PFCTL_PWR|
               (3<<BITP_PFCTL_ENA0)|
               ((mon0<<BITP_PFCTL_MON0)&BITM_PFCTL_MON0);
     if (mon1)
          ctl |= BITM_PFCTL_PWR|
               (3<<BITP_PFCTL_ENA1)|
               ((mon1<<BITP_PFCTL_MON1)&BITM_PFCTL_MON1);
     *pPFCTL = 0;
     *pPFCNTR0 = 0;
     *pPFCNTR1 = 0;
     *pPFCTL = ctl;
}

void stop_pfmon(unsigned *count0, unsigned *count1) {
     ssync();  /* flush system activity before stopping counting */
     *pPFCTL = 0;
     if (count0)
     *count0 = *pPFCNTR0;
     if (count1)
     *count1 = *pPFCNTR1;
}

These functions can be used to monitor cache activity in your program as follows.

unsigned dcache_hits, dcache_misses;
start_pfmon(pf_dcache_hit, pf_dcache_miss);
...
/* code you want to monitor */
...
stop_pfmon(&dcache_hits, &dcache_misses);
printf("dcache hits = %u, dcache misses = %u", dcache_hits, dcache_misses);
  • bf70x
  • blackfin
  • Share
  • History
  • More
  • Cancel
Related
Recommended
Social
Quick Links
  • About ADI
  • ADI Signals+
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Incubators
Languages
  • English
  • 简体中文
  • 日本語
myAnalog

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

Go to myAnalog
Analog Logo
©1995 - 2023 Analog Devices, Inc. All Rights Reserved
沪ICP备09046653号-1
  • Sitemap
  • Legal
  • Privacy & Security
  • Privacy Settings
  • Cookie Settings