From 078751733871e97790417393ab1c6802770f151c Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 3 Sep 2024 12:40:35 +0200 Subject: [PATCH 1/3] targets/efinix_titanium_ti60_f225_dev_kit.py: added argument to configure remote-ip. Pass local_ip and remote_ip to add_etherxxx --- .../targets/efinix_titanium_ti60_f225_dev_kit.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py b/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py index 6cabd5c66..e63bb3e17 100755 --- a/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py +++ b/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py @@ -59,6 +59,7 @@ def __init__(self, sys_clk_freq=200e6, with_etherbone = False, eth_phy = 0, eth_ip = "192.168.1.50", + remote_ip = None, **kwargs): platform = efinix_titanium_ti60_f225_dev_kit.Platform() @@ -116,9 +117,9 @@ def __init__(self, sys_clk_freq=200e6, pads = pads, with_hw_init_reset = False) if with_ethernet: - self.add_ethernet(phy=self.ethphy, software_debug=True) + self.add_ethernet(phy=self.ethphy, local_ip=eth_ip, remote_ip=remote_ip, software_debug=True) if with_etherbone: - self.add_etherbone(phy=self.ethphy) + self.add_etherbone(phy=self.ethphy, ip_address=eth_ip) # Build -------------------------------------------------------------------------------------------- @@ -133,10 +134,11 @@ def main(): sdopts.add_argument("--with-spi-sdcard", action="store_true", help="Enable SPI-mode SDCard support.") sdopts.add_argument("--with-sdcard", action="store_true", help="Enable SDCard support.") 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( @@ -146,6 +148,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) if args.with_spi_sdcard: From 5a1e4bedfd6463c51a34ddaa10a28d5de8a34e9a Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 3 Sep 2024 12:41:05 +0200 Subject: [PATCH 2/3] targets/efinix_titanium_ti60_f225_dev_kit.py: disable software_debug by default --- litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py b/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py index e63bb3e17..9014faa71 100755 --- a/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py +++ b/litex_boards/targets/efinix_titanium_ti60_f225_dev_kit.py @@ -117,7 +117,7 @@ def __init__(self, sys_clk_freq=200e6, pads = pads, with_hw_init_reset = False) if with_ethernet: - self.add_ethernet(phy=self.ethphy, local_ip=eth_ip, remote_ip=remote_ip, software_debug=True) + 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, ip_address=eth_ip) From 0313424fa02ef63d6047601deb65634d06f3f244 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 3 Sep 2024 12:42:49 +0200 Subject: [PATCH 3/3] targets/efinix_trion_t120_bga576_dev_kit.py: added argument to configure remote-ip. Pass local_ip and remote_ip to add_etherxxx --- .../targets/efinix_trion_t120_bga576_dev_kit.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py b/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py index 8911c62cc..b2a199a0d 100755 --- a/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py +++ b/litex_boards/targets/efinix_trion_t120_bga576_dev_kit.py @@ -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() @@ -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: @@ -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( @@ -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)