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

Satellite system doesn't get uplink clock. #2028

Closed
nkrackow opened this issue Dec 13, 2022 · 10 comments
Closed

Satellite system doesn't get uplink clock. #2028

nkrackow opened this issue Dec 13, 2022 · 10 comments

Comments

@nkrackow
Copy link
Contributor

Bug Report

One-Line Summary

Building a bitstream for a satellite with an ARTIQ version after 47581e0 leads to the satellite not getting a link to the master.

Issue Details

I'm pretty sure 0775ae1, 8f3d06a are the culprit.
If I find time tomorrow I'll check this.
The info output about the io expander is a fix for an unrelated hardware change that is not in upstreamed in ARTIQ yet.
I verified that it has nothing to do with this problem by testing a verbatim ARTIQ earlier but I don't have the console out of that right now.

Expected Behavior

[     0.000003s]  INFO(satman): ARTIQ satellite manager starting...
[     0.005908s]  INFO(satman): software ident 7.0.beta;stockholmsatellite
[     0.012445s]  INFO(satman): gateware ident 7.0.beta;stockholmsatellite
[     0.029525s]  INFO(board_misoc::io_expander): MCP23017 io expander 0 not found. Checking for PCA9539.
[     0.058069s]  INFO(board_misoc::io_expander): MCP23017 io expander 1 not found. Checking for PCA9539.
[     0.456029s]  INFO(board_artiq::si5324): waiting for Si5324 lock...
[     2.408998s]  INFO(board_artiq::si5324):   ...locked
[     2.797873s]  INFO(satman): uplink is up, switching to recovered clock
[     2.830818s]  INFO(board_artiq::si5324): waiting for Si5324 lock...
[     4.559314s]  INFO(board_artiq::si5324):   ...locked
[     7.885235s]  INFO(board_artiq::si5324::siphaser): calibration successful, lead: 198, width: 433 (347deg)
[     8.235495s]  INFO(satman): TSC loaded from uplink
[     8.307408s]  INFO(satman): rank: 1
[     8.309507s]  INFO(satman): routing table: RoutingTable { 0: 0; 1: 1 0; 2: 2 0; 3: 3 0; }

Actual (undesired) Behavior

[     0.000003s]  INFO(satman): ARTIQ satellite manager starting...
[     0.005908s]  INFO(satman): software ident 7.0.beta;stockholmsatellite
[     0.012445s]  INFO(satman): gateware ident 7.0.beta;stockholmsatellite
[     0.029525s]  INFO(board_misoc::io_expander): MCP23017 io expander 0 not found. Checking for PCA9539.
[     0.058069s]  INFO(board_misoc::io_expander): MCP23017 io expander 1 not found. Checking for PCA9539.
[     0.456029s]  INFO(board_artiq::si5324): waiting for Si5324 lock...
[     2.376948s]  INFO(board_artiq::si5324):   ...locked

It never gets an uplink connection after this.

Setup

No flash config file on the satellite.

@nkrackow
Copy link
Contributor Author

8f3d06a#diff-0c99ae49963f6b70bf1690eaba102795097c1089358b20dcc83ee82422cca57cR120-R121
I don't fully understand this comment but maybe that has something to do with it? @dnadlinger

@dnadlinger
Copy link
Collaborator

dnadlinger commented Dec 13, 2022

Your guess isn't unreasonable, but I'm also not sure how the commits would be related – AFAIK they should only affect the DRTIO master.

@dnadlinger
Copy link
Collaborator

dnadlinger commented Dec 13, 2022

What are the master's clock settings (that this satellite is supposed to connect to)?

@dnadlinger
Copy link
Collaborator

dnadlinger commented Dec 13, 2022

To be clear, the changes only (are supposed to) affect Kasli v2 when used as a master, making it such that internal/external clocks can actually be selected at runtime through the rtio_clock config option without also having to recompile the firmware.

@jordens
Copy link
Member

jordens commented Dec 13, 2022

How do you come to the impression that the changes are limited to standalone/master? Maybe this was tested.
0775ae1#diff-3ed5c793f81f4728447227870960117251dafbb1869a0ff428661c7d97fd5384R221
in the context of

crystal_ref: true

and
si5324::setup(&SI5324_SETTINGS, si5324::Input::Ckin1).expect("cannot initialize Si5324");

looks like an impact to me.

@dnadlinger
Copy link
Collaborator

dnadlinger commented Dec 17, 2022

Yep, that was just a failure of Find All Uses (and apparently, also my subsequent rging) leading me to assume that the siphaser/… code used a different code path for initialisation.

@dnadlinger dnadlinger reopened this Dec 17, 2022
@dnadlinger
Copy link
Collaborator

dnadlinger commented Dec 17, 2022

Reopened this until somebody can confirm the issue fixed, as I can't test this locally until next week, and there doesn't seem to be CI coverage for DRTIO satellites.

@sbourdeauducq
Copy link
Member

Also need to be cherry-picked on release-7.

dnadlinger added a commit that referenced this issue Dec 18, 2022
Commit 740543d had unintentionally broken DRTIO
satellites, as si5324::setup is also used there. This
imports setup_si5324_as_synthesizer() from artiq-zynq,
where the input selection was already explicitly done.

GitHub: Fixes #2028.
@nkrackow
Copy link
Contributor Author

I've now tested 1dd0d34 on a Kasli V2.0.2 satellite and master and all seems to work as before on both sides.

@dnadlinger
Copy link
Collaborator

Thanks!

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

No branches or pull requests

4 participants