Upload
cuthbert-payne
View
216
Download
0
Embed Size (px)
Citation preview
Smalltalk to teach Smalltalk to teach Computer ArchitectureComputer Architecture
ESUG 2003 Meeting ESUG 2003 Meeting Bled, Slovenia. Bled, Slovenia. August 2003August 2003
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
2
Germán FabregatGermán Fabregat
Computer Architecture GroupComputer Architecture Group
Departamento de Departamento de Ingeniería y Ciencia de los ComputadoresIngeniería y Ciencia de los Computadores
University Jaume IUniversity Jaume I
Castellón, SPAINCastellón, SPAIN
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
3
Practical experiencePractical experience
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
4
I am a Computer Architect, not a Software I am a Computer Architect, not a Software EngineerEngineer
I was a C programmer, and sceptical about I was a C programmer, and sceptical about the use of Smalltalk except to play withthe use of Smalltalk except to play with
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
5
I discovered Smalltalk during a stage at the I discovered Smalltalk during a stage at the UBO, some five years agoUBO, some five years ago
I developed my last processor simulator I developed my last processor simulator during a week, and is used by more than during a week, and is used by more than 300 students per year300 students per year
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
6
Using VisualWorks V5i.3Using VisualWorks V5i.3
SmalltalkSmalltalk
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
7
Teaching Computer ArchitectureTeaching Computer Architecture
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
8
Elementary levelElementary level
•Parts of a computerParts of a computer
•Von Neumann and Harvard ArchitecturesVon Neumann and Harvard Architectures
•Basics of the execution of programsBasics of the execution of programs
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
9
Intermediate levelIntermediate level
•Assembly programmingAssembly programming
•Input/output and exception managementInput/output and exception management
•Basics of the CPU internalsBasics of the CPU internals
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
10
Advanced levelAdvanced level
•Control unit designControl unit design
•Instruction level parallelismInstruction level parallelism
•Superscalar and VLIW processorsSuperscalar and VLIW processors
•Performance issuesPerformance issues
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
11
The only affordable way to carry out The only affordable way to carry out practical -practical -laboratorylaboratory- work on the - work on the highlighted items is through highlighted items is through
simulationsimulation
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
12
The ideal laboratory environmentThe ideal laboratory environment
•Homogeneous for all levels/simulatorsHomogeneous for all levels/simulators
•Platform (OS) independent (more than 5 Platform (OS) independent (more than 5 labs and 500 students)labs and 500 students)
•Easy to modify, upgrade, customize, Easy to modify, upgrade, customize, manipulate...manipulate...
•Complex things -VHDL- are not really Complex things -VHDL- are not really required (nor desired)required (nor desired)
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
13
The simulatorsThe simulators
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
14
The First DevelopmentThe First Development
•General circuit simulatorGeneral circuit simulator
•Based on the classes Based on the classes
CPURegisterCPURegister
CPUCombinatorialCPUCombinatorial
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
15
The First DevelopmentThe First Development
•Simulation engine based on Simulation engine based on value holdersvalue holders
•Developed and tested in 2 months, with Developed and tested in 2 months, with no previous Smalltalk programming no previous Smalltalk programming experienceexperience
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
16
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
17
The Second DevelopmentThe Second Development
•Second version of the previous simulatorSecond version of the previous simulator
•Used to teach Control Unit design at the Used to teach Control Unit design at the University of Bretagne Occidentale. Brest, University of Bretagne Occidentale. Brest, FranceFrance
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
18
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
19
The Last DevelopmentThe Last Development
•Fully new simulator designFully new simulator design
•Used by more than 600 students during 2 Used by more than 600 students during 2 academic yearsacademic years
•Developed in a week (the basic version)Developed in a week (the basic version)
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
20
The Last DevelopmentThe Last Development
•Basic Processor for the elementary levelBasic Processor for the elementary level
•The instruction set was not fully known The instruction set was not fully known during the developmentduring the development
•Changes and upgrades were expected Changes and upgrades were expected during the first weeks of useduring the first weeks of use
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
21
The Last DevelopmentThe Last Development
•The processor-like model was not suitableThe processor-like model was not suitable
•Execution is responsibility of each Execution is responsibility of each instructioninstruction
•Each instruction type is a subclass of the Each instruction type is a subclass of the root class root class InstructionInstruction
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
22
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
23
The Last DevelopmentThe Last Development
•New instructions were continuously added New instructions were continuously added to fit the requirements of the teachersto fit the requirements of the teachers
•The processor was easily upgraded to The processor was easily upgraded to support interrupts and input/outputsupport interrupts and input/output
•The executable image can be obtained at The executable image can be obtained at http:/mermaja.act.uji.es/otros/pb/pbintro.htmlhttp:/mermaja.act.uji.es/otros/pb/pbintro.html
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
24
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
25
Why Smalltalk?Why Smalltalk?
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
26
Building rich user interfaces is fast and Building rich user interfaces is fast and easyeasy
All the simulators have the same All the simulators have the same look and feellook and feel
The applications are platform The applications are platform independentindependent
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
27
Simple systems are easy to build, Simple systems are easy to build, upgrade and modifyupgrade and modify
Complex systems are easy to grow Complex systems are easy to grow from simpler ones, adding components from simpler ones, adding components in a modular wayin a modular way
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
28
Simulators can be built focusing on the Simulators can be built focusing on the important aspects, without worrying important aspects, without worrying about data types, instruction coding...about data types, instruction coding...
Pre-built high level tools -parsers- can Pre-built high level tools -parsers- can be added to allow user configurability be added to allow user configurability
... ...
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
29
The FutureThe Future
SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003
30
Smalltalk is well established in my Smalltalk is well established in my research team research team
Other colleagues teaching Computer Other colleagues teaching Computer Architecture prefer using JavaArchitecture prefer using Java
While the new panacea for the teachers of While the new panacea for the teachers of programming is Pythonprogramming is Python
Smalltalk to teach Smalltalk to teach Computer ArchitectureComputer Architecture
Germán FabregatGermán Fabregat
[email protected]@icc.uji.es