In this exercise we examine in detail how an instruction is executed in a single-cycle datapath. Problems in this exercise refer to a clock cycle in which the processor fetches the following instruction word: 0000 0000 0000 1100 0001 1011 0000 0000 Assume that data memory is all zeros and that the processor’s registers have the following values at the beginning of the cycle in which the above instruction word is fetched. r0 r1 r2 r3 r4 r5 r6 r8 r12 r31 0 197 -2 -35 4 -100 674 -89 222 -16 2.0.1 What are the outputs of the sign-extend and the jump “Shift left 2” unit (near the top of Figure 4.24) for this instruction word? 2.0.2 For the ALU and the two add units, what are their data input values?
Instructions and Operation
Nowadays, electrical engineers are required to evolve their practices by incorporating embedded processes, microcontrollers, digital signal processors, and so on. These processors are beneficial in many ways and have changed the perspective of electronic design.
Subroutine Instruction
Subroutine instruction is defined as the instructions used in the programming language in a sequence form saved in memory. They are used to doing a specific task. Subroutine instruction is called a unit that instructs to perform some needed task. There are many programming languages in which subroutine instructions are used but have a different identity or name, such as method, function, subprogram, routine, etc. Subroutine or sub-program is designed or coded as they can be called multiple times while executing the program.
Classification of Buses
A bus inside a microprocessor is a collection of wirelines that contain related information. A group of wires required for communication among the microprocessor and peripherals is known as a system bus. A bus is an electrical or digital passage across which bits are transferred between a variety of computer elements. It mainly links all the internal parts to the CPU (Central Processing Unit) and main memory. The width or size of any bus is crucial since it affects the amount of data that is transferred at a certain time period. Buses always transmit data parallelly, in a 32-bit bus, the information is supplied over 32 wirelines simultaneously and each bus comprises a clock speed measurable in MHz. The various types of buses inside a microprocessor are address bus, data bus, and control bus.
Execution of Instruction
A sequence of instructions makes up a program stored in a computer's memory unit. The CPU executes these instructions by going through a cycle for each instruction. The instruction cycle in a simple computer includes the steps listed below:
In this exercise we examine in detail how an instruction is executed in a single-cycle datapath. Problems in this exercise refer to a clock cycle in which the processor fetches the following instruction word:
0000 0000 0000 1100 0001 1011 0000 0000
Assume that data memory is all zeros and that the processor’s registers have the following values at the beginning of the cycle in which the above instruction word is fetched.
r0 |
r1 |
r2 |
r3 |
r4 |
r5 |
r6 |
r8 |
r12 |
r31 |
0 |
197 |
-2 |
-35 |
4 |
-100 |
674 |
-89 |
222 |
-16 |
2.0.1 What are the outputs of the sign-extend and the jump “Shift left 2” unit (near the top of Figure 4.24) for this instruction word?
2.0.2 For the ALU and the two add units, what are their data input values?
![M
Ex.
4
U PC Address
Add
Instruction
memory
IF/D
Instruction
Read
register 1
Read
register 2
Registers
Write
register
Write
data
RegWrite
Instruction
(15-0)
Instruction
(20-16)
Instruction
(15-11)
16
Read
data 1
Read
data 2
Sign-
extend
32
ID/EX
Shift
left 2
ALUSIC
0
AddAdd
result
RegDst
M
ALU
control
0 ALUOP
M
U
Copyright © 2021 Elsevier Inc. All rights reserved
Zero
Add ALU
result
EX/MEM
Branch
Address
Write
data
PCSrc
MemWrite
Data
memory
MemRead
Read
data
MEM/WB
MemtoReg
IMUNO](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F69f01e34-6a53-47ef-9854-f1c5594a3899%2F8cc386ab-ae25-4223-80d5-d74691c10430%2F37w0vkh_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Introductory Circuit Analysis (13th Edition)](https://www.bartleby.com/isbn_cover_images/9780133923605/9780133923605_smallCoverImage.gif)
![Delmar's Standard Textbook Of Electricity](https://www.bartleby.com/isbn_cover_images/9781337900348/9781337900348_smallCoverImage.jpg)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
![Introductory Circuit Analysis (13th Edition)](https://www.bartleby.com/isbn_cover_images/9780133923605/9780133923605_smallCoverImage.gif)
![Delmar's Standard Textbook Of Electricity](https://www.bartleby.com/isbn_cover_images/9781337900348/9781337900348_smallCoverImage.jpg)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
![Fundamentals of Electric Circuits](https://www.bartleby.com/isbn_cover_images/9780078028229/9780078028229_smallCoverImage.gif)
![Electric Circuits. (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780134746968/9780134746968_smallCoverImage.gif)
![Engineering Electromagnetics](https://www.bartleby.com/isbn_cover_images/9780078028151/9780078028151_smallCoverImage.gif)