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

[WIP] Rebar refactoring #264

Closed
wants to merge 8 commits into from
Closed

[WIP] Rebar refactoring #264

wants to merge 8 commits into from

Conversation

davidbiancolin
Copy link
Contributor

Here's an initial pass at the rebar refactoring. It moves the FireSim-class targets into firechip entirely, much as it would be in a general chip project.

TODO:

  • build-setup.sh updates.
  • more extensive build system testing

You now need to export FIRESIM_STANDALONE to indicate firesim is being used as top. This is kinda hacky, i'm open to better ways of dealing with this, but i figure since you need to sourceme to do anything else interesting, it's not marginally more hacky.


# Include target-specific sources and input generation recipes
include $(TARGET_PROJECT_MAKEFRAG)

verilog: $(VERILOG)
compile: $(VERILOG)

# Phony targets for launching the sbt shell and running scalatests
sbt: $(FIRRTL_JAR)
Copy link

Choose a reason for hiding this comment

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

Do you ever mark these as phony with .PHONY?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not this Makefile, will fix.

@@ -21,62 +21,36 @@ def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test =>

testGrouping in Test := isolateAllTests( (definedTests in Test).value )

val rocketChipDir = file("target-rtl/firechip/rocket-chip")
val fireChipDir = file("target-rtl/firechip")
lazy val firesimAsLibrary = sys.env.get("FIRESIM_STANDALONE") == None
Copy link

Choose a reason for hiding this comment

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

I think this is fine. I've used sys.props and -D options when invoking sbt b/c I thought that was a little more explicit, but environment vars are fine too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, sounds good.


$(info Firesim standalone)

base_dir := $(firesim_base_dir)

SBT ?= sbt
Copy link

Choose a reason for hiding this comment

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

Is it intentional that SBT and related vars are not defined in the else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, they are defined in rebar's makefrag.

@davidbiancolin davidbiancolin deleted the rebar-dev branch July 17, 2019 21:26
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.

None yet

3 participants