Source code for hwtLib.examples.simpleAxiStream

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from hwt.synthesizer.unit import Unit
from hwt.synthesizer.param import Param
from hwtLib.amba.axis import AxiStream


[docs]class SimpleUnitAxiStream(Unit): """ Example of unit with axi stream interface .. hwt-autodoc:: """ def _config(self): self.DATA_WIDTH = Param(8) self.USE_STRB = Param(True) def _declr(self): with self._paramsShared(): self.a = AxiStream() self.b = AxiStream()._m() def _impl(self): self.b(self.a)
if __name__ == "__main__": from hwt.synthesizer.utils import to_rtl_str u = SimpleUnitAxiStream() print(to_rtl_str(u))