an introduction to digital signal processors 1

46
AN INTRODUCTION TO DIGITAL SIGNAL PROCESSORS Prepared by: Hossam Fadeel

Upload: hossam-hassan

Post on 14-Apr-2017

286 views

Category:

Engineering


5 download

TRANSCRIPT

Page 1: An introduction to digital signal processors 1

AN INTRODUCTION TO DIGITAL SIGNAL PROCESSORS

Prepared by:Hossam Fadeel

Page 2: An introduction to digital signal processors 1

Lecture Outlines:

Introduction. System architecture.

Page 3: An introduction to digital signal processors 1

Introduction

Page 4: An introduction to digital signal processors 1

Outlines

Computers and microprocessors. Applications areas of the microprocessor. Examples of embedded systems.

Page 5: An introduction to digital signal processors 1
Page 6: An introduction to digital signal processors 1

COMPUTERS AND MICROPROCESSORS

History of Computer. Program. Central Processing Unit (CPU). Microprocessor .

Audion(Triode), 1906Lee De Forest

Page 7: An introduction to digital signal processors 1

The First Computer

The BabbageDifference Engine(1832)25,000 partscost: £17,470

Page 8: An introduction to digital signal processors 1

ENIAC - The first electronic computer (1946)

Page 9: An introduction to digital signal processors 1

Evolution (revolution) of IC design

1947

1958

Page 10: An introduction to digital signal processors 1

Evolution (revolution) of IC design

Integration density doubles every 18 months.

Page 11: An introduction to digital signal processors 1

Development of the Microprocessor

1971 1000 transistors 1 MHz operation

Intel Pentium (IV) microprocessor Intel 4004 Micro-Processor

Page 12: An introduction to digital signal processors 1

Development of the Microprocessor

Microcontroller

Microprocessors

Digital Signal ProcessorsProgrammable System on a Chip

Page 13: An introduction to digital signal processors 1

Digital Signal Processors

The 1980s also saw the introduction of the first Digital Signal Processors. Introduced in 1983 by Texas Instruments, the TMS320C10 was a microprocessor specifically designed to solve digital signal processing problems.

Digital Signal processing progressively replaced analog signal processing in applications that range from control to telecommunications.

Page 14: An introduction to digital signal processors 1

Digital CircuitRequirements

FixedFunctionality

Processor

PLD

Memory

StandardProduct IC

ASICFixed

Functionality

Processor

PLD

Memory

Microprocessor

Microcontroller

Digital SignalProcessor

Simple PLD

Complex PLD

FieldProgrammableGate Array

ROM

RAM

Technology choices for digital circuit design

Page 15: An introduction to digital signal processors 1

APPLICATION AREAS OF THE MICROPROCESSOR

The vast majority of microprocessors are used in embedded systems.

Embedded systems:Are electronic devices or sub-systems that use microprocessors for their operation.

Page 16: An introduction to digital signal processors 1

Now The ReallyCool Stuff

Page 17: An introduction to digital signal processors 1

Microprocessors

Page 18: An introduction to digital signal processors 1

Microprocessors, Microcontrollers and DSPs

Microprocessor is an “umbrella” term for all types of processor.

Microcontrollers and DSPs evolved from the original microprocessors.

Microcontrollers Processor specifically designed for

control applications. DSPs

Processors specifically designed for digital signal processing.

Microprocessors Processors for general purpose

processing.

Microprocessors

Microcontrollers

DSPsMicroprocessors

Microprocessors

Page 19: An introduction to digital signal processors 1

Microprocessors, Microcontrollers and DSPs

Microprocessors(General purpose

processors)

DSPs(Digital Signal

Processors)Designed to be good at mathematics for signal processing.

Microcontrollers

(Processors good at control)

Typically compact, low power, good I/O

capacity, limited computational

power)

ASICs(Application Specific Integrated Circuits)

FIXED PURPOSE HARDWARE

FPGAs(Field Programmable Gate

Arrays)FLEXIBLE PROGRAMABLE

HARDWARE

(Many processors are hybrids, for example, the dsPIC).

Page 20: An introduction to digital signal processors 1

Applications and types of microprocessors

Today, microprocessors are found in three major application areas: Computer systems: General-purpose

microprocessors. Embedded applications: Microcontrollers Signal processing applications: Digital Signal

Processors (DSPs)

Page 21: An introduction to digital signal processors 1

General purpose microprocessors

Applications Computer systems

Manufacturers and models Intel: Pentium Motorola: PowerPC Digital: Alpha Chip LSI Logic: SPARC family (SUN) ... etc.

Page 22: An introduction to digital signal processors 1

General purpose microprocessors

Typical features Wide address bus Integrated hardware memory management unit Wide data formats (32 bits or more) Integrated co-processor Sophisticated addressing modes Large silicon area High cost High power consumption

Page 23: An introduction to digital signal processors 1

Microcontrollers Application examples Manufacturers and models

Motorola: 68HC11 Intel: 8751 Microchip: PIC16/17family Cypress PSoC family … etc.

Typical features Memory and peripherals integrated on the chip Narrow address bus Narrow data formats Small silicon area Low cost Low power consumption

Page 24: An introduction to digital signal processors 1

DSPs

Application examples Telecommunication systems Audio/video recording … etc.

Manufacturers and models Texas Instruments: TMS320C6000, TMS320C5000... Motorola: 56000, 96000... Analog devices: ADSP2100, ADSP21000 ... etc.

Page 25: An introduction to digital signal processors 1

DSPs

Typical features Fixed-point processor or floating point processor Architecture optimized for intensive computation Narrow address bus Specialized addressing modes Narrow data formats Many specialized peripherals integrated on the chip Low power consumption Low cost

Page 26: An introduction to digital signal processors 1

EVOLUTION OF THE SOFTWARE DEVELOPMENT TOOLS AND METHODOLOGIES

An embedded system is usually designed to run a unique application.

The software of an embedded system is generally much less complex than the software that runs on a computer system.

Most embedded systems are very specific devices. The development of code in a high-level language is

often less efficient than the development in assembly language.

Page 27: An introduction to digital signal processors 1

Microprocessor Programming

A program is a set of instructions written in a specific sequence for a processor to accomplish specified tasks.

An instruction is defined as a complete task (such as addition) performed by the microprocessor. Each microprocessor has its own set of instructions.

To be intelligible to the microprocessor, instructions must be supplied in binary, i.e., as machine language.

Assembler language is a symbolic language which represents instructions with short human-readable mnemonics. For example, in PIC assembler a null operation or ‘no operation’ is represented by the mnemonic ‘NOP’.

An assembler is a software tool that converts assembler source programs into machine language object files.

Assemblers contain built-in debugging tools which can detect syntax errors. For example, ‘MPLAB’ is Microchip's PIC development environment which includes an assembler that

generates assembled files (object files) with .HEX extensions which are used to program PIC chips.

Page 28: An introduction to digital signal processors 1

Microprocessor Programming

There is a one-to-one correspondence between the assembly language mnemonics and the machine code instructions.

Machine and assembly languages are referred to as low-level languages.

Programs written in these languages are generally faster and more compact than higher-level language programs but not transferable to other processors.

High-level languages such as C, Pascal and BASIC are machine-independent. Programs (source code) written in these languages are translated by compilers or interpreters into machine language compatible with the given processor. The translated code is called object code. Each microprocessor needs its own compiler or interpreter.

An important advantage of high-level languages is that they are much easier to debug.

Page 29: An introduction to digital signal processors 1

CRITERIA FOR CHOOSING A MICROPROCESSOR

I want to design a system that controls Temperature using sensor and fans…………

So What is the Processor to use…….?!!!

Page 30: An introduction to digital signal processors 1

CRITERIA FOR CHOOSING A MICROPROCESSOR

The choice of a microprocessor for a given application is probably one of the most difficult tasks.

To take this action correctly, the engineer must know the whole range of microprocessors that could be used for the application.

The investment in time and experience necessary to know a microprocessor well is very high.

Most engineers try to make their choice within the set of devices with which they are already familiar.

This approach is sub-optimal, but reflects the reality of systems design. To help in the choice, most manufacturers offer “development kits” or

“evaluation kits”. The availability of such tools and information biases the choice toward

one manufacturer, or one family of microprocessors.

Page 31: An introduction to digital signal processors 1

CRITERIA FOR CHOOSING A MICROPROCESSOR

The following general criteria may be applied for the choice of a microprocessor:

1. Capacity of the microprocessor

2. Software tools and support3. Cost 4. Market availability

Logical criteria:• Instruction set functionality.• Architecture, addressing modes.• Execution speed (not just clock frequency!)• Arithmetic and Logic capabilities.• Addressing capacity.

Physical criteria: • Power consumption.• Size.• Presence of on-chip peripherals

Page 32: An introduction to digital signal processors 1

BUILDING BLOCKS OF AN EMBEDDED SYSTEM

Page 33: An introduction to digital signal processors 1

BUILDING BLOCKS OF AN EMBEDDED SYSTEM

Microprocessor (CPU): The CPU is a sequential logic machine that reads instructions in

memory and executes them one after the other.

Executes the instructions found in memory.Performs the calculations and data processing operations specified by the instructions.Initiates data exchanges with peripherals (memory, parallel ports, …etc.)

What the CPU Do?

Page 34: An introduction to digital signal processors 1

BUILDING BLOCKS OF AN EMBEDDED SYSTEM

Clock: The clock circuit is usually implemented by a quartz oscillator. The

oscillator may be part of the microprocessor, or may be external. The clock sequences all the operations that are performed by the CPU. Dividing or multiplying the clock frequency provides a way to

dynamically adjust the computational speed and the power consumption of the microprocessor.

Memory:Memory circuits are used to:Store program instructions.Store data words (constants and variables) that are used by the program.Exchange these data words with the CPU.

Page 35: An introduction to digital signal processors 1

BUILDING BLOCKS OF AN EMBEDDED SYSTEM

Peripherals: Peripherals provide services to the CPU, or provide a connation to the

outside world. Any electronic circuit connected to the CPU by its bus system is

considered to be a peripheral.

Bus system: The bus system is the network of conations between the CPU and the

peripherals. It allows instructions and data words to be exchanged between the

CPU and its various peripherals.

Page 36: An introduction to digital signal processors 1

BUILDING BLOCKS OF AN EMBEDDED SYSTEM

Page 37: An introduction to digital signal processors 1

PROGRAM EXECUTION

The CPU executes instructions that are stored in memory. These instructions describe elementary operations, such as

reading a peripheral, adding two values, or writing a result back into memory.

Two phases can be identified in the operation of the CPU:

1. The Fetch Cycle:During the fetch cycle the CPU reads the instruction word (or words) from the memory. The fetch cycle is always a read from memory.

2. The Execute Cycle:During the execute cycle the CPU carries out the operation indicated by the instruction. This operation can be a read from memory or from a peripheral, a write to memory or to a peripheral, or can be an internal arithmetic or logic operation that does not require any exchange with a peripheral.

Page 38: An introduction to digital signal processors 1

System architecture

Page 39: An introduction to digital signal processors 1

Outlines:

Von Neumann architecture Harvard architecture Pros and cons of each architecture

Page 40: An introduction to digital signal processors 1

Introduction

The system’s architecture represents the way that the elements of the system are interconnected and exchange data.

It has a significant influence on the way the CPU accesses its peripherals.

Every type of architecture includes: At least one CPU At least one peripheral At least one bus system connecting the CPU to the

peripherals.

Page 41: An introduction to digital signal processors 1

VON NEUMANN ARCHITECTURE

Page 42: An introduction to digital signal processors 1

VON NEUMANN ARCHITECTURE

The Data Bus: Transports data between the CPU and its peripherals. It is bi-directional. The CPU can read or write data in the peripherals.

The Address Bus: The CPU uses the address bus to indicate which peripherals it wants to access, The address bus is unidirectional The CPU always writes the address.

Control Bus: This bus carries signals that are used to manage and synchronize the exchanges between the CPU and its peripherals.

Page 43: An introduction to digital signal processors 1

HARVARD ARCHITECTURE

Page 44: An introduction to digital signal processors 1

HARVARD ARCHITECTURE

It uses two separate bus systems to transport the instruction codes and the data being processed by the CPU.

The Program Bus System: Is used exclusively to transport instruction codes from the program memory to the CPU during the fetch cycle.

The Data Bus System: Is used exclusively to transport data from/to the CPU, to/from the memory and peripherals.

Page 45: An introduction to digital signal processors 1

PROS AND CONS OF EACH ARCHITECTURE

Since it possesses two independent bus systems, the Harvard architecture is capable of simultaneously reading an instruction code, and reading or writing a memory or peripheral as part of the execution of the previous instruction. It has a speed advantage over the Von Neumann architecture.

The Harvard architecture is also safer, since it is not possible for the CPU to mistakenly write codes into the program memory and therefore corrupt the code while it is executing.

The Harvard architecture is less flexible. It needs two independent memory banks (one for program and another one for

data). These two resources are not interchangeable. The Von Neumann architecture is better, because program and data memories

are interchangeable, and it will lead to a better usage of the memory resources. Over the years, these architectures have been enhanced to provide more

performance.

Page 46: An introduction to digital signal processors 1

BUSSES, ADDRESS DECODING AND THREE-STATE LOGIC

In all architectures, it is always the CPU that initiates exchanges with the peripherals.

Data is always exchanged between the CPU and a peripheral. It is never exchanged directly between 2 peripherals.

Definition: Read operation: The CPU reads a register in a peripheral.

Definition: Write operation: The CPU writes a register in a peripheral.