pymtl / pymtl3

Pymtl 3 (Mamba), an open-source Python-based hardware generation, simulation, and verification framework
BSD 3-Clause "New" or "Revised" License
388 stars 46 forks source link

Support s.bitstruct_wire //= s.bits_wire #195

Closed jsn1993 closed 11 months ago

jsn1993 commented 4 years ago

Yanghui Ou:

It seems that I cannot connect a bits interface to a bitstruct interface nor does s.bitstruct_wire //= s.bits_wire seem to work.

s.bitstruct_wire @= s.bits_wire works. We may want to make it consistent?

ptpan commented 11 months ago

This now works with the connect_bits2bitstruct free function. A unit test under stdlib/connects verifies this:

https://github.com/pymtl/pymtl3/blob/4b3bc183b14ffacd069f48dc5997b00045aea53f/pymtl3/stdlib/connects/test/connect_bits2bitstruct_test.py#L147C42-L147C42