Timing Core 12 Current cycle = 0 mov (%rbp),%rcx I1D I1I Current cycle = l1d->load(curCycle) Load(%rbp) add %rax,%rbx mov %rdx,(%rbp) Current cycle = l1d->store(curCycle) Store(%rbp) IPC1 Core ja 40530a Miss Write back Request from core Tag Acc Mem Data Read Response to core Data Write
Timing Core 12 Current cycle = 0 mov (%rbp),%rcx I1D I1I Current cycle = l1d->load(curCycle) Load(%rbp) add %rax,%rbx mov %rdx,(%rbp) Current cycle = l1d->store(curCycle) Store(%rbp) IPC1 Core ja 40530a Miss Request Write from core Tag back Acc Request from core Tag Data Acc Write Mem Data Read Response to core Data Write
Timing Core 12 Current cycle = 0 mov (%rbp),%rcx I1D I1I Current cycle = l1d->load(curCycle) Load(%rbp) add %rax,%rbx mov %rdx,(%rbp) Current cycle = l1d->store(curCycle) Store(%rbp) IPC1 Core BasicBlock(BblDescriptor) ja 40530a Miss Request Write from core Tag back Acc Request from core Tag Data Acc Write Mem Data Read Response to core Data Write
Timing Core 12 Current cycle = 0 mov (%rbp),%rcx I1D I1I Current cycle = l1d->load(curCycle) Load(%rbp) add %rax,%rbx mov %rdx,(%rbp) Current cycle = l1d->store(curCycle) Store(%rbp) IPC1 Core BasicBlock(BblDescriptor) Current cycle += 4 ja 40530a Miss Request Write from core Tag back Acc Request from core Tag Data Acc Write Mem Data Read Response to core Data Write
OOO Core - BBL 13 Simulate all stages at once Load A Exec Store A Exec
OOO Core - BBL 13 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 14 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Load A Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Exec Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 15 Simulate all stages at once Store A Exec Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 16 Simulate all stages at once Load A Fetch Decode Issue OOO Commit Execute
OOO Core - BBL 17 Simulate all stages at once Load A Fetch cycle Fetch Decode Issue OOO Commit Execute Miss prediction Fetch wrong ins Ins Fetch Fetch whole bbl Adjust Fetch clock
OOO Core - BBL 18 Simulate all stages at once Load A Decode cycle Fetch Decode Issue OOO Commit Execute uop Queue Miss prediction Check next available Fetch cycle wrong ins Ins Fetch Fetch whole bbl Adjust Adjust Fetch clock Decode clock
OOO Core - BBL 19 Simulate all stages at once Load A Dispatch cycle Fetch Decode Issue OOO Commit Reg Scoreboard Execute uop Queue Miss prediction Check src Check next available available Fetch cycle cycle wrong ins Rob Ins Fetch Check next avail cycle Fetch Issue width whole bbl RegFile width Adjust Adjust Adjust issue clock Fetch clock Decode clock
OOO Core - BBL 20 Simulate all stages at once Load A Commit cycle Fetch Decode Issue OOO Commit Reg Scoreboard Execute uop Queue Miss prediction Check src Ins Window Check next available available Fetch Schedule cycle cycle wrong ins uop in the Rob next cycle Ins Fetch Check next that needed avail cycle ports avail Fetch Issue width whole bbl LS Unit* RegFile width Issue Adjust Adjust Adjust Adjust Load/Store issue clock issue clock Fetch clock Decode clock *Only for load/store
OOO Core - BBL 21 Simulate all stages at once Load A Fetch Decode Issue OOO Commit Reg Scoreboard Execute uop Queue Reg Scoreboard Miss prediction Check src Ins Window Check next Set dst available available available Fetch Schedule cycle cycle cycle wrong ins uop in the Rob next cycle Rob Ins Fetch Check next that needed Retire uop avail cycle ports avail Fetch considering Issue width whole bbl rob width LS Unit* RegFile width Issue Adjust Adjust Adjust Adjust Adjust Load/Store retire clock issue clock issue clock Fetch clock Decode clock
OOO Core – Load/Store 22 Simulate MLP Load A Load B
OOO Core – Load/Store 22 Simulate MLP Load A Load B Cache Hit @ 50 Dispatch @ 40 Issue A Response @ 30 @ 70
OOO Core – Load/Store 23 Mem Mem Read WB @ 90 @ 110 Simulate MLP Cache Load A Cache Miss Write Load B Cache @ 70 @ 100 Hit @ 50 Dispatch @ 60 Dispatch @ 40 Issue B Response Issue A Response @ 50 @ 110 @ 30 @ 70
OOO Core – Load/Store 23 Mem Mem Read WB @ 90 @ 110 Simulate MLP Cache Load A Cache Miss Write Load B Cache @ 70 @ 100 Hit @ 50 Dispatch @ 60 Dispatch @ 40 Issue B Response Issue A Response @ 50 @ 110 @ 30 @ 70 In weave phase, request B will not be delayed due to contentions for A
Simulation Speed for Different Core Type 24 SPECCPU 2006 suite
Simulation Speed for Different Core Type 24 SPECCPU 2006 suite ~3X difference between IPC1 and OOO-C in Hmean
Not Modeled Core Behaviors 25
Not Modeled Core Behaviors 25 Wrong path execution Hard to simulate for Pin Okay to skip for Westmere
Not Modeled Core Behaviors 25 Wrong path execution Hard to simulate for Pin Okay to skip for Westmere Fine-grained message-passing Need significant changes
Not Modeled Core Behaviors 25 Wrong path execution Hard to simulate for Pin Okay to skip for Westmere Fine-grained message-passing Need significant changes TLBs and SMT Not supported yet
Coding Examples 26
Coding Examples 26 Implement a branch predictor for OOO core
Coding Examples 26 Implement a branch predictor for OOO core Change OOO core type From Westmere to Silvermont
Implement Branch Predictors 27
Implement Branch Predictors 27 Have a new branch predictor class
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor {
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… }
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) {
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) { bool prediction = (taken == lastSeen);
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) { bool prediction = (taken == lastSeen); lastSeen = taken;
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) { bool prediction = (taken == lastSeen); lastSeen = taken; return prediction; // always predict taken }
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) { bool prediction = (taken == lastSeen); lastSeen = taken; return prediction; // always predict taken } Replace the branch predictor in ooo_core.h
Implement Branch Predictors 27 Have a new branch predictor class class GShareBranchPredictor { private: bool lastSeen; …… } Implement the predict method public: // Predicts and updates; returns false if mispredicted inline bool predict(Address branchPc, bool taken) { bool prediction = (taken == lastSeen); lastSeen = taken; return prediction; // always predict taken } Replace the branch predictor in ooo_core.h //BranchPredictorPAg<11, 18, 14> branchPred; GSharePredictor branchPred;
Demo 28
Recommend
More recommend