#include <circuitTree.h>
◆ memo_ts_t
◆ CircType
Enumerator |
---|
CIRC_GROUP | |
CIRC_COMB | |
CIRC_DELAY | |
CIRC_TRI | |
CIRC_ASSERT | |
◆ CircuitTree()
CircuitTree::CircuitTree |
( |
| ) |
|
◆ ~CircuitTree()
CircuitTree::~CircuitTree |
( |
| ) |
|
|
virtual |
◆ alter()
void CircuitTree::alter |
( |
bool |
uprec = true | ) |
|
Notify the circuit that its internals have been modified, and its memoized results must be invalidated. This is done automatically on every altering method call. This can nevertheless be called if you want to invalidate memoization.
- Parameters
-
uprec | whether the ancestors' cache should be also invalidated |
◆ ancestor()
Get the parent group of this circuit. This might be NULL
if the group has no parent (yet).
◆ circType()
virtual CircType CircuitTree::circType |
( |
| ) |
const |
|
pure virtual |
◆ computeSignature()
sign_t CircuitTree::computeSignature |
( |
int |
level | ) |
|
|
protectedvirtual |
Computes the actual signature of the circuit when it was not previously memoized. You should call sign
when overriding this function and needing a lower-level signature of a block.
◆ equals()
Checks whether this circuit is formally equal to its argument, wrt. permutations, names, etc. This does not take into account the gate's I/O, but only its internal structure.
◆ id()
size_t CircuitTree::id |
( |
| ) |
const |
|
inline |
◆ innerEqual()
virtual bool CircuitTree::innerEqual |
( |
CircuitTree * |
othTree | ) |
|
|
protectedpure virtual |
◆ innerSignature()
virtual sign_t CircuitTree::innerSignature |
( |
| ) |
const |
|
protectedpure virtual |
◆ inp_begin()
virtual IoIter CircuitTree::inp_begin |
( |
| ) |
const |
|
pure virtual |
◆ inp_end()
IoIter CircuitTree::inp_end |
( |
| ) |
const |
|
inline |
Get an iterator to the end of input wires
◆ inputCount()
virtual size_t CircuitTree::inputCount |
( |
| ) |
const |
|
pure virtual |
◆ io_begin()
IoIter CircuitTree::io_begin |
( |
| ) |
const |
|
inline |
Get an iterator to the first I/O wire
◆ io_end()
IoIter CircuitTree::io_end |
( |
| ) |
const |
|
inline |
Get an iterator to the end of output wires
◆ nth_input()
virtual WireId* CircuitTree::nth_input |
( |
size_t |
circId | ) |
const |
|
pure virtual |
◆ nth_output()
virtual WireId* CircuitTree::nth_output |
( |
size_t |
circId | ) |
const |
|
pure virtual |
◆ operator==()
bool CircuitTree::operator== |
( |
const CircuitTree & |
oth | ) |
const |
|
inline |
O(1) comparaison using IDs
◆ out_begin()
virtual IoIter CircuitTree::out_begin |
( |
| ) |
const |
|
pure virtual |
◆ out_end()
virtual IoIter CircuitTree::out_end |
( |
| ) |
const |
|
pure virtual |
◆ outputCount()
virtual size_t CircuitTree::outputCount |
( |
| ) |
const |
|
pure virtual |
◆ sign()
sign_t CircuitTree::sign |
( |
int |
level = 2 | ) |
|
Computes the signature of the circuit. Memoized function, it will only be costy on the first run.
- Parameters
-
level | Defines the signature level used. Lower means cheaper, but also less precise. |
◆ toDot()
virtual void CircuitTree::toDot |
( |
std::basic_ostream< char > & |
out, |
|
|
int |
indent = 0 |
|
) |
| |
|
pure virtual |
◆ unplug()
void CircuitTree::unplug |
( |
| ) |
|
|
virtual |
Unplug the circuit from its ancestor.
Unplug the circuit from its ancestor, that is, disconnects every wire. You should delete this circuit right after it has been unplugged, as its internal state is not cleaned up and will most probably break up in mean and inventive ways if you try to reuse it
Reimplemented in CircuitGroup.
◆ unplug_common()
void CircuitTree::unplug_common |
( |
| ) |
|
|
protected |
Common steps for every overridden implementation of unplug
◆ CircuitGroup
◆ ancestor_
Group this circuit belongs to. This is automatically set.
◆ curHistoryTime
Current history "timestamp" for this circuit, used for memoization.
◆ lastAlterationTime
◆ memoSig
std::vector<MemoSign> CircuitTree::memoSig |
|
protected |
The documentation for this class was generated from the following files: