ChiselSim

chisel3.simulator.`package`.ChiselSim

A trait that provides the minimal set of ChiselSim APIs.

Example usage:

import chisel3.simulator.ChiselSim

class Foo extends ChiselSim {
 /** This has access to all ChiselSim APIs like `simulate`, `peek`, and `poke`. */
}

Attributes

See also

chisel3.simulator.scalatest.ChiselSim

Source
package.scala
Graph
Supertypes
trait SimulatorAPI
trait PeekPokeAPI
trait ControlAPI
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def disableWaves(): Unit

Enable waveform dumping

Enable waveform dumping

This control function will disable waveforms from the moment it is applied. A simulator must be compiled with waveform dumping support for this to have an effect.

Example usage:

disableWaves()

Attributes

Inherited from:
ControlAPI
Source
ControlAPI.scala
def enableWaves(): Unit

Enable waveform dumping

Enable waveform dumping

This control function will enable waveforms from the moment it is applied. A simulator must be compiled with waveform dumping support for this to have an effect.

Example usage:

enableWaves()

Attributes

Inherited from:
ControlAPI
Source
ControlAPI.scala
def simulate[T <: Module](module: => T, chiselOpts: Array[String] = ..., firtoolOpts: Array[String] = ..., settings: Settings[T] = ..., additionalResetCycles: Int = ..., subdirectory: Option[String] = ...)(stimulus: T => Unit)(implicit hasSimulator: HasSimulator, testingDirectory: HasTestingDirectory, chiselOptsModifications: ChiselOptionsModifications, firtoolOptsModifications: FirtoolOptionsModifications, commonSettingsModifications: CommonSettingsModifications, backendSettingsModifications: BackendSettingsModifications): Unit

Simulate a Module using a standard initialization procedure.

Simulate a Module using a standard initialization procedure.

For details of the initialization procedure see ResetProcedure.

Value parameters

additionalResetCycles

a number of additional cycles to assert reset for

chiselOpts

command line options to pass to Chisel

firtoolOpts

command line options to pass to firtool

module

the Chisel module to generate

settings

ChiselSim-related settings used for simulation

stimulus

directed stimulus to use

subdirectory

an optional subdirectory for the test. This will be a subdirectory under what is provided by testingDirectory.

testingDirectory

a type class implementation that can be used to change the behavior of where files will be created

Attributes

Note

Take care when passing chiselOpts. The following options are set by default and if you set incompatible options, the simulation will fail.

Inherited from:
SimulatorAPI
Source
SimulatorAPI.scala
def simulateRaw[T <: RawModule](module: => T, chiselOpts: Array[String] = ..., firtoolOpts: Array[String] = ..., settings: Settings[T] = ..., subdirectory: Option[String] = ...)(stimulus: T => Unit)(implicit hasSimulator: HasSimulator, testingDirectory: HasTestingDirectory, chiselOptsModifications: ChiselOptionsModifications, firtoolOptsModifications: FirtoolOptionsModifications, commonSettingsModifications: CommonSettingsModifications, backendSettingsModifications: BackendSettingsModifications): Unit

Simulate a RawModule without any initialization procedure.

Simulate a RawModule without any initialization procedure.

Use of this method is not advised when simulate can be used instead. This method may cause problems with certain simulators as it is up to the user to ensure that race conditions will not exist during the time zero and reset procedure.

Value parameters

chiselOpts

command line options to pass to Chisel

firtoolOpts

command line options to pass to firtool

module

the Chisel module to generate

settings

ChiselSim-related settings used for simulation

stimulus

directed stimulus to use

subdirectory

an optional subdirectory for the test. This will be a subdirectory under what is provided by testingDirectory.

testingDirectory

a type class implementation that can be used to change the behavior of where files will be created

Attributes

Note

Take care when passing chiselOpts. The following options are set by default and if you set incompatible options, the simulation will fail.

Inherited from:
SimulatorAPI
Source
SimulatorAPI.scala

Implicits

Inherited implicits

implicit def toTestableBool(bool: Bool): TestableBool

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableClock(clock: Clock): TestableClock

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableData[T <: Data](data: T): TestableData[T]

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableEnum[T <: EnumType](data: T): TestableEnum[T]

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableRecord[T <: Record](record: T): TestableRecord[T]

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableReset(reset: Reset): TestableReset

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableSInt(sint: SInt): TestableSInt

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableUInt(uint: UInt): TestableUInt

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala
implicit def toTestableVec[T <: Data](vec: Vec[T]): TestableVec[T]

Attributes

Inherited from:
PeekPokeAPI
Source
PeekPokeAPI.scala