blob: c45bff0d18dad962c44e918cd9d3b5f50378feb9 [file] [log] [blame]
Rupert Swarbrick105df012021-01-29 11:33:13 +00001#!/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# Check generated files are up to date
7
Rupert Swarbrickbaa04282021-02-10 16:11:00 +00008make -k -C hw regs && git diff --exit-code
Rupert Swarbrick105df012021-01-29 11:33:13 +00009if [[ $? != 0 ]]; then
10 echo -n "##vso[task.logissue type=error]"
11 echo "Register headers not up-to-date. Regenerate them with 'make -C hw regs'."
12 exit 1
13fi
14
Rupert Swarbrickbaa04282021-02-10 16:11:00 +000015make -k -C hw top && git diff --exit-code
Rupert Swarbrick105df012021-01-29 11:33:13 +000016if [[ $? != 0 ]]; then
17 echo -n "##vso[task.logissue type=error]"
18 echo "Autogenerated tops not up-to-date. Regenerate with 'make -C hw top'."
19 exit 1
20fi
21
Rupert Swarbrickbaa04282021-02-10 16:11:00 +000022make -k -C hw otp-mmap && git diff --exit-code
Rupert Swarbrick105df012021-01-29 11:33:13 +000023if [[ $? != 0 ]]; then
24 echo -n "##vso[task.logissue type=error]"
25 echo "Autogenerated OTP memory map files not up-to-date. Regenerate with 'make -C hw otp-mmap'."
26 exit 1
27fi
28
Rupert Swarbrickbaa04282021-02-10 16:11:00 +000029make -k -C hw lc-state-enc && git diff --exit-code
Rupert Swarbrick105df012021-01-29 11:33:13 +000030if [[ $? != 0 ]]; then
31 echo -n "##vso[task.logissue type=error]"
32 echo "Autogenerated LC state not up-to-date. Regenerate with 'make -C hw lc-state-enc'."
33 exit 1
34fi
Rupert Swarbrick53cc1f82021-02-09 13:00:42 +000035
36hw/ip/flash_ctrl/util/flash_ctrl_gen.py && git diff --exit-code
37if [[ $? != 0 ]]; then
38 echo -n "##vso[task.logissue type=error]"
39 echo "Autogenerated flash_ctrl code not up-to-date."
40 echo "Regenerate with 'hw/ip/flash_ctrl/util/flash_ctrl_gen.py'."
41 exit 1
42fi
Rupert Swarbrick1f38a162021-04-19 11:10:56 +010043
44util/design/secded_gen.py --no_fpv && git diff --exit-code
45if [[ $? != 0 ]]; then
46 echo -n "##vso[task.logissue type=error]"
47 echo "Autogenerated secded primitive code not up-to-date."
48 echo "Regenerate with 'util/design/secded_gen.py --no_fpv'."
49 exit 1
50fi