Designing a Virtual Machine. Basic Approach Object-oriented design Try to model the hardware. Seek a level of detail that is appropriate for interpretation.

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

GCSE Computing Lesson 5.
ARITHMETIC LOGIC SHIFT UNIT
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Chapter 12 Pipelining Strategies Performance Hazards.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
A look at interrupts What are interrupts and why are they needed.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
Processor Types And Instruction Sets Barak Perelman CS147 Prof. Lee.
ROBOT Computer and its Programs
Assembly & Machine Languages
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Computer Organization
5-Stage Pipelining Fetch Instruction (FI) Fetch Operand (FO) Decode Instruction (DI) Write Operand (WO) Execution Instruction (EI) S3S3 S4S4 S1S1 S2S2.
Lecture 3. Diff b/w RAM and Registers Registers are used to hold data immediately applicable to the operation at hand Registers are used to hold data.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns.
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
Chapter 8: The Very Simple Computer
The Central Processing Unit (CPU) and the Machine Cycle.
Computer Science/Ch. 5 System Softwares 5-1 Chapter 5 System Softwares.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
J. Stover, CSD-HS.  A computer is an electronic device that is programmed to accept data (input), process it into useful information (output), and store.
COMPUTER ORGANISATION I HIGHER STILL Computing Computer Systems Higher Marr College Computing Department 2002.
Computer Science 101 Computer Systems Organization ALU, Control Unit, Instruction Set.
Fetch-execute cycle.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
More on Pipelining 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Compilers and Interpreters
CPIT Program Execution. Today, general-purpose computers use a set of instructions called a program to process data. A computer executes the.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
DIGITAL TECHNOLOGY. 20 Questions  Pair off with another student within your table.  Both of you are to think of your favorite in a specific category.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
The Little man computer
Component 1.6.
CS161 – Design and Architecture of Computer Systems
Starter Read the Feedback Click on Add new Feedback Open Realsmart
Computer Science 210 Computer Organization
Design of the Control Unit for Single-Cycle Instruction Execution
Do it now You will find your do it now task in your workbook – look for the start button! Thursday, 20 September 2018.
The Processor and Machine Language
Figure 8.1 Architecture of a Simple Computer System.
Computer Science 210 Computer Organization
Intro to Architecture & Organization
Topic 6 LC-3.
Figure 8.1 Architecture of a Simple Computer System.
Sequencing, Selection, and Loops in Machine Language
Computer Architecture
MARIE: An Introduction to a Simple Computer
8051 ASSEMBLY LANGUAGE PROGRAMMING
Program Execution.
The Von Neumann Machine
Review: The whole processor
1.3.7 High- and low-level languages and their translators
Instruction execution and ALU
Computer Architecture
Algoritmos y Programacion
Sec (2.3) Program Execution.
Presentation transcript:

Designing a Virtual Machine

Basic Approach Object-oriented design Try to model the hardware. Seek a level of detail that is appropriate for interpretation of a machine language program Consider tool-building mode to bottom up design a structure that will make the problem manageable

A Simple Computer Memory CPU 1. Fetch2. Decode 3. Fetch Operands 4. Execute & Store Results Basic instruction cycle to execute instructions.

CPU object Define registers –Programmable and internal Method to execute single instruction –switch to check for opcode –Methods for each instruction Execution selection to either: –Loop until STOP or BREAK location found Only once for a single instruction

Memory Lots of latitude in designing memory Do not be concerned with storing “binary” values. Design a “run-time” memory that allows storing what you need stored. –Distinguish data and instructions –Instructions have opcode/operand1/operand2 Maintain a table of tokens and locations for both instructions and data. –Build a lookup method to find names

Other Utilities Loader –Parse input –Store instructions in memory –Build label table Debug routines –Examine memory and label table after loading –Dump basic registers to an output file as executing

Design/Testing Strategies Try to divide the lines with simple but limited interaction (like good method design) Build incrementally –Build a loader – dump to see if working –Build an interpreter – test with “manually” defined instructions and data –Being with a limited instruction set

Problem Areas Visualize the result. If you don’t have a vision of your work, you haven’t designed sufficiently. You should be able to see the end. Define problem areas early and solve those –Don’t start doing the easy things, ignoring problems Ask for help when there is a problem area.

Time Line Develop a reasonable time line Stick with it. Work effort may not be proportional. –Time –Personal workload Meet your responsibility to the group. Work with the strengths of each person.