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

Factor out resource "sevenseg". #17

Closed
cr1901 opened this issue Jul 7, 2019 · 3 comments
Closed

Factor out resource "sevenseg". #17

cr1901 opened this issue Jul 7, 2019 · 3 comments

Comments

@cr1901
Copy link
Contributor

cr1901 commented Jul 7, 2019

Differences between various 7SDs:

  • Common cathode vs anode?
  • Is decimal point used?
  • Are the digit enable signals one-hot coming out of the FPGA or not?
    • Using a single enable line, where 0 controls one digit, and 1 controls the other seems more
      common when only two digits are present (fairly common setup). Otherwise, one-hot is used.

Potential Subsignal naming scheme:

  • a, b, ... g, dp for decimal point (if present)
  • en{0, 1, 2}
    • How should one-hot vs shared en be handled in naming. Should there be a difference?

Boards using it right now

None! But Mercury will (for the baseboard peripheral that is normally attached to it), and in omigen, the naming scheme was inconsistent. So I want to fix this before it becomes a problem.

@cr1901 cr1901 changed the title Factor out Seven Segment Display Resources Factor out resource "sevenseg". Jul 7, 2019
@mithro
Copy link

mithro commented Jul 7, 2019

BTW 7-segment displays are a common learning exercise for beginner HDL coders. It would be good to have good support for them and to not make it too easy....

@cr1901
Copy link
Contributor Author

cr1901 commented Jul 7, 2019

BTW 7-segment displays are a common learning exercise for beginner HDL coders. It would be good to have good support for them and to not make it too easy....

I'm assuming we've left the realm of "not make it too easy" for beginners once PinsN was introduced. For "NMigen for beginners" literature, I'm guessing "active-high" and "active-low" will need to be footnotes. Similar w/ seven seg quirks.

@whitequark
Copy link
Contributor

whitequark commented Jul 7, 2019

  • Common cathode vs anode?

Logical high means LED is lit.

  • Is decimal point used?

Optional, the downstream code can check it with hasattr(seven_seg, "dp").

  • Are the digit enable signals one-hot coming out of the FPGA or not?

The enable signal is called sel if it's straight binary, and en if it's one-hot. (No enable signal is also OK for one digit.

I'm assuming we've left the realm of "not make it too easy" for beginners once PinsN was introduced.

Yes.

whitequark added a commit that referenced this issue Oct 3, 2019
With the expectation that "display_9seg", "display_14seg" and
"display_16seg" will be forthcoming.

There are no provisions in this resource itself for multiplexing
the display. It is expected that on boards with multiplexed displays,
an additional resource "display_7seg_ctrl" will be provided, and it
would have either an n-bit signal "sel" (binary encoded) or an n-bit
signal "en" (one-hot encoded). (This may be revisited in the future.)

Fixes #17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants