trait Scale extends AnyRef
Adds -Dscale=<double>
This adds an option which can be used to control the "scaling factor" of the test. This option can be used by the test author to "scale" the test to make it longer or shorter.
This is inteded to be used with randomized testing or some testing which does not have a natural end point or an end point which may be dependent on execution context. E.g., you can use this to make a test which runs for briefly in a pre-merge Continuous Integration (CI) flow, but runs for much longer in nightly CI.
Note that the interpretation of the "scaling factor" is test dependent.
In order to document this and help end users, this trait has an abstract
member scaleHelpText
which must be overridden to document what the scale
affects in the test. E.g., if the scale is used to lengthen a test, a
test author could write:
override protected def scaleHelpText = "scales the runtime of a test"
While this adds the low-level scale
option. A user of this should use
the member functions that this trait adds, e.d., scaled
.
- Self Type
- Scale with HasCliOptions
- Source
- Cli.scala
- Alphabetic
- By Inheritance
- Scale
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def scaleHelpText: String
Help text that describes what the
-Dscale
parameter does for this test.Help text that describes what the
-Dscale
parameter does for this test.This is used to populate the help text that an end user sees when invoking this test with
-Dhelp=1
.- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Scale, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ensuring(cond: (Scale) => Boolean, msg: => Any): Scale
- def ensuring(cond: (Scale) => Boolean): Scale
- def ensuring(cond: Boolean, msg: => Any): Scale
- def ensuring(cond: Boolean): Scale
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def scaled(a: Int): Int
Scale an integer by the scaling factor, if set.
Scale an integer by the scaling factor, if set.
If no scaling factor is set, this will scale by
1.0
, i.e., the input is unchanged. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from Scale toStringFormat[Scale] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Scale, B)
- Implicit
- This member is added by an implicit conversion from Scale toArrowAssoc[Scale] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
This is the documentation for Chisel.
Package structure
The chisel3 package presents the public API of Chisel. It contains the concrete core types
UInt
,SInt
,Bool
,Clock
, andReg
, the abstract typesBits
,Aggregate
, andData
, and the aggregate typesBundle
andVec
.The Chisel package is a compatibility layer that attempts to provide chisel2 compatibility in chisel3.
Utility objects and methods are found in the
util
package.The
testers
package defines the basic interface for chisel testers.