1 # pythondata-cpu-libresoc
3 Non-Python files needed for the cpu Libre-SOC, packaged
4 into a Python module so they can be used with Python libraries and tools.
6 This Useful for usage with tools like
7 [LiteX](https://github.com/enjoy-digital/litex.git).
9 The data files can be found under the Python module `pythondata_cpu_libresoc`. The
10 `pythondata_cpu_libresoc.data_location` value can be used to find the files on the file
13 Example of getting the data file directly;
15 import pythondata_cpu_libresoc
17 my_data_file = "abc.txt"
19 with open(os.path.join(pythondata_cpu_libresoc.data_location, my_data_file)) as f:
23 Example of getting the data file using `litex.data.find` API;
25 from pythondata_cpu_libresoc import data_file
27 my_data_file = "abc.txt"
29 with open(data_file(my_data_file)) as f:
33 The verilog files are built from https://git.libre-soc.org/soc.git
34 due to the original source being over 130,000 lines of nmigen.
35 Instructions on how to re-build the verilog can be found in the
36 [Software prerequisites](https://libre-soc.org/HDL_workflow/#software-prerequisites)
37 section of Libre-SOC [HDL_workflow](https://libre-soc.org/HDL_workflow/)
40 ## Installing from git repository
44 You can install the package manually, however this is **not** recommended.
47 git clone https://github.com/litex-hub/pythondata-cpu-libresoc.git
48 cd pythondata-cpu-libresoc
49 sudo python setup.py install
52 ## Using [pip](https://pip.pypa.io/) with git repository
54 You can use [pip](https://pip.pypa.io/) to install the data package directly
58 pip install --user git+https://github.com/litex-hub/pythondata-cpu-libresoc.git
61 If you want to install for the whole system rather than just the current user,
62 you need to remove the `--user` argument and run as sudo like so;
65 sudo pip install git+https://github.com/litex-hub/pythondata-cpu-libresoc.git
68 You can install a specific revision of the repository using;
70 pip install --user git+https://github.com/litex-hub/pythondata-cpu-libresoc.git@<tag>
71 pip install --user git+https://github.com/litex-hub/pythondata-cpu-libresoc.git@<branch>
72 pip install --user git+https://github.com/litex-hub/pythondata-cpu-libresoc.git@<hash>
75 ### With `requirements.txt` file
77 Add to your Python `requirements.txt` file using;
79 -e git+https://github.com/litex-hub/pythondata-cpu-libresoc.git
82 To use a specific revision of the repository, use the following;
84 -e https://github.com/litex-hub/pythondata-cpu-libresoc.git@<hash>
87 ## Installing from [PyPi](https://pypi.org/project/pythondata-cpu-libresoc/)
89 ## Using [pip](https://pip.pypa.io/)
92 pip install --user pythondata-cpu-libresoc