-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 2.5-release
- Loading branch information
Showing
22 changed files
with
220 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,10 @@ jobs: | |
verilator --version | ||
- name: Setup Scala | ||
uses: olafurpg/setup-scala@v10 | ||
- name: Cache | ||
uses: coursier/cache-action@v5 | ||
# Commented out because cached dependency SNAPSHOTs were stale | ||
# This can be uncommented in the future | ||
#- name: Cache | ||
# uses: coursier/cache-action@v5 | ||
- name: Setup Mill | ||
uses: jodersky/[email protected] | ||
- name: Mill sanity check | ||
|
@@ -50,4 +52,4 @@ jobs: | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package chisel3 | ||
|
||
import chisel3.stage.{NoRunFirrtlCompilerAnnotation, PrintFullStackTraceAnnotation} | ||
|
||
import firrtl.{AnnotationSeq, ExecutionOptionsManager, ComposableOptions} | ||
|
||
//TODO: provide support for running firrtl as separate process, could alternatively be controlled by external driver | ||
//TODO: provide option for not saving chirrtl file, instead calling firrtl with in memory chirrtl | ||
/** | ||
* Options that are specific to chisel. | ||
* | ||
* @param runFirrtlCompiler when true just run chisel, when false run chisel then compile its output with firrtl | ||
* @note this extends FirrtlExecutionOptions which extends CommonOptions providing easy access to down chain options | ||
*/ | ||
case class ChiselExecutionOptions( | ||
runFirrtlCompiler: Boolean = true, | ||
printFullStackTrace: Boolean = false | ||
// var runFirrtlAsProcess: Boolean = false | ||
) extends ComposableOptions { | ||
|
||
def toAnnotations: AnnotationSeq = | ||
(if (!runFirrtlCompiler) { Seq(NoRunFirrtlCompilerAnnotation) } else { Seq() }) ++ | ||
(if (printFullStackTrace) { Some(PrintFullStackTraceAnnotation) } else { None }) | ||
|
||
} | ||
|
||
trait HasChiselExecutionOptions { | ||
self: ExecutionOptionsManager => | ||
|
||
var chiselOptions = ChiselExecutionOptions() | ||
|
||
parser.note("chisel3 options") | ||
|
||
parser.opt[Unit]("no-run-firrtl") | ||
.abbr("chnrf") | ||
.foreach { _ => | ||
chiselOptions = chiselOptions.copy(runFirrtlCompiler = false) | ||
} | ||
.text("Stop after chisel emits chirrtl file") | ||
|
||
parser.opt[Unit]("full-stacktrace") | ||
.foreach { _ => | ||
chiselOptions = chiselOptions.copy(printFullStackTrace = true) | ||
} | ||
.text("Do not trim stack trace") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package chisel3 | ||
|
||
import chisel3.internal.ErrorLog | ||
import internal.firrtl._ | ||
import firrtl._ | ||
import firrtl.options.{Dependency, Phase, PhaseManager, StageError} | ||
import firrtl.options.phases.DeletedWrapper | ||
import firrtl.options.Viewer.view | ||
import firrtl.annotations.JsonProtocol | ||
import firrtl.util.{BackendCompilationUtilities => FirrtlBackendCompilationUtilities} | ||
import chisel3.stage.{ChiselExecutionResultView, ChiselGeneratorAnnotation, ChiselStage} | ||
import chisel3.stage.phases.DriverCompatibility | ||
import java.io._ | ||
|
||
|
||
/** | ||
* This family provides return values from the chisel3 and possibly firrtl compile steps | ||
*/ | ||
@deprecated("This will be removed in Chisel 3.5", "Chisel3 3.4") | ||
trait ChiselExecutionResult | ||
|
||
/** | ||
* | ||
* @param circuitOption Optional circuit, has information like circuit name | ||
* @param emitted The emitted Chirrrl text | ||
* @param firrtlResultOption Optional Firrtl result, @see freechipsproject/firrtl for details | ||
*/ | ||
@deprecated("This will be removed in Chisel 3.5", "Chisel 3.4") | ||
case class ChiselExecutionSuccess( | ||
circuitOption: Option[Circuit], | ||
emitted: String, | ||
firrtlResultOption: Option[FirrtlExecutionResult] | ||
) extends ChiselExecutionResult | ||
|
||
/** | ||
* Getting one of these indicates failure of some sort. | ||
* | ||
* @param message A clue might be provided here. | ||
*/ | ||
@deprecated("This will be removed in Chisel 3.5", "Chisel 3.4") | ||
case class ChiselExecutionFailure(message: String) extends ChiselExecutionResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.