A. Explain the functions of the register file:-
the execution datapaths for the R-type instructions. we need to model the register file and the module that performs the calculations that are required by the instructions. the register file contains 32 registers labeled R0, R1,..., R31; each register being 32-bits wide. Out of these, R0 and R31 are special registers. R0 always reads as 0; any data written to it is discarded. R31 is a special register used for the JAL and JALR instructions. The remaining registers are general purpose, and are primarily used for executing instructions. The various input and output ports of the required register file.RD is the selection vector for the destination register, and D is the data to be stored in the destination vector. RD1 and RD2 are the selection vectors for the registers that are to appear on buses A and B respectively. WE is the “Write Enable” bit - changes are allowed in the contents of the file only when this bit is set high. Clk is the clock input for the synchronous operation of the register file.
B. Explain the functions of the arithmetic logic unit:-
The arithmetic logic unit is a combinatorial module that performs the integer and logical calculations required by the instruction set. Its inputs are a set of operands and a function code supplied by the control unit, and it gives the result as an output. Generally, the design of an efficient arithmetic logic unit is very complicated. To keep the experiment simple, we shall forgo the requirement of performance and design a simple arithmetic logic unit that meets the minimum specifications of the instruction set.
C. Determine the number of registers inside the register file:-
two registers are available inside the register file. The registers are stored in a structure called a register file. Which can be read or updated by specifying the appropriate register number. There are two read input ports since we could read two registers in one instruction and one write input port specifying the register number since at most one register will be updated. There are three inputs that are 5 bits wide, which allows one of 32 registers to be specified. There is also one input data port that will contain the data to be written. There are two output ports containing the values of the registers specified to be read. These three ports are 32 bits wide since they contain data. Values are always read, but a write may not always occur. Thus, we need a write control signal.
D. Determine the maximum number of operations can be performed by the ALU:-
The ALU takes two 32-bit inputs and generates one 32-bit output. The control signal is 3-bits wide in this implementation to specify the appropriate operation to be performed.there are 9 different instructions, some ALU operations will be used for several instructions. The zero output will be used on a beq instruction. We need both read and write signals could read, write, or neither when instruction does not reference memory need a 32-bit address and data input ports data for stores and a 32-bit output port for loads. Also, need to sign extend a 16-bit offset value to 32 bits before it is input to the ALU. Thus, the offset can be positive or negative often negative offset from the frame pointer.
Question 1 Figure 1 shows a datapath for R-type instructions which consits of a register file...
6. Consider a datapath similar to the one in figure below, but for a processor that only has one type of instruction: unconditional PC-relative branch. What would the cycle time be for this datapath? PCSrc Add ALU Add result Shift +( left 2 Read register 1 ALUSrc, 4 ALU operation PCRead PC-address Read data 1 Registers Read data 2 MemWrite Zero ALU ALU-I Address MemtoReg Instruction register 2 Instruction | Write Read data-M register Write Lu memory Write Data data...
PCSrc Add ALU Add result Shift left 2 Read register 1Read Read register 2 Write register Write data RegWrite Read ALU operation MemWrite data 1 MemtoReg Zero ALU ALUAddresS data Instruction Registers Read Read Instruction MI IMI memory WriteData data memory 16 Sign- MemRead extend 3, (4 points) For question#2, in the datapath as shown in Fig. 1, assume that one of the following control signals has a stuch-at-0 fault, meaning that the signal is always 0, regardless of its...
Question 4: Single Cycle Datapath Control (15 points) We wish to add the hardware support for a special R-type instruction jlr Jump and Link Register) to the single-cycle datapath below. Though this is an R-type instruction, but it is a special one that has the opcode being 000001 (instead of 000000), so the control unit will be able to differentiate this jlr instruction from the other R-type instructions and generate a special set of controls for this instruction. Opcode rs...
Question 12 The datapath for 5-stage MIPS pipelined architecture is given below. IFAD IDEX EX/MEM MEMWB Add 4 Add Add result Shift left 2 PC Address Instruction ALU Instruction memory Read register 1 Read data 1 Read register 2 "Registers Read Write data 2 register Write data Zero ALU result Address Read data Data memory Write data 16 32 Sign- extend Choose all the components that generate a useful result during the execution of the following instruction: LW R1, 8(R2)...
Question 5 0.25 pts What is the value of the MemWrite control signal? Question 6 0.25 pts What is the value of the ALUSrc control signal? Add Add Sum--(1 4 Shift left 1 Branch MemRead Instruction [6-0] ControMemtoReg MemWrite ALUSrc RegWrite Instruction [19-15]Read Read register 1 Read Read data! PCaddress Instruction [24-20] Zero ALU ALU result register 2 Instruction 31-0 Instruction [11-7 Read1 Address data | Write Read register daiaALU | M Instruction memory Write data Registers Write Data data...
EEL4768C Lab Assignment 6 (40 points) Due 7/24/2018, 11:59 pm on Canvas Register file is an important state element of the MIPS processor. Consider the register file shown below. The register file can read and write the data into the registers. The register file has two read ports (A1, A2) and one write port (A3). The width of Al, A2 and A3 is 5 bits. Writing data into the register is synchronized with the clock signal. WE is the write...
Modify the circuit to support a MFCC instruction. MFCC Rd instruction: Move From Condition Codes MFCC copies into the four rightmost bits of Rd the values of the ALU signals Carry (C), Overflow (O), Zero (Z) and Negative (N) as they were set by the previous R- type instruction. The remaining 28 bits of Rd are set to zero. Describe the changes and additions needed for the single-cycle MIPS processor datapath and control to support this instruction. Hints: 1) MFCC...
Consider the following MIPS assembly language instructions: addi $1, $2, 100 swr $1, 0($2): addi $rt, $rs, immediate # add immediate swr $rt, immedi ate ($rs) # store word write register These instructions are I-format instructions similar to the load word and store word instructions. The addi and swr instructions store a computed value to the destina- tion register $rt. The instructions do not require any physical hardware changes to the datapath. The effect of each instruction is given below....
Assume the MIPS instruction subset is redefinied to contain only the following instructions: 1. Assume that our MIPS instruction subset is redefined to contain only the following instructions: Instruction Instruction fetch Register read & ALU operation Data Memory Register write decode 0 ns R-format 2ns 1 ns lw ns l ns 2 ns 5 ns 1 ns ns 1 ns ns 0 0 bne The table lists the times required for each step within each instruction. Recall that with the...
computer architecture The sum of the two 32 bit integers may not be representable in 32 bits. In this case, we say that an overflow has occurred. Write MIPS instructions that adds two numbers stored in registers Ss1 and Ss2, stores the sum in register $s3, and sets register Sto to 1 if an overflow occurs and to 0 otherwise. 5. (16pts) 6. Show the IEEE 754 binary representation of the number -7.425 in a single and double 7. If...