1 \documentclass[slidestop
]{beamer
}
2 \usepackage{beamerthemesplit
}
8 \title{Data-Dependent-Fail-First
}
9 \author{Luke Kenneth Casson Leighton and Shriya Sharma
}
16 \huge{The Libre-SOC Hybrid
3D CPU
}\\
18 \Large{Data-Dependent-Fail-First
}\\
23 \large{Sponsored by NLnet's PET Programme
}\\
30 \frame{\frametitle{Why another SoC?
}
33 \item Intel Management Engine, Apple QA issues, Spectre
\vspace{6pt
}
34 \item Endless proprietary drivers, "simplest" solution: \\
35 License proprietary hard macros (with proprietary firmware)\\
36 Adversely affects product development cost\\
37 due to opaque driver bugs (Samsung S3C6410 / S5P100)
39 \item Alternative: Intel and Valve-Steam collaboration\\
40 "Most productive business meeting ever!"\\
41 https://tinyurl.com/valve-steam-intel
43 \item Because for
30 years I Always Wanted To Design A CPU
45 \item Ultimately it is a strategic
\textit{business
} objective to
46 develop entirely Libre hardware, firmware and drivers.
52 \frame{\frametitle{How can you help?
}
57 \item Start here! https://libre-soc.org \\
58 Mailing lists https://lists.libre-soc.org \\
59 IRC Freenode libre-soc \\
60 etc. etc. (it's a Libre project, go figure) \\
62 \item Can I get paid? Yes! NLnet funded\\
63 See https://libre-soc.org/nlnet/\#faq \\
65 \item Also profit-sharing in any commercial ventures \\
67 \item How many opportunities to develop Libre SoCs exist,\\
68 and actually get paid for it?
70 \item I'm not a developer, how can I help?\\
71 - Plenty of research needed, artwork, website \\
72 - Help find customers and OEMs willing to commit (LOI)
78 \frame{\frametitle{What goes into a typical SoC?
}
81 \item 15 to
20mm BGA package:
2.5 to
5 watt power consumption\\
82 heat sink normally not required (simplifies overall design)
84 \item Fully-integrated peripherals (not Northbridge/Southbridge)\\
85 USB, HDMI, RGB/TTL, SD/MMC, I2C, UART, SPI, GPIO etc. etc.
87 \item Built-in GPU (shared memory bus,
3rd party licensed)
\vspace{3pt
}
88 \item Built-in VPU (likewise, proprietary)
\vspace{3pt
}
89 \item Target price between \$
2.50 and \$
30 depending on market\\
90 Radically different from IBM POWER9 Core (
200 Watt)
92 \item We're doing the same, just with a hybrid architecture.\\
99 %%\frame{\frametitle{Simple SBC-style SoC}
102 %%\includegraphics[width=0.9\textwidth]{shakti_libre_soc.jpg}
110 \begin{frame
}[fragile
]
111 \frametitle{Simple-V CMPI in a nutshell
}
114 function op
\_cmpi(BA, RA, SI) # cmpi not vector-cmpi!
115 (assuming you know power-isa)
117 for (i =
0; i < VL; i++)
118 CR
[BA+id
] <= compare(ireg
[RA+ira
], SI);
119 if (reg
\_is\_vectorised[BA
] ) \
{ id +=
1; \
}
120 if (reg
\_is\_vectorised[RA
]) \
{ ira +=
1; \
}
124 \item Above is oversimplified: predication etc. left out
125 \item Scalar-scalar and scalar-vector and vector-vector now all in one
126 \item OoO may choose to push CMPIs into instr. queue (v. busy!)
130 \frame{\frametitle{Load/Store Fault-First
}
133 \item Problem: vector load and store can cause a page fault
134 \item Solution: a protocol that allows optional load/store
135 \item instruction
\textit{requests
} a number of elements
136 \item instruction
\textit{informs
} the number actually loaded
137 \item first load/store is not optional
141 \begin{frame
}[fragile
]
142 \frametitle{Data-Dependent Fail-First
}
145 function op
\_cmpi(BA, RA, SI) # cmpi not vector-cmpi!
147 for (i =
0; i < VL; i++)
148 CR
[BA+id
] <= compare(ireg
[RA+ira
], SI);
149 if (reg
\_is\_vectorised[BA
] ) \
{ id +=
1; \
}
150 if (reg
\_is\_vectorised[RA
]) \
{ ira +=
1; \
}
154 \item Above is oversimplified: predication etc. left out
155 \item Scalar-scalar and scalar-vector and vector-vector now all in one
156 \item OoO may choose to push CMPIs into instr. queue (v. busy!)
161 \frame{\frametitle{Additional Simple-V features
}
164 \item "fail-on-first" (POWER9 VSX strncpy segfaults on boundary!)
165 \item "Twin Predication" (covers VSPLAT, VGATHER, VSCATTER, VINDEX etc.)
166 \item SVP64: extensive "tag" (Vector context) augmentation
167 \item "Context propagation": a VLIW-like context. Allows contexts
168 to be repeatedly applied.
169 Effectively a "hardware compression algorithm" for ISAs.
170 \item Ultimate goal: cut down I-Cache usage, cuts down on power
171 \item Typical GPU has its own I-Cache and small shaders.\\
172 \textit{We are a Hybrid CPU/GPU: I-Cache is not separate!
}
173 \item Needs to go through OpenPOWER Foundation `approval'
177 \frame{\frametitle{maxloc
}
182 \frame{\frametitle{Pospopcount
}
184 // Copyright (c)
2020 Robert Clausecker <fuz@fuz.su>
185 // count8 reference implementation for tests. Do not alter.
186 func count8safe(counts *
[8]int, buf
[]uint8)
{
188 for j :=
0; j <
8; j++
{
189 counts
[j
] += int(buf
[i
] >> j &
1)
194 A simple but still hardware-paralleliseable SVP64 assembler for
8-bit input values (count8safe) is as follows:
196 mtspr
9,
3 # move r3 to CTR
197 setvl
3,
0,
8,
0,
1,
1 # set MVL=
8, VL=r3=MIN(MVL,CTR)
198 # load VL bytes (update r4 addr) but compressed (dw=
8)
199 addi
6,
0,
0 # initialise all
64-bits of r6 to zero
200 sv.lbzu/pi/dw=
8 *
6,
1(
4) # should be /lf here as well
201 # gather performs the transpose (which gets us to positional..)
203 # now those bits have been turned around, popcount and sum them
204 setvl
0,
0,
8,
0,
1,
1 # set MVL=VL=
8
205 sv.popcntd/sw=
8 *
24,*
8 # do the (now transposed) popcount
206 sv.add *
16,*
16,*
24 # and accumulate in results
207 # branch back if CTR still non-zero. works even though VL=
8
208 sv.bc/all
16, *
0, -
0x28 # reduce CTR by VL and stop if -ve
212 \frame{\frametitle{strncpy
}
217 \frame{\frametitle{linked-list walking
}
222 \frame{\frametitle{Summary
}
225 \item Goal is to create a mass-volume low-power embedded SoC suitable
226 for use in netbooks, chromebooks, tablets, smartphones, IoT SBCs.
227 \item No way we could implement a project of this magnitude without
228 nmigen (being able to use python OO to HDL)
229 \item Collaboration with OpenPOWER Foundation and Members absolutely
230 essential. No short-cuts. Standards to be developed and ratified
231 so that everyone benefits.
232 \item Riding the wave of huge stability of OpenPOWER ecosystem
233 \item Greatly simplified open
3D and Video drivers reduces product
234 development costs for customers
235 \item It also happens to be fascinating, deeply rewarding technically
236 challenging, and funded by NLnet
244 {\Huge The end
\vspace{12pt
}\\
245 Thank you
\vspace{12pt
}\\
246 Questions?
\vspace{12pt
}
251 \item Discussion: http://lists.libre-soc.org
252 \item Freenode IRC \#libre-soc
253 \item http://libre-soc.org/
254 \item http://nlnet.nl/PET
255 \item https://libre-soc.org/nlnet/\#faq