Embedded Systems Jo, Heeseung
Embedded Systems Everywhere 2
임베디드시스템개요 임베디드시스템? 정해진특정기능을수행하기위해하드웨어와소프트웨어가내장된전자제어시스템 단순회로만으로구성된장치가아닌마이크로프로세서가내장되어있고, 이러한마이크로프로세서를운용하여원하는작업을수행및관리하는프로그램이포함된시스템을의미 자동차, 우주, 항공, 군사, 의료장비와공정제어등산업용 가전제품, 스마트폰등영역을확대 - 스마트폰이나인터넷접속이가능한스마트 TV - 휴대가간편한 Tablet PC - 원격모니터링기능을갖는보일러등 3
임베디드시스템개요 현재의임베디드시장 대량생산을기반으로형성되는가격구조 초기개발비용중요 소프트웨어를구비하기위한대당비용과지속적인개발과유지보수를위한기술지원비용이훨씬더중요 임베디드시스템의발전 새로운기술이집적된하드웨어와소프트웨어를모두수용 소프트웨어의확장성에관한시장의요구 점점더개방적인운영체제가환영받고있음 임베디드리눅스는이러한요구에대한가장적절한솔루션으로부각 현재사용되거나개발되고있는 Android, Meego, Limo, Bada, Tizen 등은모두리눅스를기반으로발전 4
임베디드리눅스 운영체제 컴퓨터시스템계층구조에서하드웨어와가장가까운쪽을차지하는소프트웨어 시스템의여러자원을관리 - CPU, 메모리, 파일시스템, 각종입출력장치, 네트워크,... 자원의공유 & 보호 - 운영체제의도움으로응용프로그램들은임베디드시스템내의자원을공유하여사용할수있으며자신에게할당된자원을보호받음 현재의운영체제는용도에따라크게두가지분류구분 서버나개인용컴퓨터에서실행되는응용프로그램들을지원 - Unix, Linux,, MS Windows, MacOs,... 임베디드시스템에서엄격한시간제약성을만족시켜야하는환경 - 실시간운영체제 (RTOS) - VxWorks, psos, QNX, VRTX, nucleus, LynxOS, ChorusOS, QnX Neutrino, RTEMS, OS9, RealTime Linux,... 5
임베디드리눅스 운영체제 과거에는많은임베디드시스템들이운영체제없이개발됨 최근에는대부분의임베디드시스템들이어떤형태든운영체제를가지고개발됨 더좋은성능을가진복잡한하드웨어가사용되고예전과는비교할수없는많은소프트웨어기능이요구되기때문 개인장비용임베디드운영체제 Apple ios Google Android 삼성의 Bada, Tizen Meego, Limo, Tizen, BrewMP, Windows Phone 7,... 6
임베디드리눅스 기존임베디드운영체제의한계점 (vs. Embedded Linux) 첫째이들은완전한기능을가진운영체제가아님 - 소량의메모리에대처하기위해필요한최소한의기능만을제공하도록제작 - 복잡한응용프로그램이요구하는운영체제의기능을다수용하지못함 - 실시간운영체제는거의예외없이쓰레드실행형태를가지고있음 둘째변화하는사용자의요구를운영체제의기능으로수용, 성능의향상, 기타문제점해결에빠르게대처하지못할가능성이높음 셋째는초기구입비용및사용료가비싼편임 7
임베디드리눅스 임베디드리눅스의장점 리눅스의모든소스는공개 - 개발환경이기본적으로제공되기때문에무료로제공하는 GNU 개발도구는리눅스에서커널을포함한모든응용프로그램을개발하는데사용할수있음 리눅스는완전한운영체제 - 리눅스커널은완벽한멀티태스킹환경, 페이지기반의가상메모리시스템, 공유라이브러리, 인터넷접속을위한 TCP/IP, 여러가지종류의파일시스템을기본적으로지원 리눅스는모듈단위로설계되어있음 - 리눅스커널은사용자에게필요한기능과하드웨어장치에따라최적화된구성으로만들어져메모리사용량을최소화할수있음 - 대부분의장치드라이버들은커널실행중에추가또는제거될수있도록작성되어있어확장성에문제가없음 8
임베디드리눅스 임베디드리눅스의장점 새로운 CPU 나컴퓨터에쉽게이식될수있는구조를가지고있음 많은장치드라이버가제공됨 리눅스는이미많은사용자가사용하고있으며, 많은개발자가참여하고있음 - 전세계의개발자들과쉽고신속하게교류할수있으며이를통해기술지원에필요한비용을많이절감할수있음 - 또새로개발되는기술이가장먼저실험되고증명되는시스템이리눅스이기때문에리눅스는어떤기술의개발초기시장점유를달성하기위해가장유리한운영체제 9
Classes of Computers Desktop computers General purpose, variety of software Subject to cost/performance tradeoff Server computers Network based High capacity, performance, reliability Range from small servers to building sized Embedded computers Hidden as components of systems Stringent power/performance/cost constraints 10
What are Embedded Systems? Embedded systems (ES) Any device that includes a programmable computer but is not itself a general-purpose computer Take advantage of application characteristics to optimize the design 11
Embedding a Computer 12
Where are the CPUs? Estimated 98% of 8 billion CPUs produced in 2000 used for embedded applications Smartphone shipments (101M) surpass PCs (2010Q4) 13
Embedded Processors Microcontroller (μc or MCU) A small computer on a single IC containing a processor core, memory, and I/O peripherals Microprocessor A general-purpose CPU in a single chip SoC (System-on-a-Chip) More integration than MCU Mostly, require external memory 14
Early History (1) MIT Whirlwind computer (Late 1940's) Originally designed to control a flight simulator for training bomber crews The first computer that operated in real time 5000 vacuum tubes 15
Early History (2) Intel 4004 (1971) The first microprocessor (4-bit) Originally designed for use in a calculator The first complete CPU on one chip The first commercially available microprocessor 2300 transistors @ 108KHz 16
Early History (3) Automobiles used microprocessor-based engine controllers starting in 1970's Control fuel/air mixture, engine timing, etc. Multiple modes of operation: warm-up, cruise, hill climbing, etc. Provides lower emissions, better fuel efficiency 17
Keyboard 18
Mouse 19
Hard Disk Drive 20
Digital Still Camera 21
iphone 3G 22
Galaxy S3 23
Digital TV 24
Automobile A high-end automobile > 100 microprocessors 4-bit microcontroller checks seat belt Microcontrollers run dashboard devices 16/32-bit microprocessor controls engine 25
ES Characteristics Single-functioned Executes a single program, repeatedly Sophisticated functionality Often have to run sophisticated algorithms or multiple algorithms - Cell phone, laser printer Often provide sophisticated user interfaces 26
ES Characteristics Reactive and real-time operation: Must finish operations by deadlines Continually reacts to changes in the systems environment Hard real-time: missing deadline causes failure Soft real-time: missing deadline results in degraded performance Many systems are multi-rate: Must handle operations at widely varying rate 27
ES Characteristics Low cost Manufacturing cost - The monetary cost of manufacturing each copy NRE (Non-Recurring Engineering) cost - The one-time monetary cost of designing the system Many embedded systems are mass-market items that must have low manufacturing cost Limited memory, microprocessor power, etc. Low power Power consumption is critical in battery-powered devices Excessive power consumption increases system cost even in wall-powered devices 28
ES Characteristics Designed to tight deadlines by small teams Often designed by a small team of designers Often must meet tight deadlines - 6-month time-to-market is common - Can't miss back-to-school window for calculator Many design alternatives Hard to develop and debug 29
Challenges in ES Design How much hardware do we need? Powerful CPU? Big memory? How do we meet our deadlines? Faster hardware or cleverer software? How do we minimize power? Turn off unnecessary logic? Reduce memory accesses? Time-to-market? 30
Challenges in ES Design Does it really work? Is the specification correct? Does the implementation meet the spec? How do we test for real-time characteristics? How do we test on real data? Does it work reliably? How do we work on the system? Observability, controllability? What is our development platform? 31
Challenges in ES Design Optimizing design metrics Improving one may worsen others Expertise with both software and hardware is needed to optimize design metrics A designer must be comfortable with various technologies in order to choose the best for a given application and constraints 32