Skip to content

netlist_carpentry.io.vcd.wrapper

Classes:

VCDVar dataclass

VCDVar(var: Var, wf: Waveform)

Methods:

  • value_at_time

    Return the signal's value at a given timestamp.

  • value_at_idx

    Return the signal's value at a given index in the waveform list.

Attributes:

name property

name: str

Return the variable's name.

full_name property

full_name: str

Return the variable's full name.

bitwidth property

bitwidth: Optional[int]

Return the variable's bitwidth.

var_type property

var_type: VAR_TYPES

Return the variable's type.

enum_type property

enum_type: Optional[Tuple[str, List[Tuple[str, str]]]]

Return the variable's enum type.

direction property

direction: Literal[
    "Unknown", "Implicit", "Input", "Output", "InOut", "Buffer", "Linkage"
]

Return the variable's direction.

length property

length: Optional[int]

Return the variable's length.

is_real property

is_real: bool

Return True if the variable is real.

is_string property

is_string: bool

Return True if the variable is a string.

is_bit_vector property

is_bit_vector: bool

Return True if the variable is a bit vector.

is_1bit property

is_1bit: bool

Return True if the variable is 1-bit.

all_changes property

all_changes: List[Tuple[NonNegativeInt, Union[NonNegativeInt, str]]]

Return a list of all signal changes.

change_times property

change_times: List[NonNegativeInt]

Return a list of times when the variable changed.

value_at_time

value_at_time(time: NonNegativeInt) -> Union[NonNegativeInt, str]

Return the signal's value at a given timestamp.

Parameters:

  • time

    (NonNegativeInt) –

    The timestamp to retrieve the value for.

Returns:

  • Union[NonNegativeInt, str]

    Union[int, str]: The signal's value at the specified timestamp.

value_at_idx

value_at_idx(idx: int) -> Union[NonNegativeInt, str]

Return the signal's value at a given index in the waveform list.

Parameters:

  • idx

    (int) –

    The index to retrieve the value for.

Returns:

  • Union[NonNegativeInt, str]

    Union[int, str]: The signal's value at the specified index.

VCDScope dataclass

VCDScope(scope: Scope, wf: Waveform)

Attributes:

name property

name: str

Return the scope's name.

full_name property

full_name: str

Return the scope's full name.

scope_type property

scope_type: SCOPE_TYPES

Return the scope's type.

scopes property

scopes: List[VCDScope]

Return a list of sub-scopes.

vars property

vars: List[VCDVar]

Return a list of variables in the scope.

VCDWaveform

VCDWaveform(wf: Union[Waveform, str, Path])

Attributes:

top_scopes property

top_scopes: List[VCDScope]

Return a list of top-level scopes.

all_vars property

all_vars: Dict[str, VCDVar]

Return a dictionary of all variables.