-
Notifications
You must be signed in to change notification settings - Fork 89
Allow passing custom module name to output_to_verilog #474
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
Allow passing custom module name to output_to_verilog #474
Conversation
fdxmw
left a comment
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.
It would be good to test this new feature, maybe we can modify one of the existing tests to exercise module_name?
|
Great PR I also wanted this feature |
Fix formatting of module declaration and add module_name parameter.
|
Hey, I have updated my branch. Please check if anything wrong still persists |
Please ensure that there are tests for your new code. |
…999/module_name_param-fix into feature/module_name_param
|
Hey, I updated my code again adn this time I made sure it passed all the tests. I hope it works now! |
dff6a32 to
593d1e6
Compare
593d1e6 to
9ee7b78
Compare
|
@devmam999 btw there are a few Verilog files seems you used for testing in the parent directory on your branch - did you accidentally commit these? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #474 +/- ##
=============================================
+ Coverage 91.5% 91.5% +0.1%
=============================================
Files 25 25
Lines 7089 7090 +1
=============================================
+ Hits 6486 6487 +1
Misses 603 603 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I agree, Verilog files do not belong in this pull request. Please also see my earlier comments about adding documentation and testing for your new feature to this pull request. |
|
To be clear, with this latest update on my branch, module_name is part of the verilog output class so it should be able to support custom names |
Your current changes to So this is a great start, but before we can merge this PR we'll need to wrap up a few details:
|
|
"Add new tests, or update existing tests, to verify that pyrtl.output_to_verilog and pyrtl.output_verilog_testbench work correctly when the new module_name parameter is set. Your new/updated tests should fail with the PR in its current state, since it currently does not modify these functions." So I'm confused, you want some of my tests to fail? |
|
Also I am confused as to why you want two of my functions to have module_name as a parameter after I said I wanted to use the class's parameter |
Sorry for the confusion! I'll try to clear things up. First, let's make sure we agree that there are two different things here that are both called
There is a similar distinction between Your PR currently adds your new I am requesting that you update
I am requesting tests in this PR that verify that With your PR in its current state, your new/updated test should not pass because I recommend verifying this for yourself by writing the test first, verifying that it fails, then updating But that's just my recommendation, you can do whatever you want, as long as you update Hope this clears things up, let me know if you have more questions! |
|
Alright, thanks a lot. I have updated my file again I hope it's good now |
Your changes to |
|
Remind me how to add the tests? I remember last time I added test files you told me to remove them. |
In software projects, "tests" generally refer to code that checks whether another piece of code works properly. In Python, this is usually done with the Tests are crucial for projects with many contributors because:
A generated Verilog file is not really a test, because the reader has to know something about Verilog to tell if the generated Verilog file is correct or not. Also, a generated Verilog file will not re-generate itself when someone changes PyRTL has many tests in the You can decide whether your feature deserves its own new tests in Hope this makes sense, let me know if you have more questions! |
|
Interesting, thanks for the clarifying comment |
|
Alright, I have added my test |
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.
Your new test looks good, here are some minor comments. There are also some lint errors identified by the test automation.
Next time, please run uv run just presubmit to check for lint errors before requesting another review. See this announcement for background on the new uv-based developer workflow.
After these comments and lint errors are addressed, I think we can merge this pull request. Thank you for your patience!
|
Thank you for addressing my comments! We are almost there, you'll need to fix the formatting and lint errors identified by the pull request checks before we can merge. See my earlier comment. |
|
I've tried doing that but I get this error "Error: No justfile found" |
It sounds like your fork is not up to date. Try syncing your fork, and make sure it includes includes commit 1c06c9e |
|
Alright thanks. The formatting errors should hopefully be fixed now |
No description provided.