File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -587,6 +587,8 @@ def direction(self):
587
587
def elaborate (self , platform ):
588
588
if hasattr (platform , "get_io_buffer" ):
589
589
return platform .get_io_buffer (self )
590
+ elif not isinstance (self ._port , (SingleEndedPort , DifferentialPort , SimulationPort )):
591
+ raise TypeError ("Cannot elaborate generic 'Buffer' with port {self._port!r}" ) # :nocov:
590
592
591
593
m = Module ()
592
594
@@ -632,8 +634,6 @@ def elaborate(self, platform):
632
634
if self .direction in (Direction .Output , Direction .Bidir ):
633
635
m .d .comb += self ._port .o .eq (o_inv )
634
636
m .d .comb += self ._port .oe .eq (self .oe .replicate (len (self ._port )))
635
- else :
636
- raise TypeError ("Cannot elaborate generic 'Buffer' with port {self._port!r}" ) # :nocov:
637
637
638
638
return m
639
639
You can’t perform that action at this time.
0 commit comments