add slids
[libreriscv.git] / shakti / m_class / libre_riscv_chennai_2018.tex
1 \documentclass[slidestop]{beamer}
2 \usepackage{beamerthemesplit}
3 \usepackage{graphics}
4 \usepackage{pstricks}
5
6 \title{Commercial Libre-RISCV SoC}
7 \author{Luke Kenneth Casson Leighton}
8
9
10 \begin{document}
11
12 \frame{
13 \begin{center}
14 \huge{Designing a Commercial Libre RISC-V SoC}\\
15 \vspace{32pt}
16 \Large{Ethical Strategic Leveraging of the benefits}\\
17 \Large{of Libre and Open SW/HW}\\
18 \Large{for pure unadulterated Commercial gain}\\
19 \vspace{24pt}
20 \Large{Chennai 9th RISC-V Workshop}\\
21 \vspace{16pt}
22 \large{\today}
23 \end{center}
24 }
25
26
27 \frame{\frametitle{Credits and Acknowledgements}
28
29 \begin{itemize}
30 \item The Designers of RISC-V\vspace{15pt}
31 \item The Shakti Group\vspace{15pt}
32 \item Prof. G S Madhusudan\vspace{15pt}
33 \item Neel Gala\vspace{15pt}
34 \item Rishabh Jain\vspace{15pt}
35 \end{itemize}
36 }
37
38
39 \frame{\frametitle{Why, How, What?}
40
41 \begin{itemize}
42 \item Why? Because these days it's just not necessary to
43 make [un]ethical compromises in order to make a profitable,
44 desirable mass-volume product\\
45 {\it (There's enough companies doing that: where it's got us??)}
46 \item How? By leveraging the long-establised strategic cost and
47 maintenance benefits of libre-licensed software (and
48 HDL) and
49 {\it making sure that the people who provide it are
50 financially rewarded}. Also by empowering diverse team
51 collaboration
52 \item What? A 2.5ghz RISC-V 64-bit SoC that has
53 a 3D Embedded GPU, 1080p Video decode, and interfaces
54 to make it attractive for use in tablets, netbooks, industrial
55 embedded and more. 22nm or less, under 400 pins, under USD \$4.\\
56 {\it All sounds obvious... but is it practical and achievable?}
57 \end{itemize}
58 }
59
60
61 \frame{\frametitle{Definitions}
62
63 \begin{itemize}
64 \item {\bf Business}: the provision of a service and being
65 commensurately financially rewarded for doing so
66 \item {\bf Spongeing}: the provision of a service and being
67 taken advantage of for doing so {\it (cf: Professor Yunus)}
68 \item {\bf An ethical act}: an act that increases truth,
69 love, awareness or creativity for one or more people
70 (including yourself), {\it without} reducing those
71 same four qualities {\it for anyone}
72 \item {\bf The Four Freedoms}: the rights and guarantees
73 associated with and embedded within GNU Licenses {\it (cf: FSF)}
74 \end{itemize}
75 {\it Is it possible to ethically do business and respect the
76 Four Freedoms? That's where it gets interesting, as there are
77 even cases where the Four Freedoms are unethical. Note: google's
78 former motto "don't be evil" is clearly (unintentionally) unethical}
79 }
80
81
82 \frame{\frametitle{Does what we want already exist? Surely this is nonsense!}
83 \begin{center}
84 \includegraphics[height=2.4in]{nolibresocs.jpg}\\
85 {\bf Analysis of SoCs over the past 7+ years (answer: no)}
86 \end{center}
87 }
88
89
90 \frame{\frametitle{Breakdown of non-existence of fully-Libre SoCs}
91
92 \begin{itemize}
93 \item {\bf iMX6}: Libre bootable, Vivante 3D GPU (libre etnaviv)
94 but proprietary VPU (and a power-hungry Cortex A9)
95 \item {\bf Allwinner SoCs}: mostly Libre bootable,
96 VPU reverse engineered; GPU: MALI or PowerVR (i.e. proprietary)
97 \item {\bf Rockchip SoCs}: good but using MALI or PowerVR.
98 \item {\bf TI OMAP}: good but using PowerVR. and expensive.
99 \item {\bf Samsung}: good but using MALI.
100 \item {\bf Ingenic jz4775}: GREAT! performance
101 sucks (1ghz MIPS32).
102 \item {\bf Broadcom SoCs}: Cartelled. and boots from the GPU
103 \end{itemize}
104 {\it Basically there does not exist one single commercial SoC that
105 provides full source code for all functions (CPU, GPU, VPU)
106 with modern performance. Which is kinda bizarre if you think about it}
107 }
108
109
110 \frame{\frametitle{What would a good (Libre) boring, mundane SoC have?}
111
112 \begin{itemize}
113 \item Cover a lot of different scenarios (embedded, tablets, industrial,
114 netbooks, crypto-currency mining).
115 \item Decent performance with high efficiency. RISC-V: 40 \%
116 more efficient than ARM / Intel. Shakti a good
117 candidate: 2.5ghz and 120mW per core @ 22nm.
118 \item 1080p video: y'all gotta watch cute kittens on youtube, right?
119 \item 3D GPU: y'all gotta play Angri Burds, right? (or Minecraft)
120 \item No spying back-door co-processors (to steal crypto-wallets)
121 \item No Spectres, no Meltdowns.
122 \end{itemize}
123 {\it Basically quite boring and mundane. No Monster Performance,
124 no AI stuff, no special sauce. Just a plain-old SoC,
125 40\% more power efficient than ARM/Intel,
126 and not spying on end-users, that's all}
127 }
128
129
130 \frame{\frametitle{How on earth does an ethical Libre SoC make money???}
131
132 \begin{itemize}
133 \item Simple answer: Mask Rights.
134 \item Without Mask Rights: by having a desirable
135 product, and packaging it for a customer (i.e. by being a middle-man
136 a service is still being provided for which payment etc. etc.)
137 \item Without a desirable product or customer(s): err... you don't.\\
138 (cf: definition of Business)
139 \item By not having high NREs (leveraging back-to-back deals,
140 and helping others fulfil their needs and goals)
141 \end{itemize}
142 {\it Detachment from the goal also helps. If someone else makes this
143 product then GREAT! I can go do something else}\\
144 \vspace{4pt}
145 {\bf Main point: please do not automatically assume Ethical and Libre is
146 non-commercial. It's not nice, and it's not helping }
147
148 }
149
150 \frame{\frametitle{Things wot are "off-limits"}
151
152 \begin{itemize}
153 \item Customer entrapment (through proprietary software).\\
154 Strong business case for not entrapping customers:\\
155 https://tinyurl.com/most-productive-meeting-ever
156 \item Funding, endorsing, supporting or empowering unethical
157 Companies, Organisations, Cartels and Individuals.\\
158 (cf: definition of an ethical act).
159 \item Being totally inflexible / unrealistic. Goals have
160 to be met: it's no good being an idiot about that. e.g. if
161 a Libre 3D GPU really can't be made, use Vivante GC800
162 (with etnaviv).
163 \end{itemize}
164 {\it Still no real show-stoppers to making money (or product):
165 it's just slightly harder, that's all. Ultimately it's about
166 confidence. }
167 }
168
169
170 \frame{\frametitle{Interfaces, Block Diagram, of the Libre-RISCV SoC}
171 \begin{center}
172 \includegraphics[height=2.1in]{../shakti_libre_riscv.jpg}\\
173 {\bf Separate Power Domains for GPIO banks, Variable voltages
174 required, low-power sleep states etc. Quite involved}
175 \end{center}
176 }
177
178
179 \frame{\frametitle{Hardware / Development Complexity Comparison}
180
181 \begin{itemize}
182 \item {\bf Server}: relatively easy. PCIe, RapidIO, XAUI, SATA, GbE, 10GE,
183 DDR3/4 (or HMC) etc. etc. No multiplexing: all interfaces dedicated
184 and high-speed differential pairs.
185 \item {\bf Desktop}: really just a variant of Server.
186 Graphics is a PCIe Card (except if integrated). Peripherals
187 often done in dedicated external ICs ("Southbridge" concept)
188 \item {\bf Embedded}: also pretty easy. Really needs a pinmux. Low clock
189 rate, low power mode. e.g. SiFive Freedom U310.
190 \item {\bf Mobile}: HARD. Performance/Watt matters $=>$ variable core
191 voltage domains {\it per core}. Number of pins matters (affects
192 yield and package cost). Cost
193 matters. Pinmux critical.
194 \end{itemize}
195 {\it Bottom line: Mobile-class processors are challenging!}
196 }
197
198
199 \frame{\frametitle{Proprietary vs Libre-licensed Interface HDL}
200
201 \begin{itemize}
202 \item DDR3/4: challenging! \$1m for single-use, single instance.\\
203 Symbiotic EDA: \$600k for PHY; CERN developed a Controller\\
204 http://libre-riscv.org/shakti/m\_class/DDR/
205 \item HyperRAM (JEDEC xSPI): lower risk than DDR3/4\\
206 http://libre-riscv.org/shakti/m\_class/HyperRAM/
207 \item RGMII: several available (saves \$50k)\\
208 http://libre-riscv.org/shakti/m\_class/RGMII/
209 \item UART, SPI, I2C, PWM, SD/MMC: all libre (except eMMC).
210 \item Shakti Group has FlexBus, QuadSPI, SRAM, many more.
211 \item RGB/TTL: R. Herveille (SSD2828, SN75LVDS83b, TFP410a)
212 \end{itemize}
213 {\it Basically there's no compelling reason to spend vast sums
214 on proprietary HDL. Sorry Cadence / Mentor / Synopsis / whoever}
215 }
216
217
218 \frame{\frametitle{Challenging Stuff [1] - Memory Interfaces}
219
220 \begin{itemize}
221 \item DDR3/4 PHYs are analog and very high speed.
222 Impedance training. Extreme timing tolerances on parallel buses.\\
223 No surprise they cost USD \$1m and above.
224 \item Symbiotic EDA will do (Libre) PHY layout for USD \$300k,
225 time to completion for chosen geometry: 8-12 months.
226 \end{itemize}
227 {\it Silicon-proven but still risky. What are the alternatives?}
228 \vspace{4pt}
229 \begin{itemize}
230 \item 133mhz 32-bit SDRAM (um...) maybe even FlexBus?
231 \item HyperRAM (aka JEDEC xSPI) 8-bit SPI 166mhz or DDR-300.\\
232 300mbyte/sec for only 13 wires, not bad! (We'll take several)\\
233 http://libre-riscv.org/shakti/m\_class/HyperRAM/
234 \item HMC: insanely fast, very low power. OpenHMC (LGPL)
235 https://opencores.org/project/openhmc
236 \end{itemize}
237 }
238
239
240 \frame{\frametitle{Challenging Stuff [2] - Video Decode Engine}
241
242 \begin{itemize}
243 \item Richard Herveille's Video Core Blocks\\
244 https://opencores.org/project/video\_systems
245 \item Symbiotic EDA MP4 decoder in FPGA
246 \item H.264 seems to have been done...\\
247 https://github.com/adsc-hls/synthesizable\_h264
248 \item Really needs SIMD (or better, not-SIMD)\\
249 {http://libre-riscv.org/simple\_v\_extension/}
250 \item Definitely needs xBitManip (parallelised by Simple-V)\\
251 https://github.com/cliffordwolf/xbitmanip
252 \end{itemize}
253 {\it SIMD is insane. $O(N^6)$ opcode proliferation. See\\
254 https://www.sigarch.org/simd-instructions-considered-harmful/ \\
255 (1): P-Ext designed for Audio. (2): Investigate RI5CY's SIMD
256 }
257 }
258
259
260 \frame{\frametitle{Challenging Stuff [3] - Libre 3D GPU. Sigh.}
261
262 \begin{itemize}
263 \item Actual requirements quite modest: 30MP/s 100MT/s 5GFLOPS
264 but power/area is crucial ($2mm^2$ @ 40nm)
265 \item Nyuzi, MIAOW, GPLGPU (Number Nine), OGP.
266 \item Nyuzi based on Larrabee. Jeff Bush really helpful.
267 \item MIAOW is an OpenCL engine. GPLGPU is fixed-function
268 \item Nyuzi lessons: Software-only rendering not enough.
269 Getting through L1 cache takes most power. Fixed functions
270 such as parallel FP-Quad to ARGB Pixel, and Z-Buffer
271 needed.
272 \item Fallback is GC800 (\$250k) {\it contact me if you can do better!}
273 \end{itemize}
274 {\it Jacob Bachmeyer's Cache-control proposal turns L1 Cache into
275 scratchpad RAM. RVV is just too heavy (sorry!), Simple-V much
276 more light-weight and flexible ($O(1)$ ISA proliferation)
277 }
278 }
279
280
281 \frame{\frametitle{TODO}
282
283 \begin{itemize}
284 \item TODO\vspace{8pt}
285 \end{itemize}
286 }
287
288
289 \frame{\frametitle{Summary}
290
291 \begin{itemize}
292 \item Making a commercially-desirable SoC is neither academically
293 nor standard-investor sexy! No AI. Boring. zzzz
294 \item Luckily there is an anonymous sponsor who needs an SoC that
295 doesn't exist (who knows the commercial benefits of Libre)
296 \item Shakti Group know the benefits (cost, sovereignty) of a Libre
297 Mobile-Class SoC as well (No spying on India citizens!)
298 \item A Libre GPU, even a modest performer (100T/s etc.)
299 is the biggest technical risk/unknown (besides DDR3/4).\\
300 (fall-back is GC800. Do please help with a Libre GPU!)
301 \item DDR3/4 and eMMC are the main high-risk interfaces\\
302 (there are fall-back strategies in place)
303 \item Ultimately the strategy is all about cost reduction
304 vs risk mitigation,
305 with Libre/Ethical prioritised over "convenience"
306 \end{itemize}
307 }
308
309
310 \frame{
311 \begin{center}
312 {\Huge The end\vspace{20pt}\\
313 Thank you\vspace{20pt}\\
314 Questions?\vspace{20pt}
315 }
316 \end{center}
317
318 \begin{itemize}
319 \item Discussion:
320 \item http://libre-riscv.org/shakti/m\_class/
321 \end{itemize}
322 }
323
324
325 \end{document}