如何模拟RISCV Rocket芯片

How to simulate the RISCV Rocket chip

我们根据riscv-gcc编译器生成了二进制文件。该二进制文件数据通过该信号馈送到火箭芯片。 io_host_in_valid,输入[15:0]io_host_in_bits

这里io_host_in_bits是16位的,所以我们在little-Endian模式下为每个指令数据驱动2次。 我们没有收到来自 Rocket core (HTIF) 的任何回应。 如何模拟 Rocket 核心,是否可以在 Xilinx Vivado 2014 中模拟以及调试设计。 谁能帮我解决这个问题

此致, 桑托什·库马尔。

有关 Rocket Chip 基础设施的更多信息,我建议查看第一个 RISC-V Bootcamp 的幻灯片和视频。

Rocket Chip 可以 simulated/debugged 两种不同的方式:C 模拟器和 Verilog。有关使用这些模式的信息,请参阅 Rocket Chip README

Yunsup 在 riscv-hw 邮件列表上的回复:

I would take a look at http://riscv.org/tutorial-hpca2015/riscv-rocket-chip-generator-tutorial-hpca2015.pdf for an overview of interfaces and the FPGA setup.

Here’s a link to our test bench we use to test the rocket chip: https://github.com/ucb-bar/rocket-chip/blob/master/vsrc/rocketTestHarness.v. I would take a look at the htif_tick function, where the implementation can be found here at https://github.com/ucb-bar/rocket-chip/blob/master/csrc/vcs_main.cc, which calls a method on htif_emulator_t (https://github.com/ucb-bar/rocket-chip/blob/master/csrc/htif_emulator.h), which is inherited from htif_pthread_t (https://github.com/riscv/riscv-fesvr/blob/master/fesvr/htif_pthread.cc). You should also take a look at https://github.com/riscv/riscv-fesvr/blob/master/fesvr/htif.cc.

The host interface (HostIO) doesn’t take instructions directly, it’s a port for the front-end server (https://github.com/riscv/riscv-fesvr/tree/master/fesvr) to access target memory and the core’s control and status registers (CSR).