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

Need a consistent naming convention on variables #146

Open
iBug opened this issue Mar 25, 2019 · 1 comment
Open

Need a consistent naming convention on variables #146

iBug opened this issue Mar 25, 2019 · 1 comment

Comments

@iBug
Copy link

iBug commented Mar 25, 2019

IMO, a consistent coding style, including naming convention, is important for good code.

While starting my own Chisel project some time ago, I faced some port mismatch issues, and found it was caused by inconsistent port naming. I then traced my study history back to this repository.

Long story short, here are the examples:

I think we need some guideline on this, for example ScalaStyle?

@edwardcwang
Copy link
Member

Thank you for your interest in Chisel!

There is a style guide for Chisel itself here: https://github.com/freechipsproject/chisel3/blob/master/doc/style.md

From my experience, usually ports are either camelCase or snake_case (inherited from Verilog). I would also note that coding/naming styles do vary across institutions depending on the nature of the group/team.

Finally, have you seen https://github.com/freechipsproject/chisel-bootcamp ? The Chisel bootcamp is our latest iteration of Chisel educational materials.

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

No branches or pull requests

2 participants