(no commit message)
[libreriscv.git] / nlnet_2019_gcc.mdwn
1 # NL.net proposal
2
3 ## Project name
4
5 Libre RISC-V SoC, gcc upstream vector support
6
7 ## Website / wiki
8
9 <https://libre-riscv.org/nlnet_2019_gcc>
10
11 Please be short and to the point in your answers; focus primarily on
12 the what and how, not so much on the why. Add longer descriptions as
13 attachments (see below). If English isn't your first language, don't
14 worry - our reviewers don't care about spelling errors, only about
15 great ideas. We apologise for the inconvenience of having to submit in
16 English. On the up side, you can be as technical as you need to be (but
17 you don't have to). Do stay concrete. Use plain text in your reply only,
18 if you need any HTML to make your point please include this as attachment.
19
20 ## Abstract: Can you explain the whole project and its expected outcome(s).
21
22 The Libre RISCV SoC is being developed to provide a privacy-respecting
23 modern processor, developed transparently and as libre to the bedrock
24 as possible.
25
26 The design is a hybrid processor. That means that the same processor executes instructions designed for accelerating video, and 3D, where normally a separate coprocessor would be involved.
27
28 To accelerate this processor, it has had "Vector" support added. This means that compilers have to be modified to support it.
29
30 Therefore, this proposal is to add support to gcc and binutils in order that basic libraries and applications can take advantage of the accelerated capabilities of this processor.
31
32 # Have you been involved with projects or organisations relevant to this project before? And if so, can you tell us a bit about your contributions?
33
34 Luke Leighton is an ethical technology specialist who has a consistent
35 24-year track record of developing code in a real-time transparent
36 (fully libre) fashion, and in managing Software Libre teams. He is the
37 lead developer on the Libre RISC-V SoC.
38
39 Jacob Lifshay is a software libre 3D expert who developed a Vulkan 3D
40 software render engine under the GSoc2017 Programme. He also developed
41 his own libre-licensed 32-bit RISC-V processor, and has written an
42 optimising javascript compiler. Jacob is a valuable member of the team and is
43 working on Kazan (https://salsa.debian.org/Kazan-team/kazan)
44
45 # Requested Amount
46
47 EUR 50,000.
48
49 # Explain what the requested budget will be used for?
50
51 The task is seemingly straightforward: augment gcc and binutils to add support for the Libre RISC-V processor's Vectorisation capabilities.
52
53 In more detail, because the processor supports "tagging" of registers, it will be a little more involved as the design is quite unique.
54
55 However it will at least be possible to make low-hanging-fruit incremental improvements, because there are SIMD-like capabilities for subvectors of length 2 to 4. Full function vectorisation including predication will be an ongoing process.
56
57 The task may also involve some iteration and overlap with the main project, given that the main project involves the simulator, riscv-spike-sv.
58
59 It may turn out that during the course of the implementation, gcc is sufficiently functional so as to clearly demonstrate a better way of doing Vectorisation.
60
61 # Does the project have other funding sources, both past and present?
62
63 The overall project has sponsorship from Purism as well as a prior grant
64 from NLNet. However that is for specifically covering the development
65 of the RTL (the hardware source code)
66
67 Actual development of general purpose compilers for general purpose code, accelerated by the capabilities of this hybrid design, was not part of the original proposal.
68
69 # Compare your own project with existing or historical efforts.
70
71 The Libre RISCV SoC is intended to be compatible with RV64GC, the base UNIX Platform. This so that we can progress without being critically reliant on writing a compiler.
72
73 However its accelerated Vectorisation is entirely unique. There is literally no commercial or academic design in existence with the same capabilities or advantages. Thus, comparisons are difficult to make.
74
75 The closest analogous equivalent is the Cray Supercomputer, which inspired many Vector Processor designs including RISC-V RVV. However even here, RVV has explicit vector instructions, whereas our design "tags" scalar ones as being vectorised.
76
77 Whatever other compiler projects exist, they are just not compatible at the assembly level. There just is no option but to bite the bullet and write a compiler.
78
79 This is just a standard part of processor innovation. We will also have to do the same thing for LLVM at some point.
80
81 # What are significant technical challenges you expect to solve during the project, if any?
82
83 Compiler development is known, traditionally, to be extremely technically
84 challenging. There are not many people in the world who work on it.
85 Vectorisation support is even more challenging, and is a fast-moving
86 research topic. Fortunately there is convergent research in this area,
87 however with this processor's Vectorisation being literally unique,
88 and also in active development (requiring an iterative process), this is
89 going to be a huge challenge. Luckily, there is low-hanging fruit that
90 will allow significant performance increases for relatively little compiler
91 effort.
92
93 Keeping the work upstream is made difficult because there is not yet any
94 active silicon. Part of the tasks will therefore be to ensure that the
95 code is kept up-to-date until such time as active silicon is available.
96
97 ## Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes?
98
99 As mentioned in the 2018 submission, the Libre RISC-V
100 SoC has a full set of resources for Libre Project Management and development:
101 mailing list, bugtracker, git repository and wiki - all listed here:
102 <https://libre-riscv.org/>
103
104 In addition, we have a Crowdsupply page
105 <https://www.crowdsupply.com/libre-risc-v/m-class> which provides a public
106 gateway, and heise.de, reddit, phoronix, slashdot and other locations have
107 all picked up the story. The list is updated and maintained here:
108 <https://libre-riscv.org/3d_gpu/>
109
110 # Extra info to be submitted
111
112 * <http://libre-riscv.org/3d_gpu/>
113 * <https://nlnet.nl/project/Libre-RISCV/>