Skip to content

Commit

Permalink
core/dhcp: Add check to ensure DHCP cannot be used without IP broadca…
Browse files Browse the repository at this point in the history
…st support
  • Loading branch information
rowanG077 committed Mar 4, 2024
1 parent 991335e commit ac2fed0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions liteeth/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def __init__(self, phy, mac_address, ip_address, clk_freq, arp_entries=1, dw=8,
):
# Ensure either IP is external or DHCP is used
assert((ip_address is None) == with_dhcp)
# DHCP requres IP broadcast
assert(not with_dhcp or with_ip_broadcast)

# Parameters.
# -----------
Expand Down

0 comments on commit ac2fed0

Please sign in to comment.