netlist_carpentry.core.exceptions
¶
A collection of custom exceptions for several error cases that may occur.
Classes:
-
CircuitStructureError–Base class for all exceptions related to circuit structure issues.
-
StructureMismatchError–Raised when two objects should have a matching structure but actually differ, e.g. in regards to their interface.
-
WidthMismatchError–Raised when a wire's width does not match the port's width or vice versa.
-
MultipleDriverError–Raised whenever two driver signals attempt to drive the same wire.
-
AlreadyConnectedError–Raised when attempting to connect a port that is already connected.
-
MissingConnectionError–Raised when a connection was expected but is not present (e.g. an unconnected port, where a connected port was expected).
-
InvalidDirectionError–Raised when a port with an invalid direction is passed.
-
ObjectLockedError–Raised when attempting to modify a locked (temporarily immutable) object.
-
SingleOwnershipError–Raised when an object is already owned by a certain container and cannot be added to another container.
-
IdentifierConflictError–Raised when an object with a duplicate identifier (usually an already existing name) is created.
-
ObjectNotFoundError–Raised when a requested object does not exist in the circuit.
-
ParentNotFoundError–Raised when the parent is requested for an object, but no parent exists.
-
PathResolutionError–Raised when a circuit path cannot be resolved.
-
HierarchyError–Raised whenever issues with the circuit's hierarchy arise.
-
DetachedSegmentError–Raised when a segment object is created without a parent element.
-
UnsupportedOperationError–Raised when an operation is not supported for a given instance type.
-
SplittingUnsupportedError–Raised when attempting to split an unsplittable instance.
-
SignalError–Base class for all exceptions related to signal issues.
-
EvaluationError–Base class for all exceptions arising during signal evaluation.
-
InvalidSignalError–Raised when an invalid signal is provided.
-
NetTypeError–Raised when the wrong net type is provided, e.g.
wireinstead ofreg. -
SignalAssignmentError–Raised when a signal cannot be assigned due to various reasons.
-
VerilogSyntaxError–Raised whenever a Syntax Error with Verilog code occurs.
-
VcdLoadingError–Raised whenever a VCD file could not be loaded.
-
MaxRetriesExceededError–Raised when the maximum number of retries has been exceeded.
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.
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.
MaxRetriesExceededError
¶
Bases: RuntimeError
Raised when the maximum number of retries has been exceeded.