Fix typo
[crowdsupply.git] / updates / 001_2018nov28_why_a_libre_soc.mdwn
1 So, the year is 2018, and there does not exist a single commercial
2 "System-on-a-Chip" (SoC) that is capable of running 3D mobile games and
3 playing 1080p60 video, where the end-user, including commercial
4 customers, can say that they have full control over their
5 devices.
6
7 Let that sink in for a moment.
8
9 To reiterate: there does not exist, anywhere in the world, one single,
10 popular, modern, commercial, portable tablet, IPTV device, netbook, or
11 smartphone, today - in the year 2018 - where an end-user may download
12 the full and complete source code of the bootloader, kernel, operating
13 system, video processor library, *and* 3D GPU library, *and* all the
14 internal and external peripherals. (For a more in-depth analysis, see
15 a [previous EOMA68
16 update](https://www.crowdsupply.com/eoma68/micro-desktop/updates/picking-a-processor)
17 -- two years later the situation still has not changed.)
18
19 Now, there happen to be some medium- to high-end systems based on
20 Intel processors, from both [ThinkPenguin](https://thinkpenguin.com)
21 and [Purism](https://puri.sm/products/librem-13), where both these
22 companies go to the trouble of actually re-flashing the BIOS,
23 replacing it with LibreBoot or Coreboot. They both also make sure the
24 Wi-Fi firmware is libre (ruling out 802.11ac), and they specifically
25 do not use an NVIDIA GPU. Finally, they ensure the Intel "Management
26 Engine" (known as an NSA backdoor spying co-processor) is (or may be)
27 disabled.
28
29 However, that is the medium- to high-end market, using relatively
30 expensive, power-sucking Intel processors. In this realm, 15 to 50
31 watts just for the processor is not uncommon. Everything else -
32 tablets, smartphones, and most netbooks, use ARM SoCs in order to keep
33 power consumption well below 10 watts, and in some cases below 5
34 watts, and that's where it goes to hell in a handbasket.
35
36 It's not specifically ARM's "fault": it's just the way it goes.
37 Imagine you are a new (or even an established) fabless semiconductor
38 company. Your "job" is to get an integrated, all-in-one product out the door
39 at minimum cost (where that's going to be at least USD $10m to
40 $30m), and the least amount of risk. In evaluating the options, you
41 absolutely want tried-and-tested, proven, risk-free, "off-the-shelf"
42 peripherals (called "hard macros") which you can first test in the
43 biggest, most horribly-expensive FPGAs you can get hold of, then
44 when the engineers are happy, throw around a quarter of a million
45 dollars a pop at a test chip, and, finally, once that's tested
46 and known to be working, put down a couple of million on production masks.
47 That's before even actually getting chips manufactured.
48
49 The sums of money involved are so vast that absolutely no fabless semi
50 company will take the risk of using an unknown, unproven design. They
51 would far rather pay USD $250,000 to an established company to license
52 a proprietary GPU hard macro, for example, which comes with an associated
53 proprietary software library, because the company that licenses that GPU
54 design has had multiple customers successfully tape it out. The same
55 story goes for the VPU: another USD $100,000 to $200,000 on license fees
56 is better than spending USD $10m and above, only to find that the chip
57 doesn't work. DDR3/4 PHY and Controller hard macro licensing: in
58 excess of USD $1m, even as high as $2m. These are not costs where
59 you can mess about.
60
61 All of this is because these are *integrated* processors. There is no
62 separate VPU: it's on-board. There is no separate GPU: it's on-board.
63 There is no separate "Northbridge" or "Southbridge" IC: it's on-board,
64 all on the same die as the actual processor, as a way to save both on
65 space (think mobile phones) and power (driving external pins uses a huge
66 amount of power, which an "embedded" all-in-one design does not have).
67 The down-side of this all-in-one approach: one single mistake and
68 the entire chip, with all the investment up to that point, is junk.
69
70 And the problem is compounded by the fact that foundries themselves
71 make money only by selling wafers. They absolutely hate having their
72 time wasted. If you, as a new fabless semiconductor company, come to
73 them with a design that fails, and yet you booked a production run
74 because you were expecting it to succeed, now the slot's cancelled
75 because *your chip failed*, and they just lost tens to hundreds of
76 millions of dollars worth of business, if none of the foundry's other
77 customers happen to be ready with a mask set and the cash lined up. If
78 that happens, do you think that foundry will ever take your calls
79 again?
80
81 This is just how things are. Most fabless semi companies looking to
82 compete with other embedded tablet / smartphone / netbook / IPTV / etc.
83 SoC companies are taking what they can get, doing the best integration
84 job they can, getting it out the door, and moving on to the next
85 product. Samsung actually has two separate teams (one internal,
86 the other a third party called Nexell) that produce Samsung-badged
87 SoCs on overlapping cycles, as a way to help reduce the risk.
88
89 The problem for all of these companies is that, apart from some
90 differences in processor speed, they're all using ARM cores and
91 they're all using the same GPU hard macros licensed from the same
92 handful of companies: there really is absolutely nothing really
93 significant that differentiates them from each other (and to be frank,
94 the end-user genuinely doesn't care what the processor is: they just
95 buy the end-product).
96
97 Along comes RISC-V, which in the same geometry has a power envelope
98 that is a whopping 40% lower than any ARM or Intel processor available
99 today.
100
101 So, this is where it gets interesting, given that power consumption is
102 key to the success of mobile devices. Here in Taiwan, kids as young
103 as eight carry around a smartphone... oh, and a "power bank" that's twice
104 the size of the phone (anyone who used to have a Nokia 6310i, with
105 a standby time of over two weeks, will be laughing and crying at the same
106 time).
107
108 The point of this story is: it's not enough to just go "oh, I think I
109 will design a Libre SoC today", it has to have an actual commercial
110 hook: it has to have compelling reasons why it will sell. For the
111 Libre RISC-V SoC, those are threefold:
112
113 1. **Significantly lower power consumption.** The technical reason why
114 RISC-V has lower power consumption is down to "compressed"
115 instructions, which result in a 25% code reduction, which in turn
116 means the L1 instruction cache can be smaller, and that translates
117 to a huge - 40% - reduction in power.
118 2. **Reduced development cost due to source code availability.** This
119 is not an end-user argument, it's one for the OEMs (Original
120 Equipment Manufacturers). A good example is
121 [here](http://www.h-online.com/open/news/item/Intel-and-Valve-collaborate-to-develop-open-source-graphics-drivers-1649632.html),
122 where two completely independent really large companies came
123 together to fix bugs in their respective 3D codebases, all without
124 requiring NDAs or lawyers to get involved.
125 3. **Reduced royalties means reduced selling price.** Softbank
126 recently ordered ARM to increase royalties. They believe they have
127 the market cornered. What they don't realise is that end-users
128 don't care what processor is inside. They just want a device that
129 "does the job." By using libre-licensed hard macros (including for
130 the main on-board CPU, the VPU, and the GPU), the royalties are
131 slashed literally to zero.
132
133 There are additional justifications for going libre, even with the
134 hard macros for the peripherals: the costs of licensing proprietary
135 hard macros are enormous. The highest is for DDR3/4, which can come
136 to around USD $2 million for the PHY and the Controller (per 32-bit
137 interface). Gigabit Ethernet: USD $50k. USB 2: $100k.
138 USB 3: $500k. All of these costs are per interface instance. If as many of
139 these can be cut as possible, it adds up to a saving of over USD $4 million,
140 bringing the development cost down to only around USD $6 million.
141
142 Sad to have to say it: being ethical isn't enough. Money talks.
143 Once that's accepted, it turns out that yes, there's a strategy that
144 happens to reduce both development cost and end-product cost, oh,
145 and happens to be ethical and gives people back control of their devices
146 at the same time.
147
148 If this is something you want to help with, join the
149 [mailing list](http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev)
150 and get in touch. If you want to help sponsor the project
151 or invest in the team, contact me directly at <lkcl@libre-riscv.org>.
152