Corrected a bug in electrical dimensions of the transistors when
parsing al file: eg a 0.35 in al became a 0.34 in spice! Argh!
This commit is contained in:
parent
346f8c4d30
commit
667d94751f
|
@ -30,6 +30,10 @@
|
||||||
* is provided. *
|
* is provided. *
|
||||||
* Updates : AUGUST, 12th 2002, Pierre Nguyen Tuong *
|
* Updates : AUGUST, 12th 2002, Pierre Nguyen Tuong *
|
||||||
* $Log: alc_pars_l6.c,v $
|
* $Log: alc_pars_l6.c,v $
|
||||||
|
* Revision 1.6 2003/01/14 12:02:23 fred
|
||||||
|
* Corrected a bug in electrical dimensions of the transistors when
|
||||||
|
* parsing al file: eg a 0.35 in al became a 0.34 in spice! Argh!
|
||||||
|
*
|
||||||
* Revision 1.5 2002/10/09 09:18:37 xtof
|
* Revision 1.5 2002/10/09 09:18:37 xtof
|
||||||
* Dans la fonction read_line, deux buffers de 524288 caracteres etaient
|
* Dans la fonction read_line, deux buffers de 524288 caracteres etaient
|
||||||
* declares. En fonction de la taille max de la pile, dans certains
|
* declares. En fonction de la taille max de la pile, dans certains
|
||||||
|
@ -396,10 +400,10 @@ int version;
|
||||||
);
|
);
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
l = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
l = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
w = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
w = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
drain = givelosig( ptfig, decode_int( (char*)line->DATA, fname, mal_line ) );
|
drain = givelosig( ptfig, decode_int( (char*)line->DATA, fname, mal_line ) );
|
||||||
|
@ -422,22 +426,22 @@ int version;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
xs = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
xs = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
xd = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
xd = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
ps = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
ps = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
pd = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
pd = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
x = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
x = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
y = decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
y = .5 + decode_float( (char*)line->DATA, fname, mal_line ) * (double)SCALE_X ;
|
||||||
line = line->NEXT;
|
line = line->NEXT;
|
||||||
|
|
||||||
phdrain = 0;
|
phdrain = 0;
|
||||||
|
|
|
@ -653,30 +653,31 @@ char *vdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooutput( df, "%s ", spitransmodel( scantrs->TYPE ) );
|
tooutput( df, "%s ", spitransmodel( scantrs->TYPE ) );
|
||||||
|
#define SCALED(x,y) (double)((double)(x)/(double)(y))
|
||||||
|
|
||||||
if(scantrs->LENGTH!=0)
|
if(scantrs->LENGTH!=0)
|
||||||
tooutput( df, "L=%gU ", (float)scantrs->LENGTH/SCALE_X );
|
tooutput( df, "L=%gU ", SCALED(scantrs->LENGTH, SCALE_X));
|
||||||
|
|
||||||
if(scantrs->WIDTH!=0)
|
if(scantrs->WIDTH!=0)
|
||||||
tooutput( df, "W=%gU ", (float)scantrs->WIDTH/SCALE_X );
|
tooutput( df, "W=%gU ", SCALED(scantrs->WIDTH, SCALE_X));
|
||||||
|
|
||||||
if( scantrs->XS != 0 )
|
if( scantrs->XS != 0 )
|
||||||
tooutput( df,
|
tooutput( df,
|
||||||
"AS=%gP ",
|
"AS=%gP ",
|
||||||
(float) scantrs->XS * scantrs->WIDTH / ( SCALE_X * SCALE_X )
|
SCALED(scantrs->XS * scantrs->WIDTH, SCALE_X * SCALE_X)
|
||||||
);
|
);
|
||||||
|
|
||||||
if( scantrs->XD != 0 )
|
if( scantrs->XD != 0 )
|
||||||
tooutput( df,
|
tooutput( df,
|
||||||
"AD=%gP ",
|
"AD=%gP ",
|
||||||
(float) scantrs->XD * scantrs->WIDTH / ( SCALE_X * SCALE_X )
|
SCALED(scantrs->XD * scantrs->WIDTH, SCALE_X * SCALE_X)
|
||||||
);
|
);
|
||||||
|
|
||||||
if( scantrs->PS != 0 )
|
if( scantrs->PS != 0 )
|
||||||
tooutput( df, "PS=%gU ", (float)scantrs->PS/SCALE_X );
|
tooutput( df, "PS=%gU ", SCALED(scantrs->PS, SCALE_X));
|
||||||
|
|
||||||
if( scantrs->PD != 0 )
|
if( scantrs->PD != 0 )
|
||||||
tooutput( df, "PD=%gU ", (float)scantrs->PD/SCALE_X );
|
tooutput( df, "PD=%gU ", SCALED(scantrs->PD, SCALE_X));
|
||||||
|
|
||||||
tooutput( df, "\n" );
|
tooutput( df, "\n" );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue