Skip to content

Trace

Trace

Trace(ctx, rawtrace=None)

A trace generated from an Engine, or manually built for use in simulation

get_numeric_value staticmethod

get_numeric_value(value)

Converts a string value (including true, false) into a corresponding float or integer. Reals that are not finite decimals come as fractions, n/d, and floats can be inf, -inf and nan.

get_max_depth

get_max_depth()

Returns the max depth of the trace

get_value

get_value(net, depth)

Retrieval of a value from the trace for a net at a depth

set_value

set_value(net, depth, value)

Sets a value for a net at a certain depth

get_as_net_dictionary

get_as_net_dictionary(net2name: None = None) -> dict[Net, list[str]]
get_as_net_dictionary(net2name: Mapping[Net, _Key]) -> dict[_Key, list[str]]
get_as_net_dictionary(net2name=None)

Return the trace as a dictionary

net -> [value@0, value@1, ...]

get_as_depth_dictionary

get_as_depth_dictionary()

Return the trace as a dictionary

depth -> [valuenet1@depth, valuenet2@depth, ...]

set_from_dictionary

set_from_dictionary(name2values, inputname2net)

Fills the trace from a dictionary, as get_as_net_dictionary(net2name) gives it: name -> [value@0, value@1, ...]. Only the names of inputname2net are taken, and empty values ('' or None) are left unset. Returns the last depth set.