Skip to content

Commit

Permalink
Fix histogram variables
Browse files Browse the repository at this point in the history
  • Loading branch information
bengineerd committed Oct 3, 2024
1 parent 9288591 commit 7f00903
Showing 1 changed file with 21 additions and 26 deletions.
47 changes: 21 additions & 26 deletions python/surf/xilinx/_GtRxAlignCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,6 @@ def __init__( self,
# Variables
##############################

# self.addRemoteVariables(
# name = "PhaseCount",
# description = "Timing frame phase",
# offset = 0x00,
# bitSize = 16,
# bitOffset = 0,
# mode = "RO",
# pollInterval = 1,
# number = 128,
# stride = 2,
# hidden = True,
# )

self.addRemoteVariables(
name = "PhaseCount",
description = "Timing frame phase",
offset = 0x00,
bitSize = 32,
bitOffset = 0,
mode = "RO",
pollInterval = 1,
number = 64,
stride = 4,
hidden = True,
)

self.add(pr.RemoteVariable(
name = "PhaseTarget",
description = "Timing frame phase lock target",
Expand Down Expand Up @@ -184,3 +158,24 @@ def __init__( self,
linkedGet = lambda read: self.RefClkFreqRaw.get(read=read) * 1.0e-6,
disp = '{:0.3f}',
))

self.add(pr.RemoteVariable(
name = "PhaseCount",
description = "Timing frame phase",
offset = 0x00,
valueBits = 8,
valueStride = 8,
numValues = 40,
mode = "RO",
pollInterval = 1,
hidden = False,
))

for i in range(40):
self.add(pr.LinkVariable(
name = f'PhaseHist[{i}]',
guiGroup='Hist',
disp = '{:d}',
mode = 'RO',
dependencies = [self.PhaseCount],
linkedGet = lambda read, x=i: self.PhaseCount.get(read=read, index=x)))

0 comments on commit 7f00903

Please sign in to comment.