dftlib.storage.dft_gates.DftSpare¶
- class DftSpare(element_id, name, children, position)¶
Bases:
DftGate
SPARE gate.
Methods
Add child.
Get children.
Compare elements.
Check whether two gates have the same successors.
Get JSON string.
Get whether the element is a BE.
Get whether the element is dynamic.
Get whether the element is a gate.
Get parents.
Remove child.
Remove parent.
Replace given child with new element.
Set whether the element is relevant (and will not be set to 'Don't Care' for example).
- add_child(element)¶
Add child. :param element: Child to add.
- children()¶
Get children. :return: Ordered list of children.
- compare(other, respect_ids)¶
Compare elements. :param other: Other element. :param respect_ids: Whether the ids must be equal. :return: True iff both elements are equal.
- compare_successors(other, ordered, respect_ids)¶
Check whether two gates have the same successors. :param other: Other gate. :param ordered: Whether the order of successors should be respected. :param respect_ids: Whether the ids of the successors must be equal. :return: True iff both gates have the same successors.
- get_json()¶
Get JSON string. :return: JSON string.
- is_be()¶
Get whether the element is a BE. :return: True iff element is a BE.
- is_dynamic()¶
Get whether the element is dynamic. :return: True iff element is dynamic.
- is_gate()¶
Get whether the element is a gate. :return: True iff element is a gate.
- parents()¶
Get parents. :return: List of parents.
- remove_child(element)¶
Remove child. :param element: Child to remove.
- remove_parent(element)¶
Remove parent. :param element: Parent to remove.
- replace_child(child, element)¶
Replace given child with new element. Maintains the order. :param child: Original child to be replaced. :param element: Element which will be the new child.
- set_relevant(relevant=True)¶
Set whether the element is relevant (and will not be set to ‘Don’t Care’ for example). :param relevant: Whether the element is relevant.