Miles Dai | 91d811e | 2022-05-10 15:51:17 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright lowRISC contributors. |
| 3 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | |
| 6 | # Only a single test is supported on English Breakfast (EB). |
| 7 | # Currently, Bazel cannot build the EB Verilator model, so we only build the test with Bazel and then use opentitantool directly |
| 8 | # EB Verilator model is built in a previous CI step |
| 9 | |
| 10 | set -e |
| 11 | |
| 12 | . util/build_consts.sh |
| 13 | |
| 14 | # Cleaning is necessary for the find commands below to work correctly |
| 15 | ci/bazelisk.sh clean |
| 16 | |
| 17 | # Build the modified EB software. |
Timothy Trippel | 5d96baf | 2022-06-06 22:44:06 -0700 | [diff] [blame] | 18 | ./hw/top_englishbreakfast/util/prepare_sw.py -b |
Miles Dai | 91d811e | 2022-05-10 15:51:17 -0400 | [diff] [blame] | 19 | |
| 20 | # Build some other dependencies. |
Chris Frantz | 5093115 | 2022-09-01 00:52:57 +0000 | [diff] [blame] | 21 | ci/bazelisk.sh build \ |
| 22 | --copt=-DOT_IS_ENGLISH_BREAKFAST_REDUCED_SUPPORT_FOR_INTERNAL_USE_ONLY_ \ |
| 23 | //sw/host/opentitantool //hw/ip/otp_ctrl/data:img_rma |
Miles Dai | 91d811e | 2022-05-10 15:51:17 -0400 | [diff] [blame] | 24 | |
| 25 | # Run the one test. |
| 26 | # This needs to be run outside the bazel sandbox, so we do not use `bazel run` |
| 27 | bazel-bin/sw/host/opentitantool/opentitantool \ |
| 28 | --rcfile="" \ |
| 29 | --logging=info \ |
| 30 | --interface=verilator \ |
Miles Dai | 91d811e | 2022-05-10 15:51:17 -0400 | [diff] [blame] | 31 | --verilator-bin=$BIN_DIR/hw/top_englishbreakfast/Vchip_englishbreakfast_verilator \ |
Miles Dai | 6c340f8 | 2022-07-07 14:41:20 -0400 | [diff] [blame] | 32 | --verilator-rom="$(find bazel-out/* -name 'test_rom_sim_verilator.32.vmem')" \ |
| 33 | --verilator-flash="$(find bazel-out/* -name 'aes_smoketest_prog_sim_verilator.64.scr.vmem')" \ |
Miles Dai | 91d811e | 2022-05-10 15:51:17 -0400 | [diff] [blame] | 34 | console \ |
| 35 | --exit-failure="(FAIL|FAULT).*\n" \ |
| 36 | --exit-success="PASS.*\n" \ |
| 37 | --timeout=3600s |