Compsci 210 Tutorial Four.

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

1 ITCS 3181 Logic and Computer Systems B. Wilkinson Slides9.ppt Modification date: March 30, 2015 Processor Design.
Give qualifications of instructors: DAP
Computer Science 210 Computer Organization Clocks and Memory Elements.
1 Fundamentals of Computer Science Sequential Circuits.
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
COMPSCI 210 Semester Tutorial 3: Latches & Exercises from Ch3.
CPT 310 Logic and Computer Design Instructor: David LublinerPhone Engineering Technology Dept.Cell
LC-3 Computer LC-3 Instructions
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Overview The von Neumann Machine - the programmable digital computer Introducing the LC-3 Computer - A “toy” computer for us to learn from Computer machine.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Digital Computer Design Fundamental
Midterm Exam Logistics
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Complete Example.
© GCSE Computing Candidates should be able to:  describe the characteristics of an assembler Slide 1.
Dale & Lewis Chapter 5 Computing components
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Datapath and control Dr. ir. A.B.J. Kokkeler 1. What is programming ? “Programming is instructing a computer to do something for you with the help of.
Chapter I: Introduction to Computer Science. Computer: is a machine that accepts input data, processes the data and creates output data. This is a specific-purpose.
Digital Logic Structures: Chapter 3 COMP 2610 Dr. James Money COMP
Software Development Environment
Computer Science 210 Computer Organization
Compsci 210 Tutorial Five.
The Little man computer
Computer Science 210 Computer Organization
Sequential Logic.
Computer Science 210 Computer Organization
ECE 3130 – Digital Electronics and Design
Instructor: Alexander Stoytchev
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
KU College of Engineering Elec 204: Digital Systems Design
Synchronous Sequential Circuits
Introduction to Computer Engineering
Sequential Logic Jess 2006.
Sequential Logic and Flip Flops
Instructor: Alexander Stoytchev
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Chapter 11 Sequential Circuits.
Computer Science 210 Computer Organization
Sequential Logic and Flip Flops
Figure 8.1 Architecture of a Simple Computer System.
Instructor: Alexander Stoytchev
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Introduction to Computer Engineering
Synchronous Sequential Circuits
Sequential Logic.
Reference: Chapter 5 Sequential Circuits Moris Mano 4th Ediditon
Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we’ve already seen. Our schedule will be very.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Instructor: Alexander Stoytchev
The Stored Program Computer
Flip-Flops.
CSC3050 – Computer Architecture
ECE 352 Digital System Fundamentals
Reference: Moris Mano 4th Edition Chapter 5
Chapter 5 Sequential Circuits.
Digital Circuits and Logic
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

Compsci 210 Tutorial Four

agenda Last week homework Sequential circuit - difficult Lc-3 simulator

Exercise 2.8 Determine the truth table for this decoder (Solution on Piazza) CompSci 210 - Semester One 2016

Two type of logic circuits Combinational Circuit for computing always gives the same output for a given set of inputs Decoders – convert S into control signals Multiplexers – select inputs and outputs ALU (Arithmetic and Logic Unit) – operations on data Sequential Circuit for storing stores information State machine – coordinate control signals and data movement Registers and latches – storage elements CompSci 210 - Semester One 2016

Latches The SR Latch (NOR) Consider the following circuit Q R Q Q S S Q Q S Q Symbol Circuit R S Q 0 0 Qprev (HOLD) 0 1 1 1 0 0 1 1 ? Q represents current output Qprev represents previous output. (at last time) Not allowed Function Table Why we need “HOLD” state? Although SR LAtch is one of the most important fundamental methods of didgital storage,it is not often used in practice (because of undefined state) - However forms the basis of the more complex latches that we will be dicussing

You ought to be able to figure this one out yourself! Latches The SR Latch(NAND) NAND Form produces similar result from inverted inputs R R S Q 0 0 ? 0 1 0 1 0 1 1 1 Qprev Q R R Q Q Not allowed Q S S S Q Q Hold Function Table Circuit Symbol You ought to be able to figure this one out yourself!

Master-Slave Flip flop Reduce the current noise on the circuit D CK Qcurrent Qnext ↑ X 1 At the beginning of each clock cycle Again: To reduce the noise possibility

Von Neumann Model

Instruction Processing

LC-3 an assembly language (low-level programming language) a type of educational programming language CompSci 210 - Semester One 2016

Why assembly language Human logic: We are here Circuit: CompSci 210 - Semester One 2016

High level languages Assembly language Machine code CompSci 210 - Semester One 2016

LC-3 simulator & LC-3 editor CompSci 210 - Semester One 2016

LC-3 simulator & LC-3 editor You can edit your program here using binary code, hexadecimal code and assembly code.  After finish editing, you can export to .obj file which can be run by LC3 simulator.

LC-3 simulator & LC-3 editor virtual computer which execute assembly code Simulator CompSci 210 - Semester One 2016

LC-3 Notes The simulator and the editor are separate programs The simulator is available for Windows (also Linux/Java/etc) The lab computers should have LC-3 included The LC-3 software can be executed from a flash drive Download from : Goolge: lc-3 simulator canvas if needed CompSci 210 - Semester One 2016

The LC-3 Files CompSci 210 - Semester One 2016

The LC-3 Files After installation, you will see 2 exe programs (windows): LC3Edit.exe and Simulate.exe.

LC-3 Editor CompSci 210 - Semester One 2016

LC-3 Editor The editor is used to enter your LC-3 instructions You will save your programs into the .asm format The editor will also assemble your .asm files into .obj files which can be run on the simulator

example.asm .ORIG x3000 LD R2, ZERO LD R0, M0 LD R1, M1 LOOP BRz DONE ADD R2, R2, R0 ADD R1, R1, -1 BR LOOP DONE ST R2, RESULT HALT RESULT .FILL x0000 ZERO .FILL x0000 M0 .FILL x0004 M1 .FILL x0803 .END CompSci 210 - Semester One 2016

LC-3 Simulator

LC-3 Simulator The simulator is used to execute your assembled LC-3 machine code You will load the .obj files you create into the editor The editor gives you a very detailed view of what is happening as your machine code is executed

Lc-3 simulator CompSci 210 - Semester One 2016

Example: LC-3 ADD Instruction CompSci 210 - Semester One 2016

Demonstration Complete the following tasks in LC-3. Write a program in the LC-3 Editor. Assemble a program in the LC-3 Editor. Load and execute a program in the LC-3 Simulator. Set breakpoints in the simulator to pause execution. Step forward through your executing program one line at a time. Modify a register value during program execution.