Skip to content

Commit 858f739

Browse files
committed
[FIX] vivado_ibert: Fix setting link properties
1 parent 7af6555 commit 858f739

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

protoplaster/tests/bert/vivado_ibert/ibert_eyescan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class EyeScan:
1111

1212
def __init__(self, vivado_cmd: str, hw_server: str, serial_number: str,
1313
channel_path: str, prbs_bits: int, loopback: bool) -> None:
14-
self.eyescan_file = tempfile.NamedTemporaryFile()
14+
self.eyescan_file = tempfile.NamedTemporaryFile(suffix=".csv")
1515
self.hw_server = hw_server
1616
self.serial_number = serial_number
1717
self.channel_path = channel_path
@@ -39,7 +39,7 @@ def __init__(self, vivado_cmd: str, hw_server: str, serial_number: str,
3939
self.serial_number,
4040
self.channel_path,
4141
str(self.prbs_bits),
42-
int(self.loopback),
42+
str(self.loopback),
4343
]
4444
res = subprocess.run(vivado_argv,
4545
cwd=os.path.dirname(__file__),

protoplaster/tests/bert/vivado_ibert/ibert_eyescan.tcl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ proc perform_eye_scan { outputPath hwServer serialNumber channelPath prbsBits lo
1515
if { $loopback } {
1616
# Set link to use PCS Loopback, and write to hardware
1717
set_property LOOPBACK {Far-End PCS} [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
18-
commit_hw_sio -non_blocking [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
1918
}
2019
set_property RX_PATTERN "PRBS $prbsBits-bit" [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
21-
commit_hw_sio -non_blocking [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
2220
set_property TX_PATTERN "PRBS $prbsBits-bit" [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
23-
commit_hw_sio -non_blocking [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
21+
commit_hw_sio [get_hw_sio_links -of_objects [get_hw_sio_linkgroups {Link_Group_0}]]
2422
# Create, run, and save scan
25-
set xil_newScan [create_hw_sio_scan -description {Scan 2} 2d_full_eye [lindex [get_hw_sio_links $fullPath/TX->$fullPath/RX] 0 ]]
23+
set xil_newScan [create_hw_sio_scan -description {Scan 0} 2d_full_eye [lindex [get_hw_sio_links $fullPath/TX->$fullPath/RX] 0 ]]
2624
run_hw_sio_scan [get_hw_sio_scans $xil_newScan]
27-
wait_on_hw_sio_scan $xil_newScan
28-
write_hw_sio_scan $outputPath $xil_newScan
25+
wait_on_hw_sio_scan [get_hw_sio_scans $xil_newScan]
26+
write_hw_sio_scan -force $outputPath [get_hw_sio_scans $xil_newScan]
2927
}
3028

3129
set requiredArgs 6

protoplaster/tests/bert/vivado_ibert/test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ def test_eye_size(self):
9090
assert min_width <= max_width, f"Invalid range: [{min_width}, {max_width}]"
9191
assert min_height <= max_height, f"Invalid range: [{min_height}, {max_height}]"
9292

93-
for sample in samples:
94-
width, height = self.eyescan.get_eye_size(sample)
95-
assert min_width <= width <= max_width, f"Eye width {width} is not in accepted range: [{min_width}, {max_width}]"
96-
assert min_height <= height <= max_height, f"Eye height {height} is not in accepted range: [{min_height}, {max_height}]"
93+
width, height = self.eyescan.get_eye_size(samples)
94+
assert min_width <= width <= max_width, f"Eye width {width} is not in accepted range: [{min_width}, {max_width}]"
95+
assert min_height <= height <= max_height, f"Eye height {height} is not in accepted range: [{min_height}, {max_height}]"
9796

9897
def name(self):
9998
return self.test_name

0 commit comments

Comments
 (0)