remove archived date on standards tag
[libreriscv.git] / resources.mdwn
1 # Resources and Specifications
2
3 This page aims to collect all the resources and specifications we need
4 in one place for quick access. We will try our best to keep links here
5 up-to-date. Feel free to add more links here.
6
7 # Libre-RISC-V Standards
8
9 This list auto-generated from a page tag "standards":
10
11 [[!inline pages="tagged(standards)" actions="no" quick="yes"]]
12
13
14 # RISC-V Instruction Set Architecture
15
16 The Libre RISC-V Project is building a hybrid CPU/GPU SoC. As the name
17 of the project implies, we will be following the RISC-V ISA due to it
18 being open-source and also because of the huge software and hardware
19 ecosystem building around it. There are other open-source ISAs but none
20 of them have the same momentum and energy behind it as RISC-V.
21
22 To fully take advantage of the RISC-V ecosystem, it is important to be
23 compliant with the RISC-V standards. Doing so will allow us to to reuse
24 most software as-is and avoid major forks.
25
26 * Official compiled PDFs of RISC-V ISA Manual:
27 <https://github.com/riscv/riscv-isa-manual/releases/latest>
28 * Working draft of the proposed RISC-V Bitmanipulation extension:
29 <https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-draft.pdf>
30 * RISC-V "V" Vector Extension:
31 <https://riscv.github.io/documents/riscv-v-spec/>
32
33 Note: As far as I know, we aren't using the RISC-V V Extension directly
34 at the moment. However, there are many wiki pages that make a reference
35 to the V extension so it would be good to include it here as a reference
36 for comparative/informative purposes with regard to Simple-V.
37
38 # IEEE Standard for Floating-Point Arithmetic (IEEE 754)
39
40 Almost all modern computers follow the IEEE Floating-Point Standard. Of
41 course, we will follow it as well for interoperability.
42
43 * IEEE 754-2019: <https://standards.ieee.org/standard/754-2019.html>
44
45 Note: Even though this is such an important standard used by everyone,
46 it is unfortunately not freely available and requires a payment to
47 access. However, each of the Libre RISC-V members already have access
48 to the document.
49
50 # Khronos Standards
51
52 The Khronos Group creates open standards for authoring and acceleration
53 of graphics, media, and computation. It is a requirement for our hybrid
54 CPU/GPU to be compliant with these standards *as well* as with IEEE754,
55 in order to be commercially-competitive in both areas: especially Vulkan
56 and OpenCL being the most important. SPIR-V is also important for the
57 Kazan driver.
58
59 Thus the [[zfpacc_proposal]] has been created which permits runtime dynamic
60 switching between different accuracy levels, in userspace applications.
61
62 **SPIR-V Main Page <https://www.khronos.org/registry/spir-v/>**
63
64 * SPIR-V 1.5 Specification Revision 1:
65 <https://www.khronos.org/registry/spir-v/specs/unified1/SPIRV.html>
66 * SPIR-V OpenCL Extended Instruction Set:
67 <https://www.khronos.org/registry/spir-v/specs/unified1/OpenCL.ExtendedInstructionSet.100.html>
68 * SPIR-V GLSL Extended Instruction Set:
69 <https://www.khronos.org/registry/spir-v/specs/unified1/GLSL.std.450.html>
70
71 **Vulkan Main Page <https://www.khronos.org/registry/vulkan/>**
72
73 * Vulkan 1.1.122:
74 <https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/index.html>
75
76 **OpenCL Main Page <https://www.khronos.org/registry/OpenCL/>**
77
78 * OpenCL 2.2 API Specification:
79 <https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_API.html>
80 * OpenCL 2.2 Extension Specification:
81 <https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_Ext.html>
82 * OpenCL 2.2 SPIR-V Environment Specification:
83 <https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_Env.html>
84
85 Note: We are implementing hardware accelerated Vulkan and
86 OpenCL while relying on other software projects to translate APIs to
87 Vulkan. E.g. Zink allows for OpenGL-to-Vulkan in software.
88
89 # Graphics and Compute API Stack
90
91 I found this informative post that mentions Kazan and a whole bunch of
92 other stuff. It looks like *many* APIs can be emulated on top of Vulkan,
93 although performance is not evaluated.
94
95 <https://synappsis.wordpress.com/2017/06/03/opengl-over-vulkan-dev/>
96
97 # Free Silicon Conference
98
99 The conference brought together experts and enthusiasts who want to build
100 a complete Free and Open Source CAD ecosystem for designing analog and
101 digital integrated circuits. The conference covered the full spectrum of
102 the design process, from system architecture, to layout and verification.
103
104 * <https://wiki.f-si.org/index.php/FSiC2019#Foundries.2C_PDKs_and_cell_libraries>
105
106 * LIP6's Coriolis - a set of backend design tools:
107 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
108
109 Note: The rest of LIP6's website is in French, but there is a UK flag
110 in the corner that gives the English version.
111
112 * KLayout - Layout viewer and editor: <https://www.klayout.de/>
113
114 # The OpenROAD Project
115
116 OpenROAD seeks to develop and foster an autonomous, 24-hour, open-source
117 layout generation flow (RTL-to-GDS).
118
119 * <https://theopenroadproject.org/>
120
121 # Tests, Benchmarks, Conformance, Compliance, Verification, etc.
122
123 ## RISC-V Tests
124
125 RISC-V Foundation is in the process of creating an official conformance
126 test. It's still in development as far as I can tell.
127
128 * //TODO LINK TO RISC-V CONFORMANCE TEST
129
130 ## IEEE 754 Tests
131
132 IEEE 754 has no official tests for floating-point but there are several
133 well-known third party tools to check such as John Hauser's SoftFloat
134 and TestFloat.
135
136 * <http://www.jhauser.us/arithmetic/>
137
138 Jacob is also making a Rust library to check IEEE 754 operations.
139
140 * <http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2019-September/002737.html>
141
142 A cool paper I came across in my research is "IeeeCC754++ : An Advanced
143 Set of Tools to Check IEEE 754-2008 Conformity" by Dr. Matthias Hüsken.
144
145 * Direct link to PDF:
146 <http://elpub.bib.uni-wuppertal.de/servlets/DerivateServlet/Derivate-7505/dc1735.pdf>
147
148 ## Khronos Tests
149
150 OpenCL Conformance Tests
151
152 * <https://github.com/KhronosGroup/OpenCL-CTS>
153
154 Vulkan Conformance Tests
155
156 * <https://github.com/KhronosGroup/VK-GL-CTS>
157
158 MAJOR NOTE: We are **not** allowed to say we are compliant with any of
159 the Khronos standards until we actually make an official submission,
160 do the paperwork, and pay the relevant fees.
161
162 ## Formal Verification
163 Formal verification of Libre RISC-V ensures that it is bug-free in regards to what we specify.
164 Of course, it is important to do the formal verification as a final step in the development process before
165 we produce thousands or millions of silicon.
166
167 Some learning resources I found in the community:
168
169 * ZipCPU: <http://zipcpu.com/>
170
171 ZipCPU provides a comprehensive tutorial for beginners and many exercises/quizzes/slides: <http://zipcpu.com/tutorial/>
172
173
174 * Western Digital's SweRV CPU blog (I recommend looking at all their posts): <https://tomverbeure.github.io/>
175
176 <https://tomverbeure.github.io/risc-v/2018/11/19/A-Bug-Free-RISC-V-Core-without-Simulation.html>
177
178 <https://tomverbeure.github.io/rtl/2019/01/04/Under-the-Hood-of-Formal-Verification.html>
179