Skip to content

Commit 34fdb00

Browse files
Merge pull request openhwgroup#1234 from openhwgroup/cva6/dev
Merge cva6/dev up onto master
2 parents c4badaa + 153b1df commit 34fdb00

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+12367
-64
lines changed

.gitlab-ci.yml

+129-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,129 @@
1-
stages:
2-
- test
3-
4-
riscv_tests_cv32:
5-
stage: test
6-
script:
7-
- curl -H 'Private-Token:'$METRICS_CI_SERVICE
8-
-H 'Content-Type:application/json'
9-
-d '{"projectId":"cv32e40p_verif-core-v-verif-cv32", "regressionName":"cv32_sanity_regression",
10-
"branch":"'$CI_COMMIT_REF_NAME'"}'
11-
-X POST 'https://openhwgroup.metrics.ca/api/jobs/v1/runRegression'
12-
13-
1+
# Copyright 2022 Thales DIS design services SAS
2+
#
3+
# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
6+
# You may obtain a copy of the License at https://solderpad.org/licenses/
7+
#
8+
# Original Author: Yannick Casamatta ([email protected])
9+
10+
# Project maintainers must define following variables to adapt this CI to their runtime environment (Settings > CI/CD > Variables)
11+
# - TAGS_RUNNER: shell,debian10
12+
# - RUN_CV32_CI: 'true'/'false'
13+
# - SETUP_CI_CV32_BRANCH: master
14+
# - RUN_CVA6_CI: 'true'/'false'
15+
# - SETUP_CI_CVA6_BRANCH: master
16+
# - RUN_EXTERNAL_CI: 'true'/'false'
17+
# - SETUP_CI_EXTERNALBRANCH: dev/mybranch
18+
19+
# A git repository named "setup-ci" must be created in the same namespace as core-v-verif and must contain the following files:
20+
# - 'cv32/core-v-verif-cv32.yml' (if RUN_CV32_CI == 'true')
21+
# - 'cva6/core-v-verif-cva6.yml' (if RUN_CVA6_CI == 'true')
22+
# - 'common/core-v-verif.yml' (if $RUN_EXTERNAL_CI == 'true')
23+
# Each of these files must at least contain the variables necessary for the execution of the associated downstream pipeline.
24+
# Other elements such as new jobs can be added to overload the associated downstream pipeline included in this repository.
25+
# Example can be found in ".gitlab-ci/setup-ci-example/"
26+
27+
# Guidelines:
28+
# - Prefer using parent-child pipelines instead of including yml for ease of maintenance.
29+
# - Specific elements should be defined in the triggered yml to avoid conflicts between pipelines.
30+
# - In this file, only generic job/variables should be declared.
31+
32+
33+
variables:
34+
# variables defined here can't be overriden in downstream pipeline when upstream pipeline is triggered manually or by schedule.
35+
36+
37+
workflow:
38+
rules:
39+
- if: '$CI_COMMIT_REF_NAME =~ /^master.*/ || $CI_COMMIT_REF_NAME =~ /^hotfix.*/ || $CI_COMMIT_REF_NAME =~ /^rc.*/ || $CI_COMMIT_REF_NAME =~ /^cva6\/dev.*/'
40+
variables:
41+
CI_WEIGHT: "full"
42+
- if: '$CI_COMMIT_REF_NAME =~ /^dev.*/ || $CI_COMMIT_REF_NAME =~ /^feature.*/'
43+
variables:
44+
CI_WEIGHT: "short"
45+
- if: '$CI_COMMIT_REF_NAME =~ /^cvvdev\/master.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/hotfix.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/rc.*/ || $CI_COMMIT_REF_NAME =~ /^cva6\/dev.*/'
46+
variables:
47+
CI_WEIGHT: "full"
48+
CVA6_BRANCH: $CI_COMMIT_REF_NAME
49+
- if: '$CI_COMMIT_REF_NAME =~ /^cvvdev\/dev.*/ || $CI_COMMIT_REF_NAME =~ /^cvvdev\/feature.*/'
50+
variables:
51+
CI_WEIGHT: "lite"
52+
CVA6_BRANCH: $CI_COMMIT_REF_NAME
53+
- when: never
54+
55+
56+
check_env:
57+
variables:
58+
GIT_STRATEGY: none
59+
tags: [$TAGS_RUNNER]
60+
before_script:
61+
after_script:
62+
script:
63+
- echo $TAGS_RUNNER
64+
- echo $RUN_CV32_CI
65+
- echo $SETUP_CI_CV32_BRANCH
66+
- echo $RUN_CVA6_CI
67+
- echo $SETUP_CI_CVA6_BRANCH
68+
- echo $RUN_EXTERNAL_CI
69+
- echo $SETUP_CI_EXTERNAL_BRANCH
70+
- echo $CI_COMMIT_REF_NAME
71+
- echo $CI_COMMIT_BRANCH
72+
- echo $CVA6_BRANCH
73+
74+
75+
# cv32 downstream pipeline describes in '.gitlab-ci/cv32.yml' + 'cv32/core-v-verif-cv32.yml' of 'setup-ci' repository
76+
# If enabled by RUN_CV32_CI
77+
cv32:
78+
trigger:
79+
include:
80+
- local: .gitlab-ci/cv32.yml
81+
- project: '$CI_PROJECT_NAMESPACE/setup-ci'
82+
ref: '$SETUP_CI_CV32_BRANCH'
83+
file: 'cv32/core-v-verif-cv32.yml'
84+
strategy: depend
85+
variables:
86+
TAGS_RUNNER: $TAGS_RUNNER
87+
SCOPE_CVV: "true"
88+
rules:
89+
- if: '$RUN_CV32_CI == "true"'
90+
when: always
91+
- when: never
92+
93+
94+
# cva6 downstream pipeline describes in '.gitlab-ci/cva6.yml' + 'cva6/core-v-verif-cva6.yml' of 'setup-ci' repository
95+
# If enabled by RUN_CVA6_CI
96+
cva6:
97+
trigger:
98+
include:
99+
- local: .gitlab-ci/cva6.yml
100+
- project: '$CI_PROJECT_NAMESPACE/setup-ci'
101+
ref: '$SETUP_CI_CVA6_BRANCH'
102+
file: 'cva6/core-v-verif-cva6.yml'
103+
strategy: depend
104+
variables:
105+
TAGS_RUNNER: $TAGS_RUNNER
106+
SCOPE_CVV: "true"
107+
rules:
108+
- if: '$RUN_CVA6_CI == "true"'
109+
when: always
110+
- when: never
111+
112+
113+
# If enabled by RUN_EXTERNAL_CI
114+
# Use this entry point to run a pipeline describes in 'common/core-v-verif.yml' of 'setup-ci' repository
115+
external:
116+
trigger:
117+
include:
118+
- project: '$CI_PROJECT_NAMESPACE/setup-ci'
119+
ref: '$SETUP_CI_EXTERNAL_BRANCH'
120+
file: 'common/core-v-verif.yml'
121+
strategy: depend
122+
variables:
123+
TAGS_RUNNER: $TAGS_RUNNER
124+
SCOPE_CVV: "true"
125+
rules:
126+
- if: '$RUN_EXTERNAL_CI == "true"'
127+
when: always
128+
- when: never
129+

.gitlab-ci/cv32.yml

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Copyright 2022 Thales DIS design services SAS
2+
#
3+
# Licensed under the Solderpad Hardware Licence, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.0
6+
# You may obtain a copy of the License at https://solderpad.org/licenses/
7+
#
8+
# Original Author: Yannick Casamatta ([email protected])
9+
10+
# Guidlines:
11+
12+
# This pipeline can be also be triggerd underneath by CI of CV32 repository, this requires to respected some rules:
13+
# - In this pipeline, job artifacts must be only defined in a folder named "artifacts" at the root of the job's workdir.
14+
# - In this pipeline, do not define before_script and after_script in the global section (avoid in job too).
15+
# - Please prefix all jobs in this file with "pub_" which stands for "public" job.
16+
17+
18+
variables:
19+
GIT_STRATEGY: fetch
20+
GIT_SUBMODULE_STRATEGY: recursive
21+
22+
23+
.template_job_low_footprint:
24+
variables:
25+
GIT_STRATEGY: none
26+
before_script:
27+
- echo 'nothing'
28+
after_script:
29+
- echo 'nothing'
30+
31+
.template_job_init_cva6:
32+
tags: [$TAGS_RUNNER]
33+
rules:
34+
- if: '$SCOPE_CVV == "true"'
35+
when: on_success
36+
- when: never
37+
38+
.template_job_full_ci:
39+
tags: [$TAGS_RUNNER]
40+
rules:
41+
- when: on_success
42+
43+
.template_job_short_ci:
44+
tags: [$TAGS_RUNNER]
45+
rules:
46+
- if: '$CI_WEIGHT == "full"'
47+
when: on_success
48+
- when: manual
49+
allow_failure: true
50+
51+
.template_job_always_manual:
52+
tags: [$TAGS_RUNNER]
53+
rules:
54+
- when: manual
55+
allow_failure: true
56+
57+
58+
stages:
59+
- .pre
60+
- one
61+
- two
62+
- three
63+
64+
65+
pub_check_env:
66+
stage: one
67+
extends:
68+
- .template_job_low_footprint
69+
- .template_job_full_ci
70+
needs: []
71+
script:
72+
- echo $CI_WEIGHT
73+
- echo $RISCV
74+
- echo $VERILATOR_ROOT
75+
- echo $SPIKE_ROOT
76+
- echo $BBL_ROOT
77+
- echo $SYN_VCS_BASHRC
78+
- echo $SYN_DCSHELL_BASHRC
79+
- echo $QUESTA_BASHRC
80+
- echo $VIVALDO_SETUP
81+
- echo $CV32_REPO
82+
- echo $CV32_BRANCH
83+
- echo $CV32_HASH
84+
- echo $CORE_V_VERIF_REPO
85+
- echo $CORE_V_VERIF_BRANCH
86+
- echo $CORE_V_VERIF_HASH
87+
- echo $COMPLIANCE_REPO
88+
- echo $COMPLIANCE_BRANCH
89+
- echo $COMPLIANCE_HASH
90+
- echo $COMPLIANCE_PATCH
91+
- echo $TESTS_REPO
92+
- echo $TESTS_BRANCH
93+
- echo $TESTS_HASH
94+
- echo $DV_REPO
95+
- echo $DV_BRANCH
96+
- echo $DV_HASH
97+
- echo $DV_PATCH
98+
- echo $TAGS_RUNNER
99+
- echo $NUM_JOBS
100+
- echo $FOUNDRY_PATH
101+
- echo $TECH_NAME
102+
- echo $SYNTH_PERIOD
103+
- echo $LIB_VERILOG
104+
105+
106+
# cv32e40p Quick start
107+
pub_quickstart:
108+
stage: one
109+
extends:
110+
- .template_job_full_ci
111+
needs: []
112+
rules:
113+
- if: '$CI_WEIGHT == "full"'
114+
when: on_success
115+
- when: manual
116+
allow_failure: true
117+
script:
118+
- make -C cv32e40p/sim/core
119+

0 commit comments

Comments
 (0)