blob: fea57f7b6ba0c990e7e07447929a3a21f4d4828c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
Shakti C Reference Platform (``shakti_c``)
==========================================
Shakti C Reference Platform is a reference platform based on arty a7 100t
for the Shakti SoC.
Shakti SoC is a SoC based on the Shakti C-class processor core. Shakti C
is a 64bit RV64GCSUN processor core.
For more details on Shakti SoC, please see:
https://gitlab.com/shaktiproject/cores/shakti-soc/-/blob/master/fpga/boards/artya7-100t/c-class/README.rst
For more info on the Shakti C-class core, please see:
https://c-class.readthedocs.io/en/latest/
Supported devices
-----------------
The ``shakti_c`` machine supports the following devices:
* 1 C-class core
* Core Level Interruptor (CLINT)
* Platform-Level Interrupt Controller (PLIC)
* 1 UART
Boot options
------------
The ``shakti_c`` machine can start using the standard -bios
functionality for loading the baremetal application or opensbi.
Boot the machine
----------------
Shakti SDK
~~~~~~~~~~
Shakti SDK can be used to generate the baremetal example UART applications.
.. code-block:: bash
$ git clone https://gitlab.com/behindbytes/shakti-sdk.git
$ cd shakti-sdk
$ make software PROGRAM=loopback TARGET=artix7_100t
Binary would be generated in:
software/examples/uart_applns/loopback/output/loopback.shakti
You could also download the precompiled example applications using below
commands.
.. code-block:: bash
$ wget -c https://gitlab.com/behindbytes/shakti-binaries/-/raw/master/sdk/shakti_sdk_qemu.zip
$ unzip shakti_sdk_qemu.zip
Then we can run the UART example using:
.. code-block:: bash
$ qemu-system-riscv64 -M shakti_c -nographic \
-bios path/to/shakti_sdk_qemu/loopback.shakti
OpenSBI
~~~~~~~
We can also run OpenSBI with Test Payload.
.. code-block:: bash
$ git clone https://github.com/riscv/opensbi.git -b v0.9
$ cd opensbi
$ wget -c https://gitlab.com/behindbytes/shakti-binaries/-/raw/master/dts/shakti.dtb
$ export CROSS_COMPILE=riscv64-unknown-elf-
$ export FW_FDT_PATH=./shakti.dtb
$ make PLATFORM=generic
fw_payload.elf would be generated in build/platform/generic/firmware/fw_payload.elf.
Boot it using the below qemu command.
.. code-block:: bash
$ qemu-system-riscv64 -M shakti_c -nographic \
-bios path/to/fw_payload.elf
|