Answered step by step
Verified Expert Solution
Question
1 Approved Answer
n e ECE 487/587-Spring 2017 Laboratory Assignment #7-Memory Simulator s.l General Assignment Specification You are to write a memory simulator for a system containing a
n e ECE 487/587-Spring 2017 Laboratory Assignment #7-Memory Simulator s.l General Assignment Specification You are to write a memory simulator for a system containing a two-level memory hierarchy using set- associative cache mapping. The simulator must support various set-associativities; various replacement policies including least-recently-used (LRU) and FIFO; and the write-back write policy. These parameters will be prompted from the user and read from a file supplied by the user. Input file specifications are described below. The simulator must be able to calculate various operational and performance characteristics (described below) of different memory configurations for your embedded system 2. The simulator must query the user for the memory configuration and the name of an input file containing a sequence of memory references/addresses generated by the CPU Requirements Using this information, the program must compute the following 1) the number of address lines required, 2) the size of the offset field of the memory address, 3) the size of the index field of the memory address, 4) the size of the tag field of the memory address, 5) the total size of the cache memory 6) a table consisting of the main memory (mm) block number, the cache memory (cm) block number, the cm set number, and the hit/miss "status" of each memory reference in the sequence, 7) the highest possible hit rate for the sequence of references, 8) the actual hit rate for the sequence of references, and 9) a table showing the final "status" of the cache memory including the contents of each cache field for each cache block Your program should also prompt the user to continue with the analysis of a new memory configuration or exit after each run" This assignment must be written in the C programming language. No Arduino hardware is required for this assignment. You are welcome to write your simulator on any lab PC or your own laptop. However, demos must be done in the Embedded Systems Lab (2005 SERC). You are responsible for demonstrating the program to the TA on or before the due date. This assignment is an independent assignment. Therefore, no teaming is allowed. Required for ECE 587 Students/No Extra Credit for ECE 487 Students Dummy Proofing: "Dummy proof" code means that you should verify that all inputs are within reasonable ranges and are meaningful (i.e. you should verify range and type of user input). For example, if the user specifies -4 bytes as the size of main memory, you are cxpected to catch the error, print an error message, and request the info from the user until valid input data is supplied or the user exits the program. Your error checking must include checking both user supplied input as well as input from the user-specified input file. Errors found in the file should produce an error message and your code should prompt the user for a different input file name. Your error checking loops must also allow the user to exit the program at any prompt. Errors in input should not require the user to go all the way back to the first input prompt and start again. Instead, an erroneous input should be detected and the same input requested again until correct input is provided or the user selects to exit the program. Up to 100 points can be carned based upon how well your error checking is done. 3. Grading Due Date: 04 21/2017 at 5:00 p.m No late assignments will be accepted, n e ECE 487/587-Spring 2017 Laboratory Assignment #7-Memory Simulator s.l General Assignment Specification You are to write a memory simulator for a system containing a two-level memory hierarchy using set- associative cache mapping. The simulator must support various set-associativities; various replacement policies including least-recently-used (LRU) and FIFO; and the write-back write policy. These parameters will be prompted from the user and read from a file supplied by the user. Input file specifications are described below. The simulator must be able to calculate various operational and performance characteristics (described below) of different memory configurations for your embedded system 2. The simulator must query the user for the memory configuration and the name of an input file containing a sequence of memory references/addresses generated by the CPU Requirements Using this information, the program must compute the following 1) the number of address lines required, 2) the size of the offset field of the memory address, 3) the size of the index field of the memory address, 4) the size of the tag field of the memory address, 5) the total size of the cache memory 6) a table consisting of the main memory (mm) block number, the cache memory (cm) block number, the cm set number, and the hit/miss "status" of each memory reference in the sequence, 7) the highest possible hit rate for the sequence of references, 8) the actual hit rate for the sequence of references, and 9) a table showing the final "status" of the cache memory including the contents of each cache field for each cache block Your program should also prompt the user to continue with the analysis of a new memory configuration or exit after each run" This assignment must be written in the C programming language. No Arduino hardware is required for this assignment. You are welcome to write your simulator on any lab PC or your own laptop. However, demos must be done in the Embedded Systems Lab (2005 SERC). You are responsible for demonstrating the program to the TA on or before the due date. This assignment is an independent assignment. Therefore, no teaming is allowed. Required for ECE 587 Students/No Extra Credit for ECE 487 Students Dummy Proofing: "Dummy proof" code means that you should verify that all inputs are within reasonable ranges and are meaningful (i.e. you should verify range and type of user input). For example, if the user specifies -4 bytes as the size of main memory, you are cxpected to catch the error, print an error message, and request the info from the user until valid input data is supplied or the user exits the program. Your error checking must include checking both user supplied input as well as input from the user-specified input file. Errors found in the file should produce an error message and your code should prompt the user for a different input file name. Your error checking loops must also allow the user to exit the program at any prompt. Errors in input should not require the user to go all the way back to the first input prompt and start again. Instead, an erroneous input should be detected and the same input requested again until correct input is provided or the user selects to exit the program. Up to 100 points can be carned based upon how well your error checking is done. 3. Grading Due Date: 04 21/2017 at 5:00 p.m No late assignments will be accepted
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started