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

Update rocket-chip again #33

Merged
merged 1 commit into from
Apr 20, 2018
Merged

Update rocket-chip again #33

merged 1 commit into from
Apr 20, 2018

Conversation

zhemao
Copy link
Contributor

@zhemao zhemao commented Apr 19, 2018

No description provided.

FIRRTL_JAR ?= $(ROCKETCHIP_DIR)/firrtl/utils/bin/firrtl.jar
FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(FIRRTL_JAR) firrtl.Driver
FIRRTL ?= java -Xmx2G -Xss8M -XX:MaxPermSize=256M -cp $(ROCKETCHIP_JAR):$(FIRRTL_JAR) firrtl.Driver
Copy link
Member

Choose a reason for hiding this comment

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

Another way is to use a classpath wildcard to avoid hardcoding the JAR filename: -cp $(lib_dir)/*:$(FIRRTL_JAR)

@jwright6323
Copy link
Contributor

jwright6323 commented Apr 19, 2018

My understanding of chipsalliance/rocket-chip@8f3009f is that ROCKET_CLASSES sets the BlackBox path and obviates the need to set rocketchip_vsrc_dir

@zhemao
Copy link
Contributor Author

zhemao commented Apr 19, 2018

No, ROCKET_CLASSES just sets the classpath so that FIRRTL can find the transformations to match the annotations. I've not yet figured out how the new BlackBox resources thing works.

@jwright6323
Copy link
Contributor

@grebe ?

@grebe
Copy link
Collaborator

grebe commented Apr 19, 2018

So, the current state that things are in is a little bit weird. I had a big PR that updated several different things all at once:

  • build.sbt
  • black box resources
  • makefiles to set firrtl classpath correctly
  • makefiles to use the newly generated black box resources

This was a lot to digest, so they got broken up and are still in the process of getting reviewed, merged, etc.

The current state of rocketchip is that:

  1. vsrc/csrc got moved to src/main/resources, which includes them in rocketchip's jar.
  2. HasBlackBoxResource was added to any black boxes, which means when firrtl runs it will spit out the appropriate black box into the build dir.

Rocket's build system still hasn't been updated to actually use these generated files, though. I'm using rocket as a library for things like queues and tilelink masters, etc., so rocket's build system doesn't really impact me (but it is way easier for me now that the blackboxes get emitted), but you guys have some decisions to make. If you want to be as much like rocket currently is right now, you should have references to vsrc/csrc and ignore the verilog/cpp that gets emitted by firrtl (other than your top level verilog file, of course).

If you want to do things the "right way", you can look at how I did it with makefiles in my big PR. It was kind of fragile, so I wouldn't recommend it unless you like getting fancy with makefiles.

Does that help?

Copy link
Contributor

@davidbiancolin davidbiancolin left a comment

Choose a reason for hiding this comment

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

MTS.

@zhemao
Copy link
Contributor Author

zhemao commented Apr 20, 2018

Yeah, let's stick with the way rocket-chip does it for now.

@zhemao zhemao merged commit 4c8c6e2 into master Apr 20, 2018
@zhemao zhemao deleted the master-rc-bump branch April 20, 2018 20:04
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

5 participants