In this post, we will see how to resolve how to load a 32-bit constant starting at memory address 0x300 Question: I have to store the hex 0x1234ABCD into a register s0 that starts at memory address 0x300? I expect ...
In this post, we will see how to resolve What does RISC-V do on PC overflow? Question: What happens on a RISC-V CPU when the program counter (PC) overflows? For example, what happens on RV32G IALIGN = 32 after a (32-bit) ...
In this post, we will see how to resolve Local initialized array in riscv Question: I have a c program that comes below: I also wrote a startup file by myself and compile them using risc-v compiler by the following ...
In this post, we will see how to resolve How to build a Rust program for riscv64gc-unknown-linux-musl? Question: I’m trying to cross-compile a Rust program for the tier 3 platform riscv64gc-unknown-linux-musl, but am running into problems, I believe either with ...
In this post, we will see how to resolve How can instructions such as the RISC-V auipc work when the FW image is to be placed at some random address? Question: The RISC-V instruction auipc does rd = (imm << ...
In this post, we will see how to resolve Ramp of lanes <= 1 exception when cross-compile Halide for RISC-V Question: Tried this tutorial https://halide-lang.org/tutorials/tutorial_lesson_11_cross_compilation.html on x86 host machine (Ubuntu 20.04) but for RISC-V target architecture. Unfortunately, there is an ...
In this post, we will see how to resolve How to calculate the maximum range of BEQ instruction in risc-V? Question: In risc-v, beq instruction has 12bits of imm[12:1]. And PC-relative addressing is Target address = PC + immediate x ...
In this post, we will see how to resolve is there any use of __attribute__ ((interrupt)) for riscv compilers? Question: we can read here that the interrupt attribute keyword is use for ARM, AVR, CR16, Epiphany, M32C, M32R/D, m68k, MeP, ...
Question: I am trying to divide a float to a word every time I try to run it an error pops up mentioning Too few or incorrectly formatted operands. Expected: fmul.d f1, f2, f3, dyn Answer: You’ll need to first ...
Question: I followed the MMIO Peripherals page from the Chipyard documentation to learn about adding modules to rocket-chip within Chipyard framework – and all that seems to have worked pretty well. I summed up my experiences and tried to write ...