Skip to content

Commit e5e70ce

Browse files
authored
Merge pull request #87 from Nancy-Chauhan/yosys-ci
Enable CI for yosys synthesis for monitoring resource usages
2 parents ee7f758 + 8525e44 commit e5e70ce

File tree

3 files changed

+67
-35
lines changed

3 files changed

+67
-35
lines changed

Jenkinsfile

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,25 @@ pipeline {
99
}
1010
}
1111

12+
stage("Yosys synthesis"){
13+
steps {
14+
sh 'docker run --rm -v $(pwd):/src -w /src librecores/librecores-ci:0.4.0 /bin/bash -c \
15+
"fusesoc library add mor1kx /src; \
16+
fusesoc run --target=synth mor1kx; \
17+
/test-scripts/extract-yosys-stats.py < build/mor1kx_*/synth-icestorm/yosys.log"'
18+
}
19+
}
20+
21+
stage('Resource Usage Report Generation') {
22+
steps {
23+
echo "-=- execute performance tests -=-"
24+
perfReport 'output.csv'
25+
}
26+
}
27+
1228
stage("Docker run") {
1329
parallel {
14-
stage("verilator") {
30+
stage("verilator") {
1531
environment{
1632
JOB = 'verilator'
1733
}
@@ -35,7 +51,7 @@ pipeline {
3551
JOB = 'or1k-tests'
3652
SIM = 'icarus'
3753
PIPELINE = 'CAPPUCCINO'
38-
EXPECTED_FAILURES="or1k-cy"
54+
EXPECTED_FAILURES="or1k-cy"
3955
EXTRA_CORE_ARGS="--feature_dmmu NONE"
4056
}
4157
steps {
@@ -44,10 +60,10 @@ pipeline {
4460
}
4561
stage("testing 3") {
4662
environment {
47-
JOB = 'or1k-tests'
48-
SIM = 'icarus'
49-
PIPELINE = 'CAPPUCCINO'
50-
EXPECTED_FAILURES = "or1k-cy or1k-dsxinsn"
63+
JOB = 'or1k-tests'
64+
SIM = 'icarus'
65+
PIPELINE = 'CAPPUCCINO'
66+
EXPECTED_FAILURES = "or1k-cy or1k-dsxinsn"
5167
EXTRA_CORE_ARGS = "--feature_immu NONE"
5268
}
5369
steps {
@@ -56,10 +72,10 @@ pipeline {
5672
}
5773
stage("testing 4") {
5874
environment {
59-
JOB = 'or1k-tests'
60-
SIM = 'icarus'
61-
PIPELINE = 'CAPPUCCINO'
62-
EXPECTED_FAILURES = "or1k-cy"
75+
JOB = 'or1k-tests'
76+
SIM = 'icarus'
77+
PIPELINE = 'CAPPUCCINO'
78+
EXPECTED_FAILURES = "or1k-cy"
6379
EXTRA_CORE_ARGS = "--feature_datacache NONE"
6480
}
6581
steps {
@@ -68,10 +84,10 @@ pipeline {
6884
}
6985
stage("testing 5") {
7086
environment {
71-
JOB = 'or1k-tests'
72-
SIM = 'icarus'
73-
PIPELINE = 'CAPPUCCINO'
74-
EXPECTED_FAILURES = "or1k-cy"
87+
JOB = 'or1k-tests'
88+
SIM = 'icarus'
89+
PIPELINE = 'CAPPUCCINO'
90+
EXPECTED_FAILURES = "or1k-cy"
7591
EXTRA_CORE_ARGS = "--feature_instructioncache NONE"
7692
}
7793
steps {
@@ -80,10 +96,10 @@ pipeline {
8096
}
8197
stage("testing 6") {
8298
environment {
83-
JOB = 'or1k-tests'
84-
SIM = 'icarus'
85-
PIPELINE = 'CAPPUCCINO'
86-
EXPECTED_FAILURES = "or1k-cy"
99+
JOB = 'or1k-tests'
100+
SIM = 'icarus'
101+
PIPELINE = 'CAPPUCCINO'
102+
EXPECTED_FAILURES = "or1k-cy"
87103
EXTRA_CORE_ARGS = "--feature_debugunit NONE"
88104
}
89105
steps {
@@ -92,10 +108,10 @@ pipeline {
92108
}
93109
stage("testing 7") {
94110
environment {
95-
JOB = 'or1k-tests'
96-
SIM = 'icarus'
97-
PIPELINE = 'CAPPUCCINO'
98-
EXPECTED_FAILURES = "or1k-cy or1k-cmov"
111+
JOB = 'or1k-tests'
112+
SIM = 'icarus'
113+
PIPELINE = 'CAPPUCCINO'
114+
EXPECTED_FAILURES = "or1k-cy or1k-cmov"
99115
EXTRA_CORE_ARGS = "--feature_cmov NONE"
100116
}
101117
steps {
@@ -104,10 +120,10 @@ pipeline {
104120
}
105121
stage("testing 8") {
106122
environment {
107-
JOB = 'or1k-tests'
108-
SIM = 'icarus'
109-
PIPELINE = 'CAPPUCCINO'
110-
EXPECTED_FAILURES = "or1k-cy or1k-ext"
123+
JOB = 'or1k-tests'
124+
SIM = 'icarus'
125+
PIPELINE = 'CAPPUCCINO'
126+
EXPECTED_FAILURES = "or1k-cy or1k-ext"
111127
EXTRA_CORE_ARGS = "--feature_ext NONE"
112128
}
113129
steps {
@@ -116,9 +132,9 @@ pipeline {
116132
}
117133
stage("testing 9") {
118134
environment {
119-
JOB = 'or1k-tests'
120-
SIM = 'icarus'
121-
PIPELINE = 'ESPRESSO'
135+
JOB = 'or1k-tests'
136+
SIM = 'icarus'
137+
PIPELINE = 'ESPRESSO'
122138
}
123139
steps {
124140
script {
@@ -128,7 +144,7 @@ pipeline {
128144
} catch (Exception e) {
129145
echo "Allowed failure"
130146
}
131-
}
147+
}
132148
}
133149
}
134150
}
@@ -138,4 +154,4 @@ pipeline {
138154

139155
void dockerrun() {
140156
sh 'docker run --rm -v $(pwd):/src -e "JOB=$JOB" -e "SIM=$SIM" -e "PIPELINE=$PIPELINE" -e "EXPECTED_FAILURES=$EXPECTED_FAILURES" -e "EXTRA_CORE_ARGS=$EXTRA_CORE_ARGS" librecores/librecores-ci-openrisc /src/.travis/test.sh'
141-
}
157+
}

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,21 @@ Integration (CI) suite running in [travis ci](travis-ci.org). This currently co
163163
caching, timers, interrupts and other features.
164164

165165
Status: [![Build Status](https://travis-ci.org/openrisc/mor1kx.svg?branch=master)](https://travis-ci.org/openrisc/mor1kx)
166-
167-
166+
167+
168168
The or1k Continuous Integration (CI) suite is running in a librecores-ci-openrisc docker container in Travis CI. Parallel execution of tests runs in librecores-ci-openrisc docker environment.
169-
- [librecores-ci-openrisc](https://github.com/librecores/docker-images/tree/master/librecores-ci-openrisc) docker image is based on the standard [librecores/librecores-ci](https://github.com/librecores/docker-images/tree/master/librecores-ci) docker image and it largely target the [FuseSoC](https://github.com/olofk/fusesoc) use cases.
169+
- [librecores-ci-openrisc](https://github.com/librecores/docker-images/tree/master/librecores-ci-openrisc) docker image is based on the standard [librecores/librecores-ci](https://github.com/librecores/docker-images/tree/master/librecores-ci) docker image and it largely target the [FuseSoC](https://github.com/olofk/fusesoc) use cases.
170170
- The base image includes installation of common EDA tools such as Icarus Verilog, Verilator and Yosys that is required by CI suite for testing. librecores/libreocres-ci-openrisc docker image gets the toolchain required, downloads and compiles the or1k-tests.
171171

172+
173+
The Continous Integration suite also runs in [Jenkins](https://ci.librecores.org/) supported by [Librecores-CI](https://github.com/librecores/librecores-ci-jenkins-server). As similar to Travis, `mor1kx` pipelines are also constantly verified. In addition to that, it also supports:
174+
175+
- Yosys synthesis for monitoring resource usages. [Fusesoc](https://github.com/olofk/fusesoc/blob/master/doc/icestorm.adoc) provides the icestorm backend.
176+
- [LibreCores CI](https://github.com/librecores/docker-images/tree/master/librecores-ci) Docker image provides Yosys synthesis metrics parser which outputs 'Printing Statistics'. Results are parsed to graphs with Performance Plugin, which can be seen at [ci.librecores.org](https://ci.librecores.org/job/Projects/job/OpenRISC/job/mor1kx/)
177+
178+
179+
Status : [![Build Status](https://ci.librecores.org/job/Projects/job/OpenRISC/job/mor1kx/job/master/badge/icon)](https://ci.librecores.org/job/Projects/job/OpenRISC/job/mor1kx/job/master/)
180+
172181
In the future we are working on bringing more tests including:
173182

174183
- softfloat, fpu verification (may not be feasable in CI due to long run times)
@@ -187,4 +196,3 @@ Verification status of mor1kx pipelines:
187196
|`ESPRESSO`|`linting` `or1k-tests` |Still many pipeline failures, see issue #71|
188197
|`PRONTO_ESPRESSO`|`linting`|No toolchain support for no-delayslot c code|
189198
|`MAROCCHINO`|`linting` `or1k-tests`|See [marocchino](https://github.com/openrisc/or1k_marocchino) project.|
190-

mor1kx.core

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,11 @@ targets:
8787
- "tool_rivierapro? (monitor)"
8888
- "tool_xsim? (monitor)"
8989
parameters: [trace_enable, trace_to_screen]
90+
91+
synth:
92+
default_tool : icestorm
93+
filesets : [core , fpu]
94+
tools:
95+
icestorm:
96+
pnr: none
97+
toplevel : mor1kx

0 commit comments

Comments
 (0)