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

add HasBlackBoxPath to BlackBoxUtils.scala #903

Merged
merged 6 commits into from
Feb 20, 2019

Conversation

albertchen-sifive
Copy link
Contributor

@albertchen-sifive albertchen-sifive commented Oct 5, 2018

  • add HasBlackBoxPath that acts like HasBlackBoxResource except that it works with files outside of the resources directory.
  • deprecate and rename setResource to addResource because multiple calls will result in multiple resources being copied to the target directory.

Type of change: feature request

Impact: API addition (no impact on existing code)

Development Phase: implementation

Metadata:

@albertchen-sifive albertchen-sifive requested a review from a team as a code owner October 5, 2018 18:31
@ghost
Copy link

ghost commented Oct 5, 2018

Can one of the admins verify this patch?

@ucbjrl
Copy link
Contributor

ucbjrl commented Oct 5, 2018

ok to test

@jackkoenig
Copy link
Contributor

LGTM, should we also changed setInline to addInline? @chick thoughts on the API changes?

Copy link
Contributor

@chick chick left a comment

Choose a reason for hiding this comment

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

I think this looks fine. But I'd suggest if you have time that you add a bit of scala doc on
the add* methods.

@deprecated("Use addResource instead", "3.2")
def setResource(blackBoxResource: String): Unit = addResource(blackBoxResource)

def addResource(blackBoxResource: String): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice to add some scaladoc here, in particular, providing an example
of what a resource path looks like.

trait HasBlackBoxPath extends BlackBox {
self: BlackBox =>

def addPath(blackBoxPath: String): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

ScalaDoc here too. Probably worth mentioning that the working directory is
not likely to be the same as the target directory

Copy link
Contributor

@chick chick left a comment

Choose a reason for hiding this comment

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

LGTM

@seldridge seldridge merged commit c6aae22 into chipsalliance:master Feb 20, 2019
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