From aa17c27eb9ed8d34e707a52d201d9d4b2f1b71c1 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 5 Oct 2022 11:06:52 +0200 Subject: [PATCH] interconnect/axi/axi_stream: Add clock_domain parameters. Useful for wrapping IP and do checks or decide if CDC has to be inserted. --- litex/soc/interconnect/axi/axi_stream.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/litex/soc/interconnect/axi/axi_stream.py b/litex/soc/interconnect/axi/axi_stream.py index f928747d1..4e187687c 100644 --- a/litex/soc/interconnect/axi/axi_stream.py +++ b/litex/soc/interconnect/axi/axi_stream.py @@ -17,12 +17,13 @@ from litex.soc.interconnect.axi.axi_common import * # AXI-Stream Definition ---------------------------------------------------------------------------- class AXIStreamInterface(stream.Endpoint): - def __init__(self, data_width=0, keep_width=None, id_width=0, dest_width=0, user_width=0, layout=None, name=None): - self.data_width = data_width - self.keep_width = data_width//8 if keep_width is None else keep_width - self.id_width = id_width - self.dest_width = dest_width - self.user_width = user_width + def __init__(self, data_width=0, keep_width=None, id_width=0, dest_width=0, user_width=0, clock_domain="sys", layout=None, name=None): + self.data_width = data_width + self.keep_width = data_width//8 if keep_width is None else keep_width + self.id_width = id_width + self.dest_width = dest_width + self.user_width = user_width + self.clock_domain = clock_domain # Define Payload Layout. if layout is not None: