1. 1 cycle mips performance - georgetown...

22
1. 1 cycle MIPS performance 3. general pipelining 8. MIPS pipe, LW 12. MIPS performance, piped vs non-piped 14. arrays, piped 15. hazards

Upload: others

Post on 20-Oct-2019

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

1. 1 cycle MIPS performance3. general pipelining8. MIPS pipe, LW12. MIPS performance, piped vsnon-piped14. arrays, piped15. hazards

Page 2: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 3: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 4: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 5: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

required delay before using written data.

Page 6: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

Positive edge-triggered FF:

output changes on rising clock

Page 7: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 8: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

NEG-FFSamples

NEG-FFLatches

POS-FFSamples

POS-FFLatches

RegFile negtriggered FF

upstream, postriggered FF

downstream,pos triggeredFF

POS/NEGclock edges.

2-phase,ACTIVE

lw $1, ...nopnopnopadd $2, $1, ...

Page 9: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 10: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 11: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 12: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 13: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 14: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 15: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

Could we possibly send data from pipeline stage to stage?

Page 16: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

Sub is stuck in Fetch,repeatedly fetchedPC not incremented

Instruction written to 1st stage pipeline register is OR $0, $0, $0

Sub advances to Reg-Read at t == 5

PC incrementednext instruction fetched

Page 17: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 18: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

add $1, _, _sub _, $1, _

Data available next tick.

Forwarding (feedback) works.

lw $1, (offset)(_)sub _, $1, _

WHY NOT forward Dmem.out?

DELAY = 200ps (memory) + 200ps (ALU)

forward from WB instead, insert NOP

Page 19: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 20: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining
Page 21: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining

Feedback paths to ALU go to both inputs. Hazard detection sets MUXes: Opcode needed in pipe stage registers for detection.

Page 22: 1. 1 cycle MIPS performance - Georgetown Universitypeople.cs.georgetown.edu/.../520-2012-CourseDocuments/Lec-4b-MIPSpiped.pdf · 1. 1 cycle MIPS performance 3. general pipelining