p

firrtl_interpreter

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. Protected

Package Members

  1. package real
  2. package vcd

Type Members

  1. abstract class BlackBoxFactory extends AnyRef

    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

    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

    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], monitorManagerOpt: Option[MonitorManager] = None) extends Product with Serializable

    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
  6. trait Concrete extends AnyRef
  7. case class ConcreteClock(value: BigInt) extends Concrete with Product with Serializable
  8. case class ConcreteSInt(value: BigInt, width: Int, poisoned: Boolean = false) extends Concrete with Product with Serializable

    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

    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

    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
  12. trait HasVcdReplayOptions extends AnyRef
  13. class InterpreterException extends Exception

    Created by chick on 4/21/16.

  14. class LoFirrtlExpressionEvaluator extends SimpleLogger

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

  15. class Memory extends SimpleLogger

    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

  16. class MonitorManager extends AnyRef
  17. class NumberMonitor extends AnyRef

    This tracks the running average, variance min, max, and a histogram of series of values

  18. class ReplVcdController extends AnyRef
  19. class Script extends AnyRef
  20. case class ScriptFactory(parent: FirrtlRepl) extends Product with Serializable
  21. trait SimpleLogger extends AnyRef
  22. class StopException extends Exception
  23. class Timer extends AnyRef
  24. case class TimerEvent(tag: String) extends Product with Serializable
  25. case class VcdReplayOptions(firrtlSourceName: String = "", vcdSourceName: String = "", skipEvents: Int = 0, eventsToRun: Int = -1, testAliasedWires: Boolean = false) extends ComposableOptions with Product with Serializable
  26. 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 'run-main firrtl_interpreter.VcdReplayTester -fs src/test/resources/VcdAdder.fir \
    -vcd src/test/resources/VcdAdder.vcd'
  27. class VcdReplayTesterOptions extends InterpreterOptionsManager with HasVcdReplayOptions

Deprecated Type Members

  1. class FirrtlRepl extends AnyRef
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  2. class FirrtlTerp extends SimpleLogger

    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.

    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  3. trait HasInterpreterOptions extends AnyRef
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  4. trait HasInterpreterSuite extends ExecutionOptionsManager with HasFirrtlOptions with HasInterpreterOptions
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  5. trait HasReplConfig extends AnyRef
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  6. 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 = ExpressionExecutionStack.defaultMaxExecutionDepth, showFirrtlAtLoad: Boolean = false, lowCompileAtLoad: Boolean = true, monitorReportFileName: String = "", monitorBitUsage: Boolean = false, monitorHistogramBins: Int = 0, monitorTrackTempNodes: Boolean = false, prettyPrintReport: Boolean = false) extends ComposableOptions with Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  7. class InterpreterOptionsManager extends ExecutionOptionsManager with HasInterpreterSuite
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  8. class InterpretiveTester 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

    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

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

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

Value Members

  1. val Big0: BigInt
  2. val Big1: BigInt
  3. val BitsRequiredOverflowSizeBigInt: BigInt
  4. val DangerShiftSize: Int
  5. val InterpreterMaxSupportedWidth: Int
  6. def bigIntBitsToDouble(bigInt: BigInt): Double
  7. def boolToBigInt(condition: Boolean): BigInt
  8. def boolToInt(condition: Boolean): Int
  9. def ceilingLog2(x: Int): Int
  10. 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

  11. def doubleToBigIntBits(double: Double): BigInt
  12. 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)

  13. 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)

  14. val random: Random
  15. def randomBigInt(width: Int): BigInt
  16. 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

  17. def requiredBitsForUInt(num: BigInt): Int

    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

  18. def typeToWidth(tpe: Type): Int
  19. def widthToInt(width: Width): Int
  20. object CircuitState extends Serializable
  21. object Concrete
  22. object DependencyGraph extends SimpleLogger

    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

  23. object Driver
  24. object ExpressionExecutionStack
  25. object InterpreterException extends Serializable
  26. object Memory
  27. object StopException extends Serializable
  28. object Timer
  29. object ToLoFirrtl
  30. object TypeInstanceFactory

    Created by chick on 4/21/16.

  31. object VcdReplayTester

Deprecated Value Members

  1. object FirrtlRepl
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

  2. object FirrtlTerp
    Annotations
    @deprecated
    Deprecated

    (Since version firrtl-interpreter 1.5.0) firrtl-interpreter is end-of-life. Use treadle instead.

Inherited from AnyRef

Inherited from Any

Ungrouped