Computer Architecture RISC-V Cache Performance

I'm working on a computer science report and need an explanation and answer to help me learn.

For this lab you will be looking at the RISC-V instruction set covered in chapters 2-4 of your

textbook.

You will need to complete the following questions and show all work when necessary. You

will also have 2 coding portions. For the coding portions you are required to create a lab report

outlining any equation and calculations you performed in order to code your solutions. You will

also need to answer some questions regarding your solution and provide some screenshots in your

report. Feel free to use this document as a foundation for your report or create your own. All

solutions need to be typed, No hand written solutions will be accepted.

To submit you will need to upload a single PDF file lab report which will include the answers

to the questions below as well as sections outlining your solutions for the coding portion. You will

also need to provide a section that includes the code you wrote. Make sure that the code is properly

formatted and runs properly in the RISC-V simulation we covered in class. The link is provided

below.

RISC-V Simulator

All submissions should be done through Canvas by the due date or will be subjected to the

penalties outlined in the syllabus. We encourage collaboration, however, you must submit your

own original work must be submitted and cheating will not be tolerated. Your solutions will need

to follow strict adherence to the RISC-V coding style. This means that you your solutions should

be case sensitive, if commenting make sure you use // to represent the commented section. A new

line will be associated with a new line of code and use of indentation is needed to separate label,

instructions, and registers (both destination and source).

(2pts) 1. Assume the following:

CDA 4205L

RISC-V Cache Performance

Page 2 of 5

– Miss rate of an instruction cache is 2%

– Miss rate of data cache is 5%

– A processor has a CPI of 2 cycles without any memory stalls (perfect cache)

– Miss penalty of 120 cycles for all misses

– Frequency of all loads and stores is 40%

(1 pts) 1.aDetermine how much faster a processor would run if it had a perfect cache compared

to one that had misses (use CPU time for your comparison).

(1 pts) 1.bDetermine how much of the processing time is spent on memory access stalls (i.e. give

me a percentage of total CPI time).

2

Computer Architecture Lab

(2pts) 2.Assume the following:

– 5 ns clock cycle

– Miss penalty of 120 cycles

CDA 4205L

Page 3 of 5

– Miss rate of 1% misses per instruction

– cache access time including hit detection is 3 ns (i.e. hit time)

(2 pts) 1.aAssuming that the read and write miss penalties are the same and ignore other write

stalls, what is the average memory access time?

Coding Portion

For this section you will be writing two short programs. You will be creating an array like

structure in memory that will contain the firstn integers of the Fibonacci sequence. If you are

unfamiliar this this sequence below is a link to a web page with more information.

Fibonacci sequence

The Fibonacci sequence is a series of numbers where a number is the addition of the last two

numbers, starting with 0, and 1.

The Fibonacci Sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 . . .

The rule for finding the nthinteger in the sequence is given by:

xn=xn−1+xn−2

For the next question you will need to write a program to calculate the first n integers of the

Fibonacci Sequence and store them in memory in a specific way. The user data starts a memory

address 1024 and you will use this as the starting point of your array. Your array will need to be

consecutive (i.e. the next spot in memory is the next element in the array. You should also write a

general solution so that you can change n to any number you want. Please read the instructions for

the problem very carefully as how you create the array will change.

4

Problem 3

(6pts) 3.You will need to write a program that will create an array of the first n integers of the

Fibonacci Sequence. The array will need to start at memory address 1024 and fill up after

that. You will need to place the sequence in order. So that the first element will be stored a

memory address 1024, then next will be stored at 1032 and so on. Note that you will need

to manually store the first two values of the Fibonacci Sequence (i.e. x1= 0 and x2= 1) at

the correct addresses and then calculate the rest using the rule provided above.

Code for Problem 3Write down a paragraph describing your steps to solve this problem.

Then answer the following questions using gem5 simulator:

A)

Make your program calculates the first 15 integers of the Fibonacci Sequence. If you disable forwarding how many cycles does it take to finish the program? If you enable forwarding how many cycles does it take to finish the program? Provide screenshots of both Execution Tables generated by the simulator when you run your program with forwarding enabled and disabled. Make sure to label every table properly.

B)

Make your program calculate the first 15 integers of the Fibonacci Sequence. How many elements are in your array? What is the range of addresses used for the array (i.e. 1024 to …)? Provide a screenshot of the data memory generated by the simulator after you run your program.

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Ace Writing Center has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

Essays

Essay Writing Services

At Ace Writing Center, Nowadays, students normally have extremely busy schedules. You will note that some of them have to take on some evening or weekend jobs in order to get some income that can help them to sustain in college or in the university. This can deny them a chance to write all the essays given. Others usually get bombarded with a lot of work by their lecturers. This can still delay such students from working on all their essays. However, some of them usually try to work on all these essays but end up delivering their work late. This can prevent them from graduating since most lecturers are strict on deadlines. If you want to write a business essay, the wise way is to hire an outstanding essay writing service like us, so that you can get the best results. If you are keen, you will note that many companies usually overcharge their customers. Some of them are there only to make money. And in reality, they really don’t care to build a long term commitment with students. You should not choose such companies. You should take your time and choose a reliable company to work with. Ace Writing Center is the ultimate solution for you. We have been offering our writing service for more than 7 years. This is a clear indication that you will get quality essay writing service. We have a wide range of writers who can work on any business essay that you might have. We believe in doing extensive research so that we can provide quality work to all our clients. .

Admissions

Admission and Business Papers

Have you ever had to write an admission essay for college? The majority of students face the same issues when applying to a university or college and many in such situations decide they need professional help to cope with this matter. They get in a situation when the deadline keeps coming closer but lack motivation to start because they are just not sure if their writing skills are strong enough. We have a solution for you! Ace Writing Center is the best admission essay writing service with a large professional team and years of experience in providing high-quality papers to students of all levels and faculties. The mission of our team is to help students make their dreams of entering a good college come true and that’s what we offer!.

Editing

Editing and Proofreading

Sometimes all the words for your paper just flow out of your mind and into your fingers. You type quickly at your keyboard and there they are, your beautiful words right there on the screen. But you have no idea how to polish it up. You may be wishing there was a paper writing service that offered this type of writing service. Look no more! Here at Ace Writing Center, we offer you an editing and proofreading option that you can't find anywhere else..

Coursework

College Essay Writing

In case you are familiar Ace Writing Center, you know the way to distinguish a better company from a cheap one exactly. First of all, poor service website does not have a sufficient support. We think support team is an essential part of success; it has to answer all clients’ questions and be a connecting link between clients and their writers. On our web-service you will get answers about anything you need and your writer will receive all your instructions, assignments and requirements exactly and swiftly. A writing service that we run has got a flexible pricing system that will save you from senseless wastes and many bonus systems that let you sparing money for something important for you.