global: use 192.168.1.100 (remote)/ 192.168.1.50 (local) IP addresses

This commit is contained in:
Florent Kermarrec 2016-03-15 15:40:06 +01:00
parent b7efe0fd46
commit 9593e29756
10 changed files with 17 additions and 17 deletions

4
README
View File

@ -74,7 +74,7 @@ devel [AT] lists.m-labs.hk.
run ./make.py -t udp all load-bitstream
4. Test design (only for KC705 for now):
try to ping 192.168.0.42
try to ping 192.168.1.50
go to example_designs/test/
run ./test_udp.py
@ -82,7 +82,7 @@ devel [AT] lists.m-labs.hk.
python3 make.py -t etherbone all load-bitstream
6. Test design (only for KC705 for now):
try to ping 192.168.0.42
try to ping 192.168.1.50
go to example_designs/test/
run ./test_etherbone.py

View File

@ -20,7 +20,7 @@ class BaseSoC(SoCCore):
csr_map.update(SoCCore.csr_map)
def __init__(self, platform, clk_freq=166*1000000,
mac_address=0x10e2d5000000,
ip_address="192.168.0.42"):
ip_address="192.168.1.50"):
clk_freq = int((1/(platform.default_clk_period))*1000000000)
SoCCore.__init__(self, platform, clk_freq,
cpu_type=None,

View File

@ -138,7 +138,7 @@ _io = [
# payload
Subsignal("data", Pins(32)),
Subsignal("error", Pins(4))
),
),
]
class CorePlatform(XilinxPlatform):
@ -197,7 +197,7 @@ class MACCore(PHYCore):
"ethmac": 0x50000000
}
mem_map.update(SoCCore.mem_map)
def __init__(self, phy, clk_freq):
PHYCore.__init__(self, phy, clk_freq)
@ -265,7 +265,7 @@ def main():
parser.add_argument("--phy", default="MII", help="Ethernet PHY(MII/RMII/GMII/RMGII)")
parser.add_argument("--core", default="wishbone", help="Ethernet Core(wishbone/udp)")
parser.add_argument("--mac_address", default=0x10e2d5000000, help="MAC address")
parser.add_argument("--ip_address", default="192.168.0.42", help="IP address")
parser.add_argument("--ip_address", default="192.168.1.50", help="IP address")
args = parser.parse_args()
if args.core == "mac":

View File

@ -9,7 +9,7 @@ class EtherboneSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.0.42")
ip_address="192.168.1.50")
self.submodules.etherbone = LiteEthEtherbone(self.core.udp, 20000)
self.add_wb_master(self.etherbone.master.bus)

View File

@ -9,8 +9,8 @@ class TTYSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.0.42")
self.submodules.tty = LiteEthTTY(self.core.udp, convert_ip("192.168.0.14"), 10000)
ip_address="192.168.1.50")
self.submodules.tty = LiteEthTTY(self.core.udp, convert_ip("192.168.1.100"), 10000)
self.comb += self.tty.source.connect(self.tty.sink)

View File

@ -10,7 +10,7 @@ class UDPSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.0.42")
ip_address="192.168.1.50")
# add udp loopback on port 6000 with dw=8
self.add_udp_loopback(6000, 8, 8192, "loopback_8")

View File

@ -10,7 +10,7 @@ socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
packet = EtherbonePacket()
packet.pf = 1
packet.encode()
socket.sendto(bytes(packet), ("192.168.0.42", 20000))
socket.sendto(bytes(packet), ("192.168.1.50", 20000))
time.sleep(0.01)
# test writes
@ -23,7 +23,7 @@ record.wcount = len(writes_datas)
packet = EtherbonePacket()
packet.records = [record]
packet.encode()
socket.sendto(bytes(packet), ("192.168.0.42", 20000))
socket.sendto(bytes(packet), ("192.168.1.50", 20000))
time.sleep(0.01)
# test reads
@ -36,5 +36,5 @@ record.rcount = len(reads_addrs)
packet = EtherbonePacket()
packet.records = [record]
packet.encode()
socket.sendto(bytes(packet), ("192.168.0.42", 20000))
socket.sendto(bytes(packet), ("192.168.1.50", 20000))
time.sleep(0.01)

View File

@ -36,6 +36,6 @@ def test(fpga_ip, udp_port, test_message):
# # #
test_message = "LiteEth virtual TTY Hello world\n"
test("192.168.0.42", 10000, test_message)
test("192.168.1.50", 10000, test_message)
# # #

View File

@ -82,7 +82,7 @@ def test(fpga_ip, udp_port, test_size):
# # #
test("192.168.0.42", 6000, 128*KB)
test("192.168.0.42", 8000, 128*KB)
test("192.168.1.50", 6000, 128*KB)
test("192.168.1.50", 8000, 128*KB)
# # #

View File

@ -24,7 +24,7 @@ class LiteEthPHYModelCRG(Module, AutoCSR):
class LiteEthPHYModel(Module, AutoCSR):
def __init__(self, pads, tap="tap0", ip_address="192.168.0.14"):
def __init__(self, pads, tap="tap0", ip_address="192.168.1.100"):
self.dw = 8
self.submodules.crg = LiteEthPHYModelCRG()
self.sink = sink = Sink(eth_phy_description(8))