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