Re:Programming with RISC-V Vector Instructions
by fulafel on Friday August 07, 2020 @07:35AM
(#24080785)
Nitpick: printf is is a libc call.
Re:Programming with RISC-V Vector Instructions
by brucehoult on Friday August 07, 2020 @07:36PM
(#24087543)
... and that libc code (usually NewLib[nano]) formats a buffer then calls write(2), which pk provides.
If you're simulating actual hardware, e.g., a Verilog description of a RISC-V microprocessor compiled to a cycle-accurate simulation with Verilator, your simulation rate is going to be ~10KHz. You can write useful tests with the Proxy Kernel (or something like it) that run in ~1 million instructions (minutes of wall clock time) while still getting full system calls like printf. However, booting Linux is out of the question (days of wall clock time). Running bare metal is useful, too, but you don't have system calls there.
If you're doing fast RISC-V virtualization, like on QEMU, or doing emulation on an FPGA, you're running at >1MHz and running a "normal kernel" like Linux is totally tractable. However, it would be foolhardy to expect to jump from hardware design to immediately booting Linux.