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 'dev-mode' attribute to handle script #739

Closed
wants to merge 1 commit into from
Closed

Conversation

Avimitin
Copy link
Contributor

It is incovenient for users to always input strings like ".#t1.blastoise.ip.cases.mlir.hello.emu-result". So here is an env to help improve the current situation. With the "dev-mode" shell, users will have many bash function to help them set the current development "mode".

For example, if users want to test "intrinsic.linear_optimisation" with VCS emulator, and compare the result with verilator-emulator,
they will have to write "nix build
.#t1.blastoise.ip.vcs-emu.cases.intrinsic.linear_optimisation", then ".#t1.blastoise.ip.verilator-emu.cases.intrinsic.linear_optimisation"

With the new script, the test flow is separate into different phrases:

  • Firstly, get into the dev-mode shell: nix develop .#dev-mode
  • Then, set the config: set_config blastoise
  • Users can inspect RTL with simple command too: build vcs-emu-rtl
  • To switch between verilator and VCS, they can use: set_emulator vcs-emu or set_emulator verilator-emu
  • Finally, run the case: test intrinsic.linear_optimisation

It is incovenient for users to always input strings like
".#t1.blastoise.ip.cases.mlir.hello.emu-result". So here is an env to
help improve the current situation. With the "dev-mode" shell, users
will have many bash function to help them set the current development "mode".

For example, if users want to test "intrinsic.linear_optimisation" with VCS emulator,
and compare the result with verilator-emulator,
they will have to write "nix build
.#t1.blastoise.ip.vcs-emu.cases.intrinsic.linear_optimisation",
then ".#t1.blastoise.ip.verilator-emu.cases.intrinsic.linear_optimisation"

With the new script, the test flow is separate into different phrases:

* Firstly, get into the dev-mode shell: `nix develop .#dev-mode`
* Then, set the config: `set_config blastoise`
* Users can inspect RTL with simple command too: `build vcs-emu-rtl`
* To switch between verilator and VCS, they can use: `set_emulator
  vcs-emu` or `set_emulator verilator-emu`
* Finally, run the case: `test intrinsic.linear_optimisation`

Signed-off-by: Avimitin <[email protected]>
@Avimitin
Copy link
Contributor Author

Since there are bunch of changes of nix build system in rocket-t1 branch, I would love to hold the PR until the PR #717 is merged, which avoids the need to have 2 PRs for the same functionality.

@Avimitin Avimitin closed this Aug 24, 2024
@Avimitin
Copy link
Contributor Author

I would love to add this feature into #717 directly.

@Avimitin Avimitin deleted the dev-mode branch August 24, 2024 07:00
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