RawClockedNonVoidFunctionCall

chisel3.util.circt.dpi.RawClockedNonVoidFunctionCall

Attributes

Source
DPI.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[T <: Data](functionName: String, ret: => T, inputNames: Option[Seq[String]] = ..., outputName: Option[String] = ...)(clock: Clock, enable: Bool, data: Data*): T

Creates an intrinsic that calls non-void DPI function at its clock posedge. The result values behave like registers and the DPI function is used as a state transfer function of them.

Creates an intrinsic that calls non-void DPI function at its clock posedge. The result values behave like registers and the DPI function is used as a state transfer function of them.

enable operand is used to conditionally call the DPI since DPI call could be quite more expensive than native constructs.

When an enable is false, it means the state transfer function is not called. Hence their values will not be modified in that clock.

Please refer https://github.com/llvm/circt/blob/main/docs/Dialects/FIRRTL/FIRRTLIntrinsics.md#dpi-intrinsic-abi for DPI function ABI.

Attributes

Example
val a = RawClockedNonVoidFunctionCall("dpi_func_foo", UInt(1.W))(clock, enable, b, c)
Source
DPI.scala