Skip to content
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

Merged
merged 2 commits into from
Sep 10, 2019
Merged

TDM input channels #221

merged 2 commits into from
Sep 10, 2019

Conversation

dieris
Copy link
Collaborator

@dieris dieris commented Sep 9, 2019

See #204

@dieris dieris requested a review from ahelsing September 9, 2019 21:59
@coveralls
Copy link

coveralls commented Sep 9, 2019

Coverage Status

Coverage decreased (-0.02%) to 58.207% when pulling 18dc28f on feature/tdm-chan into 2e9ff3e on develop.

@@ -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)))
Copy link
Contributor

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?

Copy link
Collaborator Author

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)
Copy link
Contributor

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?

Copy link
Collaborator Author

@dieris dieris Sep 10, 2019

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

Copy link
Contributor

@ahelsing ahelsing left a 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
@dieris dieris merged commit 4967e72 into develop Sep 10, 2019
@dieris dieris deleted the feature/tdm-chan branch September 10, 2019 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants