amaranth-lang / amaranth-boards

Board definitions for Amaranth HDL
BSD 2-Clause "Simplified" License
107 stars 109 forks source link

Factor out resource "sevenseg". #21

Closed nmigen-issue-migration closed 5 years ago

nmigen-issue-migration commented 5 years ago

Issue by cr1901 Sunday Jul 07, 2019 at 13:55 GMT Originally opened as https://github.com/m-labs/nmigen-boards/issues/17


Differences between various 7SDs:

Potential Subsignal naming scheme:

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.

nmigen-issue-migration commented 5 years ago

Comment by mithro Sunday Jul 07, 2019 at 16:09 GMT


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....

nmigen-issue-migration commented 5 years ago

Comment by cr1901 Sunday Jul 07, 2019 at 16:12 GMT


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.

nmigen-issue-migration commented 5 years ago

Comment by whitequark Sunday Jul 07, 2019 at 19:05 GMT


  • 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.