Net Class
Net Overview
In najaeda, a najaeda.netlist.Net can represent the following scenarios:
Simple Scalar Net: A net that represents a single scalar signal. See
najaeda.netlist.Net.is_scalar().Full Bus Net: A net that encompasses an entire bus. See
najaeda.netlist.Net.is_bus().Single Bit of a Bus: A net that corresponds to an individual bit within a bus. See
najaeda.netlist.Net.is_bus_bit().Concatenation of Bits: A net created by combining multiple bits. See
najaeda.netlist.Net.is_concat().
Net Attributes
- class najaeda.netlist.Net(path, net=None, net_concat=None)[source]
Bases:
object- class Type(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
- count_attributes() int[source]
Count the attributes of this Net.
- Returns:
the number of attributes of this Net.
- Return type:
int
- count_design_terms() int[source]
Count the design terminals of this net.
- Returns:
the number of design terminals of this net.
- Return type:
int
- count_inst_terms() int[source]
Count the instance terminals of this net.
- Returns:
the number of instance terminals of this net.
- Return type:
int
- get_attributes() Iterator[Attribute][source]
Iterate over the attributes of this Net.
- Returns:
the attributes of this Net.
- Return type:
Iterator[Attribute]
- get_bit(index: int)[source]
- Parameters:
index (int) – the index of the bit to get.
- Returns:
the Net bit at the given index or None if it does not exist.
- Return type:
- get_bits()[source]
Iterate over the bits of this Net. The iterator will return itself if the Net is scalar. :return: an iterator over the bits of this Net. :rtype: Iterator[Net]
- get_design_terms()[source]
Return an iterator over the design terminals of the net. This includes only the terminals that are part of the current design. The iterator will yield Term objects bit per bit.
- Returns:
an iterator over the design terminals of the net.
- Return type:
Iterator[Term]
- get_inst_terms()[source]
- Returns:
an iterator over the instance terminals of the net.
- Return type:
Iterator[Term]
- get_lsb() int[source]
- Returns:
the least significant bit of the net if it is a bus.
- Return type:
int
- get_msb() int[source]
- Returns:
the most significant bit of the net if it is a bus.
- Return type:
int