Skip to content

Commit

Permalink
liteeth: use bios ip_address in example designs
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Mar 18, 2015
1 parent cb4be52 commit 236ea0f
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions misoclib/com/liteeth/README
Expand Up @@ -70,15 +70,15 @@ devel [AT] lists.m-labs.hk.
run ./make.py -t udp all load-bitstream

5. Test design (only for KC705 for now):
try to ping 192.168.1.40
try to ping 192.168.0.42
go to [..]/example_designs/test/
run ./make.py test_udp

6. Build and load Etherbone design (only for KC705 for now):
python3 make.py -t etherbone all load-bitstream

7. Test design (only for KC705 for now):
try to ping 192.168.1.40
try to ping 192.168.0.42
go to [..]/example_designs/test/
run ./make.py test_etherbone

Expand Down
2 changes: 1 addition & 1 deletion misoclib/com/liteeth/example_designs/targets/base.py
Expand Up @@ -21,7 +21,7 @@ class BaseSoC(SoC, AutoCSR):
csr_map.update(SoC.csr_map)
def __init__(self, platform, clk_freq=166*1000000,
mac_address=0x10e2d5000000,
ip_address="192.168.1.40"):
ip_address="192.168.0.42"):
clk_freq = int((1/(platform.default_clk_period))*1000000000)
self.submodules.uart2wb = LiteScopeUART2WB(platform.request("serial"), clk_freq, baudrate=115200)
SoC.__init__(self, platform, clk_freq, self.uart2wb,
Expand Down
2 changes: 1 addition & 1 deletion misoclib/com/liteeth/example_designs/targets/etherbone.py
Expand Up @@ -13,7 +13,7 @@ class EtherboneSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.1.40")
ip_address="192.168.0.42")
self.submodules.etherbone = LiteEthEtherbone(self.core.udp, 20000)
self.add_wb_master(self.etherbone.master.bus)

Expand Down
4 changes: 2 additions & 2 deletions misoclib/com/liteeth/example_designs/targets/tty.py
Expand Up @@ -13,8 +13,8 @@ class TTYSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.1.40")
self.submodules.tty = LiteEthTTY(self.core.udp, convert_ip("192.168.1.12"), 10000)
ip_address="192.168.0.42")
self.submodules.tty = LiteEthTTY(self.core.udp, convert_ip("192.168.0.14"), 10000)
self.comb += Record.connect(self.tty.source, self.tty.sink)

class TTYSoCDevel(TTYSoC):
Expand Down
2 changes: 1 addition & 1 deletion misoclib/com/liteeth/example_designs/targets/udp.py
Expand Up @@ -12,7 +12,7 @@ class UDPSoC(BaseSoC):
def __init__(self, platform):
BaseSoC.__init__(self, platform,
mac_address=0x10e2d5000000,
ip_address="192.168.1.40")
ip_address="192.168.0.42")

# add udp loopback on port 6000 with dw=8
self.add_udp_loopback(6000, 8, 8192, "loopback_8")
Expand Down
4 changes: 2 additions & 2 deletions misoclib/com/liteeth/example_designs/test/make.py
Expand Up @@ -4,9 +4,9 @@
def _get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-b", "--bridge", default="uart", help="Bridge to use")
parser.add_argument("--port", default=2, help="UART port")
parser.add_argument("--port", default="2", help="UART port")
parser.add_argument("--baudrate", default=921600, help="UART baudrate")
parser.add_argument("--ip_address", default="192.168.1.40", help="Etherbone IP address")
parser.add_argument("--ip_address", default="192.168.0.42", help="Etherbone IP address")
parser.add_argument("--udp_port", default=20000, help="Etherbone UDP port")
parser.add_argument("--busword", default=32, help="CSR busword")

Expand Down
6 changes: 3 additions & 3 deletions misoclib/com/liteeth/example_designs/test/test_etherbone.py
Expand Up @@ -12,7 +12,7 @@ def main(wb):
packet = EtherbonePacket()
packet.pf = 1
packet.encode()
sock.sendto(bytes(packet), ("192.168.1.40", 20000))
sock.sendto(bytes(packet), ("192.168.0.42", 20000))
time.sleep(0.01)

# test writes
Expand All @@ -34,7 +34,7 @@ def main(wb):
packet = EtherbonePacket()
packet.records = [record]
packet.encode()
sock.sendto(bytes(packet), ("192.168.1.40", 20000))
sock.sendto(bytes(packet), ("192.168.0.42", 20000))
time.sleep(0.01)

# test reads
Expand All @@ -56,5 +56,5 @@ def main(wb):
packet = EtherbonePacket()
packet.records = [record]
packet.encode()
sock.sendto(bytes(packet), ("192.168.1.40", 20000))
sock.sendto(bytes(packet), ("192.168.0.42", 20000))
time.sleep(0.01)
2 changes: 1 addition & 1 deletion misoclib/com/liteeth/example_designs/test/test_tty.py
Expand Up @@ -33,4 +33,4 @@ def send():

def main(wb):
test_message = "LiteEth virtual TTY Hello world\n"
test("192.168.1.40", 10000, test_message)
test("192.168.0.42", 10000, test_message)
4 changes: 2 additions & 2 deletions misoclib/com/liteeth/example_designs/test/test_udp.py
Expand Up @@ -77,5 +77,5 @@ def send():
pass

def main(wb):
test("192.168.1.40", 6000, 128*KB)
test("192.168.1.40", 8000, 128*KB)
test("192.168.0.42", 6000, 128*KB)
test("192.168.0.42", 8000, 128*KB)
4 changes: 2 additions & 2 deletions misoclib/mem/litesata/example_designs/test/make.py
Expand Up @@ -4,9 +4,9 @@
def _get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-b", "--bridge", default="uart", help="Bridge to use")
parser.add_argument("--port", default=2, help="UART port")
parser.add_argument("--port", default="2", help="UART port")
parser.add_argument("--baudrate", default=921600, help="UART baudrate")
parser.add_argument("--ip_address", default="192.168.1.40", help="Etherbone IP address")
parser.add_argument("--ip_address", default="192.168.0.42", help="Etherbone IP address")
parser.add_argument("--udp_port", default=20000, help="Etherbone UDP port")
parser.add_argument("--busword", default=32, help="CSR busword")

Expand Down
4 changes: 2 additions & 2 deletions misoclib/tools/litescope/example_designs/test/make.py
Expand Up @@ -4,9 +4,9 @@
def _get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-b", "--bridge", default="uart", help="Bridge to use")
parser.add_argument("--port", default=3, help="UART port")
parser.add_argument("--port", default="2", help="UART port")
parser.add_argument("--baudrate", default=115200, help="UART baudrate")
parser.add_argument("--ip_address", default="192.168.1.40", help="Etherbone IP address")
parser.add_argument("--ip_address", default="192.168.0.42", help="Etherbone IP address")
parser.add_argument("--udp_port", default=20000, help="Etherbone UDP port")
parser.add_argument("--busword", default=32, help="CSR busword")

Expand Down

0 comments on commit 236ea0f

Please sign in to comment.