Equipotential Class

Equipotential Overview

The najaeda.netlist.Equipotential class represents a flat connected component across hierarchy. It is the right tool when local net connectivity is not enough.

An equipotential can enumerate:

  • top-level terms connected to the signal;

  • instance terms connected through hierarchy;

  • leaf drivers and readers;

  • constant drivers.

Example

equi = top.get_term("clk").get_equipotential()

for reader in equi.get_leaf_readers():
    print(reader)

Equipotential Attributes

class najaeda.netlist.Equipotential(term)[source]

Bases: object

Class that represents the term and wraps some of the snl occurrence API.

dump_dot(path: str)[source]

Dump the dot file of this equipotential.

get_inst_terms()[source]

Iterate over the instance terminals of this equipotential.

Returns:

an iterator over the instance terminals of this equipotential.

Return type:

Iterator[Term]

get_leaf_drivers(filter=None)[source]
get_leaf_readers(filter=None)[source]
get_top_drivers()[source]
get_top_readers()[source]
get_top_terms()[source]

Iterate over the top terminals of this equipotential.

Returns:

an iterator over the top terminals of this equipotential.

Return type:

Iterator[Term]

is_const() bool[source]

Check if this equipotential is a constant generator.

Returns:

True if this equipotential is a constant generator.

Return type:

bool

is_const0() bool[source]

Check if this equipotential is a constant 0 generator.

Returns:

True if this equipotential is a constant 0 generator.

Return type:

bool

is_const1() bool[source]

Check if this equipotential is a constant 1 generator.

Returns:

True if this equipotential is a constant 1 generator.

Return type:

bool