Algorithms¶
-
algos.cp(g, return_delta=False)¶ Compute the clock period of a synchronous circuit.
Time complexity

Space complexity

- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
return_delta – Whether to return the computed
or not (used in other algorithms).
- Returns
The clock period of the given circuit.
-
algos.feas(g, c)¶ Given a synchronous circuit
and a desired clock period
, this algorithm produces a retiming
of
such that
is a synchronous circuit with clock period not greater than
,
if such retiming exists.Time complexity

Space complexity

- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
c – The desired clock period.
- Returns
The retiming function or
Noneifcis not feasible.
-
algos.opt1(g, show_wd=False)¶ Given a synchronous circuit
, this algorithm determines a retiming
such that the clock period of
is as small as possible.Time complexity

Space complexity

- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
show_wd – Print matrices W and D.
- Returns
The retimed graph having the smallest possible clock period.
-
algos.opt2(g, show_wd=False)¶ Given a synchronous circuit
, this algorithm determines a retiming
such that the clock period of
is as smallas possible.Time complexity

Space complexity

- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
show_wd – Print matrices W and D.
- Returns
The retimed graph having the smallest possible clock period.
-
algos.retime(g, r)¶ Compute the retimed graph.
- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
r – The retiming function
to be applied.
- Returns
The retimed graph.
-
algos.wd(g, show=False)¶ Given a synchronous circuit
, this algorithm computes
and
for all
such that
is connected to
in
.Time complexity

Space complexity

- Parameters
g – A NetworkX (Multi)DiGraph representing a synchronous circuit.
show – Print the matrices.
- Returns
Matrices W and D in the form
dict<(u,v), int>.