Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

1. Datapath Modification Modify the datapath and control signals to perform the new, Schemes and Mind Maps of Assembly Language Programming

1. Datapath Modification Modify the datapath and control signals to perform the new instructions in the corresponding datapath. Use the minimal amount of additional hardware and clock cycles/control states. Remember: • When adding new instructions, don't break the operation of the standard ones. • Avoid adding ALUs, adders, Reg Files, or memories to the datapath • You can add MUXes, logic gates, etc. but try to do minimally. (these cost in terms of area, cycle time, etc) • You can add or remove step(s) to the datapath execution if it’s necessary, but try to do minimally The new Instruction to be added to the standard multicycle datapath 1. Load Word Register (uses R instruction format) lwr Rt, Rd (Rs) #Reg[Rt] = Mem[Reg[Rd]+Reg[Rs]] 2. Add 3 operands (new instruction format: opcode(6), rs(5), rt(5), rd(5), rx(5), (6 bits not used)) add3 Rd, Rs, Rt, Rx #Reg[Rd] = Reg[Rs] + Reg[Rt] + Reg[Rx] 3. Add to Memory (new instruction format: opcode(6), rs(5), rt(5), rd(5), offset(11)) addm

Typology: Schemes and Mind Maps

2022/2023

Uploaded on 05/08/2023

osama-masri
osama-masri 🇯🇴

1 document

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download 1. Datapath Modification Modify the datapath and control signals to perform the new and more Schemes and Mind Maps Assembly Language Programming in PDF only on Docsity! Assignment Project: Multi‐Cycle Datapath Adding instructions Students will work in groups of no less than 2 and no more than 3. All groups will present their work to the class in the last week (i.e. between 14/5/2023 to 18/5/2023) with no exceptions, and submit their report to me on course Moodle for grading. 1. Datapath Modification Modify the datapath and control signals to perform the new instructions in the corresponding datapath. Use the minimal amount of additional hardware and clock cycles/control states. Remember:  When adding new instructions, don't break the operation of the standard ones.  Avoid adding ALUs, adders, Reg Files, or memories to the datapath  You can add MUXes, logic gates, etc. but try to do minimally. (these cost in terms of area, cycle time, etc)  You can add or remove step(s) to the datapath execution if it’s necessary, but try to do minimally The new Instruction to be added to the standard multicycle datapath 1. Load Word Register (uses R instruction format) lwr Rt, Rd (Rs) #Reg[Rt] = Mem[Reg[Rd]+Reg[Rs]] 2. Add 3 operands (new instruction format: opcode(6), rs(5), rt(5), rd(5), rx(5), (6 bits not used)) add3 Rd, Rs, Rt, Rx #Reg[Rd] = Reg[Rs] + Reg[Rt] + Reg[Rx] 3. Add to Memory (new instruction format: opcode(6), rs(5), rt(5), rd(5), offset(11)) addm Rd, Rt, Offset(Rs) #Reg[Rd] = Reg[Rt] + Mem[sign extended offset + Reg[Rs]] 4. Branch on less than or Equal (uses I instruction format) blez Rs, label # if Reg[Rs] < 0, PC = PC+4 + (sign‐extended offset << 2) 5. Branch Equal to Memory (new instruction format: opcode(6), rs(5), rt(5), rd(5), offset(11)) beqm Rd, Rt, Offset(Rs) # if Reg[Rt] = Mem[Offset+Reg[Rs]], PC = PC + 4 + Reg[Rd] 6. Branch Equal to 0 to Immediate (uses R instruction format) beqzi (Rs), Label #if Mem[Reg[Rs]] = 0, then PC = PC + (sign‐extended offset) (NOTE: This is not PC+4, and not shifted by 2) 7. Store Word and Increment swinc Rt, offset(Rs) #Mem[Reg[Rs] + sign extended offset]= Reg[Rt], Reg[Rs] = Reg[Rs] + 4 8. Store Word and Decrement swdec Rt, offset(Rs) #Mem[Reg[Rs] + sign extended offset] = Reg[Rt], Reg[Rs] = Reg[Rs] – 4 Note: Treat each new added instruction separately i.e. Each new added instruction is treated as the only one to be added to the standard datapath showing the necessary added gates and control signals 2. Datapath Timing Calculate the delay and the minimal clock cycle in the modified datapaths when performing each new instruction above. Assume the following delays:  Memory: 200ps  Register Files Access (READ/Write): 50ps  ALU and adders: 100ps  Logic Gates and Multiplexors: 1ps  All other times are negligible
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved