Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / tas / stm / stm_prop_eval.c
1 /****************************************************************************/
2 /* */
3 /* Chaine de CAO & VLSI AVERTEC */
4 /* */
5 /* Produit : STM Version 1.00 */
6 /* Fichier : stm_prop_eval.c */
7 /* */
8 /* (c) copyright 2000 AVERTEC */
9 /* Tous droits reserves */
10 /* */
11 /* Auteur(s) : Gilles Augustins */
12 /* */
13 /****************************************************************************/
14
15 /****************************************************************************/
16 /* includes */
17 /****************************************************************************/
18
19 #include "stm.h"
20
21 /****************************************************************************/
22 /* functions */
23 /****************************************************************************/
24
25 float stm_getfancap (timing_props *properties, float fanout)
26 {
27 timing_model *capmodel;
28 float capa;
29
30 if(!properties)
31 return 0.0;
32
33 capmodel = properties->CAPMODEL;
34
35 if(capmodel){
36 capa = stm_modtbl_interpol1Dlinear(capmodel->UMODEL.TABLE, fanout);
37 if(capa < 0.0)
38 return 0.0;
39 else
40 return capa;
41 }else{
42 return 0.0;
43 }
44 }
45
46 /****************************************************************************/
47
48 float stm_getfanres (timing_props *properties, float fanout)
49 {
50 timing_model *resmodel;
51 float res;
52
53 if(!properties)
54 return 0.0;
55
56 resmodel = properties->RESMODEL;
57
58 if(resmodel){
59 res = stm_modtbl_interpol1Dlinear(resmodel->UMODEL.TABLE, fanout);
60 if(res < 0.0)
61 return 0.0;
62 else
63 return res;
64 }else{
65 return 0.0;
66 }
67 }
68
69 /****************************************************************************/
70
71