Skip to content

Commit 2a272c5

Browse files
committed
[orchestrator] Handle targets with different ott interface
hyper310 has been renamed cw310 on master but the opentitantool interface named remains hyper310. Therefore the orchestrator needs to be aware that the interface names may not match the target name. Signed-off-by: Amaury Pouly <[email protected]>
1 parent 0974049 commit 2a272c5

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

sw/host/provisioning/orchestrator/src/orchestrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def main(args_in):
9494
)
9595
parser.add_argument(
9696
"--fpga",
97-
choices=["hyper310", "cw340"],
97+
choices=["cw310", "cw340"],
9898
help="Run flow on FPGA (instead of silicon).",
9999
)
100100
parser.add_argument(

sw/host/provisioning/orchestrator/src/ot_dut.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@
1919
# FPGA bitstream.
2020
_FPGA_UNIVERSAL_SPLICE_BITSTREAM = "hw/bitstream/universal/splice.bit"
2121

22+
# Opentitantool interface
23+
_OTT_FPGA_INTERFACE = {
24+
"cw310": "hyper310",
25+
"cw340": "cw340",
26+
}
27+
2228
# CP and FT shared flags.
2329
_OPENOCD_BIN = "third_party/openocd/build_openocd/bin/openocd"
2430
_OPENOCD_ADAPTER_CONFIG = "external/openocd/tcl/interface/cmsis-dap.cfg"
2531
_BASE_PROVISIONING_FLAGS = """
26-
--interface={target} \
32+
--interface={ott_intf} \
2733
--openocd={openocd_bin} \
2834
--openocd-adapter-config={openocd_cfg} \
2935
"""
@@ -106,6 +112,7 @@ def run_cp(self) -> None:
106112
if self.fpga:
107113
# Set host flags and device binary for FPGA DUT.
108114
host_flags = host_flags.format(target=self.fpga,
115+
ott_intf=_OTT_FPGA_INTERFACE[self.fpga],
109116
openocd_bin=openocd_bin,
110117
openocd_cfg=openocd_cfg)
111118
host_flags += " --clear-bitstream"
@@ -117,6 +124,7 @@ def run_cp(self) -> None:
117124
else:
118125
# Set host flags and device binary for Silicon DUT.
119126
host_flags = host_flags.format(target="teacup",
127+
ott_intf="teacup",
120128
openocd_bin=openocd_bin,
121129
openocd_cfg=openocd_cfg)
122130
host_flags += " --disable-dft-on-reset"
@@ -194,6 +202,7 @@ def run_ft(self) -> None:
194202
# No need to load another bitstream, we will take over where CP
195203
# stage above left off.
196204
host_flags = host_flags.format(target=self.fpga,
205+
ott_intf=_OTT_FPGA_INTERFACE[self.fpga],
197206
openocd_bin=openocd_bin,
198207
openocd_cfg=openocd_cfg)
199208
individ_elf = individ_elf.format(
@@ -211,6 +220,7 @@ def run_ft(self) -> None:
211220
else:
212221
# Set host flags and device binaries for Silicon DUT.
213222
host_flags = host_flags.format(target="teacup",
223+
ottf_intf="teacup",
214224
openocd_bin=openocd_bin,
215225
openocd_cfg=openocd_cfg)
216226
host_flags += " --disable-dft-on-reset"

sw/host/provisioning/orchestrator/tests/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sh_test(
6666
"PYTHON": "$(location @python3//:python3)",
6767
},
6868
tags = [
69-
"hyper310",
69+
"cw310",
7070
"manuf",
7171
],
7272
)

sw/host/provisioning/orchestrator/tests/e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ $PYTHON ${ORCHESTRATOR_PATH} \
2121
--sku-config=sw/host/provisioning/orchestrator/configs/skus/emulation.hjson \
2222
--test-unlock-token="0x11111111_11111111_11111111_11111111" \
2323
--test-exit-token="0x22222222_22222222_22222222_22222222" \
24-
--fpga=hyper310 \
24+
--fpga=cw310 \
2525
--non-interactive \
2626
--db-path=$TEST_TMPDIR/registry.sqlite

0 commit comments

Comments
 (0)