add first update, "why libre"
[crowdsupply.git] / updates / 001_2018nov28_why_a_libre_soc.mdwn
1 # Why make a quad-core 64-bit SoC: surely there are enough already?
2
3 So the year is 2018, and there does not exist a single commercial
4 "System-on-a-Chip" that is capable of running 3D mobile games and
5 playing 1080p60 video, where the end-user, including commercial
6 customers, cannot say that they have full control over their
7 devices.
8
9 Let that sink in for a moment.
10
11 To reiterate: there does not exist, anywhere in the world, one single popular
12 modern commercial portable tablet, IPTV device, netbook or smartphone,
13 today - in the year 2018 - where an end-user may download the full and
14 complete source code of the bootloader, kernel, operating system,
15 Video Processor library *and* 3D GPU library, *and* all the internal
16 and external peripherals (a more in-depth analysis was done
17 <a href="https://www.crowdsupply.com/eoma68/micro-desktop/updates/picking-a-processor">here</a>,
18 and two years later the situation still has not changed).
19
20 Now, there happen to be some medium to high-end systems based on Intel
21 processors, from both <a href="https://thinkpenguin.com">ThinkPenguin</a>
22 and <a href="https://puri.sm/products/librem-13">Purism</a>, where
23 both these companies go to the trouble of actually re-flashing the
24 BIOS, replacing it with LibreBoot or Coreboot. They both also make
25 sure that the WIFI firmware is libre (ruling out 802.11ac), and they also
26 specifically do not use an NVIDIA GPU. They also ensure that the
27 Intel "Management Engine" (known as an NSA backdoor spying co-processor)
28 is (or may be) disabled.
29
30 However that is the medium to high end, using relatively expensive
31 power-sucking Intel processors. 15 to 50 watts just for the processor
32 is not uncommon, here. Everything else - tablets, smartphones, and
33 most netbooks, use ARM SoCs in order to keep power consumption well
34 below 10 watts and in some cases below 5 watts, and that's where it
35 goes to hell in a handbasket.
36
37 It's not specifically ARM's "fault": it's just the way that it goes.
38 Imagine that you are a new (or even an established) Fabless Semiconductor
39 Company. Your "job" is to get an integrated all-in-one product out the door
40 with the minimum cost (where that's going to be at least USD $10m to
41 $30m), and the least amount of risk. In evaluating the options, you
42 absolutely want tried-and-tested, proven, risk-free "off-the-shelf"
43 peripherals (called "hard macros") which you can first test in the
44 biggest, most horribly-expensive FPGAs you can get hold of, then
45 when the engineers are happy, throw around a quarter of a million
46 dollars a pop at a test chip, and, finally, once that's tested
47 and known to be working, put down a couple of million on production masks.
48 That's before even actually getting chips manufactured.
49
50 The sums of money involved are so vast that absolutely no Fabless Semi
51 company will take the risk of using an unknown, unproven design. They
52 would far rather pay USD $250,000 to an established company to license
53 a proprietary GPU hard macro, for example, which comes with an associated
54 proprietary software library, because the company that licenses that GPU
55 design has had multiple customers successfully tape it out. The same
56 story goes for the VPU: another USD $100,000 to $200,000 on license fees
57 is better than spending USD $10m and above, only to find that the chip
58 doesn't work. DDR3/4 PHY and Controller hard macro licensing: in
59 excess of USD $1m, even as high as $2m. These are not costs where
60 you can mess about.
61
62 All of this is because these are *integrated* processors. There is no
63 separate VPU: it's on-board. There is no separate GPU: it's on-board.
64 There is no separate "Northbridge" or "Southbridge" IC: it's on-board,
65 all on the same die as the actual processor, as a way to save both on
66 space (think mobile phones) and power (driving external pins uses a huge
67 amount of power, which an "embedded" all-in-one design does not have).
68 The down-side of this all-in-one approach: one single mistake and
69 the entire chip, with all the investment up to that point, is junk.
70
71 And the problem is compounded by the fact that Foundries themselves make money
72 only by selling wafers. They absolutely hate having their time wasted.
73 If you as a new Fabless Semiconductor company come to them with an design
74 that fails, and yet you booked a production run because you were expecting
75 it to succeed, now the slot's cancelled because *your chip failed*, and
76 they just lost tens to hundreds of millions of dollars worth of business,
77 if none of the Foundry's other customers happen to be ready with a mask
78 set and the cash lined up.
79
80 If that happens, do you think that Foundry will ever take your calls again?
81
82 This is just how things are. Most Fabless Semi Companies looking to
83 compete with other embedded tablet / smartphone / netbook / IPTV / etc.
84 SoC companies are taking what they can get, doing the best integration
85 job that they can, getting it out the door and moving on to the next
86 product. Samsung actually has two separate teams (one internal,
87 one of them is a third party called Nexell) that produce Samung-badged
88 SoCs on overlapping cycles, as a way to help reduce the risk.
89
90 The problem for all of these companies is: apart from the increased speed,
91 they're all using ARM cores, they're all using the same GPU hard macros
92 licensed from the same handful of companies: there really is absolutely
93 nothing really significant that differentiates them from each other
94 (and to be frank, the end-user genuinely doesn't care what the processor
95 is: they just 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, is 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 * **(A) the power consumption of a RISC-V core is so much lower**
114 (the technical reason why is down to "Compressed" instructions,
115 which result in a 25% code reduction, which in turn means that
116 the L1 Instruction cache can be smaller, and that translates
117 to a huge - 40% - reduction in power)
118 * **(B) availability of source code significantly reduces development costs**
119 This is not an end-user argument, it's one for the OEMs (Original
120 Equipment Manufacturers). A good example is
121 <a href="http://www.h-online.com/open/news/item/Intel-and-Valve-collaborate-to-develop-open-source-graphics-drivers-1649632.html">here</a>,
122 where two completely independent really large companies came together to fix
123 bugs in their respective 3D codebases, all without requiring NDAs
124 or lawyers to get involved.
125 * **(C) Reduced royalties means reduced selling price**
126 Softbank recently ordered ARM to increase royalties. They believe that
127 they have the market cornered. What they don't realise is: 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
130 for the main on-board CPU, and the VPU, and the GPU), the royalties
131 are 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. USB2: $100k.
138 USB3: $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 <a href="http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev">mailing
150 list</a> and get in touch. If you want to help sponsor the project
151 or invest in the team, contact me directly by
152 <a href="email:lkcl@libre-riscv.org">email</a>.
153