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

Naming convention for counter designs #10

Closed
tangxifan opened this issue Mar 21, 2022 · 10 comments
Closed

Naming convention for counter designs #10

tangxifan opened this issue Mar 21, 2022 · 10 comments

Comments

@tangxifan
Copy link
Owner

Is your feature request related to a problem? Please describe.
As we are enriching the counter RTL designs in https://github.com/tangxifan/micro_benchmark/tree/main/simple_registers/counters ,
it is time to establish naming convention for counters.
As such, developers can identify critical technical features from the name of a counter design.

Describe the solution you'd like
A naming convention could be

   counter[down]<size>_[async|sync]_[set|reset|setb|resetb]
  • keyword down represent a counting down counter
  • size is an integer, indicating the number of bits for a counter
  • async and sync represent the feature of reset and set signal
  • set, reset, setb and resetb indicates the existence of reset/set signal as well as polarity.

For instance,

counterdown8_async_resetb

shows a counter with the following features:

  • counting down
  • 8-bit in width
  • Asynchronous active-low reset
@tangxifan
Copy link
Owner Author

@anaszameer-rs Let me know what you think. See if we can apply to all the counter designs.

@anaszameer-rs
Copy link
Collaborator

anaszameer-rs commented Mar 21, 2022

@tangxifan Just a suggestion! Wouldn't that be great if we use resetp | resetn instead of resetb to make it more clear?
For instance,
counterdown8_async_resetp
shows a counter with the following features:
counting down
8-bit in width
Asynchronous active-high reset

@tangxifan
Copy link
Owner Author

@anaszameer-rs No problem for me. We should document it. Let me start documentation template this morning. Are you o.k. to write these down in the documentation?

@tangxifan
Copy link
Owner Author

@anaszameer-rs If we follow the naming convention of p, should we consider n for active-low signals, rather than b?

@tangxifan
Copy link
Owner Author

@anaszameer-rs Kindly review the documentation about the naming rules at:

https://micro-benchmark.readthedocs.io/en/latest/developer/naming_convention/#counter-design-names

If you agree, we can close this issue. The rule will be actively applied in later PRs.

@anaszameer-rs
Copy link
Collaborator

ous active-high reset

@tangxifan Can we add more flexibility in counter design namings considering posedge | negedge | dual edge counters?

@tangxifan
Copy link
Owner Author

Good catch. Please suggest and we can update naming rules.
Currently, I will not propose to add negedge and dual edge counters massively, as OpenFPGA has not been tested on these types of counters.
But sooner or later, we should have it. Therefore, naming rules can be established now.

@anaszameer-rs
Copy link
Collaborator

anaszameer-rs commented Mar 22, 2022

Good catch. Please suggest and we can update naming rules. Currently, I will not propose to add negedge and dual edge counters massively, as OpenFPGA has not been tested on these types of counters. But sooner or later, we should have it. Therefore, naming rules can be established now.

@tangxifan Can we add posedge | negedge | dualedge keywords for counter designs ?
for instance,
counterdown8_posedge_async_resetn

counting down
8-bit in width
counting on posedge of clock
Asynchronous active-low reset

@anaszameer-rs
Copy link
Collaborator

Good catch. Please suggest and we can update naming rules. Currently, I will not propose to add negedge and dual edge counters massively, as OpenFPGA has not been tested on these types of counters. But sooner or later, we should have it. Therefore, naming rules can be established now.

@tangxifan Can we add posedge | negedge | dualedge keywords for counter designs ? for instance, counterdown8_posedge_async_resetn

counting down 8-bit in width counting on posedge of clock Asynchronous active-low reset

@tangxifan Can you please confirm which naming convention should i follow for my upcoming PR for Counter designs ?

@tangxifan
Copy link
Owner Author

@anaszameer-rs Let's follow the naming convention you have proposed.

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