Solution:
a) Suppose STA (Store Accumulator(PC) contents into a given Memory Address M(AR) ie
Register Transfer Notation for STA is D3T4: M(AR) <--- PC,SC<-- 0;
If we Replace STA with XCH ( exchange contents of AC and Memory) Instruction the Register Transfer Notation for execution is:
R'T0 : AR <-- PC, (Fetch Cycle)
R'T1 : IR <--- M[AR],PC <--PC +1;
R'T2 : D0,D1,D2,D3,D4,D5,D6. (Decode Cycle)
D3T4: TR <--- AC {Transfer the contents of AC to Temporary Register). [Execute Cycle]
AC <--- M[EA] { Transfer the Contents of given Effective Address(Physical Address) of Memory to AC}.
M[EA] <---- TR { Transfer the Contents of Temporary Register(TR) to given Effective Address(Physical Address) of Memory.
b) BSA ( Branch and Save Address) : Save address of the next instruction and Branch to subroutine:
Given that: 1 BSA 50 Means : 1 Indicates Indirect Addressing so AR = 50 ie (AR)=100 {Contents of AR) as shown in figure given.
BSA Execution Steps: D5T4 : M[AR] <--- PC, PC ADDRESS :21 ( Current Instruction location =20)
AR <-- AR +1 ( AR =50 and Indirect Mode=1 ,So (AR) =100) AR +1 = 101
D5T5 : PC <--- AR, (PC = 101)
SC <--- 0.
Answer: Next Instruction Address is :101 After Execution of given BSA, PC and Memory is shown below:
20 |
1 BSA 50 |
PC=21 |
NEXT INSTRUCTION |
AR=50 |
100 |
EA =100 |
21 |
PC =101 |
SUBROUTINE |
1 BUN 100 |
Problem 2 (40 points) a) Suppose we want to replace the STA instruction in our basic...
Instruction set architecture R: register X, Y, Op1, Op2: Operand Quantity: constant value EA: Effective memory address Opcode Operation Name MOV X Y XCH Opl, Op2 ADD X, Y SUB X, Y SAL Op. Quantity SAR Op. Quantity SHR Op Quantity AND X, Y OR X. Y XOR X, Y NOT X LOAD RA LOAD R. (A) STORERA STORE R. (A) Description Move data from Y to X Exchange Opl with Op2 X=X+Y X=Y-X Shift Arithmetic Left on Op for...
[20 pts] 5- Consider the following hypothetical 1-address assembly instruction called "Store Accumulator Indirect with Post-increment" of the form STA (x)- : M(M(x)) ← AC, M(x) ← M(x)+1 Suppose we want to implement this instruction on the pseudo-CPU discussed in class augmented with a temporary register TEMP. An instruction consists of 16 bits: A 4-bit opcode and a 12-bit address. All operands are 16 bits. PC and MAR each contain 12 bits. AC, MDR, and TEMP each contain 16 bits,...
pls both ans Question 20 5 pts Suppose a computer has 32-bit instructions. The instruction set consists of 64 different operations. All instructions have an opcode and two address fields (allowing for two addresses). The first of these addresses must be a register direct address, and the second must be a memory address. Expanding opcodes are not used. The machine has 16 registers. How many bits can be used for the memory address? Question 21 5 pts Suppose we have...
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...
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...
1. (10 points) Suppose you have a load-store computer with the following instruction mix Operation Frequency Number of clock cycles ALU ops Loads Stores Branches 40 % 20 % 18% 22 % 4 4 The ALU ops (arithmetic logic unit ops) typically use operands in CPU registers and hence they take fewer clock cycles to execute. However, if you want to add a memory operand to a CPU register, then you would have to explicitly load it into a CPU...
Suppose that we wanted to take the VBC1 instruction set and add 2 new commands for accessing the memory READ DR, Address and WRITE DR, Addres:s Because of this we also decide to add to additional registers to support memory access. Theses registers are designated R2 and R3 How does this impact the machine language for the VBC1 Please do not discuss changes to the hardware Machine Language Instructions in Assembly Language Form (ALF)e Data/ Address SR Opcode DR 4...
Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...