Upload
a-b-shinde
View
233
Download
0
Embed Size (px)
Citation preview
8/9/2019 System on Chip and Embedded Systems
1/53
Mr. A. B. Shinde
Assistant Professor,
Electronics Engineering,
PVPIT, Budhgaon
8/9/2019 System on Chip and Embedded Systems
2/53
System-on-a-chip or system on chip (SoC or SOC) refers to
integrating all components of a computer or other electronicsystem into a single integrated circuit (chip).
It may contain digital, analog, mixed-signal, and often radio-frequency functions – all on one.
Microcontrollers typically have under 100K of RAM are single-chip-systems;
whereas the term SoC is typically used with more powerfulprocessors, capable of running software such as Windows or Linux, which need external memory chips (flash, RAM) to beuseful, and which are used with various external peripherals.
2
8/9/2019 System on Chip and Embedded Systems
3/53
Many interesting systems are too complex to fit on just one chip
built with a process optimized for just one of the system's tasks.
When it is not feasible to construct an SoC for a particular application, an alternative is a system in package (SiP)comprising a number of chips in a single package.
In large volumes, SoC is believed to be more cost effectivethan SiP, because its packaging is simpler.
The SoC chip includes processors and numerous digitalperipherals, and comes in a ball grid package with lower andupper connections.
3
8/9/2019 System on Chip and Embedded Systems
4/53
4
8/9/2019 System on Chip and Embedded Systems
5/53
One microcontroller, microprocessor or DSP core(s). Some
SoCs – called multiprocessor System-on-Chip (MPSoC) –include more than one processor core.
1. Memory blocks including a selection of ROM, RAM, EEPROMand Flash.
2. Timing sources including oscillators and phase-locked loops.
3. Peripherals including counter-timers, real-time timers and
power-on reset generators.
4. External interfaces including industry standards such as USB,FireWire, Ethernet, USART, SPI.
5
8/9/2019 System on Chip and Embedded Systems
6/53
Analog interfaces including ADCs and DACs.
Voltage regulators and power management circuits.
These blocks are connected by either a proprietary or industry-
standard bus such as the AMBA bus from ARM.
DMA controllers route data directly between externalinterfaces and memory, by-passing the processor core andthereby increasing the data 6 throughput of the SoC
6
8/9/2019 System on Chip and Embedded Systems
7/53
Power SupplyCLKCLK
CLKcustom
IF-logic
SDRAM SDRAMSRAM SRAMSRAM
Memory
Controller
UARTL
C
Display
Controller
Interrupt
Controller
Timer
Audio
Codec
CPU(uP / DSP) Co-
Proc.
GP I/O
Address
Decode
Unit
Ethernet
MAC
Traditional Embedded System
7
8/9/2019 System on Chip and Embedded Systems
8/53
FPGACLKCLK
CLKcustom
IF-logic
SDRAM SDRAMSRAM SRAMSRAM
Memory
Controller
UART
Display
Controller
Timer
Power Supply
L
C
Audio
Codec
CPU(uP / DSP) Co-
Proc.
GP I/O
Address
Decode
Unit
Ethernet
MAC
Interrupt
Controller
8
8/9/2019 System on Chip and Embedded Systems
9/53
Power Supply
SDRAM SDRAMSRAM SRAMSRAM
L
C
Audio
Codec EPROM
9
8/9/2019 System on Chip and Embedded Systems
10/53
10
8/9/2019 System on Chip and Embedded Systems
11/53
A SoC consists of both the hardware described above, and the
software controlling the microcontroller, microprocessor or DSPcores, peripherals and interfaces.
The design flow for a SoC aims to develop this hardware andsoftware in parallel.
Most SoCs are developed from pre-qualified hardware blocks,together with the software drivers that control their operation.
The hardware blocks are put together using CAD tools; thesoftware modules are integrated using a software-developmentenvironment.
11
8/9/2019 System on Chip and Embedded Systems
12/53
A key step in the design flow is: The hardware is mapped onto
an FPGA that mimics the behavior of the SoC, and the softwaremodules are loaded into the memory.
Once programmed, the emulation platform enables the hardwareand software of the SoC to be tested and debugged at close to
its full operational speed.
After emulation the hardware of the SoC follows the place androute phase of the design of an integrated circuit before it isfabricated.
Chips are verified for logical correctness before being sent tofoundry. This process is called functional verification.
Verilog and VHDL are typical hardware description languagesused for verification.
12
8/9/2019 System on Chip and Embedded Systems
13/53
Microcontroller:
A microcontroller is a processor that has its program and datamemory built in.
These chips are intended for small embedded controlapplications, so leaving the pins for I/O and not requiring aexternal memory bus.
Some microcontrollers have as little as 6 pins, and can douseful things.
In contrast, general purpose computing processor (GPP) isintended for a large computations, such can have 100s of pinsin a array and require extensive external circuitry.
In general a microcontroller is taken as being an embeddeddevice which is internally programmed to perform a specifictask.
There is minimal user interaction and little or no flexibility.
A microcontroller is typically fairly low powered with only smallamounts of memory and ROM (flash). 13
8/9/2019 System on Chip and Embedded Systems
14/53
SoC:
Conversely a System-on-Chip is the other end of the spectrum. It is more geared towards complete flexibility and user
interaction.
It often includes things like IO drivers for bigger hardware, andeven sometimes a graphics adapter.
A System-on-Chip is more like a complete computer system, ona single chip.
System on Chip, is a less well defined term.
Cyprus calls some of their parts PSOC (Programmable System
on Chip). These are basically a microcontroller with small FPGA on the
same chip.
Instead of having built in peripherals, you can make whatever you want within the available resources of the FPGA.
14
8/9/2019 System on Chip and Embedded Systems
15/53
15
8/9/2019 System on Chip and Embedded Systems
16/53
An embedded system is a
special-purpose computer system designed to perform oneor a few dedicated functions,often with real- time computingconstraints.
It is usually embedded as partof a complete device includinghardware and mechanicalparts. In contrast, a general-purpose computer, such as a
personal computer, can domany different tasks dependingon programming.
Embedded systems control
many of the common devices inuse today.
16
8/9/2019 System on Chip and Embedded Systems
17/53
Physically, embedded systems range from portable devices
such as digital watches and MP4 players, to large stationaryinstallations like traffic lights, factory controllers, or the systemscontrolling nuclear power plants.
Complexity varies from low, with a single
microcontroller chip, to very high with multiple units, peripheralsand networks mounted inside a large chassis or enclosure.
In general, "embedded system" is not an exactly defined term, asmany systems have some element of programmability.
For example, Handheld computers share some elements withembedded systems — such as the operating systems andmicroprocessors which power them — but are not trulyembedded systems, because they allow different applicationsto be loaded and peripherals to be connected.
17
8/9/2019 System on Chip and Embedded Systems
18/53
18
INTRO TO
EMBEDDED S YSTEM DESIGN
8/9/2019 System on Chip and Embedded Systems
19/53
A Microcontroller is essentially a small and self sufficient
computer on a chip, used to control devices
It has all the memory and I/O it needs on board
Is not expandable – no external bus interface
Characteristics of a Microcontroller
Low cost
Low speed, on the order of 10 KHz – 20 MHz
Low Power, extremely low power in sleep mode
Small architecture, usually an 8-bit architecture
Small memory size, but usually enough for the type of application it is intended for. Onboard Flash.
Limited I/O, but again, enough for the type of application
intended for. 19
8/9/2019 System on Chip and Embedded Systems
20/53
A Microprocessor is fundamentally a collection of on/off switches
laid out over silicon in order to perform computations
Characteristics of a Microprocessor
High cost
High speed, on the order of 100 MHz – 4 GHz
High Power consumption, lots of heat
Large architecture, 32-bit, and recently 64-bit architecture
Large memory size, onboard flash and cache, with an externalbus interface for greater memory usage
Lots of I/O and peripherals, though Microprocessors tend to beshort on General purpose I/O
20
8/9/2019 System on Chip and Embedded Systems
21/53
Harvard Architecture refers to a memory structure where the
processor is connected to two different memory banks via twosets of buses
This is to provide the processor with two distinct data paths, onefor instruction and one for data
Through this scheme, the CPU can read both an instructionand data from the respective memory banks at the same time
This inherent independence increases the throughput of themachine by enabling it to always pre-fetch the next instruction
The cost of such a system is complexity in hardware commonlyused in DSPs
21
8/9/2019 System on Chip and Embedded Systems
22/53
A Von-Neumann Machine, in contrast to the Harvard Architecture
provides one data path (bus) for both instruction and data
As a result, the CPU can either be fetching an instructionfrom memory, or read/writing data to it
Other than less complexity of hardware, it allows for using asingle, sequential memory.
Today‘s processing speeds vastly outpace memory access
times, and we employ a very fast but small amount of memory(cache) local to the processor
Modern processors employ a Harvard Architecture to read fromtwo instruction and data caches, when at the same time using a
Von-Neumann Architecture to access external memory 22
8/9/2019 System on Chip and Embedded Systems
23/53
Although numbers are always displayed in the same way,
they are not stored in the same way in memory
Big-Endian machines store the most significant byte of data inthe lowest memory address
Little-Endian machines on the other hand, store the leastsignificant byte of data in the lowest memory address
23
8/9/2019 System on Chip and Embedded Systems
24/53
The Intel family of Microprocessors and processors from Digital
Equipment Corporation use Little- Endian mode
Whereas Architectures from Sun, IBM, and Motorola areBig-Endian
Architectures such as PowerPC, MIPS, and Intel‘s IA- 64 are
Big-Endian, supporting either mode
Unfortunately both methods are in prevalent use today, and
neither method is superior to the other
24
8/9/2019 System on Chip and Embedded Systems
25/53
The Program Counter is a 16 or 32 bit register which contains
the address of the next instruction to be executed
The PC automatically increments to the next sequential memorylocation every time an instruction is fetched
Branch, jump, and interrupt operations load the ProgramCounter with an address other than the next sequential location
During reset, the PC is loaded from a pre-defined memory
location to signify the starting address of the code
25
8/9/2019 System on Chip and Embedded Systems
26/53
The significance of the reset vector is that it points the processor
to the memory address which contains the firmware‘s firstinstruction
Without the Reset Vector, the processor would not know where tobegin execution
Upon reset, the processor loads the Program Counter (PC) withthe reset vector value from a pre-defined memory location
On CPU08 architecture, this is at location$FFFE:$FFFF
26
8/9/2019 System on Chip and Embedded Systems
27/53
The Stack Pointer (SP), much like the reset vector, is required at
boot time for many processors
Some processors, in particular the 8-bit microcontrollersautomatically provide the stack pointer by resetting it to apredefined value
On a higher end processor, the stack pointer is usually read froma non-volatile memory location, much like the reset vector
For example on a Cold-Fire microprocessor, the first sixteenbytes of memory location must be programmed as follows:
0x00000000: Reset Vector 0x00000008: Stack Pointer
27
8/9/2019 System on Chip and Embedded Systems
28/53
The Computer Operating Properly (COP) module is a component
of modern processors which provides a mechanism to helpsoftware recover from runaway code
The COP, also known as the Watchdog Timer, is a free runningcounter that generates a reset if it runs up to a pre-defined value
and overflows
In order to prevent a watchdog reset, the user code must clear the COP counter periodically.
COP can be disabled through register settings, and eventhough this is not good practice for final firmware release, it is aprudent strategy through the course of debug
28
8/9/2019 System on Chip and Embedded Systems
29/53
Embedded Systems, unlike a PC, never ―exit an application
They idle through an Infinite Loop waiting for an event to happenin the form of an interrupt, or a pre-scheduled task
In order to save power, some processors enter special sleepor wait modes instead of idling through an Infinite Loop, butthey will come out of this mode upon either a timer or anExternal Interrupt
29
8/9/2019 System on Chip and Embedded Systems
30/53
Interrupts are mostly hardware mechanisms which tell the
program an event has occurred
They happen at any time, and are therefore asynchronous toprogram flow
They require special handling by the processor, and areultimately handled by a corresponding Interrupt Service Routine(ISR)
Need to be handled quickly.
It takes too much time for servicing an interrupt, and you maymiss another interrupt.
30
8/9/2019 System on Chip and Embedded Systems
31/53
Proposal
Definition Technology Selection
Budgeting (Time, Human, Financial)
Material and Development tool purchase
Schematic Capture & PCB board design Firmware Development & Debug
Hardware Manufacturing
Testing
Certification
Firmware Release
Documentation
Ongoing Support
31
8/9/2019 System on Chip and Embedded Systems
32/53
The purpose of the design cycle is to remind and guide the
developer to step within a framework proven to keep you ontrack and on budget.
There are numerous design cycle methodologies, of which thefollowing are most popular
The Waterfall Model
Top-down versus Bottom-up
Spiral Model
GANTT charts
32
8/9/2019 System on Chip and Embedded Systems
33/53
THE WATERFALL MODEL
Waterfall is a software development model in which developmentis seen flowing steadily through the phases of
Requirement Analysis
Design
Implementation
Testing
Integration
Maintenance
Advantages are good progress tracking due to clear milestones
Disadvantages are its inflexibility, by making it difficult torespond to changing customer needs / market conditions
33
8/9/2019 System on Chip and Embedded Systems
34/53
TOP-DOWN VERSUS BOTTOM-UP
The Top-Down Model analyses the overall functionality of asystem, without going into details
Each successive iteration of this process then designsindividual pieces of the system in greater detail
The Bottom-Up Model in contrast defines the individual piecesof the system in great detail
These individual components are then interfaced together toform a larger system
34
8/9/2019 System on Chip and Embedded Systems
35/53
THE SPIRAL MODEL
Modern software design practices such as the Spiral Modelemploy both top-down and bottom- up techniques
Widely used in the industry today
For a GUI application, for example, the Spiral Model wouldcontend that
You first start off with a rough-sketch of user interface(simple buttons & icons)
Make the underlying application work
Only then start adding features and in a final stage neat up thebuttons & icons
35
8/9/2019 System on Chip and Embedded Systems
36/53
GANTT CHART
GANTT Chart is simply a type of bar chart which shows theinterrelationships of how projects and schedules progress over time
36
8/9/2019 System on Chip and Embedded Systems
37/53
Metrics to consider in designing an Embedded System
Unit Cost: Can be a combination of cost tomanufacture hardware + licensing fees
NRE Costs: Non Recurring Engineering costs
Size: The physical dimensions of the system
Power Consumption: Battery, power supply, wattage, currentconsumption, etc.
Performance: The throughput of the system, its responsetime, and computation power
Safety, fault-tolerance, field-upgradeability, ruggedness,
maintenance, ease of use, ease of installation, etc. etc. 37
8/9/2019 System on Chip and Embedded Systems
38/53
38
8/9/2019 System on Chip and Embedded Systems
39/53
39
8/9/2019 System on Chip and Embedded Systems
40/53
40
8/9/2019 System on Chip and Embedded Systems
41/53
8/9/2019 System on Chip and Embedded Systems
42/53
8/9/2019 System on Chip and Embedded Systems
43/53
Problem Statement
allowing a chamber temperature set-point to be entered,
displaying both set-point and actual temperatures, and
tracking step changes in set-point temperature with acceptable
rise time, steady-state error, and overshoot.
43
8/9/2019 System on Chip and Embedded Systems
44/53
Temperature controller specifications
44
8/9/2019 System on Chip and Embedded Systems
45/53
Temperature controller hardware block diagram
45
8/9/2019 System on Chip and Embedded Systems
46/53
Temperature controller hardware The microcontroller, a Motorola MC68HC705B16 (6805 for
short), is the heart of the system.
It accepts inputs from a simple four-key keypad e.g. set-pointtemperature, and it displays both set-point and measured
chamber temperatures using two-digit seven-segment LEDdisplays controlled by a display driver.
All these inputs and outputs are accommodated by parallelports on the 6805.
Chamber temperature is sensed using a pre-calibrated
thermistor and input via one of the 6805’s analog-to-digitalinputs.
Finally, a pulse-width modulation (PWM) output on the 6805 isused to drive a relay which switches line power to the resistiveheater off and on.
46
8/9/2019 System on Chip and Embedded Systems
47/53
Schematic of
microcontroller
board
47
8/9/2019 System on Chip and Embedded Systems
48/53
Figure shows a schematic of the electronics and their interfacingto the 6805.
The keypad, a Storm 3K041103, has four keys which areinterfaced to pins PAO- PA3 of Port A, configured as inputs.
One key functions as a mode switch. Two modes are supported: set mode and run mode.
In set mode two of the other keys are used to specify the set-point temperature: one increments it and one decrements.
The fourth key is unused at present.
The LED displays are driven by a Harris Semiconductor ICM7212display driver interfaced to pins PB0-PB6 of Port B, configured asoutputs.
48
8/9/2019 System on Chip and Embedded Systems
49/53
The temperature-sensing thermistor drives, through a voltagedivider, pin AN0 (one of eight analog inputs). Finally, pin PLMA(one of two PWM outputs) drives the heater relay.
Software on the 6805 implements the temperature control
algorithm, maintains the temperature displays, and alters the set-point in response to keypad inputs.
49
8/9/2019 System on Chip and Embedded Systems
50/53
The design of a SoC has similar goals as an embedded design.
The designed system will be used in a well-specifiedenvironment, and has to fulfill strict requirements.
Some requirements are clearly defined by the application like the
functional requirements of an algorithm, e.g. the decoding of anMPEG 1 Layer 3 data stream, which covers certain qualityrestrictions.
The environment poses other requirements: e.g. minimizing thecost, footprint, or power consumption. However due to theflexibility of a SoC design, achieving the set goals, involvesanalyzing a multi dimensional design space.
50
8/9/2019 System on Chip and Embedded Systems
51/53
The degrees of freedom stem from the process element types
and characteristics, their allocation, the mapping of functional elements to the process elements, their interconnectionwith busses and their scheduling.
A SoC design has to deal with a wide range: it starts with a
functional description on system level, where major functionblocks are defined and no timing information is given.
51
8/9/2019 System on Chip and Embedded Systems
52/53
The goal of SoC design paradigm is to manage the immense sizeof design decisions in the hardware software co-design.
This is only possible by above well-defined flow of design steps52
8/9/2019 System on Chip and Embedded Systems
53/53
Any
?’s