Packages

c

spinal.lib.bus.amba4.axi.sim

Axi4Master

case class Axi4Master(axi: Axi4, clockDomain: ClockDomain, name: String = "unnamed") extends Product with Serializable

Simulation master for the Axi4 bus protocol spinal.lib.bus.amba4.axi.Axi4.

axi

bus master to drive

clockDomain

clock domain to sample data on

Example:
  1. SimConfig.compile(new Component {
      val io = new Bundle {
        val axiSlave = slave(Axi4(Axi4Config(32, 32)))
      }
      io.axiSlave.assignDontCare
    }).doSim("sample") { dut =>
      val master = Axi4Master(dut.io.axiSlave, dut.clockDomain)
      val data = master.read(0x1000, 4)
    }
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Axi4Master
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Axi4Master(axi: Axi4, clockDomain: ClockDomain, name: String = "unnamed")

    create a new simulation master with the given bus instance and clock domain.

    create a new simulation master with the given bus instance and clock domain.

    axi

    bus master to drive

    clockDomain

    clock domain to sample data on

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val axi: Axi4
  6. val clockDomain: ClockDomain
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def idle: Boolean

    check if bus master is idle (readIdle && writeIdle)

  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val name: String
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. def read(address: BigInt, totalBytes: BigInt, id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize): List[Byte]

    Read synchronously multiple bytes from the specified address.

    Read synchronously multiple bytes from the specified address.

    address

    address to read from; does not need to be aligned (data will be truncated automatically)

    totalBytes

    total number of bytes in the result; if longer than a single transaction (as specified by burst, len, and size), the bus master will issue multiple transactions

    id

    AxID to use in the request; xID in the response will be checked against this (cf. AXI specification)

    burst

    burst mode to issue (cf. AXI specification)

    len

    number of beats in a single transaction minus one (cf. AXI specification)

    size

    number of bytes in one beat, log encoded (cf. AXI specification)

  17. def readCB(address: BigInt, totalBytes: BigInt, id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize)(callback: (List[Byte]) ⇒ Unit): Unit

    Read asynchronously; same as read, but result is delivered in a callback

    Read asynchronously; same as read, but result is delivered in a callback

    callback

    callback function on finish

  18. def readIdle: Boolean

    check if all read channels are idle (no read transactions active)

  19. def readSingle(address: BigInt, totalBytes: Int, id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize)(callback: (List[Byte]) ⇒ Unit): Unit

    Read asynchronously with only one transaction

  20. def reset(): Unit

    Reset bus master (dropping all pending transactions)

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def write(address: BigInt, data: List[Byte], id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize): Unit

    Write synchronously multiple bytes to the specified address.

    Write synchronously multiple bytes to the specified address.

    address

    address to write to; does not need to be aligned (data will be truncated automatically)

    data

    list of bytes to write to address; if longer than a single transaction (as specified by burst, len, and size), the bus master will issue multiple transactions

    id

    AxID to use in the request; xID in the response will be checked against this (cf. AXI specification)

    burst

    burst mode to issue (cf. AXI specification)

    len

    number of beats in a single transaction minus one (cf. AXI specification)

    size

    number of bytes in one beat, log encoded (cf. AXI specification)

  26. def writeCB(address: BigInt, data: List[Byte], id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize)(callback: ⇒ Unit): Unit

    Write asynchronously; same as write, but completion is delivered in a callback

    Write asynchronously; same as write, but completion is delivered in a callback

    callback

    callback function on finish

  27. def writeIdle: Boolean

    check if all write channels are idle (no write transactions active)

  28. def writeSingle(address: BigInt, data: List[Byte], id: Int = 0, burst: Axi4Burst = Incr, len: Int = 0, size: Int = maxSize)(callback: ⇒ Unit): Unit

    Write asynchronously with only one transaction

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped