Skip to content

netlist_carpentry.core.exceptions

A collection of custom exceptions for several error cases that may occur.

Classes:

CircuitStructureError

Bases: Exception

Base class for all exceptions related to circuit structure issues.

StructureMismatchError

Bases: CircuitStructureError

Raised when two objects should have a matching structure but actually differ, e.g. in regards to their interface.

WidthMismatchError

Bases: StructureMismatchError

Raised when a wire's width does not match the port's width or vice versa.

MultipleDriverError

Bases: CircuitStructureError

Raised whenever two driver signals attempt to drive the same wire.

AlreadyConnectedError

Bases: CircuitStructureError

Raised when attempting to connect a port that is already connected.

MissingConnectionError

Bases: CircuitStructureError

Raised when a connection was expected but is not present (e.g. an unconnected port, where a connected port was expected).

InvalidDirectionError

Bases: CircuitStructureError

Raised when a port with an invalid direction is passed.

ObjectLockedError

Bases: CircuitStructureError

Raised when attempting to modify a locked (temporarily immutable) object.

SingleOwnershipError

Bases: CircuitStructureError

Raised when an object is already owned by a certain container and cannot be added to another container.

IdentifierConflictError

Bases: CircuitStructureError

Raised when an object with a duplicate identifier (usually an already existing name) is created.

ObjectNotFoundError

Bases: CircuitStructureError, LookupError

Raised when a requested object does not exist in the circuit.

ParentNotFoundError

Bases: ObjectNotFoundError

Raised when the parent is requested for an object, but no parent exists.

PathResolutionError

Bases: ObjectNotFoundError

Raised when a circuit path cannot be resolved.

HierarchyError

Bases: CircuitStructureError

Raised whenever issues with the circuit's hierarchy arise.

DetachedSegmentError

Bases: CircuitStructureError

Raised when a segment object is created without a parent element.

UnsupportedOperationError

Bases: ValueError

Raised when an operation is not supported for a given instance type.

SplittingUnsupportedError

Bases: UnsupportedOperationError

Raised when attempting to split an unsplittable instance.

SignalError

Bases: Exception

Base class for all exceptions related to signal issues.

EvaluationError

Bases: SignalError

Base class for all exceptions arising during signal evaluation.

InvalidSignalError

Bases: SignalError

Raised when an invalid signal is provided.

NetTypeError

Bases: SignalError

Raised when the wrong net type is provided, e.g. wire instead of reg.

SignalAssignmentError

Bases: SignalError

Raised when a signal cannot be assigned due to various reasons.

VerilogSyntaxError

Bases: SyntaxError

Raised whenever a Syntax Error with Verilog code occurs.

VcdLoadingError

Bases: Exception

Raised whenever a VCD file could not be loaded.

MaxRetriesExceededError

Bases: RuntimeError

Raised when the maximum number of retries has been exceeded.