Transcript Training

ELEN 033 Lecture #1
Tokunbo Ogunfunmi
Santa Clara University
Introduction



ELEN 033 (Introduction to Digital Signal
Processing Systems)
Computer Science deals with the notions of
algorithms and data structures.
Programming Language is an abstraction
which makes algorithms and data structures
explicit.
Algorithms


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.
An algorithm operates on data structures
modifying the input to get the result
Data Structures


A data structure is an abstraction describing
different characteristics of objects to be
represented as units of information.
Examples of data structures are
– integers, arrays, strings,queues, records, stacks,
lists, trees etc.
Functions and Procedures


Functions and procedures are an abstraction
used in programming to hide or reduce
complexity.
A function or procedure is designed to solve
a small and well-defined problem which is
part of the larger problem to be solved.
Abstractions



An abstraction is a simplified picture of the
relevant information that helps us deal with
complexity.
Abstractions usually exclude extraneous
details.
A model is an abstraction used to introduce
new concepts to capture the essence of an
idea without having to remember the details
Levels of Abstraction

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
Primitives


Primitives are elementary operations
associated with a model of an abstraction.
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.
Abstractions of MIPS
RISC Architecture




MIPS RISC machine language
True Assembly Language (TAL)
MIPS Assembly Language (MAL)
Simple Abstract Language (SAL)
Computer Execution Basics




A computer’s processor (CPU) executes
instructions.
Instructions specify ways that variables are
manipulated and stored in the computer’s
memory.
In a HLL, Variables are declared. In
machine lang., variables are assigned.
Binding is the process of assigning a
memory location to a variable.
What is a Computer
Program?
It consists of
 A collection of variables
 A set of instructions that act upon those
variables
 Rules for describing the order of execution
of the instructions
How does a program run?



Each instruction is given a unique identifier
or label (it is actually an address in program
memory)
An implicit variable (actually called the
Program Counter (PC)) exists which is
initially assigned the label for the first
instruction to be executed.
At any time, PC contains the address of the
next instruction to be executed, except it is a
branch instruction.
Program Execution



The program execution is a set of changes
to the state of the computer.
The state of the computer consists of the
variables and the Program Counter.
Execution of each instruction leads to
modification of one or more variables until
the last instruction which is usually a halt.
Memory



Memory is an array of cells each assigned
an address and capable of holding a value.
We make the following distinctions:
Internal vs. External Memory
Random Access Memory (RAM) vs. ReadOnly memory (ROM)
Program vs. Data memory
Program Execution Steps






CPU fetches instruction from memory
pointed to by the PC
CPU decodes instruction
CPU loads (reads) the value of variables
from memory
CPU executes instruction
CPU stores (writes) the result in memory
PC is incremented by one.
Types of Instructions
Instructions can be of different types
 Arithmetic (eg add A, B,C)
 Logical (eg cmp A, B)
 Control (eg beq A, B, br_target)
Summary



A computer’s architecture is described by
it’s instruction set.
Programming language abstractions are
ideal for hiding the details of a specific
architecture while giving flexibility to the
programmer.
Computers operate under the model of the
instruction fetch/execute cycle.