<< Chapter < Page Chapter >> Page >

Obtaining a cycle count

Obtaining a cycle count for a given section of code is easily accomplished with the aid of Code Composer. Here is theprocedure for obtaining a cycle count:

  • Load the .out file of the program you wish to profile into Code Composer.
  • Set a breakpoint at the beginning of the section of code that you want to profile. This can be easily done byright-clicking on the line of code beginning the section and choosing "Toggle breakpoint" from the list of options.
  • Set a breakpoint at the end of the the section of code that you want to profile.
  • Open the "Profiler" menu in Code Composer. Choose "View Clock." A window should open at the bottom of the CodeComposer window that indicates the current value of the cycle counter.
  • Again, open the "Profiler" menu in Code Composer and choose "Enable Clock."
  • Choose "Run" from the "Debug" menu to execute your code. Execution will halt at the first breakpoint. Double-clickthe cycle counter to reset its value to zero (double click the number next to "Clock =").
  • Again, choose "Run" from the "Debug" menu to continue execution of your code. Execution will halt at the secondbreakpoint and the cycle counter will display the number of CPU cycles that were needed to execute the section of codedelimited by the breakpoints.

Grading information

This is a two week lab. Your prelab is due a week after the quiz for Lab 4 and the quizzing occurs two weeks after thequiz for Lab 4.

The following details how the 10 points for the lab will be assigned:

  • 1 point: Prelab. You must answer the prelab questions for two filtering techniques in Filtering Techniques . You must fully simulate one filtering technique in MATLAB anddemonstrate that the system will meet the specifications as given in the filter specification . Finite precision effects such as coefficient quantization must be modeled in your simulation.You must provide the response of your simulated system to appropriate test inputs.
  • 2 points: Working code. Code that does not meet the specification is not considered working code. You must beprepared to demonstrate that your code meets the specification by showing the system response to a frequencyswept sine input. We will check that the ripple specifications have been met in the pass-band and thestop-band. We will also check the for the locations of the pass-band and stop-band edges to make sure that the width ofthe transition band is met. We will also check to see that the phase constraint given in the specification is met. Wewill also check to ensure that you have scaled the input signal appropriately so that clipping does not occur at theoutput for any frequency. Additionally, we will check to make sure that you do not scale the input tooconservatively, specifically, a 1 V amplitude sinusoidal input is not allowed to drop below 0.5 V in amplitude at theoutput for all frequencies in the pass-band.
  • 2 points: Oral quiz.
  • 5 points: Optimization. These points will be assigned based on your cycle count. You will be judged relative toyour peers. Code that does not meet the specification will be penalized. After all the cycle counts have beencollected, we will order them for scoring in two ways. First, the cycle counts will be ordered globally over thewhole class. The groups with the lowest numbered cycle counts will be given the maximum number of points and thegroups with the highest numbered cycle counts will be given the minimum number of points. The second ordering will bedone locally relative to which of the three filtering techniques the groups have picked. The groups using thesame filtering technique will be ordered by cycle count, with the groups with the lowest cycle counts receivingmaximum points and the groups with the highest cycle counts receiving minimum points. 3 points will be assigned forthe global ordering of groups and 2 points for the local ordering with respect to filtering technique of groups.

Pizza competition

Your final assembly code and/or C source code for the pizza competition must be emailed to ece320@ews.uiuc.edu no later than 11:59 PM on Monday, March 17. However, youroptimization grade will be assigned based on the code turned in during your assigned lab section and is subject to theusual polices for late code.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 320 - spring 2003. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10096/1.2
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 320 - spring 2003' conversation and receive update notifications?

Ask