From 3b714c8145c9784d9292a103512a68c355dceffa Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 8 Sep 2022 11:53:05 +0200 Subject: [PATCH] test: Add minimal test_axi_stream test (Just syntax check for now). --- test/test_axi_stream.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/test_axi_stream.py diff --git a/test/test_axi_stream.py b/test/test_axi_stream.py new file mode 100644 index 000000000..ac6fff393 --- /dev/null +++ b/test/test_axi_stream.py @@ -0,0 +1,23 @@ +# +# This file is part of LiteX. +# +# Copyright (c) 2020-2022 Florent Kermarrec +# 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()