|
1 | | -# litex-data-cpu-vexriscv |
| 1 | +# pythondata-cpu-vexriscv |
2 | 2 |
|
3 | | -Non-Python data files required to use the vexriscv with |
| 3 | +Non-Python files needed for the cpu vexriscv packaged |
| 4 | +into a Python module so they can be used with Python libraries and tools. |
| 5 | + |
| 6 | +This Useful for usage with tools like |
4 | 7 | [LiteX](https://github.com/enjoy-digital/litex.git). |
5 | 8 |
|
6 | | -The data files can be found under the Python module `litex.data.cpu.vexriscv`. The |
7 | | -`litex.data.cpu.vexriscv.location` value can be used to find the files on the file system. |
| 9 | +The data files can be found under the Python module `pythondata_cpu_vexriscv`. The |
| 10 | +`pythondata_cpu_vexriscv.location` value can be used to find the files on the file system. |
8 | 11 |
|
9 | 12 | Example of getting the data file directly; |
10 | 13 | ```python |
11 | | -import litex.data.cpu.vexriscv |
| 14 | +import pythondata_cpu_vexriscv |
12 | 15 |
|
13 | 16 | my_data_file = "abc.txt" |
14 | 17 |
|
15 | | -with open(os.path.join(litex.data.cpu.vexriscv.data_location, my_data_file)) as f: |
| 18 | +with open(os.path.join(pythondata_cpu_vexriscv.data_location, my_data_file)) as f: |
16 | 19 | print(f.read()) |
17 | 20 | ``` |
18 | 21 |
|
19 | 22 | Example of getting the data file using `litex.data.find` API; |
20 | 23 | ```python |
21 | | -from litex.data.find import find_data |
| 24 | +from pythondata_cpu_vexriscv import data_file |
22 | 25 |
|
23 | 26 | my_data_file = "abc.txt" |
24 | 27 |
|
25 | | -with open(os.path.join(find_data("cpu", "vexriscv"), my_data_file)) as f: |
| 28 | +with open(data_file(my_data_file)) as f: |
26 | 29 | print(f.read()) |
27 | 30 | ``` |
28 | 31 |
|
29 | 32 |
|
30 | 33 |
|
31 | 34 | The data files are generated from https://github.com/SpinalHDL/VexRISCV.git and place in the directory |
32 | | -[litex/data/cpu/vexriscv/verilog](litex/data/cpu/vexriscv/verilog). |
| 35 | +[pythondata_cpu_vexriscv/verilog](pythondata_cpu_vexriscv/verilog). |
33 | 36 |
|
34 | 37 |
|
35 | | -## Installing |
| 38 | +## Installing from git repository |
36 | 39 |
|
37 | 40 | ## Manually |
38 | 41 |
|
39 | 42 | You can install the package manually, however this is **not** recommended. |
40 | 43 |
|
41 | 44 | ``` |
42 | | -git clone https://github.com/litex-hub/litex-data-cpu-vexriscv.git |
43 | | -cd litex-data-cpu-vexriscv |
| 45 | +git clone https://github.com/litex-hub/pythondata-cpu-vexriscv.git |
| 46 | +cd pythondata-cpu-vexriscv |
44 | 47 | sudo python setup.py install |
45 | 48 | ``` |
46 | 49 |
|
47 | | -## Using [pip](https://pip.pypa.io/) |
| 50 | +## Using [pip](https://pip.pypa.io/) with git repository |
48 | 51 |
|
49 | 52 | You can use [pip](https://pip.pypa.io/) to install the data package directly |
50 | 53 | from github using; |
51 | 54 |
|
52 | 55 | ``` |
53 | | -pip install --user git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git |
| 56 | +pip install --user git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git |
54 | 57 | ``` |
55 | 58 |
|
56 | 59 | If you want to install for the whole system rather than just the current user, |
57 | 60 | you need to remove the `--user` argument and run as sudo like so; |
58 | 61 |
|
59 | 62 | ``` |
60 | | -sudo pip install git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git |
| 63 | +sudo pip install git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git |
61 | 64 | ``` |
62 | 65 |
|
63 | 66 | You can install a specific revision of the repository using; |
64 | 67 | ``` |
65 | | -pip install --user git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git@<tag> |
66 | | -pip install --user git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git@<branch> |
67 | | -pip install --user git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git@<hash> |
| 68 | +pip install --user git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git@<tag> |
| 69 | +pip install --user git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git@<branch> |
| 70 | +pip install --user git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git@<hash> |
68 | 71 | ``` |
69 | 72 |
|
70 | 73 | ### With `requirements.txt` file |
71 | 74 |
|
72 | 75 | Add to your Python `requirements.txt` file using; |
73 | 76 | ``` |
74 | | --e git+https://github.com/litex-hub/litex-data-cpu-vexriscv.git |
| 77 | +-e git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git |
75 | 78 | ``` |
76 | 79 |
|
77 | 80 | To use a specific revision of the repository, use the following; |
78 | 81 | ``` |
79 | | --e https://github.com/litex-hub/litex-data-cpu-vexriscv.git@<hash> |
| 82 | +-e https://github.com/litex-hub/pythondata-cpu-vexriscv.git@<hash> |
| 83 | +``` |
| 84 | + |
| 85 | +## Installing from [PyPi](https://pypi.org/project/pythondata-cpu-vexriscv/) |
| 86 | + |
| 87 | +## Using [pip](https://pip.pypa.io/) |
| 88 | + |
| 89 | +``` |
| 90 | +pip install --user pythondata-cpu-vexriscv |
80 | 91 | ``` |
0 commit comments