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

[RFC] DisplayDevice for t1rocket emulation #815

Merged
merged 4 commits into from
Nov 3, 2024

Conversation

OceanS2000
Copy link
Contributor

Depends on #800 , this PR contains followup DisplayDevice implementation.

Currently it simply dumps a fixed-size RGB buffer to disk as png upon writing to a control register. The specific interfaces are open to futher discussion.

@OceanS2000 OceanS2000 force-pushed the emu-disp-device branch 2 times, most recently from 293883c to d5ffadc Compare October 28, 2024 07:28
nix/t1/conversion/sv-to-verilator-emulator.nix Outdated Show resolved Hide resolved
nix/t1/mill-modules.nix Outdated Show resolved Hide resolved
@OceanS2000
Copy link
Contributor Author

OceanS2000 commented Oct 28, 2024 via email

difftest/dpi_t1rocketemu/src/bus/disp.rs Outdated Show resolved Hide resolved
difftest/dpi_t1rocketemu/src/bus/disp.rs Outdated Show resolved Hide resolved
tests/disp/simple/simple.c Outdated Show resolved Hide resolved
difftest/dpi_t1rocketemu/src/bus/disp.rs Outdated Show resolved Hide resolved
@OceanS2000 OceanS2000 force-pushed the emu-disp-device branch 4 times, most recently from c6da626 to 508cc0e Compare November 2, 2024 07:38
@FanShupei
Copy link
Contributor

When I test it locally, unfortunately it won't pass the offline check.

Reproduction steps:

  1. run nix build -L --impure .#t1.rookidee.t1rocketemu.run.disp.simple.vcs-emu
  2. check result/offline-check-journal, it shows following error
thread 'main' panicked at offline_t1rocketemu/src/json_events.rs:208:7:
rtl data(0x1) should be equal to board data(0x0)
stack backtraces:
...

@FanShupei
Copy link
Contributor

There's no error in your code. It's a known limitation in our difftest framework.

Our offline verifier currently has no knowledge of mmio devices, it treats every read/write as regular memory access. We could add side effects for mmio read/write in our online simulation framework, but we must preserve load value axiom (the value loaded must equal to the last store to the same address). The frame counter read-back feature violates this, so the offline verifier complains loudly.

@OceanS2000
Copy link
Contributor Author

As a temporary measure I removed all read operation of counter from simple.c

Copy link
Contributor

@FanShupei FanShupei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now.

@sequencer sequencer merged commit d53394a into chipsalliance:master Nov 3, 2024
129 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.

3 participants