CliOption

chisel3.simulator.scalatest.HasCliOptions.CliOption
See theCliOption companion class
object CliOption

Attributes

Companion
class
Source
HasCliOptions.scala
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
CliOption.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply[A](name: String, help: String, convert: String => A, updateChiselOptions: (A, Array[String]) => Array[String], updateFirtoolOptions: (A, Array[String]) => Array[String], updateCommonSettings: (A, CommonCompilationSettings) => CommonCompilationSettings, updateBackendSettings: (A, Settings) => Settings, updateUnsetChiselOptions: (Array[String]) => Array[String], updateUnsetFirtoolOptions: (Array[String]) => Array[String], updateUnsetCommonSettings: CommonCompilationSettings => CommonCompilationSettings, updateUnsetBackendSettings: Settings => Settings): CliOption[A]

Attributes

Source
HasCliOptions.scala
def double(name: String, help: String): CliOption[Double]

Add a double option to a test.

Add a double option to a test.

Value parameters

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Throws
IllegalArgumentException

if the value is not convertible to a double precision floating point number

Source
HasCliOptions.scala
def flag(name: String, help: String): CliOption[Unit]

Add a flag option to a test.

Add a flag option to a test.

This is an option which can only take one of two "truthy" values: 1 or true. Any "falsey" values are not allowed. This option is a stand-in for any option which is supposed to be a flag to a test which has some effect if set.

This option exists because Scalatest forces options to have a value. It is illegal to pass an option like -Dfoo. This flag option exists to problem a single flag-style option as opposed to having users roll their own.

Value parameters

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Source
HasCliOptions.scala
def flag(name: String, help: String, updateChiselOptions: (Array[String]) => Array[String] = ..., updateFirtoolOptions: (Array[String]) => Array[String] = ..., updateCommonSettings: CommonCompilationSettings => CommonCompilationSettings = ..., updateBackendSettings: Settings => Settings = ..., updateUnsetChiselOptions: (Array[String]) => Array[String] = ..., updateUnsetFirtoolOptions: (Array[String]) => Array[String] = ..., updateUnsetCommonSettings: CommonCompilationSettings => CommonCompilationSettings = ..., updateUnsetBackendSettings: Settings => Settings = ...): CliOption[Unit]

Add a flag option to a test.

Add a flag option to a test.

This is an option which can only take one of two "truthy" values: 1 or true. Any "falsey" values are not allowed. This option is a stand-in for any option which is supposed to be a flag to a test which has some effect if set.

This option exists because Scalatest forces options to have a value. It is illegal to pass an option like -Dfoo. This flag option exists to problem a single flag-style option as opposed to having users roll their own.

Value parameters

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Source
HasCliOptions.scala
def int(name: String, help: String): CliOption[Int]

Add an integer option to a test.

Add an integer option to a test.

Value parameters

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Throws
IllegalArgumentException

if the value is not convertible to an integer

Source
HasCliOptions.scala
def simple[A](name: String, help: String, convert: String => A): CliOption[A]

A simple command line option which does not affect common or backend settings.

A simple command line option which does not affect common or backend settings.

This is intended to be used to create options which are passed directly to tests as opposed to creating options which are used to affect compilation or simulation settings.

Value parameters

convert

convert the <value> to type A

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Source
HasCliOptions.scala
def string(name: String, help: String): CliOption[String]

Add a string option to a test.

Add a string option to a test.

Value parameters

help

help text to show to tell the user how to use this option

name

the name of the option

Attributes

Source
HasCliOptions.scala

Deprecated methods

def apply[A](name: String, help: String, convert: String => A, updateChiselOptions: (A, Array[String]) => Array[String], updateFirtoolOptions: (A, Array[String]) => Array[String], updateCommonSettings: (A, CommonCompilationSettings) => CommonCompilationSettings, updateBackendSettings: (A, Settings) => Settings): CliOption[A]

Attributes

Deprecated
[Since version Chisel 7.1.0] use newer CliOption case class apply
Source
HasCliOptions.scala
def unapply[A](cliOption: CliOption[A]): Option[(String, String, String => A, (A, Array[String]) => Array[String], (A, Array[String]) => Array[String], (A, CommonCompilationSettings) => CommonCompilationSettings, (A, Settings) => Settings)]

Attributes

Deprecated
[Since version Chisel 7.1.0] avoid use of unapply
Source
HasCliOptions.scala