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

[nix] Add vcs sim profile flow #887

Merged
merged 1 commit into from
Dec 9, 2024
Merged

[nix] Add vcs sim profile flow #887

merged 1 commit into from
Dec 9, 2024

Conversation

FanShupei
Copy link
Contributor

Profile vcs simulation time

Since we do not want to cache prof results anyway, we couldn't use 'nix build'. The flow is a bit distorted.

Usage:

  1. modify enableProfile = true in 'sv-to-vcs-simulator.nix'
  2. `nix run --impure .#t1.rookidee.t1rocketemu.run.asm.mmm.vcs-emu.profile', for example
  3. open 'profileReport.html' in current workdir

nix/t1/run/run-vcs-emu.nix Outdated Show resolved Hide resolved
nix/t1/run/run-vcs-emu.nix Outdated Show resolved Hide resolved
nix/t1/run/run-vcs-emu.nix Show resolved Hide resolved
nix/t1/run/run-vcs-emu.nix Outdated Show resolved Hide resolved
emuDriverArgs="''${emuDriverArgsArray[@]}"
emuDriver="${emulator}/bin/${emulator.mainProgram}"
emuDriver="${emuDriver}"
emuDriverArgs="${lib.escapeShellArgs emuDriverArgs}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Here the emuDriverArgs is escaped into bash string "'argA' 'argB' 'argC'", this might cause some unexpected behavior in future modification. But just left it here if it is ok for now.

Copy link
Contributor

@Avimitin Avimitin left a comment

Choose a reason for hiding this comment

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

LGTM

@sequencer
Copy link
Member

please rebase and squash

@FanShupei FanShupei marked this pull request as ready for review December 9, 2024 06:40
@FanShupei FanShupei merged commit 6ed6bd4 into master Dec 9, 2024
210 checks passed
@FanShupei FanShupei deleted the vcs-profile branch December 9, 2024 11:45
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