VHDL-AMS photodiode

M

Mark Fisher

Guest
Hi,

First of all apologies for the long post. For my thesis I'm attempting
to model a CCD in VHDL-AMS and have been having some difficultly
modelling the photodiode charge (in electrons). Initially I used slews
as shown below. V2 and e_lim are real input signals, all parameters
inside the slews are generics, zero is a signal kept at 0.0, and e_pd
is a real quantity.

if V2 < V2H use

e_pd == e_lim'slew( ( nR * real(R) + nG * real(G) + nB * real(B) ) *
K + darkC,-PNe/T_S);

else

e_pd == zero'slew(PNe/T_V3rd);

end use;

In the analog control file I only specify to do transient analysis and
the stop point.

When I simulate this in the Cadence AMS (Spectre) simulator version
5.00 (2003), it appears to run each equation separately. So when V2 is
set to V2H, e_pd jumps straight to zero, then when V2 to is set back
it jumps straight back to the value e_pd was at before in the first
equation and carries on as if nothing had happened. Surely when the
second equation is selected, e_pd should start at the last value of
e_pd in the first equation, and vice versa?


I also did another model using as shown below. Note this time V2H, e_s
are input booleans and R, G and B are integer input signal.

break e_pd => 0.0;

if V2H = false and e_s = false and not e_pd'above(PNe) use

e_pd'dot == (( nR * real(R) + nG * real(G) + nB * real(B) ) * K +
darkC);

elsif e_s = true and e_pd'above(image_lag) use

e_pd'dot == -(PNe/T_S);

elsif V2H = true and e_pd'above(image_lag) use

e_pd'dot == -(PNe/T_V3rd);

else

e_pd'dot == 0.0;

end use;

break on e_pd'above(PNe),
V2H,
e_pd'above(image_lag),
e_lim,
R,G,B;

With the following analog control file

simulator lang=spectre
tran1_op options diagnose=yes
tran1 tran stop=140e-3 errpreset=conservative step=1e-6
UQuant quantity name="U" abstol=1 maxdelta=10000 huge=1e12
blowup=1e16

This, individually, simulates satisfactorily. However when I simulate
the above as a component in an array, the model seems highly sensitive
to the complexity (number of unique colours) of the input image. For a
24 by 18 (482 photodiode) array the transient analysis takes 12
seconds to complete using a 9 colour image. For a downsized photo of
the same size takes 98 seconds, bearing in mind this is hopefully
going to be part of a 4 megapixel CCD. The bottleneck appears to be
the processor (a P4) and memory consumption is the same (12.3MB data +
12.9MB program) in each case. This is despite a randomly generated
image_lag and darkC values being assigned to each photodiode. Does
anyone have any ideas as to whats causing the the large processor
demand? Is it possible to improve the efficiency somehow, or am I just
asking too much from Spectre to model more than 400 different
quantities?

Any help appreciated,

Regards,

Mark Fisher
University of Aberdeen
 

Welcome to EDABoard.com

Sponsor

Back
Top