Skip to content

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

@HepoH3

Description

@HepoH3

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions