SvPortSim.Verilator.Wrapper.Template (SvPortSim v0.1.0)

Copy Markdown View Source

Renders the interactive C++ wrapper template for Verilated top modules.

The C++ runtime skeleton lives in priv/sv_port_sim/wrapper.cpp.eex. Accessor-specific fragments are expected to be supplied by SvPortSim.Verilator.Wrapper.Accessor.context/1.

Summary

Functions

Renders wrapper C++ source for top_module using prebuilt accessor context.

Types

context()

@type context() :: %{
  :signal_specs_json => String.t(),
  :poke_cases => String.t(),
  :peek_cases => String.t(),
  optional(:clock_cases) => String.t(),
  optional(:default_clock_case) => String.t(),
  optional(:reset_cases) => String.t(),
  optional(:default_reset_case) => String.t(),
  optional(atom()) => term()
}

Functions

render(top_module, context)

@spec render(String.t(), context()) :: String.t()

Renders wrapper C++ source for top_module using prebuilt accessor context.