Skip to content

Commit a3e47b4

Browse files
committed
[bazel] Apply new fpga testopt to exec env
Change-Id: I645ac75eb2007d0d109bcab2fdc0cad042e7c8e1 Signed-off-by: Yi-Hsuan Deng <[email protected]>
1 parent 5d3c8cb commit a3e47b4

File tree

1 file changed

+16
-26
lines changed

1 file changed

+16
-26
lines changed

hw/top_earlgrey/BUILD

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ fpga_cw310(
8686
"//sw/device/lib/arch:fpga_cw310",
8787
],
8888
linker_script = "//sw/device/lib/testing/test_framework:ottf_ld_silicon_creator_slot_a",
89+
param = {
90+
"interface": "cw310",
91+
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
92+
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
93+
},
8994
rom_scramble_config = "//hw/top_earlgrey/data:autogen/top_earlgrey.gen.hjson",
9095
slot_spec = EARLGREY_SLOTS,
9196
test_cmd = "testing-not-supported",
@@ -98,6 +103,7 @@ fpga_cw310(
98103
"--rcfile=",
99104
"--logging=info",
100105
"--interface={interface}",
106+
"--drop-reset",
101107
] + select({
102108
"//ci:lowrisc_fpga_cw310": ["--uarts=/dev/ttyACM_CW310_1,/dev/ttyACM_CW310_0"],
103109
"//conditions:default": [],
@@ -109,15 +115,10 @@ fpga_cw310(
109115
openocd_adapter_config = "//third_party/openocd:jtag_olimex_cfg",
110116
otp = "//hw/ip/otp_ctrl/data:img_rma",
111117
param = {
112-
"interface": "cw310",
113-
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
114-
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
118+
"testopt_bootstrap": "True",
115119
},
116120
rom = "//sw/device/lib/testing/test_rom:test_rom",
117121
test_cmd = """
118-
--exec="transport init"
119-
--exec="fpga load-bitstream {bitstream}"
120-
--exec="bootstrap --clear-uart=true {firmware}"
121122
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
122123
no-op
123124
""",
@@ -239,9 +240,6 @@ fpga_cw310(
239240
manifest = "//sw/device/silicon_owner:manifest",
240241
otp = "//sw/device/silicon_creator/rom_ext/e2e:otp_img_secret2_locked_rma",
241242
param = {
242-
"interface": "cw310",
243-
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
244-
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
245243
"assemble": "{rom_ext}@{rom_ext_slot_a} {firmware}@{owner_slot_a}",
246244
},
247245
rom = "//sw/device/silicon_creator/rom:mask_rom",
@@ -258,6 +256,7 @@ fpga_cw310(
258256
"--rcfile=",
259257
"--logging=info",
260258
"--interface={interface}",
259+
"--drop-reset",
261260
],
262261
base = ":fpga_cw310",
263262
base_bitstream = "//hw/bitstream/hyperdebug:bitstream",
@@ -268,14 +267,10 @@ fpga_cw310(
268267
otp = "//hw/ip/otp_ctrl/data:img_rma",
269268
param = {
270269
"interface": "hyper310",
271-
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
272-
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
270+
"testopt_bootstrap": "True",
273271
},
274272
rom = "//sw/device/silicon_creator/rom:mask_rom",
275273
test_cmd = """
276-
--exec="transport init"
277-
--exec="fpga load-bitstream {bitstream}"
278-
--exec="bootstrap --clear-uart=true {firmware}"
279274
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
280275
no-op
281276
""",
@@ -295,9 +290,6 @@ fpga_cw310(
295290
manifest = "//sw/device/silicon_owner:manifest",
296291
otp = "//sw/device/silicon_creator/rom_ext/e2e:otp_img_secret2_locked_rma",
297292
param = {
298-
"interface": "hyper310",
299-
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
300-
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
301293
"assemble": "{rom_ext}@{rom_ext_slot_a} {firmware}@{owner_slot_a}",
302294
},
303295
rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_dice_x509_slot_a",
@@ -376,6 +368,7 @@ fpga_cw340(
376368
"--rcfile=",
377369
"--logging=info",
378370
"--interface={interface}",
371+
"--drop-reset",
379372
] + select({
380373
"//ci:lowrisc_fpga_cw340": ["--uarts=/dev/ttyACM_CW340_1,/dev/ttyACM_CW340_0"],
381374
"//conditions:default": [],
@@ -405,11 +398,11 @@ fpga_cw340(
405398
exec_env = "fpga_cw340_test_rom",
406399
mmi = "//hw/bitstream/cw340:mmi",
407400
otp = "//hw/ip/otp_ctrl/data:img_rma",
401+
param = {
402+
"testopt_bootstrap": "True",
403+
},
408404
rom = "//sw/device/lib/testing/test_rom:test_rom",
409405
test_cmd = """
410-
--exec="transport init"
411-
--exec="fpga load-bitstream {bitstream}"
412-
--exec="bootstrap --clear-uart=true {firmware}"
413406
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
414407
no-op
415408
""",
@@ -425,11 +418,11 @@ fpga_cw340(
425418
manifest = "//sw/device/silicon_creator/rom_ext:manifest",
426419
mmi = "//hw/bitstream/cw340:mmi",
427420
otp = "//hw/ip/otp_ctrl/data:img_rma",
421+
param = {
422+
"testopt_bootstrap": "True",
423+
},
428424
rom = "//sw/device/silicon_creator/rom:mask_rom",
429425
test_cmd = """
430-
--exec="transport init"
431-
--exec="fpga load-bitstream {bitstream}"
432-
--exec="bootstrap --clear-uart=true {firmware}"
433426
--exec="console --non-interactive --exit-success='{exit_success}' --exit-failure='{exit_failure}'"
434427
no-op
435428
""",
@@ -453,9 +446,6 @@ fpga_cw340(
453446
manifest = "//sw/device/silicon_owner:manifest",
454447
otp = "//sw/device/silicon_creator/rom_ext/e2e:otp_img_secret2_locked_rma",
455448
param = {
456-
"interface": "hyper340",
457-
"exit_success": DEFAULT_TEST_SUCCESS_MSG,
458-
"exit_failure": DEFAULT_TEST_FAILURE_MSG,
459449
"assemble": "{rom_ext}@{rom_ext_slot_a} {firmware}@{owner_slot_a}",
460450
},
461451
rom_ext = select({

0 commit comments

Comments
 (0)