Skip to content

Commit fa18d5f

Browse files
committed
chore: place init_flash after init_core
First, this does not introduce any functional changes. Second, the reason for this modification is that with the introduction of OpenXiangShan/XiangShan#4626, the simulation output includes some less elegant messages: Using simulated 32768B flash Core 0's Commit SHA is: 6683fc49ec, dirty: 1 Using simulated 8386560MB RAM This change makes the output look better.
1 parent 826fe99 commit fa18d5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/csrc/verilator/emu.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,6 @@ Emulator::Emulator(int argc, const char *argv[])
377377
if (enable_simjtag) {
378378
jtag_init();
379379
}
380-
// init flash
381-
init_flash(args.flash_bin);
382380

383381
#if VM_TRACE == 1
384382
if (args.enable_waveform) {
@@ -401,6 +399,9 @@ Emulator::Emulator(int argc, const char *argv[])
401399
// init core
402400
reset_ncycles(args.reset_cycles);
403401

402+
// init flash
403+
init_flash(args.flash_bin);
404+
404405
// init ram
405406
uint64_t ram_size = DEFAULT_EMU_RAM_SIZE;
406407
if (args.ram_size) {

0 commit comments

Comments
 (0)