Skip to content

v0.0.17: switchboard 0.0.17 SB-447 SB-450 SB-451 SB-452 (#100)

Compare
Choose a tag to compare
@sgherbst sgherbst released this 31 Aug 22:05
· 145 commits to main since this release
780eef2

Updates:

  • New umi_loopback() function that sends a sequence of UMI packets into a block and checks that the sequence coming back is equivalent under the split/merge rules. This can be used for testing UMI packet splitters, packet aggregators, etc. The simplest way to use it is with umi_loopback(umi, N), where umi is a UmiTxRx object and N is the number of packets to send, which are generated randomly with random_umi_packet. You can also pass in your own sequence of packets to send with umi_loopback(umi, LIST_OF_UMI_PACKETS). To see an example, check out examples/umi_fifo_flex/test.py.
  • Address alignment: random_umi_packet generates properly aligned addresses, and read/write check that addresses are aligned.
  • max_bytes parameter in random_umi_packet: if you pass the optional max_bytes parameter to random_umi_packet, it will not return packets with more than that number of data bytes. For example, you could set max_bytes=16 if you want to generate packets that can be sent with a 128b data bus.
  • There is a new method, merge() available on UMI packets. For example, if you have two PyUmiPacket objects, p and other, you can call p.merge(other), which will merge other into p according to the UMI merge rules. The method returns True if successful and False otherwise (in which case the merge is not performed).
  • The == and != operators are now implemented for PyUmiPacket objects. This makes it easier to implement some kinds of tests - to see one example, check out examples/umi_fifo/test.py.