treadle2
package treadle2
- Alphabetic
- By Inheritance
- treadle2
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package blackboxes
- package chronometry
- package executable
- package stage
- package utils
- package vcd
Type Members
- case class BlackBoxFactoriesAnnotation(blackBoxFactories: Seq[ScalaBlackBoxFactory]) extends NoTargetAnnotation with TreadleOption with Product with Serializable
- case class ClockInfoAnnotation(clockInfoSeq: Seq[ClockInfo] = Seq(ClockInfo())) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Sets one or more clocks including their frequencies and phase
- case class DataStorePlugInAnnotation(name: String, getPlugin: (ExecutionEngine) => DataStorePlugin) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Using this annotation allows external users of a TreadleTester to supply their own custom treadle2.executable.DataStorePlugins.
Using this annotation allows external users of a TreadleTester to supply their own custom treadle2.executable.DataStorePlugins. See that code for examples of use.
- name
A unique name for this plugin
- getPlugin
A function that returns a DataStorePlugin subclass
- Note
this annotation cannot be generated from the command line
- case class MemoryToVCD(specifier: String) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Controls whether changes to memory locations are written to vcd output
Controls whether changes to memory locations are written to vcd output
- specifier
controls which memories and which locations of those memories are logged to vcd output When not present not memories are logged "all" log all values at all locations of all memories "mem1:all" log all values at all locations for memory mem1 "mem1:0-4" log values at locations 0-4 for memory mem1 "mem1:b0-b100" log values at locations 0-4 but show addresses in binary for memory mem1 "mem1:h0-hff" log values at locations 0-255 but show addresses in hex for memory mem1 "mem1:o0-o377" log values at locations 0-255 but show addresses in octal for memory mem1 This annotation may occur more than once in order to specify multiple memories
- case class PlusArgsAnnotation(plusArgs: Seq[String]) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Sets verilog plus args that will be passed to black boxes
- case class RandomSeedAnnotation(seed: Long = 0L) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Sets the seed for treadle's private random number generator
- case class ResetNameAnnotation(symbolNames: String = "") extends NoTargetAnnotation with TreadleOption with Product with Serializable
used with treadle's default reset operations
- trait ScalaBlackBox extends AnyRef
This is the template for writing Scala functions that implement the behaviour of a black box.
This is the template for writing Scala functions that implement the behaviour of a black box. Implementing classes should add internal variables to hold any state information.
- abstract class ScalaBlackBoxFactory extends AnyRef
For each instantiation of an ExtModule the engine needs a separate instance of a BlackBoxImplementation.
For each instantiation of an ExtModule the engine needs a separate instance of a BlackBoxImplementation. This factory provides it.
class ExampleBBFactory extends BlackBoxFactory { override def createInstance(instanceName: String, blackBoxName: String): Option[BlackBoxImplementation] = { instanceName match { case "bb1" => Some(add(new BB1Impl)) case "bb2" => Some(add(new BB2Impl)) case "bb3" => Some(add(new BB3Impl)) case _ => throw Exception(s"ExampleBBBFactory does not know how to create " + instanceName) } } }
Example: - case class SymbolsToWatchAnnotation(symbolNames: Seq[String] = Seq.empty) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Sets a list of symbols that will be rendered during execution
- case class TreadleCircuitAnnotation(circuit: Circuit) extends NoTargetAnnotation with TreadleOption with Product with Serializable
The circuit used to build a TreadleTester
The circuit used to build a TreadleTester
- circuit
a firrtl ast
- case class TreadleCircuitStateAnnotation(state: CircuitState) extends NoTargetAnnotation with Product with Serializable
used to pass parsed firrtl to the TreadleTester
used to pass parsed firrtl to the TreadleTester
- state
the state to be passed along
- class TreadleLibrary extends RegisteredLibrary
Constructs this as a registered library that will be auto-detected by projects who have a dependency on Treadle
- sealed trait TreadleOption extends Unserializable
- class TreadleTester extends AnyRef
Works a lot like the chisel classic tester compiles a firrtl input string and allows poke, peek, expect and step
Works a lot like the chisel classic tester compiles a firrtl input string and allows poke, peek, expect and step
pokes invalidate the underlying circuit peek, expect and step, recompute (re-validate) the circuit before executing
Important note: port names in LoFirrtl have replaced dot notation with underscore notation so that io.a.b must be referenced as io_a_b
- case class TreadleTesterAnnotation(tester: TreadleTester) extends NoTargetAnnotation with TreadleOption with Product with Serializable
Used to pass a tester on to a test harness
Used to pass a tester on to a test harness
- tester
The TreadleTester to be passed on
Deprecated Type Members
- case class TreadleFirrtlFormHint(form: Any) extends NoTargetAnnotation with Product with Serializable
Provides an input form hint to treadle to know how to best handle the input it receives
Provides an input form hint to treadle to know how to best handle the input it receives
- form
the input form
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.x) Remove references, this has no effect
Value Members
- val Big0: BigInt
- val Big1: BigInt
- val BitsRequiredOverflowSizeBigInt: BigInt
- val DangerShiftSize: Int
- def bigIntBitsToDouble(bigInt: BigInt): Double
- def boolToBigInt(condition: Boolean): BigInt
- def boolToInt(condition: Boolean): Int
- def ceilingLog2(x: Int): Int
- def computeBits(n: BigInt): Int
Utility function that computes bits required for a number
Utility function that computes bits required for a number
- n
number of interest
- def doubleToBigIntBits(double: Double): BigInt
- def extremaOfSIntOfWidth(width: Int): (BigInt, BigInt)
computes the smallest and largest values that will fit in an SInt
computes the smallest and largest values that will fit in an SInt
- width
width of SInt
- returns
tuple(minVale, maxValue)
- def extremaOfUIntOfWidth(width: Int): (BigInt, BigInt)
computes the smallest and largest values that will fit in a UInt
computes the smallest and largest values that will fit in a UInt
- width
width of SInt
- returns
tuple(minVale, maxValue)
- def makeRandom(tpe: Type): BigInt
- val random: Random
- def randomBigInt(width: Int): BigInt
- def requiredBitsForSInt(num: BigInt): Int
return the smallest number of bits required to hold the given number in an SInt Note: positive numbers will get one minimum width one higher than would be required for a UInt
return the smallest number of bits required to hold the given number in an SInt Note: positive numbers will get one minimum width one higher than would be required for a UInt
- num
number to find width for
- returns
minimum required bits for an SInt
- def requiredBitsForUInt(num: BigInt): Int
return the smallest number of bits required to hold the given number in an UInt
return the smallest number of bits required to hold the given number in an UInt
- num
number to find width for
- returns
minimum required bits for an SInt
- def typeToWidth(tpe: Type): Int
- def widthToInt(width: Width): Int
- case object AllowCyclesAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to allow cycles
- case object CallResetAtStartupAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tell treadle to call it's own internal reset at startup.
Tell treadle to call it's own internal reset at startup. This is typically handled by the unit test framework and not needed for users
- case object ClockInfoAnnotation extends HasShellOptions with Product with Serializable
- case object DontRunLoweringCompilerLoadAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to not run its own lowering pass on firrtl input (not recommended)
- case object EnableCoverageAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Controls whether coverage information will be gathered or not during the execution of a test.
- case object MemoryToVCD extends HasShellOptions with Product with Serializable
- case object PlusArgsAnnotation extends HasShellOptions with Product with Serializable
- case object PrefixPrintfWithWallTime extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to prefix printf strings with a wall time
- object RandomSeedAnnotation extends HasShellOptions with Serializable
- case object RandomizeAtStartupAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to Randomize circuit at startup
- case object ResetNameAnnotation extends HasShellOptions with Product with Serializable
- case object SaveFirrtlAtLoadAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to show the low firrtl it is starting out with
- case object ShowFirrtlAtLoadAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to show the low firrtl it is starting out with
- case object SymbolsToWatchAnnotation extends HasShellOptions with Product with Serializable
- object TreadleDefaults
- object TreadleFirrtlFile extends HasShellOptions
Factory for FirrtlFileAnnotation annotation, this is an alias for Firrtl Cli
- object TreadleFirrtlString extends HasShellOptions
Factory for FirrtlSourceAnnotation, this is an alias for FirrtlCli
- object TreadleRocketBlackBoxes extends HasShellOptions
Adds the treadle blackboxes for rocket black box factory
- object TreadleTester
- case object ValidIfIsRandomAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to present random value when validIf's condition is off
- case object VcdShowUnderScoredAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to include _T_* and _GEN_* wires in VCD output
- case object VerboseAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to execute verbosely
- case object WriteCoverageCSVAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to write coverage report in CSV format after simulation
- case object WriteVcdAnnotation extends NoTargetAnnotation with TreadleOption with HasShellOptions with Product with Serializable
Tells treadle to write a vcd file during simulation
Deprecated Value Members
- object TreadleFirrtlFormHint extends HasShellOptions with Serializable
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.x) Remove references, this has no effect