-
Notifications
You must be signed in to change notification settings - Fork 201
Update deprecations #150
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 deprecations #150
Conversation
We may want to hold off on committing these changes to |
src/main/scala/examples/Adder.scala
Outdated
@@ -29,7 +29,7 @@ class Adder(val n:Int) extends Module { | |||
FAs(i).b := io.B(i) | |||
FAs(i).cin := carry(i) | |||
carry(i+1) := FAs(i).cout | |||
sum(i) := FAs(i).sum.toBool() | |||
sum(i) := FAs(i).sum.asBool() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the rule for .asBool
vs .asBool()
again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle it should be asBool
since it doesn't modify the object, but this potentially runs afoul of apply
chaining (or implicits?). I think @ducky64 can explain it better than I can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the recommendation was, if any. No parens seems logical if it works. I can't think off the top of my head why the parens would affect implicit chaining.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The asBool() all looks correct.
I'm concerned that if the user passed in some args, say for the backend or something like that
The second optionsManager you create will not see those. I think you need to at least
re-parse the arguments. Your thoughts?
That's an excellent point. Let me try to address it. |
Would it be better to address this by adding a |
I'd say that would have been worth doing if we were sticking to OptionsManagers but given Stage/Phases I would say "no, it's not worth it". I'd just write a utility copy method of your own object OptionsCopy {
def apply(t: TesterOptionsManager): TesterOptionsManager = {
new TesterOptionsManager {
testerOptions = t.testerOptions.copy()
interpreterOptions = t.interpreterOptions.copy()
chiselOptions = t.chiselOptions.copy()
firrtlOptions = t.firrtlOptions.copy()
treadleOptions = t.treadleOptions.copy()
}
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Update deprecations (#150) * Update deprecations * Ensure TesterOptionsManager isn't shared between tests. * Respond to comments - remove () from asBool. * Respond to comment - ensure testOptionsManager has parsed args. * Provide a utility copy method to copy TesterOptionsManager state * Fix some typos in tutorial.tex (#148) (#155) (cherry picked from commit 2d43a86) Co-authored-by: Felix Yan <felixonmars@archlinux.org> * Bump sbt and scala versions (#157) * Bump SNAPSHOT versions for master branch (#156) * Bump release versions * Bump sbt to 1.3.7. (#154) OpenJDK 13 causes problems with old versions of SBT. See [this issue](sbt/sbt#5093). (cherry picked from commit d47fa0d) Co-authored-by: Paul Rigge <rigge@berkeley.edu> * Remove explicit chisel3 dependency (#158) * Remove explicit chisel3 dependency Rely on testers to pull in the correct version. * Bump iotesters to correct SNAPSHOT version; simplify libraryDependencies. * Use SNAPSHOT version (for master/SNAPSHOT branches) * fix single port ram code (#160) Co-authored-by: bqwer <liventsev@gmail.com> * Bump sbt to 1.3.10 (#161) Co-authored-by: Felix Yan <felixonmars@archlinux.org> Co-authored-by: Paul Rigge <rigge@berkeley.edu> Co-authored-by: bqwer <liventsev@gmail.com>
Replace
toBool
withasBool
.Ensure each test run uses a fresh
TesterOptionsManager
so we don't end up with: