Beruflich Dokumente
Kultur Dokumente
Office automation
Printers and peripherals Fax modem Xerox machines Scanner
Instrumentation
Panel meters Dataloggers
Industrial control
Automatic circuit breaker CNC machines Energy monitoring & control
Medical electronics
Remote patient monitoring units: ECG EEG CAT & MRI scanning
Automobile industry
Fuel injection control Security & safety devices Window & wiper control
Microcontrollers
Most commonly used in Embedded systems Microprocessors with all peripherals integrated into a single chip Eg; Atmel INTEL, Philips, Microchips PIC 16/17 Cxxx family, Power PC, ARM, Strong ARM
Limitations of microcontrollers
MIPs rating inadequate for more advanced applications Cellphones require Equaliser, Source codec Channel codec (Viterbi decoder) These are too complex to be done with MCU Advanced processing functions require either a DSP or an FPGA/ASIC
Advantages of MCU
Very good application base for user interface such as Key board interface Display interface A/D & D/A interface Interface to motors TCP/IP protocol stack with advanced MCU Programming using C, C++
What is an OS?
OS is a core software which enables the computer system to function. It is the interface between the application and the hardware Examples: MSDOS Windows UNIX LINUX
OS Size
They cater to variety of applications and hence require memory Win 95 180MB HDD & 16 MB RAM Win 98 195MB HDD & 32 MB RAM Win XP-1 1 GB HDD & 256 MB RAM Linux: depends on version
Real time OS (RTOS) OS with features to support real time systems Correctness depends not only on the logical result but also on the result delivery time Respond in a timely & predictable way to unpredictable external stimuli (interrupts) Hard real time : Missing a dead line leads to catastrophic results Eg. Anti aircraft missile Firm real time : Missing dead line leads to unacceptable quality reduction eg. International telephone calls through satellite links Soft real time : Reduction in system quality due to delayed response is tolerable Eg. Air line reservation system
Features of embedded OS 1. Small foot print: Use only few kilobytes of RAM & ROM 2. Unmanned intelligence: Should run for years w/o human intervention H/w & S/w should never fail Should have no mechanical parts such as Floppy drives or hard disk: Occupy more space, use more energy, slow to communicate & complex to drive
3. Monitoring & control of appln: Hardware watchdogs: Timers force the CPU to reset if CPU does not reset it due to malfunctioning Software watchdog: If CPU is all right but some other block is wrong an interrupt is invoked to rectify it. 4. Low power : Battery life 5. Rebooting Instantly & in safe state 6. Low cost
Typical EOS/ RTOS VxWorks for Embedded TCP/IP QNx Automative & Control RTX51 Instrumention & Control WinNTE Networked applications Win CE PDAs, Mobile commn.
VLSI implementation of functions :PLA, PAL & GAL SOP : Y = ACD + ABC + BCD AND Array realizes products OR array realizes SUMs of products Programmable logic arrays(PLAs): Two level AND-OR device that can be programmed to realize any SOP logic expression Both AND and OR array are programmable Programmable Array logic (PAL): Here the OR arrays are fixed Generic Array logic: Reprogrammable; Either Y or Y can be obtained Tristate output possible
FPGAs: Field programmable Gate Arrays: Gate arrays whose functionality user programmable Mutilevel logic functions : PLDs only 2 level logic FPGA are of 2 types : MUX based and Look up table based FPGAs have a 2D array of user programmable logic blocks: Configurable logic blocks (CLBs) Slices Logic array blocks Logic modules (LMs) They implement smaller functions. A no. of such blocks interconnected to realise bigger functions: Eg: implement 5 input using AND gate using 3 input AND gates Interconnects can be realised using: Antifuses & SRAM
FPGA TECHNOLOGIES
A 0 0 1 1
B 0 1 0 1
Y 0 1 1 0
A B
0 1 1 0
Altera Flex FPGAs also have LUTs, Fast CY logic & F/Fs
Advantages of FPGAs
Small development time Availability of IP cores Lower cost for smaller numbers Field upgradability of functions
Evolution of FPGAs
Replacement for TTL glue logic . Fast prototyping device Complete system on a chip (SOC) with Configurable logic blocks (FFs & LUTs) Embedded RAM, RISC processor,
RISC processor, LUTs & RAM on a single FPGA enables optimum apportioning of task between software & hardware Internet reconfigurablity enables the partitioning by remote control Altera and Xilinx compete & hold > 50% share Design FPGAs with increased complexity & reduced cost per logic element.
MicroBlaze: Xilinxs soft- 32-bit CPU IP core Both Xilinx&Altera supply freewares for design: Altera : Quartus II design software Xilinx: WebPack ISE 5.1i for design sizes upto 300K gate.
xn
D X h0
xn-1
D X + h1
xn-2
D X + h2 X + D X + hN-1`
yn
xn
X h N-1 D X + hN-2 D X + h2 D X + X + h0`
h1` D
yn
DSP Vs Microcontroller
Microcontroller Digital Signal Processor
Multicycle instruction set. Single cycle inst. set. Multicycle multiplicity. Single cycle multiply. 8 or 16 bit support. 16/32 bit fixed or floating. Limited onchip RAM .Large on chip data RAM. Limited data pointers. Data pointers. Limited BW and limited algorithms. Speed!
Advantages of VLSI
Better reliability Lower board space Lower power consumption Larger complexity
A rake receiver implemented in digital hardware/software requires a large no. of parameters to be altered through training
RAKE receiver, used in CDMA cellular systems, can combine multipath components To improve the signal to noise ratio (SNR) at the receiver Provides a separate correlation receiver for each of the multipath signals Multipath components are practically uncorrelated when their relative propagation delay exceeds one chip period The basic idea of A RAKE receiver was first proposed by Price and Green and patented in 1956
M-finger RAKE Receiver RAKE receiver utilizes multiple correlators to separately detect M strongest multipath components Each correlator detects a time-shifted version of the original transmission, and each finger correlates to a portion of the signal, which is delayed by at least one chip in time from the other fingers The outputs of each correlator are weighted to provide better estimate of the transmitted signal than is provided by a single component Outputs of the M correlators are denoted as Z1, Z2,, and ZM Outputs are weighted by 1, 2,, and M, respectively Demodulation and bit decisions are then based on the weighted outputs of the M correlators
FPGA vendors provide tools and s/w for implementation of multiple softcore processors in an FPGA :eg. MUTEX
Multiple processors can be used to derive the benefits of multicore programming Implementation of the TCP/IP stack becomes simplified due to linux for softcore processors :eg. Clinux Optimum partitioning of tasks between h/w & s/w Speech Codec Video codec
Encryption
Channel decoder: Viterbi decoder Transform blocks: FFT, DCT, DWT
Each layer of the protocol stack is an abstraction level hiding details from other layers on top or below. For example, the network access layer does not need to know what kind of data it is carrying.
Implementation
To implement the Internet stack into an FPGA as hardware, it will: Take a lot of time (including VHDL or Verilog design and simulation). Require a robust FPGA. Consume a lot of money. Microcontrollers are good for: Protocol handling Can mitigate the time and cost of building an IRL solution Two microcontroller solutions are possible: Use external microcontrollers. Put a microcontroller inside a Virtex Platform FPGA. There are two ways to embed a microcontroller in a Virtex device. Use the software MicroBlaze microcontroller in Virtex, Virtex-E, Virtex-II, or the new Virtex-II PRO Platform FPGAs. Buy a Virtex-II PRO Platform FPGA with a hard-wired IBM PowerPC 405 microcontroller already onboard.
External Microcontrollers Several microcontroller manufacturers have Internet capable components. Eg: Ubicom microcontrollers SX52BD and IP2022 Some modifications & additions reqd. to control downloading to an FPGA. Due to the small amount of internal memory of the microcontrollers, the Internet protocol stack is tuned to only perform the necessary functions. Once the link has been set up with the e-mail server, the microcontroller asks if there is e-mail available. When there is, the microcontroller checks the e-mail header. If the header is not of a particular type, the controller will delete the mail message on the server. When the e-mail has the correct header type, the microcontroller downloads it. The /PROGRAM pin is toggled, the contents are serialized onto an output pin, and a bit clock is generated. When the DONE pin goes High, the microcontroller deletes the e-mail on the server. The microcontroller breaks the connection. If the DONE pin does not go High after a period of time, the download operation is repeated until the DONE pin goes High.
Heres what happens when the system is powered up: The FPGA is empty. The microcontroller waits for a certain time until all components of the IRL design have reached a stable state. Then the controller connects to the network by sending AT commands to an external modem through an RS-232 device, or by sending AT commands to an onboard chip modem, or by other physical implementation. Fail-Safe Setup : Make the download more reliable by storing the downloaded bitstream into semipermanent memory (flash RAM). FPGA can then be reconfigured from the flash memory.
An even more secure solution is to work with two memories. A basic configuration loaded into the FPGA when it is shipped from the manufacturer. During operation in the field, the microcontroller connects to the Internet and download a new configuration into the second memory. The new configuration bitstream downloaded into the FPGA at next boot. When the download works, the new configuration is used. If the new programming bitstream fails, the microcontroller boots again from original memory. Shortcomings of external microcontroller approach : An Internet connection is obligatory. The server must always have mail ready for the application, or else the application cannot start. When configuration fails, no fail-safe recovery mechanism exists. The design can go into an endless loop trying to download its configuration.
Internal Microcontrollers in FPGAs MicroBlaze software & PowerPC 405 processor in Virtex-II PRO devices. In both cases of soft and hard microcontrollers, the Internet protocol stack must be (ported) onto the FPGA. The FPGA must get a basic (possible partial) bitstream to download the MicroBlaze controller, its memory, and peripherals. The PowerPC Virtex-II PRO Platform FPGA must have memory and peripherals downloaded before its able to boot. The small control algorithm done in the previous description within the external microcontrollers must now be implemented in a small CoolRunner CPLD, as shown in Figure 4.