2019-11-24 05:23:13 -05:00
|
|
|
# This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
|
|
|
|
# License: BSD
|
|
|
|
|
|
|
|
import unittest
|
|
|
|
import os
|
|
|
|
|
|
|
|
root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")
|
|
|
|
|
2019-11-25 02:53:40 -05:00
|
|
|
class TestGen(unittest.TestCase):
|
2019-11-24 05:23:13 -05:00
|
|
|
def test(self):
|
|
|
|
for phy in ["mii", "gmii", "rgmii"]:
|
|
|
|
for core in ["wishbone", "udp"]:
|
|
|
|
os.system("rm -rf {}/build".format(root_dir))
|
2019-11-25 02:53:40 -05:00
|
|
|
os.system("python3 {}/liteeth/gen.py --phy={} --core={}".format(root_dir, phy, core))
|
2019-11-24 05:23:13 -05:00
|
|
|
self.assertEqual(os.path.isfile("{}/build/gateware/liteeth_core.v".format(root_dir)), True)
|