Skip to content

Commit 461bc99

Browse files
FIX: Valid Context arguments for Statistical Eye Reports (#4811)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e45510b commit 461bc99

File tree

3 files changed

+68
-2
lines changed

3 files changed

+68
-2
lines changed
Binary file not shown.

_unittest_solvers/example_models/T01/compliance/general_compliance_template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@
4646
"type": "statistical eye",
4747
"config": "StatisticalEyeDiagram_Custom.json",
4848
"quantity_type": 3,
49-
"traces": ["b_input_67"],
49+
"traces": ["b_input_67", "b_input_119"],
5050
"pass_fail": true
5151
},
5252
{"name": "eye3",
5353
"design_name":"32GTps_circuit",
5454
"type": "contour eye diagram",
5555
"config": "ContourEyeDiagram_Custom.json",
5656
"quantity_type": 3,
57-
"traces": ["b_input_67"],
57+
"traces": ["b_input_67", "b_input_119"],
5858
"pass_fail": true
5959
},
6060
{"name": "eye2",

pyaedt/modules/report_templates.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2611,6 +2611,9 @@ def _context(self):
26112611
"USE_PRI_DIST",
26122612
False,
26132613
"0" if not self.enable_jitter_distribution else "1",
2614+
"SID",
2615+
False,
2616+
"0",
26142617
]
26152618
if self.enable_jitter_distribution and str(self.quantity_type) == "3":
26162619
sim_context = [
@@ -2655,6 +2658,9 @@ def _context(self):
26552658
"PID",
26562659
False,
26572660
"0",
2661+
"SID",
2662+
False,
2663+
"0",
26582664
"PRIDIST",
26592665
False,
26602666
"0",
@@ -2680,6 +2686,31 @@ def _context(self):
26802686
"SimValueContext:=",
26812687
sim_context,
26822688
]
2689+
if len(self.expressions) == 1:
2690+
sid = 0
2691+
pid = 0
2692+
expr = self.expressions[0]
2693+
category = "Eye"
2694+
found = False
2695+
while not found:
2696+
available_quantities = self._post.available_report_quantities(
2697+
self.report_category, self.report_type, self.setup, category, arg
2698+
)
2699+
if len(available_quantities) == 1 and available_quantities[0].lower() == expr.lower():
2700+
found = True
2701+
else:
2702+
sid += 1
2703+
pid += 1
2704+
arg[2][arg[2].index("SID") + 2] = str(sid)
2705+
arg[2][arg[2].index("PID") + 2] = str(pid)
2706+
# Limited maximum iterations to 1000 in While loop (Too many probes to analyze even in a single design)
2707+
if sid > 1000:
2708+
self._post.logger.error(
2709+
"Failed to find right context for expression : {}".format(",".join(self.expressions))
2710+
)
2711+
# arg[2][arg[2].index("SID") + 2] = "0"
2712+
# arg[2][arg[2].index("PID") + 2] = "0"
2713+
break
26832714
return arg
26842715

26852716
@property
@@ -3202,8 +3233,43 @@ def _context(self):
32023233
"QTID",
32033234
False,
32043235
str(self.quantity_type),
3236+
"SCID",
3237+
False,
3238+
"-1",
3239+
"SID",
3240+
False,
3241+
"0",
32053242
],
32063243
]
3244+
if len(self.expressions) == 1:
3245+
sid = 0
3246+
pid = 0
3247+
expr = self.expressions[0]
3248+
category = "Wave"
3249+
if self.report_category == "Statistical Eye":
3250+
category = "Eye"
3251+
if self.report_category == "Eye Diagram" and self.report_type == "Rectangular Plot":
3252+
category = "Voltage"
3253+
found = False
3254+
while not found:
3255+
available_quantities = self._post.available_report_quantities(
3256+
self.report_category, self.report_type, self.setup, category, arg
3257+
)
3258+
if len(available_quantities) == 1 and available_quantities[0].lower() == expr.lower():
3259+
found = True
3260+
else:
3261+
sid += 1
3262+
pid += 1
3263+
arg[2][arg[2].index("SID") + 2] = str(sid)
3264+
arg[2][arg[2].index("PID") + 2] = str(pid)
3265+
# Limited maximum iterations to 1000 in While loop (Too many probes to analyze even in a single design)
3266+
if sid > 1000:
3267+
self._post.logger.error(
3268+
"Failed to find right context for expression : {}".format(",".join(self.expressions))
3269+
)
3270+
# arg[2][arg[2].index("SID") + 2] = "0"
3271+
# arg[2][arg[2].index("PID") + 2] = "0"
3272+
break
32073273
return arg
32083274

32093275
@property

0 commit comments

Comments
 (0)