Skip to content

Commit

Permalink
Updates during help system generation
Browse files Browse the repository at this point in the history
  • Loading branch information
PetePupalaikis committed Sep 1, 2021
1 parent 6715c5d commit fe6943d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 32 deletions.
10 changes: 3 additions & 7 deletions SignalIntegrity/App/Examples/HDMICable/PRBSTest.si
Original file line number Diff line number Diff line change
Expand Up @@ -542,16 +542,12 @@
<Columns>200</Columns>
<Invert>True</Invert>
<JitterNoise>
<JitterDeterministicPercentUIPk>2.0</JitterDeterministicPercentUIPk>
<JitterDeterministicPkS>4e-12</JitterDeterministicPkS>
<JitterPercentUI>2.0</JitterPercentUI>
<JitterS>4e-12</JitterS>
<LogIntensity>
<LogIntensity>False</LogIntensity>
<MaxBERExponent>0</MaxBERExponent>
<MaxBERSaturationPercent>100</MaxBERSaturationPercent>
<MinBERExponent>-6</MinBERExponent>
<MinBERSaturationPercent>20</MinBERSaturationPercent>
<MaxExponent>0</MaxExponent>
<MinExponent>-12</MinExponent>
</LogIntensity>
<MaxWindowPixels>100000.0</MaxWindowPixels>
<Noise>0.03</Noise>
Expand All @@ -560,7 +556,7 @@
<Rows>200</Rows>
<Saturation>20.0</Saturation>
<ScaleX>75.0</ScaleX>
<ScaleY>200.0</ScaleY>
<ScaleY>150.0</ScaleY>
<UI>3</UI>
<YAxis>
<Max>1.0</Max>
Expand Down
10 changes: 5 additions & 5 deletions SignalIntegrity/App/EyeDiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def CalculateEyeDiagram(self,callback=None):
WH=int(math.floor(math.floor(2.*10.*(deterministicJitter+jitterSigma)/deltaT/2.)*2.)+1.)
WV=int(math.floor(math.floor(2.*10.*noiseSigma/deltaY/2.)*2.)+1.)

maxPixels = int(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.MaxWindowPixels'])
maxPixels = int(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.MaxKernelPixels'])
if WH*WV > maxPixels:
if not self.headless: self.parent.statusbar.set('***** warning - limiting window to : '+str(maxPixels)+' *****')
WH=int(math.floor((WH*math.sqrt(float(maxPixels)/float(WH*WV))-1)/2))*2+1
Expand All @@ -378,11 +378,11 @@ def CalculateEyeDiagram(self,callback=None):
if SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.LogIntensity']:
total=sum([sum([bitmap[r][c] for c in range(C)]) for r in range(R)])
bitmap=[[bitmap[r][c]/total*C for c in range(C)] for r in range(R)]
minBER=max(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinBERExponent'],-20)
maxBER=max(minBER,SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxBERExponent'])
minBER=max(SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinExponent'],-20)
maxBER=max(minBER,SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxExponent'])
minValue=pow(10.,minBER-1)
minSat=SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MinBERSaturationPercent']/100.
maxSat=SignalIntegrity.App.Project['EyeDiagram.JitterNoise.LogIntensity.MaxBERSaturationPercent']/100.
minSat=0
maxSat=1.

m=(maxSat-minSat)/(maxBER-minBER)
b=minSat-minBER*m
Expand Down
22 changes: 7 additions & 15 deletions SignalIntegrity/App/EyeDiagramPropertiesDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ def __init__(self,parent,project):
self.JitterSeconds=CalculationPropertySI(self.JitterNoiseFrame,'Random Jitter (s)',self.onUpdateJitterSeconds,None,project,'EyeDiagram.JitterNoise.JitterS','s')
self.JitterDeterministicPkS=CalculationPropertySI(self.JitterNoiseFrame,'Deterministic Jitter (s, pk)',self.onUpdateDeterministicJitterSeconds,None,project,'EyeDiagram.JitterNoise.JitterDeterministicPkS','s')
self.Noise=CalculationPropertySI(self.JitterNoiseFrame,'Noise',self.onUpdateNoise,None,project,'EyeDiagram.JitterNoise.Noise','V')
self.MaxWindowWidthHeightPixels=CalculationPropertySI(self.JitterNoiseFrame,'Max Window Dimensions',self.onUpdateMaxWindowWidthHeightPixels,None,project,'EyeDiagram.JitterNoise.MaxWindowPixels','pixels')
self.MaxWindowWidthHeightPixels=CalculationPropertySI(self.JitterNoiseFrame,'Max Kernel Pixels',self.onUpdateMaxWindowWidthHeightPixels,None,project,'EyeDiagram.JitterNoise.MaxKernelPixels','pixels')
self.Invert=CalculationPropertyTrueFalseButton(self.EyeFrame,'Invert Plot',self.onUpdateInvert,None,project,'EyeDiagram.Invert')
self.LogIntensityFrame=tk.Frame(self.JitterNoiseFrame)
self.LogIntensityFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO)
self.LogIntensity=CalculationPropertyTrueFalseButton(self.LogIntensityFrame,'Log Intensity',self.onUpdateLogIntensity,None,project,'EyeDiagram.JitterNoise.LogIntensity.LogIntensity')
self.MinBERExponent=CalculationProperty(self.LogIntensityFrame,'Min BER exponent',self.onUpdateMinBERExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinBERExponent')
self.MinBERSaturation=CalculationProperty(self.LogIntensityFrame,'Min BER saturation',self.onUpdateMinBERSaturation,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinBERSaturationPercent')
self.MaxBERExponent=CalculationProperty(self.LogIntensityFrame,'Max BER exponent',self.onUpdateMaxBERExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxBERExponent')
self.MaxBERSaturation=CalculationProperty(self.LogIntensityFrame,'Max BER saturation',self.onUpdateMaxBERSaturation,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxBERSaturationPercent')
self.MinExponent=CalculationProperty(self.LogIntensityFrame,'Min Exponent',self.onUpdateMinExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MinExponent')
self.MaxExponent=CalculationProperty(self.LogIntensityFrame,'Max Exponent',self.onUpdateMaxExponent,None,project,'EyeDiagram.JitterNoise.LogIntensity.MaxExponent')
self.SaveToPreferencesFrame=tk.Frame(self.propertyListFrame,relief=tk.RIDGE, borderwidth=5)
self.SaveToPreferencesFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO)
self.SaveToPreferencesButton = tk.Button(self.SaveToPreferencesFrame,text='Save Properties to Global Preferences',command=self.onSaveToPreferences,width=CalculationProperty.entryWidth)
Expand Down Expand Up @@ -125,10 +123,8 @@ def UpdateStrings(self,calculate=True):
self.LogIntensity.Show(jitterNoiseMode)
self.LogIntensityFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO)
logIntensity=self.project['EyeDiagram.JitterNoise.LogIntensity.LogIntensity']
self.MinBERExponent.Show(jitterNoiseMode and logIntensity)
self.MinBERSaturation.Show(jitterNoiseMode and logIntensity)
self.MaxBERExponent.Show(jitterNoiseMode and logIntensity)
self.MaxBERSaturation.Show(jitterNoiseMode and logIntensity)
self.MinExponent.Show(jitterNoiseMode and logIntensity)
self.MaxExponent.Show(jitterNoiseMode and logIntensity)
def onUpdateJitterSeconds(self,_):
self.UpdateStrings()
def onUpdateDeterministicJitterSeconds(self,_):
Expand All @@ -137,13 +133,9 @@ def onUpdateNoise(self,_):
self.UpdateStrings()
def onUpdateMaxWindowWidthHeightPixels(self,_):
self.UpdateStrings()
def onUpdateMinBERExponent(self,_):
def onUpdateMinExponent(self,_):
self.UpdateStrings()
def onUpdateMinBERSaturation(self,_):
self.UpdateStrings()
def onUpdateMaxBERExponent(self,_):
self.UpdateStrings()
def onUpdateMaxBERSaturation(self,_):
def onUpdateMaxExponent(self,_):
self.UpdateStrings()
def onUpdateInvert(self,_):
self.UpdateStrings()
Expand Down
8 changes: 3 additions & 5 deletions SignalIntegrity/App/PreferencesFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,16 @@ class EyeLogIntensityConfiguration(XMLConfiguration):
def __init__(self):
super().__init__('LogIntensity')
self.Add(XMLPropertyDefaultBool('LogIntensity',False))
self.Add(XMLPropertyDefaultFloat('MinBERExponent',-12))
self.Add(XMLPropertyDefaultFloat('MinBERSaturationPercent',20))
self.Add(XMLPropertyDefaultFloat('MaxBERExponent',-6))
self.Add(XMLPropertyDefaultFloat('MaxBERSaturationPercent',100))
self.Add(XMLPropertyDefaultFloat('MinExponent',-12))
self.Add(XMLPropertyDefaultFloat('MaxExponent',0))

class EyeJitterNoiseConfiguration(XMLConfiguration):
def __init__(self):
super().__init__('JitterNoise')
self.Add(XMLPropertyDefaultFloat('JitterS',0))
self.Add(XMLPropertyDefaultFloat('JitterDeterministicPkS',0))
self.Add(XMLPropertyDefaultFloat('Noise',0.0))
self.Add(XMLPropertyDefaultInt('MaxWindowPixels',100000))
self.Add(XMLPropertyDefaultInt('MaxKernelPixels',100000))
self.SubDir(EyeLogIntensityConfiguration())

class EyeConfiguration(XMLConfiguration):
Expand Down

0 comments on commit fe6943d

Please sign in to comment.