(no commit message)
[libreriscv.git] / nlnet_2021_3mdeb_cavatools.mdwn
1 # NLnet User-operated Grant Request for 3mdeb Power ISA Simulator
2
3 * 2021-08-071
4 * <https://bugs.libre-soc.org/show_bug.cgi?id=939>
5
6 ## Project name
7
8 Libre-SOC 3mdeb Cavatools: Power ISA Simulator
9
10 ## Website / wiki
11
12 <https://libre-soc.org/nlnet_2021_3mdeb_cavatools>
13
14 Please be short and to the point in your answers; focus primarily on
15 the what and how, not so much on the why. Add longer descriptions as
16 attachments (see below). If English isn't your first language, don't
17 worry - our reviewers don't care about spelling errors, only about
18 great ideas. We apologise for the inconvenience of having to submit in
19 English. On the up side, you can be as technical as you need to be (but
20 you don't have to). Do stay concrete. Use plain text in your reply only,
21 if you need any HTML to make your point please include this as attachment.
22
23 ## Abstract: Can you explain the whole project and its expected outcome(s).
24
25 Cavatools is currently a high performance user-operated simulator of
26 the RISC-V ISA. The primary objective of the project is to extend it to
27 implement the scalar Power ISA and the Libre-SOC Draft SVP64
28 Extensions. This will allow rapid prototyping of Extensions to the
29 Power ISA long before they reach silicon (which is very costly).
30 In turn this helps Libre-SOC to deliver on its commitment to provide
31 user-trustable processors for use in Internet routers, desktop,
32 smartphone and other user-operated devices where security and transparency
33 is expected.
34
35 # 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?
36
37 3mdeb is currently helping Libre-SOC with the (horribly slow,
38 easy-to-read, easy-to-use) Libre-SOC Power ISA Simulator which is 20,000 times
39 slower than cavatools. 3mdeb is also helping with ISA level unit tests in
40 Libre-SOC's code base that will be used to cross-validate a huge range of
41 Power ISA simulators and actual silicon implementations.
42
43 # Requested Amount
44
45 EUR $50,000.
46
47 # Explain what the requested budget will be used for?
48
49 * To create a compiler which takes Libre-SOC Machine-readable
50 Power ISA specification files and generate c code
51 * To extend cavatools to include support for the Scalar
52 parts of the Power ISA
53 * To then add support for Libre-SOC's Draft SVP64 Extensions
54 * To enhance it to include gdb "remote" machine interface
55 support
56 * To add Power ISA RADIX MMU emulation
57 * To extend cavatools to run a very basic linux
58 initramfs in-memory with basic serial console access
59 * To demonstrate running first a single core linux kernel
60 and later a SMP one, with busybox
61 * To use the exact same Specification c compiler to create
62 an "illegal instruction trap" emulator, integrated
63 into the linux kernel, for emulating Power ISA SIMD instructions
64 (extending the existing trap-and-emulate code already present
65 in ppc64 linux kernel source code)
66
67 # Does the project have other funding sources, both past and present?
68
69 Although there is NLnet funding for the Libre-SOC Simulator
70 (written in python) and associayed unit tests, cavatools, which is
71 written in c by Peter Hsu, does not have funding for the Power ISA
72 aditions. cavatools itself is a very new project.
73
74 # Compare your own project with existing or historical efforts.
75
76 Although there are quite a few Power ISA simulators, none of them
77 are up-to-date or are suited to high performance, like cavatools.
78 cavatools is multi-process and extremely fast, using relatively little
79 memory, where power-gem5, which has a different focus and has huge flexibility
80 and usefulness for research, uses vast amounts
81 of memory and is much slower. cavatools also has hardware-level cycle-accurate emulation which is extremely useful and important for analysing experimental
82 instructions, which is a feature that no other Power ISA Simulator has.
83 DolphinPC and pearpc are over 15 years old and were targetted at 32 bit
84 emulation of much older Power ISA processors. Libre-SOC's python-based
85 simulator only achieves aroubd 2,000 instructions per second on
86 high performance hardware whereas
87 cavatools achieves 200,000 instructions per second per processor
88 on modest hardware.
89 IBM's own Power ISA simulator is proprietary and, because it contains
90 confidential experimentation internal to IBM, may not be made public.
91
92 ## What are significant technical challenges you expect to solve during the project, if any?
93
94 This is at its heart a compiler project, which can be a challenging
95 area. However the language being implemented is quite small and limited,
96 so the project is relatively straightforward.
97
98 ## Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes?
99
100 The project will be developed entirely publicly and transparently,
101 using Libre-SOC Project Resources which are already set up for trustable
102 auditability and transparency. The mailing lists therefore are always
103 publicly available.
104
105 Online conferences and talks will be given as progress
106 is made, as well as working with Libre-SOC to send out development
107 reports and progress.
108
109 # Extra info to be submitted