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

Bump rocket, make possible to use published deps #47

Merged
merged 23 commits into from
Mar 7, 2019
Merged

Conversation

grebe
Copy link
Collaborator

@grebe grebe commented Feb 19, 2019

  • Overriding SBT to sbt -DROCKET_USE_MAVEN ++2.12.4 causes build to ignore testchipip and rocket-chip, instead using published dependencies. If you don't override SBT, it uses the submodules as before
  • The build uses firrtl_black_box_resources.f to include blackboxes instead of hardcoded paths. This cleans up the build a bit, only including things you actually use
    • One caveat is that some blackboxes haven't been included correctly. This PR fixes the main one, and i want to clean up verisim/csrc a bit.
  • bootrom is moved into project-template- maybe it shouldn't be in testchipip? I think it makes more sense here
  • barstools is still a submodule. I would like to update it to use the new stages/phase stuff so it works nicely as a maven dep (also, we wouldn't need separate make targets to invoke barstools multiple times)
  • Oh, and I also update the example a bit to work with current rocket

Copy link
Contributor

@jwright6323 jwright6323 left a comment

Choose a reason for hiding this comment

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

What's the motivation to move the verisim/csrc stuff out of testchipip? Or is it different somehow?

Makefrag Outdated Show resolved Hide resolved
src/main/scala/example/TestHarness.scala Outdated Show resolved Hide resolved
verisim/Makefile Show resolved Hide resolved
@grebe
Copy link
Collaborator Author

grebe commented Feb 20, 2019

My latest commit removes verisim/vsrc and all but a couple headers in verisim/csrc.

I made a transform based on the blackboxresource transform to attach some resources to the TestHarness. This adds the csrc. Ideally, I would conditionally include emulator.cc only if I know I'm building with verilator.

Headers are tricky because they should be included with the -include flag, which the blackboxresource annotation doesn't have a way of doing. I think it will need to stay more hardcoded in the Makefile, unfortunately. Still, I should be able to have TestHarness pull the headers from resources instead of having them copied into the repo.

build.sbt Outdated Show resolved Hide resolved
After running a clean build, I realized old build state was masking this
problem. verisim/csrc needs to be in the include path until we find a more
permanent solution to our problem.
@jwright6323
Copy link
Contributor

@grebe what about something like this: f99ac28

@grebe
Copy link
Collaborator Author

grebe commented Feb 20, 2019

Yeah, that's sort of what I'm thinking

@zhemao
Copy link
Contributor

zhemao commented Feb 20, 2019

We had bootrom in project-template initially, but eventually moved it to testchipip. I'd rather we keep it there.

@grebe
Copy link
Collaborator Author

grebe commented Feb 20, 2019

@zhemao do you think it's OK to put bootrom in testchipip's src/main/resources? Symlinks could preserve the current layout for build scripts. If we're going to keep it in testchipip, it needs to end up in the jar somehow for use-cases that pull from maven.

@zhemao
Copy link
Contributor

zhemao commented Feb 22, 2019

Yeah, we could put it in src/main/resources.

@grebe
Copy link
Collaborator Author

grebe commented Feb 23, 2019

Now bootrom/ is generated (along with the other necessary c++/verilog files) as a build rule before running the rocket generator. Bootrom gets put in the top level directory, and everything else winds up in $(build_dir). Now, all you need to do is source two .f files, one of which contains black boxes and the other of which contains files (and command line flags) that verilator needs.

build.sbt Outdated Show resolved Hide resolved
@jwright6323 jwright6323 self-requested a review March 7, 2019 02:21
Copy link
Contributor

@jwright6323 jwright6323 left a comment

Choose a reason for hiding this comment

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

Approving per rebar feedback

@grebe grebe merged commit ddf3159 into master Mar 7, 2019
@grebe grebe deleted the usePublished branch March 7, 2019 02:22
@nachoge98 nachoge98 mentioned this pull request Jun 20, 2022
3 tasks
jerryz123 pushed a commit that referenced this pull request Apr 19, 2023
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.

5 participants