pub struct DesignImage {Show 27 fields
pub abi_version: u32,
pub tick_exp: i32,
pub x_initial_zero: bool,
pub templates: Vec<TemplateImage>,
pub instances: Vec<InstanceImage>,
pub foreign: Vec<ForeignImage>,
pub x_windows: Vec<XWindow>,
pub wires: Vec<WireImage>,
pub groups: Vec<GroupImage>,
pub networks: Vec<NetworkImage>,
pub symbols: Vec<String>,
pub kernels: Vec<KernelImage>,
pub fork_table: Vec<SpawnSpec>,
pub fork_branches: Vec<ForkBranchImage>,
pub wait_table: Vec<WaitTableEntry>,
pub strings: Vec<Vec<u8>>,
pub collections: Vec<FrozenData>,
pub classes: Vec<TemplateSnapshot>,
pub dump_signals: Vec<DumpSignalImage>,
pub stmt_cov: Option<Vec<StmtSiteImage>>,
pub fsms: Vec<FsmImage>,
pub dpi: DpiImage,
pub verif: VerifImage,
pub timing: TimingImage,
pub randomize: Vec<u8>,
pub native_nets: Vec<u8>,
pub vpi: Vec<u8>,
}Expand description
Everything a runner needs to assemble and run one design.
Fields§
§abi_version: u32sv_sim_abi::SV_SIM_ABI_VERSION the kernels were compiled against.
tick_exp: i32The scheduler tick exponent (1e<tick_exp> seconds), which %t
defaults to.
x_initial_zero: boolBuild default for --x-initial-zero.
templates: Vec<TemplateImage>§instances: Vec<InstanceImage>§foreign: Vec<ForeignImage>§x_windows: Vec<XWindow>§wires: Vec<WireImage>Port connection wires, in registration order.
groups: Vec<GroupImage>Resolved net groups (resolvers register in group order, switch networks first).
networks: Vec<NetworkImage>§symbols: Vec<String>Every function name the image refers to by index.
kernels: Vec<KernelImage>§fork_table: Vec<SpawnSpec>§fork_branches: Vec<ForkBranchImage>§wait_table: Vec<WaitTableEntry>§strings: Vec<Vec<u8>>Every interned string but "", in id order (crate::strings::snapshot).
A string’s id is baked into machine code and into cells’ initial
values, so the runner re-interns these first, in this order.
collections: Vec<FrozenData>Every constant collection (crate::collections::frozen_snapshot), the
same way: entry i is handle (1 << 32) | (i + 1).
classes: Vec<TemplateSnapshot>Every class template’s runtime metadata (crate::objects::template_snapshot),
by ascending template id. Registered with the object heap before the
design runs, so release, copy, $cast and the cycle collector see
the same classes they saw in the process that built the image.
dump_signals: Vec<DumpSignalImage>Every dumpable signal, in the order $dumpvars numbers them.
stmt_cov: Option<Vec<StmtSiteImage>>Some(defining module name of each statement site) when the code was
generated with statement-coverage probes (build-aot --coverage, LRM
40.2.1 a); None otherwise.
fsms: Vec<FsmImage>The FSMs the 40.4 pragmas name, one per instance (LRM 40.2.1 c).
dpi: DpiImageThe design’s DPI-C imports and exports.
verif: VerifImageAssertions, checker free variables and sampled-value guards.
timing: TimingImageTiming options and the timing plan (primitives, specify, timing checks, SDF).
randomize: Vec<u8>The constraint solver’s programs and randomize() call-site specs
(crate::constraints::registry::snapshot), opaque here; empty for a
design that never randomizes.
native_nets: Vec<u8>The resolvers no GroupImage describes (user-defined nettypes,
unpacked-array nets), opaque here: its typed codec lives in
sv-sim-exec::usernets, which owns the code that runs it. Empty for a
design with none.
vpi: Vec<u8>The VPI object model (sv-sim-bin vpi::model::VpiModel::encode: objects, handle
relations, properties, expression nodes, name indexes), opaque here; empty for an
image built without VPI. Present so a design runs the same user VPI libraries under
the AOT runner as under the JIT, with no slang at run time.
Implementations§
Source§impl DesignImage
impl DesignImage
Sourcepub fn decode(bytes: &[u8]) -> Result<DesignImage, ImageError>
pub fn decode(bytes: &[u8]) -> Result<DesignImage, ImageError>
Decodes and cross-checks an image (every index must land in its table).
Sourcepub fn validate(&self) -> Result<(), ImageError>
pub fn validate(&self) -> Result<(), ImageError>
Every reference in the image lands in its table.
Source§impl DesignImage
impl DesignImage
Sourcepub fn empty(abi_version: u32) -> Self
pub fn empty(abi_version: u32) -> Self
An image with no content (for tests and as a builder’s start).
Sourcepub fn intern(&mut self, name: &str) -> u32
pub fn intern(&mut self, name: &str) -> u32
Interns name, returning its index in Self::symbols.
Sourcepub fn bank(&self) -> Option<InstanceId>
pub fn bank(&self) -> Option<InstanceId>
The synthetic driver-contribution bank, if the design has one.
Sourcepub fn layout_of(&self, key: &TemplateKey) -> Option<&StateLayout>
pub fn layout_of(&self, key: &TemplateKey) -> Option<&StateLayout>
The layout of key’s template.