Skip to content

Commit

Permalink
Add defaults to yosysSynthesisReport, fix indentation in openriscPipe…
Browse files Browse the repository at this point in the history
…line

We should try to have a convention that for synthesis the target is
"synth", we can provide a default for that.  Also, since the logPath is
created by fusesoc we can predict the log location so have a default for
that too.

This will make writing pipelines even more concise.  I am not sure how
to test this.
  • Loading branch information
stffrdhrn committed Oct 26, 2019
1 parent 881af2f commit 78f7b02
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ Build a step for [Yosys Synthesis](http://www.clifford.at/yosys/) for monitoring
#### Parameters

- core - the fusesoc core to run
- target - the fusesoc target to run yosys synthesis
- logPath - the location of the `yosys.log` file
- target - the fusesoc target to run yosys synthesis, the default is "synth"
- logPath - the location of the `yosys.log` file, the default is "build/${core}_*/${target}-*/yosys.log"

#### Example

Expand Down
10 changes: 9 additions & 1 deletion src/org/librecores/fusesoc/YosysJobSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.librecores.fusesoc

class YosysJobSpec {
String core
String target = "synth"
String logPath
String target

def core(String value) {
this.core = value
Expand All @@ -16,4 +16,12 @@ class YosysJobSpec {
def target(String value) {
this.target = value
}

/**
* Expand defaults if required.
*/
void build() {
this.logPath = this.logPath ?: "build/${core}_*/${target}-*/yosys.log"
}

}
4 changes: 2 additions & 2 deletions vars/openriscPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def buildStage(jobConfig) {

def envVars = "-e \"JOB=${job}\" " +
"-e \"SIM=${sim}\" " +
"-e \"PIPELINE=${pipeline}\"" +
" -e \"EXPECTED_FAILURES=${expectedFailures}\" " +
"-e \"PIPELINE=${pipeline}\" " +
"-e \"EXPECTED_FAILURES=${expectedFailures}\" " +
"-e \"EXTRA_CORE_ARGS=${extraCoreArgs}\""

return {
Expand Down
2 changes: 2 additions & 0 deletions vars/yosysSynthesisReport.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def call(@DelegatesTo(strategy = Closure.DELEGATE_ONLY, value = YosysJobSpec) Cl
cl.delegate = jobSpec
cl()

jobSpec.build()

fusesoc {
image 'librecores/librecores-ci:0.5.0'
library jobSpec.core, '/src'
Expand Down

0 comments on commit 78f7b02

Please sign in to comment.