-
Notifications
You must be signed in to change notification settings - Fork 188
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
Adding companion main class to generate GCD.v verilog source #126
Conversation
src/main/scala/gcd/GCD.scala
Outdated
* Generate Verilog sources and save it in file GCD.v | ||
*/ | ||
object GCD extends App { | ||
val verilog_src = ChiselStage.emitSystemVerilog( |
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.
Would it not be simpler to call ChiselStage.emitSystemVerilogFile rather than emitting as a string and then writing?
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.
Yes of course ! I didn't know about this function.
That's why it's useful to provide an example :)
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 (with a couple of minor sylistic changes)
We also need to make sure this is tested in CI, I'll push a test.
It's not straightforward to write code for generating verilog.
So this merge request provide a way to do it.
Fixes #54