Skip to content

Unable to simulate loader chain binaries (zsl.rom.elf, fw_payload.bin, linux.vcu128.gpt.bin) #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
HepoH3 opened this issue May 29, 2025 · 0 comments

Comments

@HepoH3
Copy link
Contributor

HepoH3 commented May 29, 2025

Description

I'm exploring the Cheshire simulation environment and successfully ran the helloworld.spm.elf example. However, when I attempt to simulate any of the loader‐chain binaries (e.g. zsl.rom.elf, fw_payload.elf, fw_payload.bin, linux.vcu128.gpt.bin), the simulation fails with different errors.

I suspect I might be misconfiguring environment variables or misunderstanding the expected boot modes.

Environment

  • Project version: v0.3.0 tag
  • Simulator: QuestaSim (version 2024.1)
  • Binaries under test:
    • zsl.rom.elf
    • fw_payload.elf / fw_payload.bin (OpenSBI + U‑Boot)
    • linux.vcu128.gpt.bin (full SD‑card image)

Steps to Reproduce

cd to target/sim/vsim folder
start vsim
# set BOOTMODE, PRELMODE, BINARY/IMAGE variables
source start.cheshire_soc.tcl
run -all

Variables values to simulate zsl.rom.elf via JTAG:

set BOOTMODE 0
set PRELMODE 0
set BINARY path/to/zsl.rom.elf

Variables values to simulate fw_payload.bin from SD‑card image:

set BOOTMODE 1
set IMAGE path/to/fw_payload.bin

Variables values to simulate fw_payload.elf via JTAG:

set BOOTMODE 0
set PRELMODE 0
set BINARY path/to/fw_payload.elf

Variables values to simulate Linux from SD‑card image:

set BOOTMODE 1
set IMAGE path/to/linux.vcu128.gpt.bin

Observed Behavior

  • zsl.rom.elf:

    [ELF] INFO: Entrypoint at 0x10000000
    [ELF] WARNING: Section at 0x0 has 16 zero bytes not preloaded.
    # [TRACER] Output filename is: trace_hart_0.log
    # [JTAG] Initialization success
    # [JTAG] Wait for LLC configuration
    # [JTAG] Halted hart 0
    # [JTAG] Preloading ELF binary: ../../../sw/boot/zsl.rom.elf
    # [JTAG] Preloading section at 0x0000000000000000 (7328 bytes)
    # [JTAG] - 512/7328 bytes (6%)
    # ** Fatal: [JTAG] Abstract command error!
    
  • fw_payload.bin & linux.vcu128.gpt.bin:

    ** Warning: Illegal character '' in data on line 1 of file .../fw_payload.bin / linux.vcu128.gpt.bin
    ...
    ** Fatal: Unsupported boot mode 1 (SD Card)!
    
  • fw_payload.elf via JTAG:

    [ELF] INFO: Entrypoint at 0x80000000
    [ELF] WARNING: Section at 0x80000000 has 135216 zero bytes not preloaded.
    # [TRACER] Output filename is: trace_hart_0.log
    # [JTAG] Initialization success
    # [JTAG] Wait for LLC configuration
    # [JTAG] Halted hart 0
    # [JTAG] Preloading ELF binary: ../../../sw/boot/fw_payload.elf
    # [JTAG] Preloading section at 0x0000000080000000 (213928 bytes)
    # [JTAG] - 512/213928 bytes (0%)
    # ...
    # [JTAG] - 213504/213928 bytes (99%)
    # [JTAG] Preloading section at 0x0000000080200000 (415800 bytes)
    # [JTAG] - 512/415800 bytes (0%)
    # ...
    # [JTAG] - 415744/415800 bytes (99%)
    # [JTAG] Preload complete
    # [JTAG] Resumed hart 0 from 0x0000000080000000
    
    # ** Warning:           1[l1 dcache] reading invalid data on port 1: data=0000000000000000
    #    Time: 151418085 ns Started: 151418085 ns
    # Scope:
    # tb_cheshire_soc.fix.dut.gen_cva6_cores[0].i_core_cva6.gen_cache_wb.i_cache_subsystem.genblk1[1].a_invalid_read_data
    # File: cheshire/.bender/git/checkouts/cva6-20c9d7cbe0dd6995/core/cache_subsystem/std_cache_subsystem.sv Line: 318
    
    # ...
    
    # ** Warning: Got unknown value in one of the operands
    #    Time: 151418460 ns Started: 151418460 ns
    # Scope: tb_cheshire_soc.fix.dut.gen_cva6_cores[0].i_core_cva6.issue_stage_i.i_issue_read_operands
    # File: cheshire/.bender/git/checkouts/cva6-20c9d7cbe0dd6995/core/issue_read_operands.sv Line: 640
    

Expected Behavior

zsl.rom.elf should preload successfully without JTAG errors.

fw_payload.bin / linux.vcu128.gpt.bin should be accepted by the SD‑card loader (boot mode 1).

fw_payload.elf correct payload code should execute.

Questions & Next Steps

  • Am I using the correct values for BOOTMODE and PRELMODE for each binary type?
  • Are there additional simulator flags or scripts required to support SD‑card boot (mode 1)?
  • Did I miss something in Simulation and Software Stack guidelines?

I appreciate any pointers or suggestions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant