An Emulated Computer with Assembler for Teaching Undergraduate Computer Architecture Timothy Daryl Stanley Mu Wang Brigham Young University Hawaii Presented.

Slides:



Advertisements
Similar presentations
Programming 68HC11.
Advertisements

2.3) Example of program execution 1. instruction  B25 8 Op-code B means to change the value of the program counter if the contents of the indicated register.
EE1A2 Microprocessor Systems & Digital Logic Part I Digital Electronic System Design Dr. T. Collins.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicH: Building a Data Path and a Control Path for a Microprocessor José Nelson.
State Machines Used to Design Sequential Circuits.
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
SAP1 (Simple-As-Possible) Computer
Dr Masri Ayob TK 2633: Microprocessor & Interfacing Lecture 7: Assembly Language.
Computer Fundamentals ELEC 330 Digital Systems Engineering Dr. Ron Hayne.
1 Programming in Machine Language SCSC 311 Spring 2011.
Computer Systems Organization CS 1428 Foundations of Computer Science.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
designKilla: The 32-bit pipelined processor Brought to you by: Victoria Farthing Dat Huynh Jerry Felker Tony Chen Supervisor: Young Cho.
CS35101 Computer Architecture Spring 2006 Week 1 Slides adapted from: Mary Jane Irwin ( Course url:
A Simple Computer Architecture Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
Lec 5 Basic Computer Organization
Computer Organization CSC 405 (VSC) Very Simple Computer.
CoE3DJ4 Digital Systems Design
A summary of TOY. 4 Main Components Data Processor Control Processor Memory Input/Output Device.
Exam 2 Review Two’s Complement Arithmetic Ripple carry ALU logic and performance Look-ahead techniques Basic multiplication and division ( non- restoring)
CMSC 150 PROGRAM EXECUTION CS 150: Wed 1 Feb 2012.
Chapter 7 Low-Level Programming Languages Nell Dale John Lewis.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Team DataPath Research Computer Architechture. PC and IF in the Processor.
CBP 2002ITY 270 Computer Architecture1 Digital Logic This Time … Control Path, Arithmetic Ops 12 a U1 34 b Last Time …
Dale & Lewis Chapter 5 Computing components
Copyright 2006 by Timothy J. McGuire, Ph.D. 1 MIPS Assembly Language CS 333 Sam Houston State University Dr. Tim McGuire.
An Adder A Subtractor. A and B are the inputs of the adder/ subtractor R is the output of the adder/ subtractor F is the control to tell it to add or.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Pedagogic Value in Understanding Computer Architecture of Implementing the Marie Computer from Null and Lobur in the Logic Emulation Software, Multimedia.
Chapter 5 Computer Organization TIT 304/TCS 303. Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS161 – Design and Architecture of Computer Systems
PROGRAMMING THE BASIC COMPUTER
SAP1 (Simple-As-Possible) Computer
MIPS Instruction Set Advantages
Programming in Machine Language
Chap 7. Register Transfers and Datapaths
Computer Organization and Design
Digital Logic Last Time … This Time … Control Path, Arithmetic Ops a
Computer Science 210 Computer Organization
Design of the Control Unit for Single-Cycle Instruction Execution
BASIC COMPUTER ORGANIZATION AND DESIGN
Instructor: Alexander Stoytchev
Computer Science 210 Computer Organization
Assembler CASE Tool.
CS149D Elements of Computer Science
Design of the Control Unit for One-cycle Instruction Execution
CSCE Fall 2013 Prof. Jennifer L. Welch.
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Topic 5: Processor Architecture
Systems Architecture I
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
Computer Architecture and Organization: L07: Control Sequence
Computer Architecture
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
CSCE Fall 2012 Prof. Jennifer L. Welch.
Review Fig 4.15 page 320 / Fig page 322
COMS 361 Computer Organization
Processor: Datapath and Control
Presentation transcript:

An Emulated Computer with Assembler for Teaching Undergraduate Computer Architecture Timothy Daryl Stanley Mu Wang Brigham Young University Hawaii Presented by Bill Yurcik/NCSA

Objective Demonstrate an 8-bit computer built using a free logic emulation software package* to make very clear to students how: –Digital logic and binary number systems work –How data paths and control paths work –How devices (Memory, ALU, Clock, Multiplexers) combine to make computers –How a program in memory controls the registers, memory, ALUs and data paths –How instructions are decoded –How an assembler works * Multimedia Logic from

Instruction Format Op Op Op Im Im Im Im Im PC MuxPC Inc Instructions Adi - Add Immediate Adm - Add Memory Lmi - Load Mem -> RI Som - Save RO -> Mem Ji - Jump Immediate Jzi - J on Z Im Om - Out Mem Im Hlt - Halt Eight Bit Computer Data Path & Control Legend Data Path Control Path

Eight Bit Computer

Features of Emulated Computer Ability to single step or run from clock Text display of instruction to run on next half cycle All register, immediate and control line states visible Ascii text output Memory can contain comments after hex instructions

Limitations Data memory and program memory in separate devices to simplify data path Limited to eight instructions and 5 bit immediate Increment after program counter multiplexer so jump to zero ends up at one Absence of a by 8 multiplexer means eight 2 by 1 multiplexers must be used

Sample Program One 00 zero (not used) 19 Hex for character count in alphabet ff Twos complement negative one fe Twos complement negative two (not used) 41 ASCII code for letter A c4 Output from memory location Load input register from memory location 4 01 Add I (01) to input register 64 Save output register in memory location 04 c4 Output from memory location load input register from memory location Add from memory location Save output register to memory location 02 aa Jump if last calculation result was zero to 0a 80 Jump to memory location 00(+1) e0 Halt execution Data Memory Content Program Memory Content

Sample Program 2 06 column (size of triangle) 03 row (not used in program) 00 column step 00 row step ff negative one (allows decrementing ) 00 zero 2a symbol "*" 0d new line 45 Load input register from memory location 5 (zero) 20 Add memory location 0 (column) to input register 62 Save result in memory location 2 (column step) 63 Save result in memory location 3 (row step) c6 lp1: Output from memory location 6 (symbol "*") 44 Load input register from memory location 4 (neg one) 22 Add from memory location 2 (column step) 62 Save result in memory location 2 (colmn step) a9 Jump on zero to lp2: 83 Jump to lp1: 23 lp2: Add from memory location 3 (row step) 63 Save result in memory location 3 (row step) b6 Jump on zero to :hlt c7 Output from memory location 7 (new line) 45 Load input register from memory location 5 (zero) 20 Add memory location 0 (column) to input register 44 Load input register from memory location 4 (neg one) 20 Add memory location 0 (column) to input register 60 Save result in memory location 0 (column) 45 Load input register from memory location 4 (neg one) 20 Add memory location 0 (column) to input register 62 Save result in memory location 2 (column step) 83 Jump to lp1: eo hlt: Halt

Assembler in Perl.data (Please Input Data for DataMem.) numlet:26d negone:ffh acode:41h.text (Please Input Data for ProgramMem.) omi acode start:lmi acode adi 01d som acode om acode lmi negone adm numlet som numlet jzi stop ji start stop:hlt Sample input on left Patterned after the PC-SPIM MIPS assembler Writes data to files for memories

Conclusions 8 bit Computer designed using Multimedia Logic from Files available at Demonstrates data path and control path Design and implementation of operation codes demonstrated Provided the starting point of many student design project designs including 16 bit computers

Optional additional material

Scanned Memory to Output Display

Calculator with Binary and Hexadecimal Outputs.

Programmable Calculator

Four Bit Adder

Four Bit ALU 1 bit ALU from Fig 4.16 page 236 of Computer Organization and Design by Patterson & Hennessy used in my 4 bit design