split up section on conversions, into sub-sections
[libreriscv.git] / docs.mdwn
1 # Documentation
2
3 A draft version of the specification is available at
4 <https://ftp.libre-soc.org/power-spec-draft.pdf>
5
6 ## Codebase Structure
7
8 The SOC is partitioned into four repositories. The subrepositories are
9 intended as general purpose standalone projects useful outside of LibreSOC. For example,
10 the IEE754 FPU repository is a general purpose IEEE754 toolkit for the
11 construction of FSMs and arbitrary length pipelines.
12
13 | Git Repo | Online docs | Description | Pypi |
14 |----------|---------------|---------------|--------
15 | [SOC](https://git.libre-soc.org/?p=soc.git;a=tree) | [Libre-SOC](https://docs.libre-soc.org/soc/) | Main OpenPOWER Hybrid CPU-GPU | TBD |
16 | [FPU](https://git.libre-soc.org/?p=ieee754fpu.git;a=tree) | -- | Equivalent to hardfloat-3 | [libresoc-ieee754fpu](https://pypi.org/project/libresoc-ieee754fpu) |
17 | [nmutil](https://git.libre-soc.org/?p=nmutil.git;a=tree) | -- | Equivalent to Chisel3.util | [libresoc-nmutil](https://pypi.org/project/libresoc-nmutil) |
18 | [OpenPOWER ISA](https://git.libre-soc.org/?p=nmutil.git;a=tree) | [OpenPOWER ISA](https://docs.libre-soc.org/openpower-isa/) | Simulator, ISA spec compiler, co-simulation infrastructure | [libresoc-openpower-isa](https://pypi.org/project/libresoc-openpower-isa/) |
19
20
21 Also see [[SOC Architecture|3d_gpu/architecture]]
22
23 ## Installing the Codebase
24
25 Installation is much easier when using the
26 [install scripts](https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-dev-repos;hb=HEAD).
27 A separate script also helps install
28 [dependencies](https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=install-hdl-apt-reqs;hb=HEAD)
29 and a third can be used to set up a
30 [debootstrap chroot](
31 https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD).
32 The chroot is useful to ensure stability and repeatable builds: no
33 errors or issues introduced by libraries being wrong versions.
34 Also relevant is the [gdb gcc build](https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=ppc64-gdb-gcc;hb=HEAD).
35
36 pip3 install virtualenv requests
37 mkdir ~/.virtualenvs && cd ~/.virtualenvs
38 python3 -m venv libresoc
39 source ~/.virtualenvs/libresoc/bin/activate
40
41 cd ~; mkdir libresoc; cd libresoc
42 git clone https://git.libre-soc.org/git/nmutil.git
43 git clone https://git.libre-soc.org/git/openpower-isa.git
44 git clone https://git.libre-soc.org/git/c4m-jtag.git
45 git clone https://git.libre-soc.org/git/ieee754fpu.git
46 git clone https://git.libre-soc.org/git/soc.git
47
48 cd nmutil; make develop; cd ..
49 cd openpower-isa; make develop; cd ..
50 cd c4m-jtag; make develop; cd ..
51 cd ieee754fpu; make develop; cd ..
52 cd soc; make gitupdate; make develop; cd ..
53
54 python3 soc/src/soc/decoder/power_decoder.py
55 yosys -p "read_ilang decoder.il; show dec31"
56
57 ## Gtkwave Tutorial
58
59 [[docs/gtkwave_tutorial]]
60
61 ## Formal proof notes
62
63 [[docs/notes_on_formal_proofs]]
64
65 ## Learning nmigen
66
67 [[docs/learning_nmigen]]
68