Closed cr1901 closed 4 years ago
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....
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.
- 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.
Differences between various 7SDs:
0
controls one digit, and1
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}
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.