interconnect/stream: allow empty description/payload on Endpoint.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Jul 2020 17:29:05 +0000 (19:29 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 3 Jul 2020 17:29:05 +0000 (19:29 +0200)
litex/soc/interconnect/stream.py

index 8fb3213a1f23cf0811e7ba61a01dadc97cf4ef8d..5f5bd540258072615d82d255f9e09d031e0fe506 100644 (file)
@@ -33,7 +33,7 @@ def set_reset_less(field):
             s.reset_less = True
 
 class EndpointDescription:
-    def __init__(self, payload_layout, param_layout=[]):
+    def __init__(self, payload_layout=[], param_layout=[]):
         self.payload_layout = payload_layout
         self.param_layout   = param_layout
 
@@ -59,7 +59,7 @@ class EndpointDescription:
 
 
 class Endpoint(Record):
-    def __init__(self, description_or_layout, name=None, **kwargs):
+    def __init__(self, description_or_layout=[], name=None, **kwargs):
         if isinstance(description_or_layout, EndpointDescription):
             self.description = description_or_layout
         else: