treadle
package treadle
- Alphabetic
- By Inheritance
- treadle
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class Command extends AnyRef
- trait HasTreadleOptions extends AnyRef
- trait HasTreadleSuite extends ExecutionOptionsManager with HasFirrtlOptions with HasTreadleOptions
- trait HasVcdReplayOptions extends AnyRef
-
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 TreadleOptions(writeVCD: Boolean = false, vcdShowUnderscored: Boolean = false, setVerbose: Boolean = false, setOrderedExec: Boolean = false, allowCycles: Boolean = false, randomSeed: Long = System.currentTimeMillis(), blackBoxFactories: Seq[ScalaBlackBoxFactory] = Seq.empty, maxExecutionDepth: Long = Int.MaxValue, showFirrtlAtLoad: Boolean = false, lowCompileAtLoad: Boolean = true, validIfIsRandom: Boolean = false, rollbackBuffers: Int = 4, clockInfo: Seq[ClockInfo] = Seq.empty, resetName: String = "reset", callResetAtStartUp: Boolean = false, symbolsToWatch: Seq[String] = Seq.empty) extends ComposableOptions with Product with Serializable
- class TreadleOptionsManager extends ExecutionOptionsManager with HasTreadleSuite
- class TreadleRepl extends AnyRef
-
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 VcdReplayOptions(firrtlSourceName: String = "", vcdSourceName: String = "", skipEvents: Int = 0, eventsToRun: Int = -1, testAliasedWires: Boolean = false) extends ComposableOptions with Product with Serializable
-
class
VcdReplayTester extends LazyLogging
This tester runs a VCD file against a circuit expressed in a firrtl file.
This tester runs a VCD file against a circuit expressed in a firrtl file. The VCD file should have been produced by running a test harness against the circuit. This test can be used to generate circuit behavior while running symbolic or concolic testing. It can also be used to determine if later changes to a circuit have changed since some original correct **golden** run of the circuit For example use the main below to run the VcdAdder files contained in the src/test/resources directory
sbt 'runMain treadle.VcdReplayTester -fs src/test/resources/VcdAdder.fir -vcd src/test/resources/VcdAdder.vcd' - class VcdReplayTesterOptions extends TreadleOptionsManager with HasVcdReplayOptions
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
- object Driver
- object TreadleRepl
- object TreadleTester
- object VcdReplayTester