An Interactive Web-Based Simulation of a General Computer Architecture

Slides:



Advertisements
Similar presentations
The Little man computer
Advertisements

The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 14 Inside.
Execution of an instruction
LMC Little Moron Computer
Memory - Registers Instruction Sets
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
The Little Man Computer
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
National Center for Supercomputing Applications Larry Brumbaugh William Yurcik National Center for Supercomputing Applications.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Digital Design and Computer Architecture Dr. Robert D. Kent LT Ext Lecture 1 Introduction.
Bus Architecture Memory unit AR PC DR E ALU AC INPR 16-bit Bus IR TR
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
CHAPTER 6: The Little Man Computer
School of Computer Science G51CSA 1 The Little Man Computer.
Chapter 8: The Very Simple Computer
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
Execution of an instruction
Lecture 14 Today’s topics MARIE Architecture Registers Buses
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Computer Organization CSC 405 (VSC) Very Simple Computer.
Little Man Computer When your program gets “translated to machine code” all 0’s & 1’s The translator must know the language of the program (java) as well.
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Computer Architecture 2 nd year (computer and Information Sc.)
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
Dale & Lewis Chapter 5 Computing components
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Examples with 3-Digit Numbers
This is where you can reset and run your program. If your program has an “INP” (input) command, you will type it in this box here. Using the LMC These.
Jeremy R. Johnson William M. Mongan
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Mastering LMC Coding Part #1 Introduction to Low Level Languages Introduction to Little Man computer Simple examples (demos) with video tutorials included.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
Little Man Computer Task 1 Last lesson you were asked to write a program to multiply two numbers together. The next slide has a working program to do this.
1. 2 TimeActivity 9:45Welcome and introductions 10:00What is a computer? 10:15What’s inside? 10:45Activity: A simple view of how computers work 11:15Coffee/tea.
Chapter 14 Inside the Computer - the von Neumann Architecture
The Little man computer
CHAPTER 6: The Little Man Computer
Control Unit Lecture 6.
CHAPTER 6: The Little Man Computer
Review of computer processing and the basic of Operating system
Lesson Objectives A note about notes: Aims
William Stallings Computer Organization and Architecture
William Stallings Computer Organization and Architecture 7th Edition
Chapter 15 Control Unit Operation
Starter Read the Feedback Click on Add new Feedback Open Realsmart
Computer Science 210 Computer Organization
CHAPTER 6: The Little Man Computer
MARIE: An Introduction to a Simple Computer
William Stallings Computer Organization and Architecture 7th Edition
Making Programming Friendlier
The Little Man Computer
BIC 10503: COMPUTER ARCHITECTURE
Computer Architecture
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
Computer Architecture
A Level Computer Science Topic 5: Computer Architecture and Assembly
Information Representation: Machine Instructions
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Little Man Computer.
Presentation transcript:

An Interactive Web-Based Simulation of a General Computer Architecture By William Yurcik*, Joaquin Vila, and Larry Brumbaugh

Presentation Outline Introduction The LMC Paradigm LMC Technical Description Educational Use of LMC Demo Conclusion

Introduction Students taking introductory courses in computer organization and assembly language find it difficult to understand the various concepts related to computers without a proper model/tool that represents the architecture of a working computer.

Little Man Computer (LMC) web-based simulation based on a conceptual paradigm used to introduce computer architecture and assembly language programming to undergraduate students.

LMC The model was developed by Stuart Madnick of MIT.

LMC Paradigm Walled Mailroom 100 mail boxes (00 – 99) Location counter (2 digits) Input and output basket Calculator

LMC

LMC Applet We have implemented the LMC paradigm as a web-based application implemented in a Java applet.

The LMC Simulation The LMC simulation visually shows a one-pass assembly process (mnemonic assembler source code to machine code) and load process (moving machine code into mailboxes). In the edit mode users can write source code (which is automatically checked for syntax errors) or load source code from an existing file.

The LMC Simulation For the programmer’s convenience, three different execution modes are provided: Burst Mode where all instructions in the program are executed until a HALT instruction is encountered; Step Into which executes one instruction at a time; and Step Over which is similar to Step Into except for SKIP instructions (for SKIP instructions, if the condition is met the program executes the next instruction and then waits for user interaction).

The LMC Simulation Debugging break points can be set for all three execution modes. A flag register indicates error conditions and is set/reset for corresponding overflow/underflow conditions and zero/negative/positive values within the calculator.

Computer Architecture The major characteristics that define a von Neumann architecture include: stored program concept: memory holds both programs and data linear memory addressing: there is a unique sequential numeric address for every memory location memory is addressed by location without consideration of memory contents. instructions are executed sequentially (unless an instruction or outside event causes a branch to occur) functional organization: Control Unit (executes instructions), Arithmetic Logic Unit (ALU- arithmetic and logic operations), Program Counter (PC), Input/Output (I/O) interfaces, and memory

Analogy LMC is a direct implementation of a von Neumann architecture. the calculator corresponds to the ALU the mailboxes correspond to memory the location counter corresponds to the PC the I/O corresponds to input/output baskets the Little Man corresponds to the control unit.

Analogy Both data and instructions are stored in the mailboxes. There is no distinction between data and instructions except when a specific operation is taking place. It is important for students to visualize the exact steps performed by the Little Man because they reflect the steps performed in a real CPU when executing an instruction.

Instruction Set Description Mnemonic Opcode 1 2 3 4 500 600 700 800   800 801 802 9 LOAD contents of mailbox address into calculator STORE contents of calculator into mailbox address ADD contents of mailbox address to calculator SUBtract mailbox address contents from calculator INPUT value from inbox into calculator OUTPUT value from calculator into outbox HALT - LMC stops (coffee break) SKIP SKN - skip next line if calculator value is negative SKZ - skip next line if calculator value is zero SKP - skip next line if calculator is positive JUMP – goto address LDA XX STA XX ADD XX SUB XX IN OUT HLT SKN SKZ SKP JMP XX

Clarification to students Although any program can theoretically be implemented in LMC assembly source code, the actual implementation may be extremely complex. Expanded instruction sets on modern computers do not change the fundamental operations of the computer!

Program to add two numbers Mail box LMC assembly language source code machine code 00 01 02 03 04 05 99 IN ; input 1st number from inbox to calculator STA 99; store number from calculator in 99 IN ; input 2nd number from inbox to calculator ADD 99; add contents of 99 to calculator OUT ; output result from calculator to outbox HLT ; stop DAT 00; reserve and clear memory location 500 299 399 600 700 000

Fetch & Execute Cycle Fetch Execute The part of the repetitive cycle in which Little Man finds an instruction to execute. The fetch portion of the cycle is identical for each instruction and occurs before the execution Execute The part of the cycle in which Little Man actually performs the task specified in the instruction The execute portion is different for each instruction.

Analogy Close to the fetch-execute cycle of a real CPU. In a real CPU a detailed fetch-execute cycle would entail: transferring the contents of the PC to the Memory Address Register (MAR) resulting in a the contents of the memory address specified by the PC (the instruction) to be moved to the Memory Data Register (MDR) transferring the contents of the MDR (the instruction) to the Instruction Register (IR); and the remaining steps are the execution portion and thus instruction dependent.

LMC Technical Description LMC should work on any Java-enabled web browser. Java applet Signed Certificate Enables the Load and Save commands

LMC

Educational Use of LMC Von Neumann Architecture Digital Logic Addressing Modes Direct addressing Immediate addressing Indirect addressing Operating System Concepts

Questions?

URL http://138.87.169.30/LMC http://www.acs.ilstu.edu/faculty/javila/LMC

Thank You! Agradeça-o