Constants enter through tied pins, parameters and unconnected inputs with a defined tie-off. Each one turns its gate into a simpler function.
The tool repeats the folding until no gate has a constant input left. Results cross hierarchy boundaries the same way.
Gate with constant | Result |
|---|---|
|
|
|
|
|
|
|
|
|
|
A folded constant becomes an input to the next gate, which may fold in turn. One tie-off can therefore delete a whole cone of logic.
The calc block works one example end to end. Areas are library units of the fictional teaching library course.lib.
y = (a & 1) | (b & 0)
fold each AND: (a & 1) = a, (b & 0) = 0
y = a | 0 = a
gates before: 2 AND2 + 1 OR2 = 3 gates
area before: 2 x 3 + 1 x 3 = 9 area units
gates after: 0 (y is the wire a)
area after: 0 area units
saving: 9 area unitsA parameter fixed for one build looks like a constant to the tool. Changing it later re-opens the cone, so recheck the area after the change.
y = (a & 1) | (b & 0). What does the tool keep?Just the wire a. The ANDs and the OR fold away to 0 area units.
Gates that folded away under the old value reappear under the new one. The cone must be re-optimised.