TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Purpose, scope, and expectations of the course Expectations & strategy.

Slides:



Advertisements
Similar presentations
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
Advertisements

Computer Organization and Architecture
Computer Organization and Architecture
LC-3 Computer LC-3 Instructions
Allocating Space for Variables Global data section –All global variables stored here (actually all static variables) –R4 points to beginning Run-time stack.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
CSS 372 Oct 2 nd - Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture.
Chapter 11-14, Appendix D C Programs Higher Level languages Compilers C programming Converting C to Machine Code C Compiler for LC-3 Please return breadboards.
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
OS Spring’03 Introduction Operating Systems Spring 2003.
Computer System Overview
Chapter 7 Interupts DMA Channels Context Switching.
Chapter 6 Programming in Machine Language The LC-3 Simulator
RapUp Dynamic Allocation of Memory in C Last HW Exercise Review for Final Final Exam Next Thursday – Same Time / Same Place.
Overview C programming Environment C Global Variables C Local Variables Memory Map for a C Function C Activation Records Example Compilation.
Chap 4 & 5 LC-3 Computer LC-3 Instructions Chap 4 Homework – due Monday October 27 Chap 5 Homework – due Wednesday October 29 Project 2 Designs (Working.
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Chapter 9 & 10 Subroutines and Interrupts. JSR Instruction: JSR offset (11 bit) xxxxxxxxxxx [PC ]  R7, JMP Offset Jump to Subroutine at offset.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
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
CSS 372 Oct 2 nd - Lecture 2 Review of CSS 371: Simple Computer Architecture Chapter 3 – Connecting Computer Components with Buses Typical Bus Structure.
State Machines Used to Design Sequential Circuits.
TCSS 371A Machine Organization. Getting Started Get acquainted (take pictures) Discuss purpose, scope, and expectations of the course Discuss personal.
Chapter 11-12, Appendix D C Programs Higher Level languages Compilers C programming Converting C to Machine Code C Compiler for LC-3.
Chapter 8 Overview Programmed I/O Introduction to Interrupt Driven I/O Project 3.
7/13/20151 Topic 3: Run-Time Environment Memory Model Activation Record Call Convention Storage Allocation Runtime Stack and Heap Garbage Collection.
TCSS 372A Computer Architecture. Getting Started Get acquainted (take pictures) Review Web Page (
OS Spring’04 Introduction Operating Systems Spring 2004.
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
C Stack Frames / Pointer variables Stack: Local Variables Pass & Return values Frame Ptr linkage (R5) and PC linkage (R7) Pointer Variables: Defining &
Computer Architecture
Chapter 8 Overview Programmed I/O Interrupt Driven I/O.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Midterm Wednesday 11/19 Overview: 25% First Midterm material - Number/character representation and conversion, number arithmetic - DeMorgan’s Law, Combinational.
System Calls 1.
Chapter 10 The Stack Stack: An Abstract Data Type An important abstraction that you will encounter in many applications. We will describe two uses:
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Programmer's view on Computer Architecture by Istvan Haller.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
The Structure of Processes (Chap 6 in the book “The Design of the UNIX Operating System”)
COP4020 Programming Languages Subroutines and Parameter Passing Prof. Xin Yuan.
Chapter 9 Chapter 9 Subroutines and TRAPs l Privileged Instructions l TRAP Routines l Subroutines.
Security Architecture and Design Chapter 4 Part 1 Pages 297 to 319.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
ITEC 352 Lecture 19 Functions in Assembly. Functions + Assembly Review Questions? Project due on Friday Stacks Function activation / deactivation.
Structure and Role of a Processor
Introduction to Computing Systems and Programming The LC-2.
LECTURE 19 Subroutines and Parameter Passing. ABSTRACTION Recall: Abstraction is the process by which we can hide larger or more complex code fragments.
WORKING OF SCHEDULER IN OS
Storage Classes There are three places in memory where data may be placed: In Data section declared with .data in assembly language in C - Static) On the.
ECE 3430 – Intro to Microcomputer Systems
The Stack.
Chapter 4 Addressing modes
Processor Organization and Architecture
Arithmetic using a stack
The LC-3 Instruction Set Architecture Data Movement instructions
More C Stack Frames / Pointer variables
TRAP Routines Privileged Instructions Subroutines
CPU has 6 special locations called registers
Chapter 4: Computer Architecture
CPU Structure and Function
Computer Organization
Implementing Functions: Overview
Presentation transcript:

TCSS 372A Computer Architecture

Getting Started Get acquainted (take pictures) Purpose, scope, and expectations of the course Expectations & strategy for doing well Review Web Page ( Review Syllabus, Textbook, and Simulator book Discuss Laboratory (CP 206D), Access, Etiquette, Equipment Accountability Discuss Homework Format Laboratory Report Format

Review from TCSS 371 Simple machine Overview (LC-3) Memory map Architecture Instructions Addressing Modes Traps Subroutines (Functions) Activation (Context) Records I/O Interrupts

LC-3 Memory Map:

LC-3 CPU Registers: PCProgram counter IRInstruction Register PSR (PSW) Program Status Register (Program Status Word) PSR[15] – Privilege Bit (Supervisor or User State) PSR[10:8] – Priority Bits PSR[2:0] – Condition codes - N, Z, P Register File: R7{Program Counter storage} R6{Stack Pointer} R5[Context Frame Pointer] R4[Beginning of Global Data & Heap] R3 R2 R1 R0{Often used for Pass Value} Special Hidden Registers: USP.Saved SSP.Saved Memory Read/Write Support Registers: MDRMemory Data Register MARMemory Address Register I/O Devices (Pair of Registers per Device): DCRI/O Device Status/Control Register (e.g. Ready/Done, EnIntr, Priority) DDR I/O Device Data Register (maybe byte or word) State of Program (Context): PC, PSW, SP, +

LC-3 Architecture & Data Paths: Combinational Logic State Machine Storage

LC-3 Instructions:

LC-3 Instruction Addressing Modes Register (Operand is in one of the 8 registers) Immediate (Operand is in the instruction) PC-relative (Operand is “offset” from the (PC) ) Indirect (The “Operand” actually points to the real address – rather than being the operand) Base + Offset (Base relative) (Operand is “offset” from the contents of a register) Note: no Direct Addressing defined in the LC-3

Subroutines vs Traps How are Subroutines different from Traps ? –Traps are called using the TRAP instruction (Indirect call through the Trap Vector Table) Subroutines are called using JSR or JSRR instructions (JSR Direct call, JSRR Indirect call) – Both end with a RET ( load the return address) A Trap is an Subroutine call (Indirect) through a Vector Table (the Trap Vector Table [x0000-x00FF]).

Traps: 1)Execute TRAP “vector” - Operating System Service Routines 2)Trap Vectors are at memory locations [0000:00FF] 3)Trap Vectors contain addresses of Trap Service Routines 4)[PC] is stored in R7 5)Address of Trap Service Routine loaded into PC 6)Service Routine Program executed 7)Trap service routine program ends with an RET ( [R7] loaded into PC)

Allocating Space for Variables Global data section –All global variables stored here (actually all static variables) –R4 points to beginning Run-time stack –Used for local variables –R6 points to top of stack –R5 points to top frame on stack –New frame for each block (goes away when block exited) Offset = distance from beginning of storage area –Global: LDR R1, R4, #x –Local: LDR R2, R5, #-y instructions global data run-time stack Device Registers x0200 xFFFF PC R4 R6 R5 x0000 xFE00 Vectors Op Sys x3000

Activation Record or Context Frame Format Function stacked stuff …….. Local Variables Caller’s Frame Pointer (R5) Caller’s Return PC (R7) Function Return Value Function Pass Value n …….. Function Pass Value 1 R6 R5