Skip to content

Commit

Permalink
targets/efinix_trion_t120_bga576_dev_kit.py: added argument to config…
Browse files Browse the repository at this point in the history
…ure remote-ip. Pass local_ip and remote_ip to add_etherxxx
  • Loading branch information
trabucayre committed Sep 3, 2024
1 parent 5a1e4be commit 0313424
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(self, sys_clk_freq=75e6,
eth_phy = 0,
eth_rmii_pmod = True,
eth_ip = "192.168.1.50",
remote_ip = None,
with_led_chaser = True,
**kwargs):
platform = efinix_trion_t120_bga576_dev_kit.Platform()
Expand Down Expand Up @@ -126,9 +127,9 @@ def eth_lan8720_rmii_pmod_io(pmod):
)

if with_ethernet:
self.add_ethernet(phy=self.ethphy, software_debug=False)
self.add_ethernet(phy=self.ethphy, local_ip=eth_ip, remote_ip=remote_ip, software_debug=False)
if with_etherbone:
self.add_etherbone(phy=self.ethphy)
self.add_etherbone(phy=self.ethphy, ip_address=eth_ip)

# LPDDR3 SDRAM -----------------------------------------------------------------------------
if not self.integrated_main_ram_size:
Expand Down Expand Up @@ -367,10 +368,11 @@ def main():
parser.add_target_argument("--sys-clk-freq", default=75e6, type=float, help="System clock frequency.")
parser.add_target_argument("--with-spi-flash", action="store_true", help="Enable SPI Flash (MMAPed).")
ethopts = parser.target_group.add_mutually_exclusive_group()
ethopts.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support.")
ethopts.add_argument("--with-etherbone", action="store_true", help="Enable Etherbone support.")
parser.add_target_argument("--eth-ip", default="192.168.1.50", help="Ethernet/Etherbone IP address.")
parser.add_target_argument("--eth-phy", default=0, type=int, help="Ethernet PHY: 0 (default) or 1.")
ethopts.add_argument("--with-ethernet", action="store_true", help="Enable Ethernet support.")
ethopts.add_argument("--with-etherbone", action="store_true", help="Enable Etherbone support.")
parser.add_target_argument("--eth-ip", default="192.168.1.50", help="Ethernet/Etherbone IP address.")
parser.add_target_argument("--remote-ip", default="192.168.1.100", help="Remote IP address of TFTP server.")
parser.add_target_argument("--eth-phy", default=0, type=int, help="Ethernet PHY: 0 (default) or 1.")
args = parser.parse_args()

soc = BaseSoC(
Expand All @@ -379,6 +381,7 @@ def main():
with_ethernet = args.with_ethernet,
with_etherbone = args.with_etherbone,
eth_ip = args.eth_ip,
remote_ip = args.remote_ip,
eth_phy = args.eth_phy,
**parser.soc_argdict)
builder = Builder(soc, **parser.builder_argdict)
Expand Down

0 comments on commit 0313424

Please sign in to comment.