cs433 namrata mantri (nmantri2) amd zen 2 anjana suresh ...€¦ · vibhor dodeja (vdodeja2)...
TRANSCRIPT
![Page 1: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/1.jpg)
CS433AMD ZEN 2
Hyoungwook Nam (hn5)Anjana Suresh Kumar (anjanas3)
Vibhor Dodeja (vdodeja2)Namrata Mantri (nmantri2)
![Page 2: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/2.jpg)
Table of Contents1. Overview
2. Pipeline Structure
3. Memory Hierarchy
4. Security and Power
5. Takeaways
![Page 3: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/3.jpg)
Overview
![Page 4: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/4.jpg)
History of AMD's x86 microarchitectures (1)K5 - K7 (95~02)
x86 frontend, RISC backendSuperscalar, OoO, speculationSIMD, L2 cache (K6)
Introduced x86-64 ISADual-core (Athlon 64 X2)Integrated memory controller
Up to 6 coresShared L3 cacheGPU integrated APUs (Fusion)
K8 (03~08)
https://www.tomshardware.com/picturestory/713-amd-cpu-history.html
K10 (09~11)
![Page 5: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/5.jpg)
History of AMD's x86 microarchitectures (2)Bulldozer (11~16)
Multi-core module (MCM)Two cores per moduleShared FP and L2 in a module
Simultaneous Multi-thread (SMT)Two threads per coreHigher single-thread performance
AMD Financial Analyst Day, May 2015
Zen (17 ~ )
![Page 6: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/6.jpg)
Multi-core Module (MCM) Structure of Zen
Multiple dies in a package, 2 core complexes (ccx) per die, and up to 4 cores per ccx. (~4c8t per die)
Fully connected NUMA between dies with infinity fabric (IF) which also interconnects ccx.
https://www.slideshare.net/AMD/amd-epyc-microprocessor-architecture
Single EPYC Package Single Die (Chiplet)
![Page 7: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/7.jpg)
Zen 2 Changes Over Zen 1 and Zen+Dedicated IO chiplet using hybrid process- TSMC 7nm CPU cores + GF 14nm IO chiplet
2x more cores per package- up to 16 for consumer and 64 for server
More ILP- Better predictor, wider execution, deeper window, etc.
2x Larger L3 and faster IF2
Extra security features against spectre attacks
https://www.pcgamesn.com/amd/amd-zen-2-release-date-specs-performancehttps://hexus.net/tech/news/cpu/131549-the-architecture-behind-amds-zen-2-ryzen-3000-cpus/
![Page 8: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/8.jpg)
Pipeline Structure
![Page 9: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/9.jpg)
Fetch
ully associative 64-entry)
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
![Page 10: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/10.jpg)
L1 Hashed Perceptron
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
![Page 11: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/11.jpg)
L2 TAGE
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
![Page 12: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/12.jpg)
Decode
MUX
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
![Page 13: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/13.jpg)
Modes of Operation
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
µop cache
µop/cycle
![Page 14: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/14.jpg)
Integer Execute
https://fuse.wikichip.org/news/2458/a-look-at-the-amd-zen-2-core/
![Page 15: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/15.jpg)
FP/Vector Execute
FP to Int, Store
Int to FP
Source: https://www.slideshare.net/AMD/the-path-to-zen-2
![Page 16: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/16.jpg)
Memory Hierarchy
![Page 17: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/17.jpg)
Memory Stage
Source: https://www.slideshare.net/AMD/the-path-to-zen-2
![Page 18: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/18.jpg)
Cache Hierarchy
Source: https://www.slideshare.net/AMD/the-path-to-zen-2
![Page 19: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/19.jpg)
Infinity Fabric
Source: https://en.wikichip.org/wiki/amd/infinity_fabric
![Page 20: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/20.jpg)
Infinity Fabric
Source: https://en.wikichip.org/wiki/amd/infinity_fabric
![Page 21: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/21.jpg)
Security and Power
![Page 22: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/22.jpg)
SME and SEV● Need for memory encryption (especially in
servers) :○ Plain text data in memory susceptible
● Secure Memory Encryption (SME) : x86 extension for page-granular memory encryption support using a single 128-bit AES key
○ Marked pages are automatically decrypted and encrypted
○ Unmarked pages suffer no overheard
https://en.wikichip.org/wiki/amd/microarchitectures/zen#Securityhttps://en.wikichip.org/wiki/x86/sme
![Page 23: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/23.jpg)
SME and SEV
● Secure Encrypted Virtualization (SEV) : extension of SME that enables a per-virtual machine SME using per-VM key
● Key management by AMD Secure Processor making the key inaccessible to software
![Page 24: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/24.jpg)
Security for SMT
● Branch predictor tagged per thread to prevent interference between threads (both innocent and malicious)
● Load-Store queues also tagged per thread to prevent any store-to-load forwarding of data from the wrong thread
https://www.amd.com/system/files/documents/security-whitepaper.pdf
![Page 25: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/25.jpg)
Security for speculative execution attacks ● Spectre : Exploits various kinds of mis-speculation to access data the program was not supposed to● Observable side effects caused by speculation exploited by attacks ● Zen 2 has hardware mitigation against the Spectre V4 speculative store bypass vulnerability
https://meltdownattack.com/https://www.amd.com/system/files/documents/security-whitepaper.pdf
https://www.techpowerup.com/256478/amd-zen-2-has-hardware-mitigation-for-spectre-v4
![Page 26: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/26.jpg)
Power Management● Dynamic voltage-frequency scaling (DVFS) used for reducing
power ● Per-core digital LDO regulator and digital frequency synthesizer
(DFS) to vary frequency and voltage across power states on individual core basis
● LDO regulates RVDD for each power domain and create an optimal VDD per core using a system of sensors embedded across the entire chip
● Enables fine power tuning on a per core level based on information collected from the core and overall chip
https://en.wikichip.org/wiki/amd/microarchitectures/zen#Power
![Page 27: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/27.jpg)
Takeaways1. Zen2 is an x86 core architecture which implements SMT and scales up with
MCM packaging2. Higher IPC due to improved BPU, optimized L1I cache and Op cache3. Zen2 uses scalable Infinity fabric interconnect for faster, more power efficient
memory accesses4. Zen2 has spectre mitigations in hardware5. Zen has per-core power tuning
![Page 28: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/28.jpg)
Thank you
![Page 29: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/29.jpg)
Appendix
![Page 30: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/30.jpg)
Performance According to AMD evaluations :
● 15% performance gain over Zen+ compared at same frequency● Zen 2 offers >1.25x performance gain at the same power, or up to half power at same performance● For select benchmarks, +75% performance per watt gain over its previous generation ● 62% performance improvements result of architectural enhancements, and remaining 38% due to
7nm manufacturing process
https://hothardware.com/reviews/amd-zen-2-architecture-explained?page=3
![Page 31: CS433 Namrata Mantri (nmantri2) AMD ZEN 2 Anjana Suresh ...€¦ · Vibhor Dodeja (vdodeja2) Namrata Mantri (nmantri2) Table of Contents 1. Overview 2. Pipeline Structure 3. Memory](https://reader033.vdocuments.net/reader033/viewer/2022060510/5f265c7160c1665f317cf6c8/html5/thumbnails/31.jpg)
Zen Simultaneous Multi-threading (SMT)
AMD Presentation on Hot Chips, Aug 2016https://www.slideshare.net/am_sharifian/intel-hyper-threading-technology
- Shared resources
- Shared with priority
- Statically partitioned
- Shared and tagged