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):
587587 def elaborate (self , platform ):
588588 if hasattr (platform , "get_io_buffer" ):
589589 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:
590592
591593 m = Module ()
592594
@@ -632,8 +634,6 @@ def elaborate(self, platform):
632634 if self .direction in (Direction .Output , Direction .Bidir ):
633635 m .d .comb += self ._port .o .eq (o_inv )
634636 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:
637637
638638 return m
639639
You can’t perform that action at this time.
0 commit comments