chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

IBex on VCU118 is not working (Probably bootrom issue)

Open ksungkeun84 opened this issue 9 months ago • 0 comments

Background Work

Chipyard Version and Hash

Release: 1.5.0 Hash: a6a6a6

OS Setup

Ex: Output of uname -a + lsb_release -a + printenv + conda list

Other Setup

Ex: Prior steps taken / Documentation Followed / etc...

Create a config for Ibex on VCU118 as follows:

class IbexVCU118Config extends Config(
  new WithVCU118Tweaks ++
  new IbexConfig
)

Current Behavior

Bitstream is generated with no issue. However, when I flash the bitstream, messages from the bootrom (e.g., CMD and LOADING ... PAYLOAD_SIZE_B) are not printed on the screen.

Expected Behavior

At least the bootrom should work properly.

Other Information

I noticed that the makefile of the bootroom (fpga/src/main/resources/vcu118/sdboot/Makefile b/fpga/src/main/resources/vcu118/sdboot/Makefile) hardcoded to build bootrom image for march=rv64ima. Even if I fixed it myself as follows, it still does not work.

diff --git a/fpga/src/main/resources/vcu118/sdboot/Makefile b/fpga/src/main/resources/vcu118/sdboot/Makefile
index e463612..844401f 100644
--- a/fpga/src/main/resources/vcu118/sdboot/Makefile
+++ b/fpga/src/main/resources/vcu118/sdboot/Makefile
@@ -1,12 +1,11 @@
 # RISCV environment variable must be set
 ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
 BUILD_DIR := $(ROOT_DIR)/build
-
 CC=$(RISCV)/bin/riscv64-unknown-elf-gcc
 OBJCOPY=$(RISCV)/bin/riscv64-unknown-elf-objcopy
 OBJDUMP=$(RISCV)/bin/riscv64-unknown-elf-objdump
-CFLAGS=-march=rv64ima -mcmodel=medany -O2 -std=gnu11 -Wall -nostartfiles
-CFLAGS+= -fno-common -g -DENTROPY=0 -mabi=lp64 -DNONSMP_HART=0
+CFLAGS=-march=rv32ma -mcmodel=medany -O2 -std=gnu11 -Wall -nostartfiles
+CFLAGS+= -fno-common -g -DENTROPY=0 -mabi=ilp32 -DNONSMP_HART=0
 CFLAGS+= -I $(ROOT_DIR)/include -I.
 LFLAGS=-static -nostdlib -L $(ROOT_DIR)/linker -T sdboot.elf.lds

From Ibex wrapping code, I also noticed that the chipyard supports for only simulation (correct me if I'm wrong). I'm willing to contribute to make Ibex available on VCU118 with a little help from someone who are farmilar with this kind of issue :D

ksungkeun84 avatar Apr 30 '24 09:04 ksungkeun84