2019-06-24 05:43:10 -04:00
|
|
|
# This file is Copyright (c) 2015-2018 Florent Kermarrec <florent@enjoy-digital.fr>
|
|
|
|
# License: BSD
|
|
|
|
|
2015-09-08 03:50:45 -04:00
|
|
|
from liteeth.common import *
|
2015-11-24 14:44:00 -05:00
|
|
|
from liteeth.frontend.tty import LiteEthTTY
|
2015-09-07 07:28:02 -04:00
|
|
|
|
|
|
|
from targets.base import BaseSoC
|
|
|
|
|
|
|
|
|
|
|
|
class TTYSoC(BaseSoC):
|
|
|
|
default_platform = "kc705"
|
|
|
|
def __init__(self, platform):
|
|
|
|
BaseSoC.__init__(self, platform,
|
|
|
|
mac_address=0x10e2d5000000,
|
2016-03-15 10:40:06 -04:00
|
|
|
ip_address="192.168.1.50")
|
|
|
|
self.submodules.tty = LiteEthTTY(self.core.udp, convert_ip("192.168.1.100"), 10000)
|
2015-12-27 06:26:01 -05:00
|
|
|
self.comb += self.tty.source.connect(self.tty.sink)
|
2015-09-07 07:28:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
class TTYSoCDevel(TTYSoC):
|
|
|
|
def __init__(self, platform):
|
2016-03-31 15:27:08 -04:00
|
|
|
from litescope import LiteScopeAnalyzer
|
2015-09-07 07:28:02 -04:00
|
|
|
TTYSoC.__init__(self, platform)
|
2016-03-31 15:27:08 -04:00
|
|
|
debug = [
|
2016-03-16 16:30:01 -04:00
|
|
|
self.tty.sink.valid,
|
|
|
|
self.tty.sink.ready,
|
2015-09-07 07:28:02 -04:00
|
|
|
self.tty.sink.data,
|
|
|
|
|
2016-03-16 16:30:01 -04:00
|
|
|
self.tty.source.valid,
|
|
|
|
self.tty.source.ready,
|
2015-09-07 07:28:02 -04:00
|
|
|
self.tty.source.data
|
2016-03-31 15:27:08 -04:00
|
|
|
]
|
2019-11-23 09:47:42 -05:00
|
|
|
self.submodules.analyzer = LiteScopeAnalyzer(debug, 4096, csr_csv="test/analyzer.csv")
|
|
|
|
self.add_csr("analyzer")
|
2015-09-07 07:28:02 -04:00
|
|
|
|
|
|
|
default_subtarget = TTYSoC
|