-
Notifications
You must be signed in to change notification settings - Fork 22
/
.gitlab-ci.yml
127 lines (117 loc) · 2.73 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Copyright 2022 ETH Zurich and University of Bologna.
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51
# Author: Michael Rogenmoser <[email protected]>
variables:
VSIM: questa-2023.4 vsim
BENDER: bender
PYTHON: /usr/local/anaconda3/bin/python
stages:
- init
- build
- run
collect-bender-sources:
stage: init
script:
- $BENDER checkout
artifacts:
paths:
- .bender/
- Bender.lock
compile-vsim:
stage: build
needs:
- collect-bender-sources
script:
- make compile-sim | tee compile.log 2>&1
- '! grep "\*\* Error" compile.log'
artifacts:
paths:
- scripts/
- work/
- modelsim.ini
compile-vcs:
stage: build
needs:
- collect-bender-sources
parallel:
matrix:
- TB_DUT:
- tb_floo_router
- tb_floo_vc_router
- tb_floo_axi_chimney
- tb_floo_nw_chimney
- tb_floo_rob
script:
- make bin/${TB_DUT}.vcs | tee compile.log 2>&1
artifacts:
paths:
- bin/
compile-meshes:
stage: build
needs:
- collect-bender-sources
parallel:
matrix:
- DUT: [axi_mesh, nw_mesh]
ROUTE_ALGO: [xy, src, id]
script:
# Install `floogen`
- $PYTHON -m venv .venv
- source .venv/bin/activate
- pip install .
# Generate sources
- floogen -c floogen/examples/${DUT}_${ROUTE_ALGO}.yml -o generated --no-format
# Compile the network
- make compile-sim EXTRA_BENDER_FLAGS="-t ${DUT}" WORK="work_${DUT}_${ROUTE_ALGO}" | tee compile.log 2>&1
- '! grep "\*\* Error" compile.log'
artifacts:
paths:
- work_*/
run-sim:
stage: run
needs:
- collect-bender-sources
- compile-vsim
- compile-vcs
parallel:
matrix:
- SIMULATOR: [vsim, vcs]
TB_DUT:
- tb_floo_router
- tb_floo_vc_router
- tb_floo_axi_chimney
- tb_floo_nw_chimney
- tb_floo_rob
script:
- |
if [ "${SIMULATOR}" = "vsim" ]; then
make run-${SIMULATOR}-batch | tee ${SIMULATOR}.log 2>&1
grep "Errors: 0," ${SIMULATOR}.log
else
make run-${SIMULATOR}-batch
fi
run-traffic:
stage: run
needs:
- collect-bender-sources
- compile-meshes
variables:
JOB_NAME: mesh
parallel:
matrix:
- DUT: [axi_mesh, nw_mesh]
ROUTE_ALGO: [xy, src, id]
TRAFFIC_TYPE: [random, hbm, shuffle, single_dest_center]
TRAFFIC_RW: [read, write]
script:
- make jobs
- make run-sim-batch TB_DUT=tb_floo_${DUT} WORK=work_${DUT}_${ROUTE_ALGO} | tee vsim.log 2>&1
- 'grep "Errors: 0," vsim.log'
morty:
stage: build
needs:
- collect-bender-sources
script:
- $BENDER sources -f > source_list.txt
- morty -f source_list.txt