@@ -334,6 +334,7 @@ def port_for_process(p: Process):
334334
335335
336336class IOBuffer (io .Buffer ):
337+
337338 def elaborate (self , platform ):
338339 if not isinstance (self .port , SiliconPlatformPort ):
339340 raise TypeError (f"Cannot elaborate SiliconPlatform buffer with port { self .port !r} " )
@@ -342,18 +343,18 @@ def elaborate(self, platform):
342343 invert = sum (bit << idx for idx , bit in enumerate (self .port .invert ))
343344 if self .direction is not io .Direction .Input :
344345 if invert != 0 :
345- o_inv = Signal .like (self .o )
346- m .d .comb += o_inv .eq (self .o ^ invert )
346+ o_inv = Signal .like (self .o ) # type: ignore[reportAttributeAccessIssue]
347+ m .d .comb += o_inv .eq (self .o ^ invert ) # type: ignore[reportAttributeAccessIssue]
347348 else :
348- o_inv = self .o
349- m .d .comb += self .port .o .eq (o_inv )
350- m .d .comb += self .port .oe .eq (self .oe )
349+ o_inv = self .o # type: ignore[reportAttributeAccessIssue]
350+ m .d .comb += self .port .o .eq (o_inv ) # type: ignore[reportAttributeAccessIssue]
351+ m .d .comb += self .port .oe .eq (self .oe ) # type: ignore[reportAttributeAccessIssue]
351352 if self .direction is not io .Direction .Output :
352353 if invert :
353- i_inv = Signal .like (self .i )
354- m .d .comb += self .i .eq (i_inv ^ invert )
354+ i_inv = Signal .like (self .i ) # type: ignore[reportAttributeAccessIssue]
355+ m .d .comb += self .i .eq (i_inv ^ invert ) # type: ignore[reportAttributeAccessIssue]
355356 else :
356- i_inv = self .i
357+ i_inv = self .i # type: ignore[reportAttributeAccessIssue]
357358 m .d .comb += i_inv .eq (self .port .i )
358359
359360 return m
@@ -370,16 +371,16 @@ def elaborate(self, platform):
370371
371372 if self .direction is not io .Direction .Output :
372373 i_ff = Signal (reset_less = True )
373- m .d [self .i_domain ] += i_ff .eq (io_buffer .i )
374- m .d .comb += self .i .eq (i_ff )
374+ m .d [self .i_domain ] += i_ff .eq (io_buffer .i ) # type: ignore[reportAttributeAccessIssue]
375+ m .d .comb += self .i .eq (i_ff ) # type: ignore[reportAttributeAccessIssue]
375376
376377 if self .direction is not io .Direction .Input :
377378 o_ff = Signal (reset_less = True )
378379 oe_ff = Signal (reset_less = True )
379- m .d [self .o_domain ] += o_ff .eq (self .o )
380- m .d [self .o_domain ] += oe_ff .eq (self .oe )
381- m .d .comb += io_buffer .o .eq (o_ff )
382- m .d .comb += io_buffer .oe .eq (oe_ff )
380+ m .d [self .o_domain ] += o_ff .eq (self .o ) # type: ignore[reportAttributeAccessIssue]
381+ m .d [self .o_domain ] += oe_ff .eq (self .oe ) # type: ignore[reportAttributeAccessIssue]
382+ m .d .comb += io_buffer .o .eq (o_ff ) # type: ignore[reportAttributeAccessIssue]
383+ m .d .comb += io_buffer .oe .eq (oe_ff ) # type: ignore[reportAttributeAccessIssue]
383384
384385 return m
385386
0 commit comments