10924a423SVijai Kumar KShakti C Reference Platform (``shakti_c``) 20924a423SVijai Kumar K========================================== 30924a423SVijai Kumar K 40924a423SVijai Kumar KShakti C Reference Platform is a reference platform based on arty a7 100t 50924a423SVijai Kumar Kfor the Shakti SoC. 60924a423SVijai Kumar K 70924a423SVijai Kumar KShakti SoC is a SoC based on the Shakti C-class processor core. Shakti C 80924a423SVijai Kumar Kis a 64bit RV64GCSUN processor core. 90924a423SVijai Kumar K 100924a423SVijai Kumar KFor more details on Shakti SoC, please see: 110924a423SVijai Kumar Khttps://gitlab.com/shaktiproject/cores/shakti-soc/-/blob/master/fpga/boards/artya7-100t/c-class/README.rst 120924a423SVijai Kumar K 130924a423SVijai Kumar KFor more info on the Shakti C-class core, please see: 140924a423SVijai Kumar Khttps://c-class.readthedocs.io/en/latest/ 150924a423SVijai Kumar K 160924a423SVijai Kumar KSupported devices 170924a423SVijai Kumar K----------------- 180924a423SVijai Kumar K 190924a423SVijai Kumar KThe ``shakti_c`` machine supports the following devices: 200924a423SVijai Kumar K 210924a423SVijai Kumar K * 1 C-class core 220924a423SVijai Kumar K * Core Level Interruptor (CLINT) 230924a423SVijai Kumar K * Platform-Level Interrupt Controller (PLIC) 240924a423SVijai Kumar K * 1 UART 250924a423SVijai Kumar K 260924a423SVijai Kumar KBoot options 270924a423SVijai Kumar K------------ 280924a423SVijai Kumar K 290924a423SVijai Kumar KThe ``shakti_c`` machine can start using the standard -bios 300924a423SVijai Kumar Kfunctionality for loading the baremetal application or opensbi. 310924a423SVijai Kumar K 320924a423SVijai Kumar KBoot the machine 330924a423SVijai Kumar K---------------- 340924a423SVijai Kumar K 350924a423SVijai Kumar KShakti SDK 360924a423SVijai Kumar K~~~~~~~~~~ 370924a423SVijai Kumar KShakti SDK can be used to generate the baremetal example UART applications. 380924a423SVijai Kumar K 390924a423SVijai Kumar K.. code-block:: bash 400924a423SVijai Kumar K 410924a423SVijai Kumar K $ git clone https://gitlab.com/behindbytes/shakti-sdk.git 420924a423SVijai Kumar K $ cd shakti-sdk 430924a423SVijai Kumar K $ make software PROGRAM=loopback TARGET=artix7_100t 440924a423SVijai Kumar K 450924a423SVijai Kumar KBinary would be generated in: 460924a423SVijai Kumar K software/examples/uart_applns/loopback/output/loopback.shakti 470924a423SVijai Kumar K 48*b980c1aeSStefan WeilYou could also download the precompiled example applications using below 490924a423SVijai Kumar Kcommands. 500924a423SVijai Kumar K 510924a423SVijai Kumar K.. code-block:: bash 520924a423SVijai Kumar K 530924a423SVijai Kumar K $ wget -c https://gitlab.com/behindbytes/shakti-binaries/-/raw/master/sdk/shakti_sdk_qemu.zip 540924a423SVijai Kumar K $ unzip shakti_sdk_qemu.zip 550924a423SVijai Kumar K 560924a423SVijai Kumar KThen we can run the UART example using: 570924a423SVijai Kumar K 580924a423SVijai Kumar K.. code-block:: bash 590924a423SVijai Kumar K 600924a423SVijai Kumar K $ qemu-system-riscv64 -M shakti_c -nographic \ 610924a423SVijai Kumar K -bios path/to/shakti_sdk_qemu/loopback.shakti 620924a423SVijai Kumar K 630924a423SVijai Kumar KOpenSBI 640924a423SVijai Kumar K~~~~~~~ 650924a423SVijai Kumar KWe can also run OpenSBI with Test Payload. 660924a423SVijai Kumar K 670924a423SVijai Kumar K.. code-block:: bash 680924a423SVijai Kumar K 690924a423SVijai Kumar K $ git clone https://github.com/riscv/opensbi.git -b v0.9 700924a423SVijai Kumar K $ cd opensbi 710924a423SVijai Kumar K $ wget -c https://gitlab.com/behindbytes/shakti-binaries/-/raw/master/dts/shakti.dtb 720924a423SVijai Kumar K $ export CROSS_COMPILE=riscv64-unknown-elf- 730924a423SVijai Kumar K $ export FW_FDT_PATH=./shakti.dtb 740924a423SVijai Kumar K $ make PLATFORM=generic 750924a423SVijai Kumar K 760924a423SVijai Kumar Kfw_payload.elf would be generated in build/platform/generic/firmware/fw_payload.elf. 770924a423SVijai Kumar KBoot it using the below qemu command. 780924a423SVijai Kumar K 790924a423SVijai Kumar K.. code-block:: bash 800924a423SVijai Kumar K 810924a423SVijai Kumar K $ qemu-system-riscv64 -M shakti_c -nographic \ 820924a423SVijai Kumar K -bios path/to/fw_payload.elf 83