blob: f5b1f7e7c825cca1bff1ca10968aad750233f91b [file] [log] [blame]
Miles Dai91d811e2022-05-10 15:51:17 -04001#!/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
10set -e
11
12. util/build_consts.sh
13
14# Cleaning is necessary for the find commands below to work correctly
15ci/bazelisk.sh clean
16
17# Build the modified EB software.
Timothy Trippel5d96baf2022-06-06 22:44:06 -070018./hw/top_englishbreakfast/util/prepare_sw.py -b
Miles Dai91d811e2022-05-10 15:51:17 -040019
20# Build some other dependencies.
Chris Frantz50931152022-09-01 00:52:57 +000021ci/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 Dai91d811e2022-05-10 15:51:17 -040024
25# Run the one test.
26# This needs to be run outside the bazel sandbox, so we do not use `bazel run`
27bazel-bin/sw/host/opentitantool/opentitantool \
28 --rcfile="" \
29 --logging=info \
30 --interface=verilator \
Miles Dai91d811e2022-05-10 15:51:17 -040031 --verilator-bin=$BIN_DIR/hw/top_englishbreakfast/Vchip_englishbreakfast_verilator \
Miles Dai6c340f82022-07-07 14:41:20 -040032 --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 Dai91d811e2022-05-10 15:51:17 -040034 console \
35 --exit-failure="(FAIL|FAULT).*\n" \
36 --exit-success="PASS.*\n" \
37 --timeout=3600s