Core Concepts
najaeda uses Naja’s SNL database model. The high-level
najaeda.netlist API keeps the main SNL concepts visible while hiding
most raw database plumbing.
Database, libraries, and designs
A session contains one native najaeda.naja.NLUniverse. The universe
owns databases, databases own libraries, and libraries own designs.
For normal scripts, najaeda.netlist manages this structure:
najaeda.netlist.reset()clears the current universe.najaeda.netlist.create_top()creates a new top design.najaeda.netlist.get_top()returns the current top design wrapper.load functions such as
najaeda.netlist.load_verilog()create or update the top database and return the topnajaeda.netlist.Instance.
Instances and models
An najaeda.netlist.Instance represents an SNL instance in its
hierarchical context. The instance has a model design, a name, child
instances, terms, and nets. A child instance can itself contain more child
instances when its model is hierarchical.
The same model can be instantiated several times. Editing one occurrence may therefore require uniquification so that the edit applies only to the selected hierarchical context. The high-level API performs this automatically for its editing methods.
Terms, nets, and bits
Verilog ports are represented by najaeda.netlist.Term objects.
Internal signals are represented by najaeda.netlist.Net objects.
Both can be scalar, full buses, or individual bus bits.
The high-level wrappers preserve this distinction:
scalar objects represent a single bit;
bus objects represent a complete vector;
bus-bit objects represent one bit of a vector;
some net queries can return a concatenation wrapper when a connection maps to several bits.
Connectivity
Local connectivity answers questions inside one design model: which net is connected to this term, which instance terms are attached to this net, and so on.
An najaeda.netlist.Equipotential answers the flat connectivity
question across hierarchy boundaries. It can enumerate top terms, leaf
drivers, leaf readers, and instance terms connected to a signal.
Source locations and attributes
Many objects expose source ranges and attributes when they were produced by a frontend that preserved this information. Use source ranges for diagnostics and attributes for metadata imported from HDL or attached by analysis passes.
Choosing an API level
Use najaeda.netlist for application code. Use najaeda.naja only
when you need raw SNL construction, exact native object access, live
SystemVerilog frontend intent data, or a native method that is not wrapped yet.
See Expert Raw API for the expert workflow.