# RISC-V

**URL:** https://forums.sifive.com/c/archive/riscv/5.md

[Latest](https://forums.sifive.com/latest.md) · [Categories](https://forums.sifive.com/categories.md)

---

## [About the RISC-V category](https://forums.sifive.com/t/about-the-risc-v-category/17)

<div class="topic-metadata">

**Author:** [@phil.dworsky](https://forums.sifive.com/u/phil.dworsky)\
**Replies:** 0\
**Last updated:** [November 11, 2020, 8:00am UTC](https://forums.sifive.com/t/about-the-risc-v-category/17 "2020-11-11T08:00:00Z")

</div>

\*\*\* NOTICE: SiFive Forums are evolving \*\*\* NOTE: THIS FORUM HAS BEEN MADE READ-ONLY AS OF Nov 16, 2020. Please move the RISC-V discussion to https://riscv.org/technical/technical-forums Thank you for participating in…

---

## [Linux perf tool support](https://forums.sifive.com/t/linux-perf-tool-support/3926)

<div class="topic-metadata">

**Author:** [@thearni](https://forums.sifive.com/u/thearni)\
**Replies:** 2\
**Last updated:** [November 12, 2020, 4:57pm UTC](https://forums.sifive.com/t/linux-perf-tool-support/3926 "2020-11-12T16:57:48Z")

</div>

Hello, I was wondering if any of you would know about the progress regarding the support for the perf tool in RiscV. After installing the latest Linux kernel and the perf command line tool (that was on a HiFive Unleashe…

---

## [THIS "RISC-V" CATEGORY WILL BE MADE READ-ONLY AFTER Nov 15, 2020](https://forums.sifive.com/t/this-risc-v-category-will-be-made-read-only-after-nov-15-2020/4195)

<div class="topic-metadata">

**Author:** [@phil.dworsky](https://forums.sifive.com/u/phil.dworsky)\
**Replies:** 0\
**Last updated:** [November 11, 2020, 9:39pm UTC](https://forums.sifive.com/t/this-risc-v-category-will-be-made-read-only-after-nov-15-2020/4195 "2020-11-11T21:39:55Z")

</div>

\*\*\* NOTICE: SiFive Forums are evolving \*\*\* NOTE: THIS FORUM WILL BE MADE READ-ONLY Nov 15, 2020. Please move the discussion to https://riscv.org/technical/technical-forums Thank you for participating in the RISC-V co…

---

## [\[Synth 8-439\] module 'BootROM' not found](https://forums.sifive.com/t/synth-8-439-module-bootrom-not-found/4189)

<div class="topic-metadata">

**Author:** [@shiping](https://forums.sifive.com/u/shiping)\
**Replies:** 0\
**Last updated:** [November 10, 2020, 10:05pm UTC](https://forums.sifive.com/t/synth-8-439-module-bootrom-not-found/4189 "2020-11-10T22:05:10Z")

</div>

Hi, experts, I am trying to build arty\_a7\_100\_risc\_v image following the instruction here: Running a RISC-V Processor on the Arty A7 I am able to build riscv tool chain and passed verilog build.But I met error on last…

---

## [LINK ERROR: relocation truncated to fit: R\_RISCV\_JAL against symbol](https://forums.sifive.com/t/link-error-relocation-truncated-to-fit-r-riscv-jal-against-symbol/4163)

<div class="topic-metadata">

**Author:** [@Remember](https://forums.sifive.com/u/Remember)\
**Replies:** 6\
**Last updated:** [November 10, 2020, 6:28am UTC](https://forums.sifive.com/t/link-error-relocation-truncated-to-fit-r-riscv-jal-against-symbol/4163 "2020-11-10T06:28:42Z")

</div>

Toolchain Version: riscv-none-embed-gcc-xpack v8.3.0-2.3, where the individual components’ versions are as follows: BINUTILS\_GIT\_BRANCH=${BINUTILS\_GIT\_BRANCH:-"sifive-binutils-2.32-cache-control-patch-xpack"} if \[…

---

## [QEMU config file not found in Freedom Studio](https://forums.sifive.com/t/qemu-config-file-not-found-in-freedom-studio/4167)

<div class="topic-metadata">

**Author:** [@cbirchallroman](https://forums.sifive.com/u/cbirchallroman)\
**Replies:** 0\
**Last updated:** [November 4, 2020, 2:29am UTC](https://forums.sifive.com/t/qemu-config-file-not-found-in-freedom-studio/4167 "2020-11-04T02:29:08Z")

</div>

I receive the following error when I try to debug a program in Freedom Studio using the QEMU configuration: C:\\\[...\]\\freedomstudio\\SiFive\\riscv-qemu-4.2.0-2020.04.0\\bin\\qemu-system-riscv64.exe: -readconfig bsp\\qemu-sifi…

---

## [Running program which has custom instruction in SPIKE simulator results error](https://forums.sifive.com/t/running-program-which-has-custom-instruction-in-spike-simulator-results-error/4158)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 1\
**Last updated:** [November 2, 2020, 2:38pm UTC](https://forums.sifive.com/t/running-program-which-has-custom-instruction-in-spike-simulator-results-error/4158 "2020-11-02T14:38:07Z")

</div>

Hi, Currently i could successfully add a custom instruction to my gnu assembler and able to reproduce object file which has my new instruction “mod” which has opcode "02e787eb " . Now i also added same custom instructi…

---

## [Information on Coreplex IP Access](https://forums.sifive.com/t/information-on-coreplex-ip-access/105)

<div class="topic-metadata">

**Author:** [@dsb](https://forums.sifive.com/u/dsb)\
**Replies:** 8\
**Last updated:** [September 4, 2020, 8:54am UTC](https://forums.sifive.com/t/information-on-coreplex-ip-access/105 "2020-09-04T08:54:35Z")

</div>

Hi Sir/Madam, I have searched through the Coreplex series documentation available on dev.sifive.com I wanted to find out if Verilog of Coreplex is available for developers to prototype and build. If yes, please poin…

---

## [SoC based in· E24 Core](https://forums.sifive.com/t/soc-based-in-e24-core/4125)

<div class="topic-metadata">

**Author:** [@pablo1997](https://forums.sifive.com/u/pablo1997)\
**Replies:** 0\
**Last updated:** [October 21, 2020, 9:46am UTC](https://forums.sifive.com/t/soc-based-in-e24-core/4125 "2020-10-21T09:46:32Z")

</div>

Hi, I would like to know if it is possible to develope a basic SoC based in a SiFiveE24 with the rtl code? I would like to do it, adding it as a rtl module to a Vivado block design. Thanks

---

## [How sltiu instruction compares negative value?](https://forums.sifive.com/t/how-sltiu-instruction-compares-negative-value/4109)

<div class="topic-metadata">

**Author:** [@bsvtgc](https://forums.sifive.com/u/bsvtgc)\
**Replies:** 2\
**Last updated:** [October 15, 2020, 1:56am UTC](https://forums.sifive.com/t/how-sltiu-instruction-compares-negative-value/4109 "2020-10-15T01:56:53Z")

</div>

sltiu t1, t0, -6; Will this instruction compare if t0 \< 6 (absolute value) or will it compare if t0 \< 0xfffffffa (ignoring sign) ?

---

## [User Mode Syscall](https://forums.sifive.com/t/user-mode-syscall/4106)

<div class="topic-metadata">

**Author:** [@dkhayes117](https://forums.sifive.com/u/dkhayes117)\
**Replies:** 1\
**Last updated:** [October 14, 2020, 8:27pm UTC](https://forums.sifive.com/t/user-mode-syscall/4106 "2020-10-14T20:27:58Z")

</div>

I’ve got a rough idea on how to implement a syscall for using while in user mode, but I’m not 100% sure. I plan on using a public function syscall() which will do… 1. save all of the cpu registers by pushing them ont…

---

## [Riscv-gnu-toolchain build problem while adding custom instruction](https://forums.sifive.com/t/riscv-gnu-toolchain-build-problem-while-adding-custom-instruction/4100)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 1\
**Last updated:** [October 12, 2020, 5:02pm UTC](https://forums.sifive.com/t/riscv-gnu-toolchain-build-problem-while-adding-custom-instruction/4100 "2020-10-12T17:02:46Z")

</div>

HI, I tried adding one custom instruction to existing riscv-gnu-toolchain. Below are the steps i followed. I basically want to add instruction ‘mod’(modulus) New instruction called 'mod is added to the existing riscv\_…

---

## [Neep Help with Assembly](https://forums.sifive.com/t/neep-help-with-assembly/4084)

<div class="topic-metadata">

**Author:** [@dkhayes117](https://forums.sifive.com/u/dkhayes117)\
**Replies:** 19\
**Last updated:** [October 8, 2020, 9:18am UTC](https://forums.sifive.com/t/neep-help-with-assembly/4084 "2020-10-08T09:18:02Z")

</div>

I’m using this bit of inline assembly in my rust code to enter user mode. The program traps at this point with mcause of 0x1 which is instruction access fault. I read MTVAL, but I’m not sure it is from the trap or jus…

---

## [Error in Building riscv-openocd](https://forums.sifive.com/t/error-in-building-riscv-openocd/4035)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 2\
**Last updated:** [October 7, 2020, 8:30am UTC](https://forums.sifive.com/t/error-in-building-riscv-openocd/4035 "2020-10-07T08:30:21Z")

</div>

Hi, I am trying to build riscv-openocd (which is the debugger) from the repository . I got below error. /opt/riscv-tools/riscv-tools/riscv-openocd/build/jimtcl/…/…/jimtcl/jim-aio.c:2070: undefined reference to \`openpty…

---

## [OpenVX core framework](https://forums.sifive.com/t/openvx-core-framework/4090)

<div class="topic-metadata">

**Author:** [@sateeshg](https://forums.sifive.com/u/sateeshg)\
**Replies:** 0\
**Last updated:** [October 7, 2020, 7:53am UTC](https://forums.sifive.com/t/openvx-core-framework/4090 "2020-10-07T07:53:39Z")

</div>

Please provide required compiler/build option settings for OpenVX libraries for RISC-V on Yocto Linux. OpenVX base toolchain comes with CMake configured makefiles for build set-up. Does Yocto linux automatically convert …

---

## [Changing linkerscript from meta.default.lds to meta.sratchpad.lds](https://forums.sifive.com/t/changing-linkerscript-from-meta-default-lds-to-meta-sratchpad-lds/4068)

<div class="topic-metadata">

**Author:** [@vndao](https://forums.sifive.com/u/vndao)\
**Replies:** 2\
**Last updated:** [October 5, 2020, 7:18am UTC](https://forums.sifive.com/t/changing-linkerscript-from-meta-default-lds-to-meta-sratchpad-lds/4068 "2020-10-05T07:18:38Z")

</div>

Hi, I am trying to run hello world application on QEMU with target qemu-sifive-e31 with 1 modification: instead of using linker script meta.default.lds, i am pointing it to meta.scratchpad.lds. The reason is I want to b…

---

## [Online course recommendation](https://forums.sifive.com/t/online-course-recommendation/4074)

<div class="topic-metadata">

**Author:** [@roichen2](https://forums.sifive.com/u/roichen2)\
**Replies:** 2\
**Last updated:** [October 1, 2020, 9:32pm UTC](https://forums.sifive.com/t/online-course-recommendation/4074 "2020-10-01T21:32:14Z")

</div>

Hi, I’m looing for an online course for a group of Firmware engineers that currently develop on ARM Cortex M4 and going to start new project with Si-Five CPU based on RISC-V. What it the best online course for RISC-V …

---

## [IDE for developing RISCV program](https://forums.sifive.com/t/ide-for-developing-riscv-program/4047)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 4\
**Last updated:** [September 25, 2020, 4:32pm UTC](https://forums.sifive.com/t/ide-for-developing-riscv-program/4047 "2020-09-25T16:32:34Z")

</div>

Hi, I am looking for any IDE to develop small application to compile and run with RISCV-toolchain (compiler and simulator). Any recommended IDE for this? basically i will configure riscv-gnu-toolchain on this IDE and w…

---

## ["impossible constraint in 'asm'" error when adding single-precision hard-float 'sqrt'](https://forums.sifive.com/t/impossible-constraint-in-asm-error-when-adding-single-precision-hard-float-sqrt/4063)

<div class="topic-metadata">

**Author:** [@Remember](https://forums.sifive.com/u/Remember)\
**Replies:** 4\
**Last updated:** [September 25, 2020, 9:20am UTC](https://forums.sifive.com/t/impossible-constraint-in-asm-error-when-adding-single-precision-hard-float-sqrt/4063 "2020-09-25T09:20:48Z")

</div>

I want to use the single-precision hard-float sqrt instruction as my FPU supports sqrt operation, and I made some changes to Newlib: Create a new C file named ef\_sqrt.c under newlib/libm/machine/riscv . The con…

---

## [Strange error while running riscv spike pk](https://forums.sifive.com/t/strange-error-while-running-riscv-spike-pk/4045)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 5:49pm UTC](https://forums.sifive.com/t/strange-error-while-running-riscv-spike-pk/4045 "2020-09-18T17:49:40Z")

</div>

Hi, I have build spike simulator along with pk. Sometimes when i run a program compiled with riscv32-unknown-elf i get this error spike: …/fesvr/elfloader.cc:28: std::map\<std::\_\_cxx11::basic\_string, long unsigned int\> …

---

## [Can anyone tell me the meaning of this log which spike generates?](https://forums.sifive.com/t/can-anyone-tell-me-the-meaning-of-this-log-which-spike-generates/4011)

<div class="topic-metadata">

**Author:** [@123456789](https://forums.sifive.com/u/123456789)\
**Replies:** 10\
**Last updated:** [September 17, 2020, 1:22am UTC](https://forums.sifive.com/t/can-anyone-tell-me-the-meaning-of-this-log-which-spike-generates/4011 "2020-09-17T01:22:30Z")

</div>

I try to use spike to simulate risc-v. I generate a log of execution by enter spike -l pk test.riscv. The log is as follows: : core 0: 0x0000000000001000 (0x00000297) auipc t0, 0x0 : core 0: 0x0000000000001004 …

---

## [Adding custom instruction to RISCV toolchain](https://forums.sifive.com/t/adding-custom-instruction-to-riscv-toolchain/4044)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 1\
**Last updated:** [September 16, 2020, 4:36pm UTC](https://forums.sifive.com/t/adding-custom-instruction-to-riscv-toolchain/4044 "2020-09-16T16:36:44Z")

</div>

Hi, I want to add one custom instruction to RISCV compiler and assembler, so that when i compile my c program, the compiler can emit this custom instruction. Is it easy to add a custom instruction ? can u send some ex…

---

## [Difference between RISCV SPIKE simulator and GNU simulator](https://forums.sifive.com/t/difference-between-riscv-spike-simulator-and-gnu-simulator/4043)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 1\
**Last updated:** [September 16, 2020, 3:51pm UTC](https://forums.sifive.com/t/difference-between-riscv-spike-simulator-and-gnu-simulator/4043 "2020-09-16T15:51:48Z")

</div>

Hi, When i build riscv-gnu-toolchain, it created one binary with name riscv32-unknown-elf-run. Is this GNU simulator? I saw that i could easily run a c program which is built using riscv32-unknown-elf-gcc on this simul…

---

## [Riscv-gnu-toolchain build error](https://forums.sifive.com/t/riscv-gnu-toolchain-build-error/3919)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 14\
**Last updated:** [September 10, 2020, 12:59pm UTC](https://forums.sifive.com/t/riscv-gnu-toolchain-build-error/3919 "2020-09-10T12:59:25Z")

</div>

Hi, I am trying to build riscv-gnu-toolchain repository. I am getting this strange error when i do sudo make . make -C build-binutils-newlib make\[1\]: Entering directory ‘/mnt/c/UserData/RISCV/repositories/riscv-gnu-to…

---

## [Building RISCV SPIKE simulator for windows](https://forums.sifive.com/t/building-riscv-spike-simulator-for-windows/4029)

<div class="topic-metadata">

**Author:** [@hegdemur](https://forums.sifive.com/u/hegdemur)\
**Replies:** 3\
**Last updated:** [September 10, 2020, 2:16am UTC](https://forums.sifive.com/t/building-riscv-spike-simulator-for-windows/4029 "2020-09-10T02:16:00Z")

</div>

Hi, Anybody knows if i can build RISCV simulator SPIKE and Proxy kernel(PK) for windows (using MINGW or CYGWIN). I could build them with linux binaries in WSL Ubuntu. But any chance that i can also build them with wind…

---

## [Doubts about branch Boom prediction decoding](https://forums.sifive.com/t/doubts-about-branch-boom-prediction-decoding/4020)

<div class="topic-metadata">

**Author:** [@123456789](https://forums.sifive.com/u/123456789)\
**Replies:** 4\
**Last updated:** [September 3, 2020, 2:11pm UTC](https://forums.sifive.com/t/doubts-about-branch-boom-prediction-decoding/4020 "2020-09-03T14:11:02Z")

</div>

According to the riscv manual, ret and call are two pseudo instructions respectively. ret is jalr, x0, x1, 0. call is {auipc x1, offset\[31:12\]; jalr x1, x1, offset\[11:0\]}. In this link boom decode， use the following c…

---

## [Is Risc-V CPUs made to be a replacement to Intel/AMD 64bit CPUs?](https://forums.sifive.com/t/is-risc-v-cpus-made-to-be-a-replacement-to-intel-amd-64bit-cpus/4016)

<div class="topic-metadata">

**Author:** [@unix\_man](https://forums.sifive.com/u/unix_man)\
**Replies:** 4\
**Last updated:** [September 2, 2020, 12:47am UTC](https://forums.sifive.com/t/is-risc-v-cpus-made-to-be-a-replacement-to-intel-amd-64bit-cpus/4016 "2020-09-02T00:47:20Z")

</div>

I am curious to know is this architecture capable of being as fast as Intel/AMD 64bit CPUs?

---

## [HiFive1RevB not updating FreedomStudio Variable Pane](https://forums.sifive.com/t/hifive1revb-not-updating-freedomstudio-variable-pane/4018)

<div class="topic-metadata">

**Author:** [@cinlyooi](https://forums.sifive.com/u/cinlyooi)\
**Replies:** 0\
**Last updated:** [September 1, 2020, 10:59am UTC](https://forums.sifive.com/t/hifive1revb-not-updating-freedomstudio-variable-pane/4018 "2020-09-01T10:59:31Z")

</div>

Hi, I downloaded a copy of working OpenOCD and managed to get it to work with FreedomStudio to communicate with HiFive1 RevB. The “Debug” configuration is doing well in that is respecting breakpoint instruction and “Ste…

---

## [Single stepping with RTOS](https://forums.sifive.com/t/single-stepping-with-rtos/4012)

<div class="topic-metadata">

**Author:** [@amirgon](https://forums.sifive.com/u/amirgon)\
**Replies:** 0\
**Last updated:** [August 31, 2020, 3:49pm UTC](https://forums.sifive.com/t/single-stepping-with-rtos/4012 "2020-08-31T15:49:58Z")

</div>

I’m running FreeRTOS application on RV32 Spike simulation. I’m debugging it with openocd and gdb. Setting breakpoints and resuming in gdb works fine. The problem is single step. When trying to single step, the timer i…

---

## [Building kernel natively on u540](https://forums.sifive.com/t/building-kernel-natively-on-u540/3894)

<div class="topic-metadata">

**Author:** [@talnikarpankaj](https://forums.sifive.com/u/talnikarpankaj)\
**Replies:** 1\
**Last updated:** [August 29, 2020, 6:50pm UTC](https://forums.sifive.com/t/building-kernel-natively-on-u540/3894 "2020-08-29T18:50:16Z")

</div>

Hi , I am trying to replace my existing kernel image which is 5.5.6 built using openembedded-core to the 5.7.2 by building it natively. i have tried to build the kernel 5.7.2 natively,i was able to build the kernel suc…

[Next page](https://forums.sifive.com/c/archive/riscv/5.md?page=1)
