-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switchboard 0.0.17 SB-447 SB-450 SB-451 SB-452 #100
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sgherbst
changed the title
switchboard 0.0.17
switchboard 0.0.17 SB-447 SB-450 SB-451 SB-452
Aug 27, 2023
Can the latest umi repo with all bug fixes be used? |
@azaidy sure thing, just pushed that update. |
azaidy
approved these changes
Aug 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR introduces several new features:
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 withumi_loopback(umi, N)
, whereumi
is aUmiTxRx
object andN
is the number of packets to send, which are generated randomly withrandom_umi_packet
. You can also pass in your own sequence of packets to send withumi_loopback(umi, LIST_OF_UMI_PACKETS)
. To see an example, check out the updatedexamples/umi_fifo_flex/test.py
.random_umi_packet
generates properly aligned addresses, andread
/write
check that addresses are aligned.max_bytes
parameter inrandom_umi_packet
: if you pass the optionalmax_bytes
parameter torandom_umi_packet
, it will not return packets with more than that number of data bytes. For example, you could setmax_bytes
=16 if you want to generate packets that can be sent with a 128b data bus.merge()
available on UMI packets. For example, if you have twoPyUmiPacket
objects,p
andother
, you can callp.merge(other)
, which will mergeother
intop
according to the UMI merge rules. The method returnsTrue
if successful andFalse
otherwise (in which case the merge is not performed).==
and!=
operators are now implemented forPyUmiPacket
objects. This makes it easier to implement some kinds of tests - to see one example, check out the updates toexamples/umi_fifo/test.py
.Testing this PR
Change to the branch
sgh/loopback
.Reinstall the Python package.
$ pip install -e .
Update the dependencies used in the examples.
$ cd examples $ ./get_deps.py
Try out examples, such as
umi_fifo_flex
.$ cd umi_fifo_flex $ make
Other updates
umi
andlambdalib
in the examples folderresolve()
is used on paths in the examples folder