Skip to content
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

Implementing output wave trace of the emulation in VCD format #17

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

Rodrigodd
Copy link
Owner

VCD (value change dump) is a format used by EDA tools (like Verilog simulators) that shows the change of signals over time. This will dump the change of every register and internal state of the emulator over time.

This will create a file in wave_trace/trace.vcd, which can be opened on GTKWave or Surfer for example

I have the idea of implementing it while playing with msinger/dmg-sim simulation of DMG CPU B in Verilog, and later by emu-russia/dmgcpu. This will make it easier to compare my emulator with a simulation of the original hardware.

Example usage:

cargo run -p gameroy-core --bin run --profile release --features=wave_trace -- core/tests/gameboy-test-roms/blargg/cpu_instrs/individual/02-interrupts.gb --timeout 25446964 && vcd2fst wave_trace/trace.vcd wave_trace/trace.fst

This will just run a rom in the interpreter for a given amount of
time/cycles. Useful for generating vcd traces or testing something
else quickly. It compiles much faster than the gui or the unit tstes,
because it has zero dependencies.
VCD (value change dump) is a format used by EDA tools (like verilog
simulators) that shows the change of signals over time. This will dump
the change of every register and internal state of the emulator over
time.

This will create a file in `wave_trace/trace.vcd`, which can be opened
on GTKWave or Surfer for example

I have the idea of implementing it while playing with msinger/dmg-sim
simulation of DMG CPU B in verilog. This will make it easier to compare
my emulator with a simulation of the original hardware.
@Rodrigodd Rodrigodd merged commit a5acdc9 into master Jan 2, 2025
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant