blob: a826ec50a0df6ef79d3ba1b334541dada713bbe8 (
plain)
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
|
// See LICENSE for license details.
package firrtl.options
import firrtl.{AnnotationSeq, Transform}
import scopt.OptionParser
/** Indicates that this class/object includes options (but does not add these as a registered class)
*/
trait HasScoptOptions {
/** This method will be called to add options to an OptionParser ('''OPTIONS SHOULD BE PREPENDED''')
*
*
* '''The ordering of [[firrtl.annotations.Annotation Annotation]] is important and has meaning for parallel
* compilations. For deterministic behavior, you should always prepend any annotations to the [[firrtl.AnnotationSeq
* AnnotationSeq]]. The [[firrtl.AnnotationSeq AnnotationSeq]] will be automatically reversed after a [[Stage]]
* parses it.'''
*
* @param p an option parser
*/
def addOptions(p: OptionParser[AnnotationSeq]): Unit
}
/** A [[Transform]] that includes options that should be exposed at the top level.
*
* @note To complete registration, include an entry in
* src/main/resources/META-INF/services/firrtl.options.RegisteredTransform */
trait RegisteredTransform extends HasScoptOptions { this: Transform => }
/** A class that includes options that should be exposed as a group at the top level.
*
* @note To complete registration, include an entry in
* src/main/resources/META-INF/services/firrtl.options.RegisteredLibrary */
trait RegisteredLibrary extends HasScoptOptions {
/** The name of this library.
*
* This will be used when generating help text.
*/
def name: String
}
|