$20 Bonus + 25% OFF
Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!
Students Who Viewed This Also Studied
CIS 480 Introduction To Computer Architecture
Question:
Objectives
This project is designed to help students to understand the pipelining on a RISC architecture (MIPS), pipeline hazards, and hazards mitigation techniques including forwarding and stalling. Students will gain programming experience in C.
Goals
Your team of 2 students will build a simulator of a (5-stage pipelined) MIPS in C. This simulator will read a binary executable file containing a sequence of MIPS instructions and simulate their execution in stages in a (pipelined) MIPS processor.
Project 1 is a non-pipelined MIPS.
Project 2 is a pipelined MIPS without the considerations for branch hazard and data forwarding.
Project 3 is a pipelined MIPS including branch hazard and data forwarding.
Due dates for Project 1, 2 and 3 are October 6, November 5 and December 1, respectively.
Specification
Input
Your simulator will read a binary executable file. It is of size 1KB and consists of 512B of data segment followed by 512B of text segment (offset 0x200). Do not try to open this file as it causes an error. You can view a binary file using od command in linux (e.g., od -Ax -t x4 memory.out) or format-hex command in Windows Powershell (e.g., format-hex memory.out). Assume input files do not contain any errors.
Registers
The user can use any of the 32 MIPS registers (0-31). Please note that $0 is read-only and should always contain the value 0. Your simulator will need to include a register file (e.g., an array of 32 integers) that maintains the values of all the 32 registers and updates the registers as the instructions are executed.
Data segment
The data segment is of 512B and the only form of data will be integer numbers (4 bytes long). I.e., there can be at maximum 128 integer data in the data segment. The data will not contain any other form of data such as string (ascii characters) or floating point numbers. When the program sees load or store instructions, the address will resolve to access one of these 128 integer data. Therefore, as execution proceeds, loads (lw) can read from the data segment and stores (sw) can write to the data segment.
Text segment
The text segment is of 512B, i.e., there can be at maximum 128 MIPS instructions because each MIPS instruction is 4 bytes long. However, due to the presence of branches and jumps, some instructions will be executed multiple times. The text segment will only contain the following MIPS instructions.
Instruc-tion |
Syntax |
MIPS instruction encoding (32 bits) |
||||||
(R-type) |
Opcode(6) |
Rs(5) |
Rt(5) |
Rd(5) |
Shamt(5) |
Func(6) |
||
ADD |
add $1,$2,$3 |
000000 |
00000 |
100000 (=3210) |
||||
SUB |
sub $1,$2,$3 |
000000 |
00000 |
100010 (=3410) |
||||
SLL |
sll $1,$2,5 |
000000 |
000000 (=0) |
|||||
SRL |
srl $1,$2,5 |
000000 |
000010 (=2) |
|||||
SLT |
slt $1,$2,$3 |
000000 |
00000 |
101010 (=4210) |
||||
HALT |
halt |
000000 |
00000 |
00000 |
00000 |
00000 |
001100 (=1210) |
|
(I-type) |
Opcode(6) |
Rs(5) |
Rt(5) |
Immediate (16) |
||||
ADDI |
addi $1,$2,45 |
001000 |
||||||
LW |
lw $1,100($2) |
100011 |
||||||
SW |
sw $1,100($2) |
101011 |
||||||
BEQ |
beq $1,$2,Label |
000100 |
||||||
BNE |
bne $1,$2,Label |
000101 |
The ‘halt’ instruction indicates the end of the program but note that it is not an actual MIPS instruction.
Note that branch target will be contained in the program. In other words, it does not go beyond the 512B boundary. Since the text segment begins at 0x200, this means the targets will be in the range of 0x200 ~ 0x400.
Please note the use of labels in the branch (beq and bne) instructions. You will need to calculate the branch target based on the following relationship.
Addr(Label) = Addr(branch_instruction) + 4 + immediate(16 bits)*4
Sample input
Consider an input file as follows (binary view; e.g., od -Ax -t x4 or format-hex in Linux and
Windows, respectively):
000000 00000000 00000000 00000001 00000002
000010 00000000 00000000 00000000 00000000
000200 20010008 8c240000 8c250004 00020940
000210 00020942 0043082a 00000000 00000000
000220 00000000 00000000 00000000 00000000
*000400
Note that this file begins with the data segment (512 bytes) followed by the text segment (512 bytes). The data segment contains two non-zero data at location 8 and 12 and the data is 1 and 2, respectively, and the first instruction is “20010008” which indicates an ADDI instruction.
In general, when you execute a program, OS reads the program executable file and loads it into memory. You can assume the 1KB file mentioned above is an executable file and thus is loaded. Therefore, the 512 bytes of data in the data segment is loaded into Memory[0~511]. The two non-zero data can be explained as Memory[8] = 1 and Memory[12] = 2. The 512 bytes of text segment is loaded into Memory[512~1023]. The first instruction, “20010008” (ADDI) is thus at Memory[512].
Output
Your simulator should show the followings for every cycle of program execution until it encounters an HALT instruction.
Clock cycle count and the value of PC
Data memory words (the first 16 only out of 128 words) Registers ($0 ~ $15 only)
For Project 1, your simulator should output as follows. Note that an arrow sign and the instructions on the right is just for your information; you do not have to print this.
Testing
A few sample test binary files will also be provided about a week before the project is due. Make use of the sample executable to help verify your output.
You can test your design using your own programs. The quality of your simulator will be determined by how much and how varied the tests are. For example, testing if the simulator works for BNE for both the equal and not equal cases, and forward and backward branching, and all combinations of these, would get a better grade than just testing for one case of BNE.
CIS 480 Introduction To Computer Architecture
Answer in Detail
Solved by qualified expert
Get Access to This Answer
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.
Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.
58 More Pages to Come in This Document. Get access to the complete answer.
More CIS480 CIS 480 Introduction To Computer Architecture: Questions & Answers
n the next cell, write your observations about the “SpendValue” and “Purchases” columns. For each column, say what the average value is and discuss what that means in terms ofyour sales to an average person. Also discuss the min and max values.Based on the “SpendValue” column, explain how much your …
View Answer
3. Using MySQL, you are required to develop a demonstration prototype system that handles hotel bookings and payments. Use MySQL to create a new database called HMS. Create tables according to your ERD. Follow a standard naming convention for table names and also …
View Answer
Project Scope Flooding is a type of attack, in which the attacker sends numerous floods of packets to the victim or associated service in an attempt to bring down the system. There are different types of flooding attacks like ping flood, Syn floods, UDP floods etc. The project simulates a ping flood …
View Answer
Task 2 Create Business Partner with Customer View as performed in your MM workshops with following details: Create a new customer Bikes R US located at ### Space Street, Orlando, FL, US. 32804 (Street number ### is your sap id) All other data is the same as for “The Bike Zone” customer f …
View Answer
Content Removal Request
If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.
Choose Our Best Expert to Help You
Cooper Cassidy
Master of Information Technology with Specialization in Networks and Information Security
2779 – Completed Orders
Hire Me
Carlos Hancock
Pursuing Master in Management with Specialization in Project Management
798 – Completed Orders
Hire Me
Still in Two Minds? The Proof is in Numbers!
33845 Genuine Reviews With a Rating of 4.9/5.
Medical
Essay: 8 Pages, Deadline:
15 days
i received a credit mark so very happy thank you for your prompt service and quick response time
User ID: 7***42 Adelaide, Australia
Operations
Essay: 3.6 Pages, Deadline:
21 hours
Great! Nice, excellent, perfect, lifesaver, friendly, quick response, fast, reliable
User ID: 7***94 San Jose, United States
Programing
Programming: 1 Page, Deadline:
13 days
I am extremely happy with the revised solution to this assignment, the report documentation of the assignment itself and the timely matter it was comp …
User ID: 1***33 London, Great Britain
Assignment
Assignment: 2 Pages, Deadline:
20 hours
The work was well written and exactly what i asked for, although there was one spelling mistake.
User ID: 8***57 United Kingdom, Great Britain
Management
Assignment: 3 Pages, Deadline:
12 hours
Assignment was sent well before the due time and I received an A on the paper. Great work! Thank you
User ID: 7***17 United States
Mechanical Engineering
Programming: 2 Pages, Deadline:
2 days
thank you my assignment help I pass the test thaaaaaaank yougoooooooooood website
User ID: 7***53 Saudi Arabia
Management
Assignment: 1.6 Pages, Deadline:
2 days
Thank you for your help. I got an A and it was well deserved. Will use again. Great job.
User ID: 5***56 San Francisco, United States
Management
Essay: 9.1 Pages, Deadline:
1 day
Work was completed as per expectations and really on time. Quality of work was also good.
User ID: 6***52 United Kingdom, Great Britain
Management
Assignment: 2 Pages, Deadline:
18 hours
I looks like a perfect assignment.i am hoping i will get good grades in it. The formating is good and they followed the requirements and answered all …
User ID: 8***15 Canada
Maths
Assignment: 1 Page, Deadline:
7 days
Always a great thing to work with this expert! They get things done on time and are fantastic with everything they do!
User ID: 6***06 Atlanta, United States
Medical
Essay: 8 Pages, Deadline:
15 days
i received a credit mark so very happy thank you for your prompt service and quick response time
User ID: 7***42 Adelaide, Australia
Operations
Essay: 3.6 Pages, Deadline:
21 hours
Great! Nice, excellent, perfect, lifesaver, friendly, quick response, fast, reliable
User ID: 7***94 San Jose, United States
Programing
Programming: 1 Page, Deadline:
13 days
I am extremely happy with the revised solution to this assignment, the report documentation of the assignment itself and the timely matter it was comp …
User ID: 1***33 London, Great Britain
Assignment
Assignment: 2 Pages, Deadline:
20 hours
The work was well written and exactly what i asked for, although there was one spelling mistake.
User ID: 8***57 United Kingdom, Great Britain
Management
Assignment: 3 Pages, Deadline:
12 hours
Assignment was sent well before the due time and I received an A on the paper. Great work! Thank you
User ID: 7***17 United States
Mechanical Engineering
Programming: 2 Pages, Deadline:
2 days
thank you my assignment help I pass the test thaaaaaaank yougoooooooooood website
User ID: 7***53 Saudi Arabia
Management
Assignment: 1.6 Pages, Deadline:
2 days
Thank you for your help. I got an A and it was well deserved. Will use again. Great job.
User ID: 5***56 San Francisco, United States
Management
Essay: 9.1 Pages, Deadline:
1 day
Work was completed as per expectations and really on time. Quality of work was also good.
User ID: 6***52 United Kingdom, Great Britain
Management
Assignment: 2 Pages, Deadline:
18 hours
I looks like a perfect assignment.i am hoping i will get good grades in it. The formating is good and they followed the requirements and answered all …
User ID: 8***15 Canada
Maths
Assignment: 1 Page, Deadline:
7 days
Always a great thing to work with this expert! They get things done on time and are fantastic with everything they do!
User ID: 6***06 Atlanta, United States