add openpower section and isa/decoder/simulator section
[crowdsupply.git] / updates / 023_2020mar26_decoder_emulator_started.mdwn
1 So many things happened since the last update they actually need to go
2 in the main update, even in summary form. One big thing:
3 [Raptor CS](https://www.raptorcs.com/)
4 sponsored us with remote access to a Monster spec'd TALOS II Workstation!
5
6 # Introduction
7
8 Here's the summary (if it can be called a summary):
9
10 * [An announcement](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/004995.html)
11 that we got the funding (which is open to anyone - hint, hint) resulted in
12 at least three people reaching out to join the team. "We don't need
13 permission to own our own hardware" got a *really* positive reaction.
14 * New team member, Jock (hello Jock!) starts on the coriolis2 layout,
15 after Jean-Paul from LIP6.fr helped to dramatically improve how coriolis2
16 can be used. This resulted in a
17 [tutorial](https://libre-riscv.org/HDL_workflow/coriolis2/) and a
18 [huge bug report discussion](http://bugs.libre-riscv.org/show_bug.cgi?id=178)
19 * Work has started on the
20 [POWER ISA decoder](http://bugs.libre-riscv.org/show_bug.cgi?id=186),
21 verified through
22 [calling GNU AS](https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/decoder/test/test_decoder_gas.py;h=9238d3878d964907c5569a3468d6895effb7dc02;hb=56d145e42ac75626423915af22d1493f1e7bb143) (yes, really!)
23 and on a mini-simulator
24 [calling QEMU](https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/simulator/qemu.py;h=9eb103bae227e00a2a1d2ec4f43d7e39e4f44960;hb=56d145e42ac75626423915af22d1493f1e7bb143)
25 for verification.
26 * Jacob's simple-soft-float library growing
27 [Power FP compatibility](http://bugs.libre-riscv.org/show_bug.cgi?id=258)
28 and python bindings.
29 * A Conference call with OpenPOWER Foundation Director, Hugh, and Timothy
30 Pearson from RaptorCS has been established every two weeks.
31 * The OpenPOWER Foundation is also running some open
32 ["Virtual Coffee"](https://openpowerfoundation.org/openpower-virtual-coffee-calls/)
33 weekly round-table calls for anyone interested, generally, in OpenPOWER
34 development.
35 * Tim sponsors our team with access to a Monster Talos II system with a
36 whopping 128 GB RAM. htop lists a staggering 72 cores (18 real
37 with 4-way hyperthreading).
38 * [Epic MegaGrants](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005262.html)
39 reached out (hello!) to say they're still considering our
40 request.
41 * A marathon 3-hour session with [NLNet](http://nlnet.nl) resulted
42 in the completion of the
43 [Milestone tasks list(s)](http://bugs.libre-riscv.org/buglist.cgi?component=Milestones&list_id=567&resolution=---)
44 and a
45 [boat-load](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/thread.html)
46 of bug reports to the list.
47 * Immanuel Yehowshua is participating in the Georgia Tech
48 [Create-X](https://create-x.gatech.edu/) Programme, and is establishing
49 a Public Benefit Corporation in Atlanta, as an ethical vehicle for VC
50 Funding.
51 * A [Load/Store Buffer](http://bugs.libre-riscv.org/show_bug.cgi?id=216)
52 design and
53 [further discussion](http://bugs.libre-riscv.org/show_bug.cgi?id=257)
54 including on
55 [comp.arch](https://groups.google.com/forum/#!topic/comp.arch/cbGAlcCjiZE)
56 inspired additional writeup
57 on the
58 [6600 scoreboard](https://libre-riscv.org/3d_gpu/architecture/6600scoreboard/)
59 page.
60 * [Public-Inbox](http://bugs.libre-riscv.org/show_bug.cgi?id=181) was
61 installed successfully on the server, which is in the process of
62 moving to a [new domain name](http://bugs.libre-riscv.org/show_bug.cgi?id=182)
63 [Libre-SOC](http://libre-soc.org)
64 * Build Servers have been set up with
65 [automated testing](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005364.html)
66 being established
67
68 Well dang, as you can see, suddenly it just went ballistic. There's
69 almost certainly things left off the list. For such a small team there's
70 a heck of a lot going on. We have an awful lot to do, in a short amount
71 of time: the 180nm tape-out is in October 2020 - only 7 months away.
72
73 With this update we're doing something slightly different: a request
74 has gone out [to the other team members](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005428.html)
75 to say a little bit about what each of them is doing. This also helps me
76 because these updates do take quite a bit of time to write.
77
78 # NLNet Funding announcement
79
80 An announcement went out
81 [last year](https://lists.gnu.org/archive/html/libreplanet-discuss/2019-09/msg00170.html)
82 that we'd applied for funding, and we got some great responses and
83 feedback (such as "don't use patented AXI4"). The second time, we
84 sent out a "we got it!" message and got some really nice private and
85 public replies, as well as requests from people to join the team.
86 More on that when it happens.
87
88 # Coriolis2 experimentation started
89
90 Jock, a really enthusiastic and clearly skilled and experienced python
91 developer, has this to say about coriolis2:
92
93 As a humble Python developer, I understand the unique status and
94 significance of the Coriolis project, nevertheless I cannot help
95 but notice that it has a huge room for improvement. I genuinely hope
96 that my participation in libre-riscv will also help improve Coriolis.
97
98 This was the short version, with a much more
99 [detailed insight](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005478.html)
100 listed here which would do well as a bugreport. However the time it would
101 take is quite significant. We do have funding available from NLNet,
102 so if there is anyone that would like to take this on, under the supervision
103 of Jean-Paul at LIP6.fr, we can look at facilitating that.
104
105 One of the key insights that Jock came up with was that the coding style,
106 whilst consistent, is something that specifically has to be learned, and,
107 as such, being contrary to PEP8 in so many ways, creates an artificially
108 high barrier and learning curve.
109
110 Even particularly experienced cross-language developers such as
111 myself tend to be able to *read* such code, but editing it, when
112 commas separating list items are on the beginning of lines, results in
113 syntax errors automatically introduced *without thinking* because we
114 automatically add them *at the end* because it looks like one is missing.
115
116 This is why we insisted on PEP8 in the
117 [HDL workflow](http://libre-riscv.org/HDL_workflow) document.
118
119 Other than that: coriolis2 is actually extremely exciting to work with.
120 Anyone who has done manual PCB layout will know quite how much of a relief
121 it is to have auto-routing: this is what coriolis2 has by the bucket-load,
122 *as well* as auto-placement. We are looking at half a *million* objects
123 (Cells) to place. Without an auto-router / auto-placer this is just a
124 flat-out impossible task.
125
126 The first step was to
127 [learn and adapt coriolis2](http://bugs.libre-riscv.org/show_bug.cgi?id=178)
128 which was needed to find out how much work would be involved, as much as
129 anything else, in order to be able to accurately assign the fixed budgets
130 to the NLNet milestones. Following on from that, when Jock joined,
131 we needed to work out a compact way to express the
132 [layout of blocks](http://bugs.libre-riscv.org/show_bug.cgi?id=217#c44)
133 and he's well on the way to achieving that.
134
135 Some of the pictures from coriolis2 are
136 [stunning](bugs.libre-riscv.org/attachment.cgi?id=29). This was an
137 experimental routing of the IEEE754 FP 64-bit multiplier. It took
138 5 minutes to run, and is around 50,000 gates: as big as most silicon
139 ASICs that have formerly been done with Coriolis2, and 50% of the
140 practical size that can be handed in one go to the auto-place/auto-router.
141
142 Other designs using coriolis2 have been of the form where the major "blocks"
143 (such as FPMUL, or Register File) are laid-out automatically in a single-level
144 hierarchy, followed by full and total manual layout from that point onwawrds,
145 in what is termed in the industry as a "Floorplan".
146 With around 500,000 gates to do and many blocks being repeated, this approach
147 is not viable for us. We therefore need a *two* level or potentially three
148 level hierarchy.
149
150 [Explaining this](http://bugs.libre-riscv.org/show_bug.cgi?id=178#c146)
151 to Jean-Paul was amusing and challenging. Much bashing of heads against
152 walls and keyboards was involved. The basic plan: rather than have
153 coriolis2 perform an *entire* layout, in a flat and all-or-nothing fashion,
154 we need a much more subtle fine-grained approach, where *sub-blocks* are
155 laid-out, then *included* at a given level of hierarchy as "pre-done blocks".
156
157 Save and repeat.
158
159 This apparently had never been done before, and explaining it in words was
160 extremely challenging. Through a massive hack (actively editing the underlying
161 HDL files temporarily in between tasks) was the only way to illustrate it.
162 However once the lightbulb went on, Jean-Paul was able to get coriolis2's
163 c++ code into shape extremely rapidly, and this alone has opened up an
164 *entire new avenue* of potential for coriolis2 to be used in industry
165 for doing much larger ASICs. Which is precisely the kind of thing that
166 our NLNet sponsors (and the EU, from the Horizon 2020 Grant) love. hooray.
167 Now if only we could actually go to a conference and talk about it.
168
169 # POWER ISA decoder and Simulator
170
171 *(kindly written by Michael)*
172
173 The decoder we have is based on that of IBM's
174 [microwatt reference design](https://github.com/antonblanchard/microwatt).
175 As microwatt's decoder is quite regular, consisting of a bunch of large
176 switch statements returning fields of a struct, we elected not to
177 pursue a direct conversion of the VHDL to nmigen. Instead, we
178 extracted the information in the switch statements into several
179 [CSV tables](https://libre-riscv.org/openpower/isatables/),
180 and leveraged nmigen to construct the decoder from these
181 tables. We applied the same technique to extract the subfields
182 (register numbers, branch offset, immediates, etc.) from the
183 instruction, where Luke converted the information in the POWER ISA
184 specification to text, and wrote a module in python to extract those
185 fields from an instruction.
186
187 To test the decoder, we initially verified it against the tables we
188 extracted, and manually against the power ISA specification. Later
189 however, we came up with the idea of verifying the decoder against the
190 output of the GNU assembler. This is done by selecting an instruction
191 type (integer reg/reg, integer immediate, load store, etc), and
192 randomly selecting the opcode, registers, immediates, and other
193 operands. We then feed this instruction to GNU AS to assemble, and
194 then the assembled instruction is sent to our decoder. From this, we
195 can then verify that the output of the decoder matches what was generated
196 earlier.
197
198 We also explored using a similar idea to test the functionality of the
199 entire SOC. By using the [QEMU](https://www.qemu.org/) powerpc
200 emulator, we can compare the execution of our SOC against that of the
201 emulator to verify that our decoder and backend are working correctly.
202 We would write snippets of test code (or potentially randomly generate
203 instructions) and send the resulting binary to both the SOC and
204 QEMU. We would then simulate our SOC until it was finished executing
205 instructions, and use Qemu's gdb interface to do the same. We would
206 then use Qemu's gdb interface to compare the register file and memory
207 with that of our SOC to verify that it is working correctly. I did
208 some experimentation using this technique to verify a rudimentary
209 simulator of the SOC backend, and it seemed to work quite well.
210
211 *(Note from Luke: this automated approach, taking either other people's
212 regularly-written code or actual PDF specifications, not only saves us a
213 vast amount of time, it also ensures that our implementation is
214 correct and does not contain transcription errors).*
215
216 # simple-soft-float Library and POWER FP emulation
217
218 The
219 [simple-soft-float](https://salsa.debian.org/Kazan-team/simple-soft-float)
220 library is a floating-point library Jacob wrote with the intention
221 of being a reference implementation of IEEE 754 for hardware testing
222 purposes. It's specifically designed to be written to be easier to
223 understand instead of having the code obscured in pursuit of speed:
224
225 * Being easier to understand helps prevent bugs where the code does not
226 match the IEEE spec.
227 * It uses the [algebraics](https://salsa.debian.org/Kazan-team/algebraics)
228 library that Jacob wrote since that allows using numbers that behave
229 like exact real numbers, making reasoning about the code simpler.
230 * It is written in Rust rather than highly-macro-ified C, since that helps with
231 readability since operations aren't obscured, as well as safety, since Rust
232 proves at compile time that the code won't seg-fault unless you specifically
233 opt-out of those guarantees by using `unsafe`.
234
235 It currently supports 16, 32, 64, 128-bit FP for RISC-V, along with
236 having a `DynamicFloat` type which allows dynamically specifying all
237 aspects of how a particular floating-point type behaves -- if one wanted,
238 they could configure it as a 2048-bit floating-point type.
239
240 It also has Python bindings, thanks to the awesome
241 [PyO3](https://pyo3.rs/) library for writing Python bindings in Rust.
242
243 We decided to write simple-soft-float instead
244 of extending the industry-standard [Berkeley
245 softfloat](http://www.jhauser.us/arithmetic/SoftFloat.html) library
246 because of a range of issues, including not supporting Power FP, requiring
247 recompilation to switch which ISA is being emulated, not supporting
248 all the required operations, architectural issues such as depending on
249 global variables, etc. We are still testing simple-soft-float against
250 Berkeley softfloat where we can, however, since Berkeley softfloat is
251 widely used and highly likely to be correct.
252
253 simple-soft-float is [gaining support for Power
254 FP](http://bugs.libre-riscv.org/show_bug.cgi?id=258), which requires
255 rewriting a lot of the status-flag handling code since Power supports a
256 much larger set of floating-point status flags and exceptions than most
257 other ISAs.
258
259 Thanks to RaptorCS for giving us remote access to a Power9 system,
260 since that makes it much easier verifying that the test cases are correct
261 (more on this below).
262
263 API Docs for stable releases of both
264 [simple-soft-float](https://docs.rs/simple-soft-float) and
265 [algebraics](https://docs.rs/algebraics) are available on docs.rs.
266
267 One of the really important things about these libraries: they're not
268 specifically coded exclusively for Libre-SOC: like softfloat-3 itself
269 (and also like the [IEEE754 FPU](https://git.libre-riscv.org/?p=ieee754fpu.git))
270 they're intended for *general-purpose* use by other projects. These are
271 exactly the kinds of side-benefits for the wider Libre community that
272 sponsorship, from individuals, Foundations (such as NLNet) and Companies
273 (such as Purism and Raptor CS) brings.
274
275 # OpenPOWER Conference calls
276
277 We've now established a routine two-week conference call with Hugh Blemings,
278 OpenPOWER Foundation Director, and Timothy Pearson, CEO of Raptor CS. This
279 allows us to keep up-to-date (each way) on both our new venture and also
280 the newly-announced OpenPOWER Foundation effort as it progresses.
281
282 One of the most important things that we, Libre-SOC, need, and are
283 discussing with Hugh and Tim is: a way to switch on/off functionality
284 over a limited 32-bit opcode space, so that we have one mode for
285 "POWER 3.0B compliance" and another for "things that are absolutely
286 essential to make a decent GPU". With these two being strongly
287 mutually exclusively incompatible, this is just absolutely critical.
288
289 POWER 3.0B does not have c++ style LR/SC atomic operations for example,
290 and if we have half a **million** data structures **per second** that need
291 SMP-level inter-core mutexes, and the current POWER 3.0B multi-instruction
292 atomic operations are used, we're highly likely to use 10 to 15 **percent**
293 processing power consumed on spin-locking.
294
295 Adding new and essential features that could well end up in a future version
296 of the POWER ISA *need* to be firewalled in a clean way, and we've been
297 asked to [draft a letter](https://libre-riscv.org/openpower/isans_letter/)
298 to some of the (very busy) engineers with a huge amount of knowledge
299 and experience inside IBM, for them to consider. Some help in reviewing
300 it would be greatly appreciated.
301
302 These and many other things are why the calls with Tim and Hugh are a
303 good idea. The amazing thing is that they're taking us seriously. I believe
304 I may have mentioned (at least on the mailing list), that there have been
305 several people inside IBM and other places, working quietly for a long time
306 to get OpenPOWER in place - and, critically, *done right*. I believe Hugh
307 mentioned that it was quite amusing that several people contacted him to
308 say "why aren't you doing what RISC-V is doing, being open and all?" whilst
309 he and others had been quietly spearheading an effort to that for some time!
310
311 Other nice things we learned (more on this below) is that Epic Games
312 and RaptorCS are collaborating to get POWER9 supported in Unreal Engine.
313 And that the idea has been very tentatively considered to use our design
314 for the "boot management" processor, running
315 [OpenBMC](https://github.com/openbmc/openbmc). These are early days,
316 it's just ideas, ok! Aside from anything, we actually have to get a chip
317 done, first.
318
319 # OpenPower Virtual Coffee Meetings
320
321 The "Virtual Coffee Meetings", announced
322 [here](https://openpowerfoundation.org/openpower-virtual-coffee-calls/)
323 are literally open to anyone interested in OpenPOWER (if you're strictly
324 Libre there's a dial-in method). These calls are not recorded, it's
325 just an informal conversation.
326
327 What's a really nice surprise is finding
328 out that Paul Mackerras, whom I used to work with 20 years ago, is *also*
329 working on OpenPOWER, specifically
330 [microwatt](https://github.com/antonblanchard/microwatt), being managed
331 by Anton Blanchard.
332
333 A brief discussion led to learning that Paul is looking at adding TLB
334 (Virtual Memory) support to microwatt, specifically the RADIX TLB.
335 I therefore pointed him at the same resource
336 [(power-gem5)](https://github.com/power-gem5/gem5/tree/gem5-experimental)
337 that Hugh had kindly pointed me at, the week before, and did a
338 [late night write-up](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005445.html)
339
340 My feeling is that these weekly round-table meetings are going to be
341 really important for everyone involved in OpenPOWER. It's a community:
342 we help each other.
343
344 # Sponsorship by RaptorCS with a TALOS II Workstation
345
346 With many thanks to Timothy from
347 [RaptorCS](https://raptorcs.com), we've a new shiny
348 online server that needs
349 [setting up](http://bugs.libre-riscv.org/show_bug.cgi?id=265).
350 This machine is not just a "nice-to-have", it's actually essential for
351 us to be able to verify against. As you can see in the bugreport, the idea
352 is to bootstrap our way from running IEEE754 FP on a *POWER* system
353 (using typically gnu libm), verifying Jacob's algorithmic FP library
354 particularly and specifically for its rounding modes and exception modes.
355
356 Once that is done, then apart from having a general-purpose library that
357 is compliant with POWER IEEE754 which *anyone else can use*, we can use
358 that to run unit tests against our[
359 hardware IEEE754 FP library](https://git.libre-riscv.org/?p=ieee754fpu.git;a=summary) -
360 again, a resource that anyone may use in any arbitrary project - verifying
361 that it is also correct. This stepping-stone "bootstrap" method we are
362 deploying all over the place, however to do so we need access to resources
363 that have correctly-compliant implementations in the first place. Thus,
364 the critical importance of access to a TALOS II POWER9 workstation.
365
366 # Epic Megagrants
367
368 Several months back I got word of the existence of Epic Games' "Megagrants".
369 In December 2019 they announced that so far they've given
370 [USD $13 million](https://www.unrealengine.com/en-US/blog/epic-megagrants-reaches-13-million-milestone-in-2019)
371 to 200 recipients, so far: one of them, the Blender Foundation, was
372 [USD $1.2 million](https://www.blender.org/press/epic-games-supports-blender-foundation-with-1-2-million-epic-megagrant/)!
373 This is an amazing and humbling show of support for the 3D Community,
374 world-wide.
375
376 It's not just "games", or products specifically using the Unreal Engine:
377 they're happy to look at anything that "enhances Libre / Open source"
378 capabilities for the 3D Graphics Community.
379
380 A full hybrid 3D-capable CPU-GPU-VPU which is fully-documented not just in
381 its capabilities, that [documentation](http://libre-riscv.org) and
382 [full source code](http://git.libre-riscv.org) kinda extends
383 right the way through the *entire development process* down to the bedrock
384 of the actual silicon - not just the firmware, bootloader and BIOS,
385 *everything* - in my mind it kinda qualifies in way that can, in some
386 delightful way, be characterised delicately as "complete overkill".
387
388 Interestingly, guys, if you're reading this: Tim, the CEO of RaptorCS
389 informs us that you're working closely with his team to get the Unreal
390 Engine up and running on the POWER architecture? Wouldn't that be highly
391 amusing, for us to be able to run the Unreal Engine on the Libre-SOC,
392 given that it's going to be POWER compatible hardware, as a test,
393 first initially in FPGA and then in 18-24 months, on actual silicon, eh?
394
395 So, as I mentioned
396 [on the list](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005262.html)
397 (reiterating what I put in the original application), we're happy with
398 USD $25,000, we're happy with USD $10 million. It's really up to you guys,
399 at Epic Games, as to what level you'd like to see us get to, and how fast.
400
401 USD $600,000 for example we can instead of paying USD $1million to a proprietary
402 company to license a DDR3 PHY for a limited one-time use and only a 32-bit
403 wide interface, we can contract SymbioticEDA to *design* a DDR3 PHY for us,
404 which both we *and the rest of the worldwide Silicon Community can use
405 without limitation* because we will ask SymbioticEDA to make the design
406 (and layout) libre-licensed, for anyone to use.
407
408 USD 250,000 pays for the mask charges that will allow us to do the 40nm
409 quad-core ASIC that we have on the roadmap for the second chip. USD
410 $1m pays for 28nm masks (and so on, in an exponential ramp-up). No, we
411 don't want to do that straight away: yes we do want to go through a first
412 proving test ASIC in 180nm, which, thanks to NLNet, is already funded.
413 This is just good sane sensible use of funds.
414
415 Even USD $25,000 helps us to cover things such as administration of the
416 website (which is taking up a *lot* of time) and little things that we
417 didn't quite foresee when putting in the NLNet Grant Applications.
418
419 Lastly, one of the conditions as I understood it from the Megagrants
420 process is that the funds are paid in "stages". This is exactly
421 what NLNet does for (and with) us, right now. If you wanted to save
422 administrative costs, there may be some benefit to having a conversation
423 with the [30-year-old](https://nlnet.nl/foundation/history/)
424 NLNet Charitable Foundation. Something to think about?
425
426 # NLNet Milestone tasks
427
428 Part of applying for NLNet's Grants is a requirement to create a list
429 of tasks, each of which is assigned a budget. On 100% completion of the task,
430 donations can be sent out. With *six* new proposals accepted, each of which
431 required between five (minimum) and *ninteen* separate and distinct tasks,
432 a call with Michiel and Joost turned into an unexpected three hour online
433 marathon, scrambling to write almost fifty bugreports as part of the Schedule
434 to be attached to each Memorandum of Understanding. The mailing list
435 got a [leeetle bit busy](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005003.html)
436 right around here.
437
438 Which emphasised for us the important need to subdivide the mailing list into
439 separate lists (below).
440
441 # Georgia Tech CREATE-X
442
443 TODO
444
445 # LOAD/STORE Buffer and 6600 design documentation
446
447 A critical part of this project is not just to create a chip, it's to
448 *document* the chip design, the decisions along the way, for both
449 educational, research, and ongoing maintenance purposes. With an
450 augmented CDC 6600 design being chosen as the fundamental basis,
451 [documenting that](https://libre-riscv.org/3d_gpu/architecture/6600scoreboard/)
452 as well as the key differences is particularly important. At the very least,
453 the extremely simple and highly effective hardware but timing-critical
454 design aspects of the circular loops in the 6600 were recognised by James
455 Thornton (the co-designer of the 6600) as being paradoxically challenging
456 to understand why so few gates could be so effective (being as they were,
457 literally the world's first ever out-of-order superscalar architecture).
458 Consequently, documenting it just to be able to *develop* it is extremely
459 important.
460
461 We're getting to the point where we need to connect the LOAD/STORE Computation
462 Units up to an actual memory architecture. We've chosen
463 [minerva](https://github.com/lambdaconcept/minerva/blob/master/minerva/units/loadstore.py)
464 as the basis because it is written in nmigen, works, and, crucially, uses
465 wishbone (which we decided to use as the main Bus Backbone a few months ago).
466
467 However, unlike minerva, which is a single-issue 32-bit embedded chip,
468 where it's perfectly ok to have one single LD/ST operation per clock,
469 and not only that but to have that operation take a few clock cycles,
470 to get anything like the level of performance needed of a GPU, we need
471 at least four 64-bit LOADs or STOREs *every clock cycle*.
472
473 For a first ASIC from a team that's never done a chip before, this is,
474 officially, "Bonkers Territory". Where minerva is doing 32-bit-wide
475 Buses (and does not support 64-bit LD/ST at all), we need internal
476 data buses of a minimum whopping **2000** wires wide.
477
478 Let that sink in for a moment.
479
480 The reason why the internal buses need to be 2000 wires wide comes down
481 to the fact that we need, realistically, 6 to eight LOAD/STORE Computation
482 Units. 4 of them will be operational, 2 to 4 of them will be waiting
483 with pending instructions from the multi-issue Vectorisation Engine.
484
485 We chose to use a system which expands the first 4 bits of the address,
486 plus the operation width (1,2,4,8 bytes) into a "bitmap" - a byte-mask -
487 that corresponds directly with the 16 byte "cache line" byte enable
488 columns, in the L1 Cache. These bitmaps can then be "merged" such
489 that requests that go to the same cache line can be served *in the
490 same clock cycle* to multiple LOAD/STORE Computation Units. This
491 being absolutely critical for effective Vector Processing.
492
493 Additionally, in order to deal with misaligned memory requests, each of those
494 needs to put out *two* such 16-byte-wide requests (see where this is going?)
495 out to the L1 Cache.
496 So, we now have eight times two times 128 bits which is a staggering
497 2048 wires *just for the data*. There do exist ways to get that down
498 (potentially to half), and there do exist ways to get that cut in half
499 again, however doing so would miss opportunities for merging of requests
500 into cache lines.
501
502 At that point, thanks to Mitch Alsup's input (Mitch is the designer of
503 the Motorola 68000, Motorola 88120, key architecture on AMD's Opteron
504 Series, the AMD K9, AMDGPU and Samsung's latest GPU), we learned that
505 L1 cache design critically depends on what type of SRAM you have. We
506 initially, naively, wanted dual-ported L1 SRAM and that's when Staf
507 and Mitch taught us that this results in half-duty rate. Only
508 1-Read **or** 1-Write SRAM Cells give you fast enough (single-cycle)
509 data rates to be useable for L1 Caches.
510
511 Part of the conversation has wandered into
512 [why we chose dynamic pipelines](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005459.html)
513 as well as receiving that
514 [important advice](http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005354.html)
515 from both Mitch Alsup and Staf Verhaegen.
516
517 (Staf is also [sponsored by NLNet](https://nlnet.nl/project/Chips4Makers/)
518 to create Libre-licensed Cell Libraries, busting through one of the -
519 many - layers of NDAs and reducing NREs and unnecessary and artificial
520 barriers for ASIC development: I helped him put in the submission, and
521 he was really happy to do the Cell Libraries that we will be using for
522 LibreSOC's 180nm test tape-out in October 2020.)
523
524 # Public-Inbox and Domain Migration
525
526 As mentioned before, one of the important aspects of this project is
527 the documentation and archiving. It also turns out that when working
528 over an extremely unreliable or ultra-expensive mobile broadband link,
529 having *local* (offline) access to every available development resource
530 is critically important.
531
532 Hence why we are going to the trouble of installing public-inbox, due
533 to its ability to not only have a mailing list entirely stored in a
534 git repository, the "web service" which provides access to that git-backed
535 archive can be not only mirrored elsewhere, it can be *run locally on
536 your own local machine* even when offline. This in combination
537 with the right mailer setup can store-and-forward any replies to the
538 (offline-copied) messages, such that they can be sent when internet
539 connectivity is restored, yet remain a productive collaborative developer.
540
541 Now you know why we absolutely do not accept "slack", or other proprietary
542 "online oh-so-convenient" service. Not only is it highly inappropriate for
543 Libre Projects, not only do we become critically dependent on the Corporation
544 running the service (yes, github has been entirely offline, several times),
545 if we have remote developers (such as myself, working from Scotland last
546 month with sporadic access to a single Cell Tower) or developers in emerging
547 markets where their only internet access is via a Library or Internet Cafe,
548 we absolutely do not want to exclude or penalise such people, just because
549 they have less resources.
550
551 Fascinatingly, Linus Torvals is *specifically*
552 [on record](https://www.linuxjournal.com/content/line-length-limits)
553 about making sure that "Linux development does not favour wealthy people".
554
555 We are also, as mentioned before, moving to a new domain name. We'll take
556 the opportunity to fix some of the issues with HTTPS (wrong certificate),
557 and also do some
558 [better mailing list names](http://bugs.libre-riscv.org/show_bug.cgi?id=184)
559 at the same time.
560
561 TODO (Veera?) bit about what was actually done, how it links into mailman2.
562
563 # OpenPOWER HDL Mailing List opens up
564
565 It is early days, however it is fantastic to see responses from IBM with
566 regards to requests for access to the POWER ISA Specification
567 documents in
568 [machine-readable form](http://lists.mailinglist.openpowerfoundation.org/pipermail/openpower-hdl-cores/2020-March/000007.html)
569 I took Jeff at his word and explained, in some detail,
570 [exactly why](http://lists.mailinglist.openpowerfoundation.org/pipermail/openpower-hdl-cores/2020-March/000008.html)
571 machine readable versions of specifications are critically important.
572
573 The takeaway is: *we haven't got time to do manual transliteration of the spec*
574 into "code". We're expending considerable effort making sure that we
575 "bounce" or "bootstrap" off of pre-existing resources, using computer
576 programs to do so.
577
578 This "trick" is something that I learned over 20 years ago, when developing
579 an SMB Client and Server in something like two weeks flat. I wrote a
580 parser which read the packet formats *from the IETF Draft Specification*,
581 and outputted c-code.
582
583 This leaves me wondering, as I mention on the HDL list, if we can do the same
584 thing with large sections of the POWER Spec.
585
586 # Build Servers
587
588 TODO
589
590 # Conclusion
591
592 I'm not going to mention anything about the current world climate: you've
593 seen enough news reports. I will say (more about this through the
594 [EOMA68](https://www.crowdsupply.com/eoma68/micro-desktop) updates) that
595 I anticipated something like what is happening right now, over ten years
596 ago. I wasn't precisely expecting what *has* happened, just the consequences:
597 world-wide travel shut-down, and for people - the world over - to return to
598 local community roots.
599
600 However what I definitely wasn't expecting was a United States President
601 to be voted in who was eager and, frankly, stupid enough, to start *and
602 escalate* a Trade war with China. The impact on the U.S economy alone, and the
603 reputation of the whole country, has been detrimental in the extreme.
604
605 This combination leaves us - world-wide - with the strong possibility that
606 seemed so "preposterous" that I could in no way discuss it widely, let alone
607 mention it on something like a Crowdsupply update, that thanks to the
608 business model on which their entire product lifecycle is predicated,
609 in combination with the extremely high NREs and development costs for
610 ASICs (custom silicon costs USD $100 million, these days), several
611 large Corporations producing proprietary binary-only drivers for
612 hardware on which we critically rely for our internet-connected way
613 of life **may soon go out of business**.
614
615 Right at a critical time where video conferencing is taking off massively,
616 your proprietary hardware - your smartphone, your tablet, your laptop,
617 everything you rely on for connectivity to the rest of the world, all of
618 a sudden **you may not be able to get software updates** or, worse,
619 your products could even be
620 [remotely shut down](https://www.theguardian.com/technology/2016/apr/05/revolv-devices-bricked-google-nest-smart-home)
621 **without warning**.
622
623 I do not want to hammer the point home too strongly but you should be
624 getting, in no uncertain terms, exactly how strategically critical, in
625 the current world climate, this project just became. We need to get it
626 accelerated, completed, and into production, in an expedited and responsible
627 fashion.
628