Trace Driven Simulation

Trace Driven Simulation

<p> University of Jordan Computer Engineering Department CPE431 Performance Evaluation and Modeling</p><p>Assignment 6 Trace-Driven Simulation</p><p>Objective The objective of this experiment is to introduce the student to trace driven simulation.</p><p>Procedure Write a program using C or C++ that does the following: 1. Accepts an integer number greater than zero. This number must be assigned to a variable named ArraySize. 2. Creates two square arrays of floating-point numbers of sizes ArraySize * ArraySize elements. 3. Initializes these arrays with arbitrary numbers. 4. Finds the array multiplication and stores the product in a third array. 5. You should trace the memory accesses that your program does on the three arrays. You don’t need to trace accesses to other variables or instruction fetching. Tracing accesses to the three arrays can be done by a code similar to the following: for(i=0; i<ArraySize; i++) for(j=0; i<ArraySize; j++) { *(cp + i*ArraySize + j) = 0.0; /* cp points to Array C/* fprintf (tfp, "Writing to %x\n", (cp + i*ArraySize + j)); }</p><p>6. Then compile this program and test it for ArraySize = 50. Note that the trace file will be in the range of multiple mega-bytes. 7. Develop a simulator for a data cache. This simulator should be a trace-driven simulator that takes accepts the trace generated by the matrix multiplication program above. This simulator should be able to simulate direct mapped and associative caches, variable block sizes, and variable cache sizes. It should report the total number of accesses, cache hits, and cache misses. For associative caches use random replacement policy. 8. Run your simulator using the parameters shown in the following tables and fill in the cache miss rate.</p><p>Cache Type Cache Size (KB) Block Size (B) Miss Rate (%) Direct 8 4 Direct 8 8 Direct 8 16 Direct 8 32 Direct 8 64 Direct 8 128 Cache Type Cache Size (KB) Block Size (B) Miss Rate (%) Direct 1 32 Direct 2 32 Direct 4 32 Direct 8 32 Direct 16 32 Direct 32 32 Direct 64 32 Direct 128 32</p><p>Cache Type Cache Size (KB) Block Size (B) Miss Rate (%) Direct 16 32 2-Way Associative 16 32 4-Way Associative 16 32 8-Way Associative 16 32 16-Way Associative 16 32 Fully Associative 16 32</p><p>Analysis Present the simulator’s results graphically and explain these results.</p><p>Submit the following: 1. Instrumented source code of the matrix multiplication program. 2. Number of memory accesses in the trace. 3. Simulator’s source code 4. Simulator’s results 5. Your analysis</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us