-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add slave triggers like we add digitizer triggers. #23
Conversation
While I figure out how to finish this, @ahelsing can use this branch to get rid of the bonus sequence in QGL2 programs. |
Now that #25 has landed, I'll generate new test vectors and add them to the PR. |
56a2122
to
394b74f
Compare
There were a number of more subtle issues here lurking under the covers. The ones I have discovered so far have been fixed. This should pass unit test on Python 2.7 now, but since this involved updating basically every test vector, I am contemplating making a tool to visualize the difference in test vectors prior to merging. |
41c1c0a
to
26ba818
Compare
26ba818
to
c325a57
Compare
This introduces a new problem, because sequences aren't decorated with WAITs until after this is called. So, we need to change the order of the compile passes for this to work.
So that slaveTrigger injection has something to latch onto.
Makes a slaveTrig or digitizerTrig less likely to "extend" another pulse when tensored on.
Replace this expression with an explicit branch.
c325a57
to
4a09618
Compare
Note: does not yet include the `plot_pulse_files_compare` method because that needs some cleanup.
ct = 0 | ||
while ct < len(seq)-1: | ||
if isinstance(seq[ct], ControlFlow.Wait): | ||
if not isinstance(seq[ct+1], ControlFlow.ControlInstruction): |
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.
@blakejohnson isn't it safer to check if it is a Waveform? E.g. what if it is a BlockLabel?
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.
You're right that a BlockLabel
would be problematic. But, a CompositeWaveform
or a PulseBlock
would work. Maybe the better approach is just to use a try
block and fall back to inserting if the object doesn't support *=
.
Adds unit test.
@caryan is that better? |
With unit tests too! |
This introduces a new problem, because sequences aren't decorated with WAITs
until after this is called. So, we need to change the order of the compile
passes for this to work.