Prev Problem
Next Problem

16. Parking Lot Status

Design a Verilog module that reports parking lot status for a 16-bit occupancy map. Each bit of the input indicates whether a slot is occupied (1) or free (0).

Requirements

  • Module name: parking_status16
  • Inputs:
    • slots[15:0] — bit i represents slot i (1 = occupied, 0 = free)
  • Outputs:
    • all_full1 when every slot is occupied
    • any_free1 when at least one slot is free

 

Expected behaviour

slots (concept)Example valueall_fullany_free
all empty16'h000001
all occupied16'hFFFF10
mixed16'hAAAA (0101… pattern)01
mixed16'h000101
Need Help? Refer to the Quick Guide below