1 / 17

Power Profiling using Sim-Panalyzer

Power Profiling using Sim-Panalyzer. Andria Dyess and Trey Brakefield CPE631 Spring 2005. Presentation Overview. Introduction to Sim-Panalyzer Project Goals Current Status Future Work. What is Sim-Panalyzer?.

carr
Download Presentation

Power Profiling using Sim-Panalyzer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Power Profiling using Sim-Panalyzer Andria Dyess and Trey Brakefield CPE631 Spring 2005

  2. Presentation Overview • Introduction to Sim-Panalyzer • Project Goals • Current Status • Future Work

  3. What is Sim-Panalyzer? • Developed by researchers at the University of Michigan and the University of Colorado • Based on the SimpleScalar processor simulator • Builds on Sim-Outorder • Adds statistics for power estimation • Compiled with gcc • Runs in Linux environment

  4. Estimating Power Consumption with Sim-Panalyzer • User supplies a .cfg file which defines the CPU architecture • A separate .cmd file specifies voltages, capacitance, and other values needed to calculate power consumption for each architectural element

  5. Project Goals • Become familiar with the Sim-Panalyzer software • Add support for turning on and off the collection of power statistics • Add support for power profiling • Run simple simulations to test the new features

  6. Sim-Panalyzer Software Environment • Options database for registering command line options • Stats database for managing performance statistics • Register Update Unit (RUU) • Load/Store Queue (LSQ) • Pipeline stages: Fetch/Decode, Issue, Execution (out of order), and Commit

  7. Project Goal #1:Start and Stop Flags for Simulation Stats • Allows the user to profile specific sections of the test program (e.g. a single subroutine) • The test program writes to a designated memory address to control collection of stats • Simulator traps writes to this memory address and performs the appropriate action

  8. Implementation Specifics • Added a new command line option, “profiling: addr” • Added code to watch for the specified memory address just before each store instruction is committed • Overhead associated with this additional instruction (effective address calculation)

  9. Implementation Specifics • Added code around all statistics updating to check if statistics counting is on. • Added code to Stats database to reset all of the statistics registered. • Implemented the function calls needed to start, stop, dump, and reset stats in sim-profiling.h/c.

  10. Sample Code (capturing a start_stop memory access) if (LSQ[LSQ_head].addr == start_stop_addr){ switch (/*value being written*/) { case 1 : profile_off(); /* Stop counters */ break; case 2 : profile_on(); /* Start counters */ break; case 3 : profile_reset(power_sdb); /* Reset counters */ break; case 4 : profile_dump(power_sdb, fd);/* Dump counters */ break; /* to output file */ } }

  11. Sample Code (resetting statistics) stat_reset_stat(struct stat_sdb_t *sdb, /* stat database */ struct stat_stat_t *stat,/* stat variable */ FILE *fd) /* output stream */ { struct eval_value_t val; switch (stat->sc) { case sc_int: *(stat->variant.for_int.var)=stat->variant.for_int.init_val; break; . . . default: panic("bogus stat class"); } }

  12. Sample Code (not counting statistics) #ifdef PROFILING if ( counting_on) #endif /* PROFILING */ { <statistics counting> }

  13. Project Goal #2:Power Profiling • Allows user to get power statistics supplied by sim-panalyzer in slices • Builds on work already done for project Goal #1. • The simulator will watch the instruction count. • When instruction count meets user-defined number, stats are stopped, dumped, reset, and restarted.

  14. Implementation Specifics • Added a new command line option, “profiling: inst” • Add code to watch instruction count

  15. Sample Code (profiling output) /* profiling? */ if ( sim_num_insn >= profile_inst_count ) { profile_iter++; fprintf(fd, "/n***** Profiling (%d) ******/n/n", profile_iter); profile_dump(power_sdb, fd); profile_reset(power_sdb); }

  16. Project Status • Command line arguments have been added and tested • The stats database provides the ability to easily dump and reset stats • Most difficult task is finding the code that increments counters and adding a check for the flag (with out effecting the simulation).

  17. Future Work • Long-term goal is to develop “power monitoring counters” that can be implemented in future CPUs (similar to the performance monitoring counters that are common today) • Expand profiling beyond the power profiling statistics alone.

More Related