Presentation is loading. Please wait.

Presentation is loading. Please wait.

June 20071R. Smith - University of St Thomas - Minnesota A spreadsheet-based simulation of CPU instruction execution R. E. Smith Computer & Computational.

Similar presentations


Presentation on theme: "June 20071R. Smith - University of St Thomas - Minnesota A spreadsheet-based simulation of CPU instruction execution R. E. Smith Computer & Computational."— Presentation transcript:

1 June 20071R. Smith - University of St Thomas - Minnesota A spreadsheet-based simulation of CPU instruction execution R. E. Smith Computer & Computational Science University of St. Thomas St. Paul, MN

2 June 2007 2R. Smith - University of St Thomas - Minnesota The Spreadsheet CPU Motivation – teaching about the CPUMotivation – teaching about the CPU Overview – using a spreadsheetOverview – using a spreadsheet Literacy VersionLiteracy Version Architecture VersionArchitecture Version Fetch CycleFetch Cycle Execute CycleExecute Cycle

3 June 2007 3R. Smith - University of St Thomas - Minnesota Teaching about the CPU Literacy – how a CPU worksLiteracy – how a CPU works –Fetch-Execute Cycle – what the Gigahertz count –Registers and RAM –Machine language programming Architecture – how instructions workArchitecture – how instructions work –Mechanism for instruction decoding and execution –Modifying the instruction set – adding and changing

4 June 2007 4R. Smith - University of St Thomas - Minnesota Using a spreadsheet Why: Students are familiar with themWhy: Students are familiar with them –Cells provide a visual representation of RAM –Functional semantics via the Value Rule –Contrast with machine language semantics How: Implementing the behaviorHow: Implementing the behavior –Use a column of cells as RAM –Separate columns for fetch and execute cycles –Use a macro to cycle the state machine –Separate cells for last state and next state –Each register has its own row

5 June 2007 5R. Smith - University of St Thomas - Minnesota Literacy version

6 June 2007 6R. Smith - University of St Thomas - Minnesota Architecture Version GoalsGoals –Better instruction set: conditionals, indexing –Easy for students to follow instruction execution –Easy for students to modify instructions First attemptFirst attempt –Instructions assigned to separate columns –Registers/cycles split into separate rows –Hard to explain and modify Current versionCurrent version –Separate sheets/tabs for each instruction cycle –Easier to add a defer cycle for indirection, if desired

7 June 2007 7R. Smith - University of St Thomas - Minnesota Architecture Version: Fetch Cycle

8 June 2007 8R. Smith - University of St Thomas - Minnesota Execute Cycle

9 June 20079R. Smith - University of St Thomas - Minnesota Demonstration

10 June 2007 10R. Smith - University of St Thomas - Minnesota Instruction Set InstructionCodeExample TextExample Code Add xx1xxAdd 23123 Store xx2xxStore 23223 Jump xx3xxJump 5305 Stop0 0 Invert1 1 Clear2 2 Noop3 3


Download ppt "June 20071R. Smith - University of St Thomas - Minnesota A spreadsheet-based simulation of CPU instruction execution R. E. Smith Computer & Computational."

Similar presentations


Ads by Google