31
Smalltalk to teach Smalltalk to teach Computer Computer Architecture Architecture ESUG 2003 ESUG 2003 Meeting Bled, Meeting Bled, Slovenia. Slovenia. August 2003 August 2003

Smalltalk to teach Computer Architecture

  • Upload
    esug

  • View
    483

  • Download
    1

Embed Size (px)

DESCRIPTION

Germán Fabregat: Smalltalk to teach Computer Architecture (ESUG 2003, Bled)

Citation preview

Page 1: Smalltalk to teach Computer Architecture

Smalltalk to teach Smalltalk to teach Computer ArchitectureComputer Architecture

ESUG 2003 Meeting ESUG 2003 Meeting Bled, Slovenia. Bled, Slovenia. August 2003August 2003

Page 2: Smalltalk to teach Computer Architecture

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

Page 3: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

3

Practical experiencePractical experience

Page 4: Smalltalk to teach Computer Architecture

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

Page 5: Smalltalk to teach Computer Architecture

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

Page 6: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

6

Using VisualWorks V5i.3Using VisualWorks V5i.3

SmalltalkSmalltalk

Page 7: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

7

Teaching Computer ArchitectureTeaching Computer Architecture

Page 8: Smalltalk to teach 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

Page 9: Smalltalk to teach Computer Architecture

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

Page 10: Smalltalk to teach Computer Architecture

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

Page 11: Smalltalk to teach Computer Architecture

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

Page 12: Smalltalk to teach Computer Architecture

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)

Page 13: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

13

The simulatorsThe simulators

Page 14: Smalltalk to teach Computer Architecture

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

Page 15: Smalltalk to teach Computer Architecture

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

Page 16: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

16

Page 17: Smalltalk to teach Computer Architecture

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

Page 18: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

18

Page 19: Smalltalk to teach Computer Architecture

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)

Page 20: Smalltalk to teach Computer Architecture

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

Page 21: Smalltalk to teach Computer Architecture

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

Page 22: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

22

Page 23: Smalltalk to teach Computer Architecture

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

Page 24: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

24

Page 25: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

25

Why Smalltalk?Why Smalltalk?

Page 26: Smalltalk to teach Computer Architecture

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

Page 27: Smalltalk to teach Computer Architecture

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

Page 28: Smalltalk to teach Computer Architecture

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

... ...

Page 29: Smalltalk to teach Computer Architecture

SmallTalk to teach Computer Architecture - ESUG 2003 Meeting - Bled, Slovenia. August 2003

29

The FutureThe Future

Page 30: Smalltalk to teach Computer Architecture

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

Page 31: Smalltalk to teach Computer Architecture

Smalltalk to teach Smalltalk to teach Computer ArchitectureComputer Architecture

Germán FabregatGermán Fabregat

[email protected]@icc.uji.es