-
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
TDM input channels #221
TDM input channels #221
Conversation
QGL/drivers/APS2Pattern.py
Outdated
@@ -1390,7 +1390,8 @@ def tdm_instructions(seqs): | |||
|
|||
elif isinstance(s, PulseSequencer.Pulse): | |||
if s.label == 'MEAS' and s.maddr != (-1, 0): | |||
instructions.append(CrossBar(2**s.maddr[1], 0x1, label=label)) | |||
tdm_chan = m.channel.processor_chan.channel if getattr(m.channel, 'processor_chan') else 1 | |||
instructions.append(CrossBar(2**m.maddr[1], 2**(tdm_chan-1))) |
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.
Why do we not need to pass along the label here?
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.
I think we do, I'll add it back
for k in range(7): # TDM has 7 digital inputs | ||
chans.append(Channels.DigitalInput(label=f"DigitalInput-{label}-{k}", channel=k, channel_db=self.channelDatabase)) | ||
tdm = Channels.Processor(label=label, model="TDM", address=address, trigger_interval=250e-6, channels=chans, channel_db=self.channelDatabase) | ||
self.add_and_update_dict(tdm) |
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.
Out of curiosity, shouldn't this TDM have been added to the dict before? Was that a bug?
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.
Oops you're right, I think it was missing
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.
Consider more comments explaining what you are doing and the HW assumptions. (Particularly those changes to the CrossBar calls that you had to look up again to understand.)
See also the couple individual comments I added.
Otherwise it looks fine (and didn't break anything for me).
and some comments
See #204