Human Perception
Camera Perception
CSE 141L: Introduction to Computer Architecture Lab
We will start ~12:05 today, but promptly at 12:00 in the future
Copyright By PowCoder代写 加微信 powcoder
, UC San SE 141L CC BY-NC-ND – Content derived from materials from , , , and others
What is Computer Architecture and where does it fit in Computer (Science) Engineering?
• One view: what is an Architect and how do they fit in the creation of buildings?
Port Authority Building in Antwerp, designed by Zaha CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 2
Graphics courtesy Wikipedia
Computer science is all about abstractions
The person who designs this… …only needs to worry about these
Applications Programming Language / Runtime
Operating System Processor Computational Units Digital Logic / Circuits Physical Layout (VLSI) Chip Fabrication
But who designs the big picture?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 3
Computer architects look at the system as a whole and
design machine abstractions
Applications Programming Language / Runtime Operating System
Computational Units
Digital Logic / Circuits Physical Layout (VLSI) Chip Fabrication
Instruction Set Architecture Machine Organization Arithmetic & Number Systems
CC BY-NC-ND – Content derived from materials from , , , and others 4
Good abstractions make it easier to focus on reasoning about one part of a large, complex system
• Which of these maps is easier to use to plan a trolley trip?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 5
Good abstractions make it easier to focus on reasoning about one part of a large, complex system
• Modularization is fundamental to design in many domains
Modular Car Body Design and Optimization by an Implicit Parameterization Technique via SFE CONCEPT Fabien Duddeck,
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 6
But what if I’m not going to become a computer architect?
If I only want to build these…
Applications Programming Language / Runtime
Operating System Processor Computational Units Digital Logic / Circuits Physical Layout (VLSI) Chip Fabrication
…why do I need to know about any of this?
CC BY-NC-ND – Content derived from materials from , , , and others 7
The real world is full of leaky abstractions
• Goal: Sum up all the entries of a two dimensional array
• Which of these implementations is faster?
int twoDarray[256][256];
int sum = 0;
for (int i=0; i<256; i++) { for (int j=0; j<256; j++) {
sum += twoDarray[i][j];
int twoDarray[256][256];
int sum = 0;
for (int i=0; i<256; i++) { for (int j=0; j<256; j++) {
sum += twoDarray[j][i];
Answer: “It depends”
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 8
This class is an opportunity to practice architecture
• You will implement a boutique processor
– Betterthangeneralpurposeforspecifictasks
– Worse(orincapable)atthingsitwasnotdesignedfor – Canyouthinkofsomereal-worldexamplesofthese?
• This will require end-to-end thinking – Lab1:DesignISA
– Lab2:BasicOperation
– Lab3:Assembler
– Lab4:WholeThing!
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 9
What you will be able to do after this class.
• Write top-notch SystemVerilog
• Employ top-notch HW Design Practices
• Design your own processor
• Design pipelined hardware
• Design HW for Altera
• Write serious amounts of code
• Work in a team
• Debug complex designs
• Think like a HW designer
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
Is this a good time to take 141L?
• Think carefully about the timing of this class.
• It’s one of the most intense in CSE.
– But also you also learn a lot.
– If you get a solid “A” in this class, I have no trouble recommending you to a potential
• Contra-indications:
– Other major project classes
– High course load
– Large outside commitments
– Haven’t passed prereqs: CSE 110, 140/140L etc.
– Haven’t taken 141, or aren’t enrolled.
CC BY-NC-ND – Content derived from materials from , , , and others
Course Administrivia
• Instructor
– PatPannuto
– AdithyaAnand
– ChavisaThamjarat – Kanlin SE 141L CC BY-NC-ND – Content derived from materials from , , , and others 12
Question Triage: Who to ask what.
– “In lecture, ...”
– “I’m designing my own supercomputer, ...”
– “In the Altera Tools...” • Me,TA
– “In my 141L implementation...” • TAs:
– “In the 141 ISA project framework, ...” • Me, TA:
CC BY-NC-ND – Content derived from materials from , , , and others
“In a 2-way set associative cache, ...” “In the book...”
• Everything is on the course website
– https://patpannuto.com/classes/2022/winter/cse141L/ – ^ThisisalsothehomepageinCanvas
• We will use Piazza for Q&A
• We will use Gradescope to submit assignments
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 14
Class is not a competition
• My philosophy
– Icarewhetheryoulearnthematerial
– Thepurposeofagradeistoassesshowwellyouknowthematerialin141L – Thepurposeofagradeisnotto“rank”students
– IammostsuccessfulifeveryoneinclassearnsanA
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 15
Assessments & Workload
– Yourgradeishowwellyourfinalprocessorworks
– Milestones(Labs1,2,and3)aretohelpyoustayontrack
• Building a custom processor is a lot of work!
– Anddesignmatters
– Asyoukeepimplementing,itgetsharderandhardertochange...
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 16
We’ll take a short break here...
AND THEN SOME MODERN
HIGHLIGHTS FROM HERE AT UCSD
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 17
But for the rest of today, I want to highlight the kinds of cool stuff that architects do
• UCSD has an amazing team of architecture faculty
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 18
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
One wild idea: “Approximate Computing”
• Aka, what if 1 + 1 doesn’t always equal exactly 2?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 21
Embracing imprecision allows for major gains in performance and energy
Data center
Desktop Mobile
Performance
CC BY-NC-ND – Content derived from materials from , , , and others 22
Pareto.Fron0er
Imprecision
A cross-stack approach to enable approximation
Techniques
Quality Control
End-users Apps Language Compiler Arch Microarch Circuit Devices
[IEEE D&T’16]
[MICRO‘12]
[MICRO’15]
IEEE D&T’15, ACM TACO’16, HiPEAC’16]
[ASPLOS’16]
[ASPLOS‘12]
[DATE’15, IEEE Micro’15]
Privacy Preserving Techniques for Inference Privacy
Accuracy-Agnostic Noise Addition
CC BY-NC-ND – Content derived from materials from , , , and others
Computation Cost
Accuracy Loss
Homomorphic Encryption
Execution Model
Previously Trained Noise Distributions
CC BY-NC-ND – Content derived from materials from , , , and others
Sent to the Cloud
Rethinking the abstractions
Algorithms
Programming Language
Physical Device
Precision Generality
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 26
Performance
Efficiency
Memory, Storage, Software, and Architecture in the NVSL
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
This is a slide you will encounter in many CE/CSE classes...
Non-Volatile Memory
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 28
Chellappa, Srinivas & Franchetti, Franz & Püschel, Markus. (2007). How to Write Fast Numerical Code: A Small Introduction.
Applications
Operating Systems
Distributed Systems
CC BY-NC-ND – Content derived from materials from , , , and others
Orion NOVA
SubZero Ziggurat
NVSL Students Lead Industry
• Industry Built
– NVMe (2011)
– NVMe over Fabrics (2016)
– Optane (2016)
– PMDK (~2014)
Opt. SSD interface (2009) Direct, remote SSD (2013) First PCM SSD (2011) PMEM prog. tools (2011)
CC BY-NC-ND – Content derived from materials from , , , and others
Mobilizing the Micro-Ops: Exploiting Context Sensitive Decoding for Security and Energy Efficiency
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
Leaky abstractions are not always just performance problems...
• This loop behaved differently because of how caches work
Architects added “hidden” caches:
faster, intermediate memories
int twoDarray[256][256];
int sum = 0;
for (int i=0; i<256; i++) { for (int j=0; j<256; j++) {
sum += twoDarray[i][j];
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 32
Leaky abstractions can be security threats!
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 33
Mobilizing the Micro-Ops Exploiting Translated ISAs
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
Instruction Decoder
Mobilizing the Micro-Ops Exploiting Translated ISAs
Native Instructions (e.g., inc [0x803ac] )
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others
Instruction Decoder
Mobilizing the Micro-Ops Exploiting Translated ISAs
Native Instructions (e.g., inc [0x803ac] )
ld t0, [0x803ac]
add, t0, t0, 1
st [0x803ac], t0
CC BY-NC-ND – Content derived from materials from , , , and others
Instruction Decoder
Mobilizing the Micro-Ops Exploiting Translated ISAs
Native Instructions (e.g., inc [0x803ac] )
ld t0, [0x803ac]
security_check1
add, t0, t0, 1
security_check2
st [0x803ac], t0
CC BY-NC-ND – Content derived from materials from , , , and others
Instruction Decoder
Context Sensitive Decoding fixes a leaky abstraction
• Eliminating cache side channels via cache obfuscation
• Energy and Performance optimization via selective devectorization
– ISCA2018
– IEEEMicroTopPicksinComputerArchitecture
• Spectre mitigation via targeted insertion of fence micro-ops (Context Sensitive Fencing)
– ASPLOS2019
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 38
Performance was king, until we unplugged computers
• A lot of “classic” architecture research is makes sure graphs continue to
go up and to the right
1.00 858687888990919293949596979899000102030405
HP PA Pow er PC AMD
Specint2000
Processor Design Trends
Transistors (*10^3) Clock Speed (MHZ) Power (W)
Herb Sutter, Dr.
CC BY-NC-ND – Content derived from materials from , , , and others 39
I spend my time on graphs that go down and to the right
Workstation
By volume, the emerging computing
10cGlasses are mostly energy storage
1G 100M 10M 1M 100k 10k 1k 100 10 1 100m
Volume is shrinking cubically
Mini Computer
IoT/Wearable
Personal Computer
CC BY-NC-ND – Content derived from materials from , , 4n0, and others 1960 1970 1980 1990 2000 2010 2020
Smartphone
Size (mm3)
What can we do with resource-constrained computing?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 41
Where can we find resources for constrained computing?
• Soil Microbial Fuel Cells to power computational systems?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 42
What can we do with “old,” under-resourced computers?
• How do we divert and re-purpose e-waste?
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 43
Wednesday: SystemVerilog
• For those looking to get a jump: – Install/Openthecoursetools
• ModelSim
– [linksonthecoursewebsite]
CSE 141L CC BY-NC-ND – Content derived from materials from , , , and others 44
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com