2. Outline
• 軟體工程的重要性
• 實務上的進行方法
Luba Tang (唐文力)
Senior Engineer in CTO/CIT, MediaTek
HW/SW Co-Simulation, Embedded Compiler
3. SW is more costly than HW
In recent 5 years, software is 3 times costly than hardware
Software aspects of IC design can now account for 80% or
more of embedded systems development cost
5. Challenges in Modern Embedded Software
Implement a large, various and variant embedded system
Shrinking time-to-market for short life cycle of a product
• 10~15 months for releasing
• 6~12 months for being on the shelf
Changing requirement
• x2 new devices per 10 months
Coordinate with more than 6 teams coming from different
backgrounds
Heavy workload
• 250 K Line of code for self product
• 1M Line of code in total system
High reliability
40. Dependency Checking
最常見 dependency checker 為 ./configure script
Dependency checker 產生器有 Open Source 的
– Autoconf
– Cmake
Dependency checker 會 Top-down 的檢查函式庫
版本以及系統環境
程式或
Is v2? 函式庫 Is v6?
Is v3?
stdlib Qt math
41. Global Version
解決太舊的問題
將所有的project設定一個版次號碼
規定所有的 dependant的版次必須要小於等於host的版次
最上層的dependant為global version
Global version Main
V2
Qt Math
V5 V3
Stdlib
V6
Pthread
V7
42. Local Version
解決太新的問題
這是從尐數客戶擴張到多數客戶的關鍵
開分支 (branch)
需要 version 3
Host Host Host
Dependant
V3 V3-1 V3-2
合併 (merge)
版次跳躍
Host Host Host
V4 V5 V6
43. Version Threads
2.3-1 2.3-2
Local Versions
2.3
2.4-1
2.4
2.5
2.6-1
2.6
2.7
Global Versions
45. Software Versioning
功用
– 對外做為看板,告知客戶目前專案的stage of
life cycle
– 對內做為進度管理,得知目前release status
• Point release
• Major release
46. Stage of Life Cycle
2
In House
Beta
5
Customer
testing GA
1
Alpha Success in
Market
4
Internal
testing RTM
0
Pre-alpha Release to
Market
3
developing
RC
Release
Candidate In Market
47. Release Status
Point release
– 為了bug-fix經常且快速的release
Major release
– 為了new feature告知客戶應做更新
2.6 2.6.1 2.6.1
2.7 2.6.1
major 2.8 2.6.1 2.6.1 2.9
point
48. Case Study 1 – DirectFB
Format
– [Major].[Minor].[Micro].[IF_Age].[Bin_Age]
Major release
– [Major].[Minor]
Point release
– [Micro]
Release Status
– [IF Age].[Bin Age]
Release的規則不固定,隨喜好進版。
進版規則
– Existing interface changed => IF Age = 0
– Binary interface changed => Bin Age = 0
– Bug-fixed or new feature => Micro += 1
49. Case Study 2 – Linux Kernel 2.6.11+
Format
– [Major].[Patch Level].[Minor].[Bug-fixed]
改進以往 release方式(2.odd/2.even),利用多個
source tree來增加patch進入mainline的效率
Source tree Versioning Meaning
Mainline 2.6.X/2.6.X-rcY Developing source tree
Stable 2.6.X.Y For bug-fix
Legacy 2.6.X.Y-1 1 version old stable
Mm Integration tree, for new feature
Ck/Rt Improve performance
50. Linux kernel version threads
2.6.11.1 2.6.11.2
stable
2.6.11
2.6.12.1
2.6.12
2.6.13
2.6.14.1
2.6.14
2.6.15
MM Mainline