test: Add minimal test_axi_stream test (Just syntax check for now).

This commit is contained in:
Florent Kermarrec 2022-09-08 11:53:05 +02:00
parent afc89c9350
commit 3b714c8145
1 changed files with 23 additions and 0 deletions

23
test/test_axi_stream.py Normal file
View File

@ -0,0 +1,23 @@
#
# This file is part of LiteX.
#
# Copyright (c) 2020-2022 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
import unittest
from migen import *
from litex.soc.interconnect.axi import AXIStreamInterface
class TestAXIStream(unittest.TestCase):
def test_axi_stream_syntax(self):
axis = AXIStreamInterface(data_width=32)
axis = AXIStreamInterface(data_width=32, keep_width=4)
axis = AXIStreamInterface(data_width=32, keep_width=4, id_width=4)
axis = AXIStreamInterface(data_width=32, keep_width=4, id_width=4, dest_width=4)
axis = AXIStreamInterface(data_width=32, keep_width=4, id_width=4, dest_width=4, user_width=4)
def test_axi_stream_get_ios(self):
axis = AXIStreamInterface(data_width=32, keep_width=4, id_width=4, dest_width=4, user_width=4)
pads = axis.get_ios()