Component values and/or sizes in an electrical circuit are optimized with
waveform shaping considerations in addition to other constraints and/or objective
functions such as delay, power, gain, area or rise/fall times. A consistent metric
is defined as a quality measure of waveform match. Gradients of these metrics are
computed by efficient methods, thus enabling mathematical optimization by a numerical
optimizer. Two different useful metrics and the corresponding efficient gradient
computation techniques are described.