Presentation is loading. Please wait.

Presentation is loading. Please wait.

ELEN 033 Lecture #1 Tokunbo Ogunfunmi Santa Clara University.

Similar presentations


Presentation on theme: "ELEN 033 Lecture #1 Tokunbo Ogunfunmi Santa Clara University."— Presentation transcript:

1 ELEN 033 Lecture #1 Tokunbo Ogunfunmi Santa Clara University

2 Introduction l ELEN 033 (Introduction to Digital Signal Processing Systems) l Computer Science deals with the notions of algorithms and data structures. l Programming Language is an abstraction which makes algorithms and data structures explicit.

3 Algorithms l An algorithm is a program’s order of execution. Also, an algorithm is a procedural method used to solve problems. An algorithm is a finite set of steps each of which may require one or more operations. l An algorithm operates on data structures modifying the input to get the result

4 Data Structures l A data structure is an abstraction describing different characteristics of objects to be represented as units of information. l Examples of data structures are –integers, arrays, strings,queues, records, stacks, lists, trees etc.

5 Functions and Procedures l Functions and procedures are an abstraction used in programming to hide or reduce complexity. l A function or procedure is designed to solve a small and well-defined problem which is part of the larger problem to be solved.

6 Abstractions l An abstraction is a simplified picture of the relevant information that helps us deal with complexity. l Abstractions usually exclude extraneous details. l A model is an abstraction used to introduce new concepts to capture the essence of an idea without having to remember the details

7 Levels of Abstraction l Abstractions are used in everyday life –Several examples (e.g. maps, road signs, etc) –A road map contains limited information about certain roads –A map captures the notion of a route –Different models are appropriate for different problems

8 Primitives l Primitives are elementary operations associated with a model of an abstraction. l The primitives can be characterized in such ways that reflect cost and function in appropriate terms for the abstraction. For example, there are two diff. primitives for determining distance on a road map: –use scale factor or add up distances on routes.

9 Abstractions of MIPS RISC Architecture l MIPS RISC machine language l True Assembly Language (TAL) l MIPS Assembly Language (MAL) l Simple Abstract Language (SAL)

10 Computer Execution Basics l A computer’s processor (CPU) executes instructions. l Instructions specify ways that variables are manipulated and stored in the computer’s memory. l In a HLL, Variables are declared. In machine lang., variables are assigned. l Binding is the process of assigning a memory location to a variable.

11 What is a Computer Program? It consists of l A collection of variables l A set of instructions that act upon those variables l Rules for describing the order of execution of the instructions

12 How does a program run? l Each instruction is given a unique identifier or label (it is actually an address in program memory) l An implicit variable (actually called the Program Counter (PC)) exists which is initially assigned the label for the first instruction to be executed. l At any time, PC contains the address of the next instruction to be executed, except it is a branch instruction.

13 Program Execution l The program execution is a set of changes to the state of the computer. l The state of the computer consists of the variables and the Program Counter. l Execution of each instruction leads to modification of one or more variables until the last instruction which is usually a halt.

14 Memory Memory is an array of cells each assigned an address and capable of holding a value. We make the following distinctions: l Internal vs. External Memory l Random Access Memory (RAM) vs. Read- Only memory (ROM) l Program vs. Data memory

15 Program Execution Steps l CPU fetches instruction from memory pointed to by the PC l CPU decodes instruction l CPU loads (reads) the value of variables from memory l CPU executes instruction l CPU stores (writes) the result in memory l PC is incremented by one.

16 Types of Instructions Instructions can be of different types l Arithmetic (eg add A, B,C) l Logical (eg cmp A, B) l Control (eg beq A, B, br_target)

17 Summary l A computer’s architecture is described by it’s instruction set. l Programming language abstractions are ideal for hiding the details of a specific architecture while giving flexibility to the programmer. l Computers operate under the model of the instruction fetch/execute cycle.


Download ppt "ELEN 033 Lecture #1 Tokunbo Ogunfunmi Santa Clara University."

Similar presentations


Ads by Google