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

Use fat jar's to remove SBT invocations #1375

Merged
merged 23 commits into from
May 27, 2023
Merged

Use fat jar's to remove SBT invocations #1375

merged 23 commits into from
May 27, 2023

Conversation

abejgonzalez
Copy link
Contributor

@abejgonzalez abejgonzalez commented Mar 1, 2023

Since the SBT thin client is brittle (can sometimes not read in SBT_OPTS, and other issues in the past), this PR will instead remove the thin client feature and instead build a fat jar to avoid SBT invocations. This also helps future work in distributing Chisel elaboration to multiple hosts (i.e. just needing to copy the fat jar to generate Verilog in parallel on different machines).

This repurposing a lot of the work that was done in: #872 and firesim/firesim#651 with inspiration from firesim/firesim#1390

  • Some submodules had to be updated. Specifically, if a SBT project's resource path clashed with another project's resource path, it would fail. Ex. - PrjA has a file in src/main/rsrc/Makefile and PrjB also has a file in the same path it would error.
  • This has some small build.sbt cleanup to avoid other misc. sbt assembly errors. The deps removed are not needed.

Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?
  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

@abejgonzalez abejgonzalez changed the title First attempt at fat jar Use fat jar's to remove SBT invocations Mar 1, 2023
@@ -86,8 +109,6 @@ lazy val hardfloat = (project in rocketChipDir / "hardfloat")
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is cleanup (these deps aren't needed)

@jerryz123
Copy link
Contributor

Can you check this ?

  • run make verilog
  • touch/edit a random source file
  • run time make verilog

@abejgonzalez
Copy link
Contributor Author

In a clean repo, after running the setup.

  • run time make verilog -> 1m37s
  • touch/edit a random source file -> touched DigitalTop.scala
  • run time make verilog -> incremental compile worked - 40s

@abejgonzalez
Copy link
Contributor Author

Closing since #1362 solves the initial issue I was trying to solve. I'll add this after the release if time permits.

@joonho3020 joonho3020 reopened this Mar 27, 2023
@abejgonzalez
Copy link
Contributor Author

This PR can be independently merged in separate from FireSim (see https://github.com/firesim/firesim/actions/runs/5010945519)

Copy link
Contributor

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

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

Looks fine to merge once the CI passes.

@abejgonzalez abejgonzalez merged commit c1ad70c into main May 27, 2023
@jerryz123 jerryz123 deleted the use-fat-jar branch August 22, 2023 21:17
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