Implementing designs directly in schematics or structural (gate-level) Verilog can give you the best control, and often the smallest designs. But, sometimes it can be a real pain to optimize all the way down at that level. An alternative is high-level (Register Transfer Level – RTL) Verilog, where you tell the CAD tools what you what the output to look like, and it automatically does the Boolean algebra for you!
In lecture, we presented a seven-segment display driver. RTL code for that seven-segment display is given above (code).
In Lab 3, we built a system that took in a UPC and output whether a returned Nordstrom item was on sale for a discount and whether it was stolen. A nearby store, McCluskey's Pawn Shop, buys used items from customers that were originally purchased from various stores that also use the UPC system. Old Mr. McCluskey wants a similar item-checking system, but has found that devious customers are changing the UPC stickers on the items they are selling to misrepresent the price. To combat that, Mr. McCluskey would like you to add a display on HEX5-HEX0 that describes the product corresponding to that UPC – if the description doesn't match the item, then someone is trying to cheat Mr. McCluskey!
UpcDisplay and have three inputs (U, P, and C),
similar to the seg7 module, but will instead have six
7-bit outputs for the 7-seg displays. Each output should be driven by a 7-bit 6-to-1 multiplexor, illustrated with standard "trapezoid" notation. Be sure to label the select value for each mux inputs and indicate the bit width of every bus in your diagram. If you're unsure whether you're using correct notation, ask your course staff.
UpcDisplay module alongside your Lab 3's Nordstrom module.
The design should use them both so the system simultaneously computes the
Discounted LED, Stolen LED, and HEX displays.
Test and debug with ModelSim, then load onto your board.
Your design has outputs for only 6 of the 8 possible UPC codes. For the other two cases, a line such as "default: LEDs = 7'bX;" tells Quartus Prime that it can treat these cases as a Don't Care condition. If you didn't do this, go back and correct it to do so. Test your design on the circuit board, and record the pattern it shows for these Don't Care conditions (hand drawn or photo will work).
Due before Wednesday section, submitted as a PDF on .
UpcDisplay module's block diagramDue by the end of the day on Friday, but typically during your assigned demo slot or a scheduled support hour.
60 points for correctness, style, and testing.