Package

firrtl_interpreter

Permalink

package firrtl_interpreter

Source
package.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. firrtl_interpreter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class BlackBoxFactory extends AnyRef

    Permalink

    For each instantiation of an ExtModule the interpreter needs a separate instance of a BlackBoxImplementation.

    For each instantiation of an ExtModule the interpreter needs a separate instance of a BlackBoxImplementation. This factory provides it.

    Example:
    1. class ExampleBBFactory extends BlackBoxFactory {
        override def createInstatnce(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 Exeception(s"ExampleBBBFactory does not know how to create $instanceName}")
          }
        }
      }
  2. abstract class BlackBoxImplementation extends AnyRef

    Permalink

    This is the template for writing scala functions that implement the behaviour of a black box i.e.

    This is the template for writing scala functions that implement the behaviour of a black box i.e. firrtl.ir.ExtModule. Implementing classes should add internal variables to hold any state information.

  3. case class BlackBoxOutput(name: String, implementation: BlackBoxImplementation, dependentInputs: Seq[String], tpe: Type) extends Expression with Product with Serializable

    Permalink

    During dependency graph processing one of these will be created for each output of each instantiated black box in the circuit

    During dependency graph processing one of these will be created for each output of each instantiated black box in the circuit

    name

    The name of the output without module name prefix

    implementation

    The implementation instance of the parent black box

    dependentInputs

    The names of the inputs that this output depends on

    tpe

    the concrete return type of this output

  4. case class CircuitState(inputPorts: Map[String, Concrete], outputPorts: Map[String, Concrete], registers: Map[String, Concrete], memories: Map[String, Memory], validNames: HashSet[String]) extends Product with Serializable

    Permalink

    Holds the state of the circuit at a particular time State is kept for input, output and registers

    Holds the state of the circuit at a particular time State is kept for input, output and registers

    inputPorts

    a map to current concrete value

    outputPorts

    a map to current concrete value

    registers

    a map to current concrete value

  5. abstract class Command extends AnyRef

    Permalink
  6. trait Concrete extends AnyRef

    Permalink
  7. case class ConcreteClock(value: BigInt) extends Concrete with Product with Serializable

    Permalink
  8. case class ConcreteSInt(value: BigInt, width: Int, poisoned: Boolean = false) extends Concrete with Product with Serializable

    Permalink

    A runtime instance of a SInt

    A runtime instance of a SInt

    value

    the BigInt value of this UInt,

    width

    the number of bits in this value, must be big enough to contain value plus 1 for sign bit

  9. case class ConcreteUInt(value: BigInt, width: Int, poisoned: Boolean = false) extends Concrete with Product with Serializable

    Permalink

    A runtime instance of a UInt

    A runtime instance of a UInt

    value

    the BigInt value of this UInt, must be non-negative

    width

    the number of bits in this value, must be big enough to contain value

  10. class DependencyGraph extends AnyRef

    Permalink

    A (probably overly complex) map of the names to expressions that occur in @circuit This is used by the expression evaluator to follow dependencies It also maintains lists or sets of ports, registers, memories, stop and printf statements.

    A (probably overly complex) map of the names to expressions that occur in @circuit This is used by the expression evaluator to follow dependencies It also maintains lists or sets of ports, registers, memories, stop and printf statements. The above information is created by the companion object which does the actual work of traversing the circuit and discovering the various components and expressions

  11. class ExpressionExecutionStack extends AnyRef

    Permalink
  12. class FirrtlRepl extends AnyRef

    Permalink
  13. class FirrtlTerp extends SimpleLogger

    Permalink

    This is the Firrtl interpreter.

    This is the Firrtl interpreter. It is the top level control engine that controls the simulation of a circuit running.

    It coordinates updating of the circuit's inputs (other elements, nodes, registers, etc can be forced to values) and querying the circuits outputs (or optionally other circuit components)

    This mainly involves updating of a circuit state instance by using a expression evaluator on a dependency graph.

  14. trait HasInterpreterOptions extends AnyRef

    Permalink
  15. trait HasInterpreterSuite extends ExecutionOptionsManager with HasFirrtlOptions with HasInterpreterOptions

    Permalink
  16. trait HasReplConfig extends AnyRef

    Permalink
  17. trait HasVcdReplayOptions extends AnyRef

    Permalink
  18. class InterpreterException extends Exception

    Permalink

    Created by chick on 4/21/16.

  19. case class InterpreterOptions(writeVCD: Boolean = false, vcdShowUnderscored: Boolean = false, setVerbose: Boolean = false, setOrderedExec: Boolean = false, allowCycles: Boolean = false, randomSeed: Long = System.currentTimeMillis(), blackBoxFactories: Seq[BlackBoxFactory] = Seq.empty, maxExecutionDepth: Long = ..., showFirrtlAtLoad: Boolean = false, lowCompileAtLoad: Boolean = true) extends ComposableOptions with Product with Serializable

    Permalink
  20. class InterpreterOptionsManager extends ExecutionOptionsManager with HasInterpreterSuite

    Permalink
  21. class InterpretiveTester extends AnyRef

    Permalink

    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

  22. class LoFirrtlExpressionEvaluator extends SimpleLogger

    Permalink

    This is the evaluation engine for the FirrtlTerp it requires the previousState of the system

  23. class Memory extends SimpleLogger

    Permalink

    provides a black box implementation of a circuit memory presenting read, write and read/write interfaces

    provides a black box implementation of a circuit memory presenting read, write and read/write interfaces

    Assumptions: Zero read_latency latches data straight to memory(address): IGNORES enable

  24. case class ReplConfig(firrtlSourceName: String = "", scriptName: String = "", firrtlSource: String = "", useVcdScript: Boolean = false, vcdScriptOverride: String = "", runScriptAtStart: Boolean = false) extends ComposableOptions with Product with Serializable

    Permalink
  25. class ReplVcdController extends AnyRef

    Permalink
  26. class Script extends AnyRef

    Permalink
  27. case class ScriptFactory(parent: FirrtlRepl) extends Product with Serializable

    Permalink
  28. trait SimpleLogger extends AnyRef

    Permalink
  29. class StopException extends Exception

    Permalink
  30. class Timer extends AnyRef

    Permalink
  31. case class TimerEvent(tag: String) extends Product with Serializable

    Permalink
  32. case class VcdReplayOptions(firrtlSourceName: String = "", vcdSourceName: String = "", skipEvents: Int = 0, eventsToRun: Int = 1, testAliasedWires: Boolean = false) extends ComposableOptions with Product with Serializable

    Permalink
  33. class VcdReplayTester extends LazyLogging

    Permalink

    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 'run-main firrtl_interpreter.VcdReplayTester -fs src/test/resources/VcdAdder.fir \
    -vcd src/test/resources/VcdAdder.vcd'
  34. class VcdReplayTesterOptions extends InterpreterOptionsManager with HasVcdReplayOptions

    Permalink

Value Members

  1. val Big0: BigInt

    Permalink
  2. val Big1: BigInt

    Permalink
  3. val BitsRequiredOverflowSizeBigInt: BigInt

    Permalink
  4. object CircuitState extends Serializable

    Permalink
  5. object Concrete

    Permalink
  6. val DangerShiftSize: Int

    Permalink
  7. object DependencyGraph extends SimpleLogger

    Permalink

    contains the constructor for a dependency graph.

    contains the constructor for a dependency graph. The code for traversing a circuit and discovering the components and the expressions lives here

  8. object Driver

    Permalink
  9. object ExpressionExecutionStack

    Permalink
  10. object FirrtlRepl

    Permalink
  11. object FirrtlTerp

    Permalink
  12. object InterpreterException extends Serializable

    Permalink
  13. val InterpreterMaxSupportedWidth: Int

    Permalink
  14. object Memory

    Permalink
  15. object StopException extends Serializable

    Permalink
  16. object Timer

    Permalink
  17. object ToLoFirrtl

    Permalink
  18. object TypeInstanceFactory

    Permalink

    Created by chick on 4/21/16.

  19. object VcdReplayTester

    Permalink
  20. def bigIntBitsToDouble(bigInt: BigInt): Double

    Permalink
  21. def boolToBigInt(condition: Boolean): BigInt

    Permalink
  22. def boolToInt(condition: Boolean): Int

    Permalink
  23. def ceilingLog2(x: Int): Int

    Permalink
  24. def computeBits(n: BigInt): Int

    Permalink

    Utility function that computes bits required for a number

    Utility function that computes bits required for a number

    n

    number of interest

  25. def doubleToBigIntBits(double: Double): BigInt

    Permalink
  26. def extremaOfSIntOfWidth(width: Int): (BigInt, BigInt)

    Permalink

    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)

  27. def extremaOfUIntOfWidth(width: Int): (BigInt, BigInt)

    Permalink

    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)

  28. val random: Random

    Permalink
  29. def randomBigInt(width: Int): BigInt

    Permalink
  30. package real

    Permalink
  31. def requiredBitsForSInt(num: BigInt): Int

    Permalink

    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

  32. def requiredBitsForUInt(num: BigInt): Int

    Permalink

    return the smallest number of bits required to hold the given number in an UInt 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 UInt 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

  33. def typeToWidth(tpe: Type): Int

    Permalink
  34. package vcd

    Permalink
  35. def widthToInt(width: Width): Int

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped