Skip to content

fix(core.Common): Use LoadConfigProcess.#1006

Merged
tristpinsm merged 2 commits into
mainfrom
tpm/load-config
Jun 18, 2026
Merged

fix(core.Common): Use LoadConfigProcess.#1006
tristpinsm merged 2 commits into
mainfrom
tpm/load-config

Conversation

@tristpinsm

Copy link
Copy Markdown
Collaborator

Avoids timing out on long-running command.

This was often causing crashes during testing on the LAT, now that the ZMQ client will time out on long-running Command calls breaking with previous behavior in rogue 4 / EPICS.

Tested on the B33 smurf.

@tristpinsm tristpinsm requested a review from swh76 as a code owner June 1, 2026 22:10
@tristpinsm tristpinsm requested review from ruck314 and slacrherbst June 1, 2026 22:11
@github-actions github-actions Bot added core Changes to the core code, which is used in the server application client Changes to the client code labels Jun 1, 2026
@tristpinsm

Copy link
Copy Markdown
Collaborator Author

It does seem however that the JESD lock fails repeatedly and overall it takes much longer to set all of the defaults with this process... I don't know how systematic that is, but I've observed it now on the B33 smurf and on a LAT system.

@tristpinsm

Copy link
Copy Markdown
Collaborator Author

@ruck314 I should do some more testing on this, but any ideas why the JESD init may be taking a lot longer / failing with this change?

@tristpinsm

Copy link
Copy Markdown
Collaborator Author

right now I'm observing it failing repeatedly on the JESD init:

AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx: Link Not Locked: SysRefPeriodmin = 1846, SysRefPeriodmax = 65535
Setting defaults from file /tmp/fw/smurf_cfg/defaults/defaults_c03_lb_lb.yml (try number 0)
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx.DataValid = 0 
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdTx.DataValid = 0 
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx: Link Not Locked: SysRefPeriodmin = 1846, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx.DataValid = 0 
AMCc.FpgaTopLevel.AppTop.writeBlocks()
AMCc.FpgaTopLevel.AppTop.AppCore.MicrowaveMuxCore[0].writeBlocks()
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx: Link Not Locked: SysRefPeriodmin = 9, SysRefPeriodmax = 15
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx.DataValid = 0 
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdTx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx: Link Not Locked: SysRefPeriodmin = 10, SysRefPeriodmax = 15
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx: Link Not Locked: SysRefPeriodmin = 1846, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx: Link Not Locked: SysRefPeriodmin = 9, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx.DataValid = 0 
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdTx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx: Link Not Locked: SysRefPeriodmin = 10, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx: Link Not Locked: SysRefPeriodmin = 1846, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdRx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx: Link Not Locked: SysRefPeriodmin = 9, SysRefPeriodmax = 65535
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdTx.DataValid = 0 
AppTop.Init(): Link Not Locked: AMCc.FpgaTopLevel.AppTop.AppTopJesd[1].JesdTx.DataValid = 0 
AppTop.Init().AMCc.FpgaTopLevel.AppTop.AppTopJesd[0].JesdRx: Link Not Locked: SysRefPeriodmin = 10, SysRefPeriodmax = 65535

@tristpinsm

Copy link
Copy Markdown
Collaborator Author

I think this will have to be re-visited once changes in the pre-release branch have been integrated into the main branch. There are changes to a bunch of related structures that are making this hard to sort out.

When that happens, other libraries like amc-carrier-core and cryo-det will also need to be updated. In particular slaclab/rogue#1233 appears to be breaking.

@tristpinsm

Copy link
Copy Markdown
Collaborator Author

Another data point here: If I keep rogue exactly the same and only go back to using LoadConfig instead of LoadConfigProcess in pysmurf, the this works fine again.

So it might be that the process not blocking the rogue threads or something like that is cause the inits to fail. Looks like there is PR slaclab/rogue#1259 that may be addressing this (?).

Avoids timing out on long-running command.
The default period is 1.0, which means that the update thread is
not blocked while loading configuration and initialisation. This
was found to cause the JESD initialisation to fail.
@tristpinsm

Copy link
Copy Markdown
Collaborator Author

This is sorted now.

Pending #1011

@tristpinsm tristpinsm merged commit 3b5f44f into main Jun 18, 2026
21 checks passed
@tristpinsm tristpinsm deleted the tpm/load-config branch June 18, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Changes to the client code core Changes to the core code, which is used in the server application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant