mise à niveau
git-svn-id: https://mot-adms.svn.sourceforge.net/svnroot/mot-adms/trunk@1184 6a24e58b-241e-0410-9a82-9c1a24ee876d
r29173
13 years ago
565 | 565 | <evalue name="p" info="multiplication factor = 1.0e-12 (pico)"/> |
566 | 566 | <evalue name="f" info="multiplication factor = 1.0e-15 (femto)"/> |
567 | 567 | <evalue name="a" info="multiplication factor = 1.0e-18 (atto)"/> |
568 | </scalar> | |
569 | <scalar datatypefamily="basictype" name="cast" datatypename="basicenumeration" info="representation" default="d"> | |
570 | <evalue name="i" info="integer"/> | |
571 | <evalue name="d" info="double"/> | |
568 | 572 | </scalar> |
569 | 573 | </element> |
570 | 574 | <element name="function" info="function representation"> |
0 | 0 | <?xml version="1.0" encoding="ISO-8859-1"?> |
1 | <!-- built-in implicit transforms @SVN_VERSION=1115@ --> | |
1 | <!-- built-in implicit transforms @SVN_VERSION=unknown@ --> | |
2 | 2 | <!-- this file is saved in local working directory, then downloaded prior any -e xml files --> |
3 | 3 | <!-- unless flag '-x' is specified --> |
4 | 4 | |
158 | 158 | <admst:value-to test="[name='flicker_noise']" select="$globalcontribution/#fixmeflickernoise" path="1"/> |
159 | 159 | <admst:value-to test="[name='\$temperature']" select="$globalassignment/lhs/TemperatureDependent" string="yes"/> |
160 | 160 | <admst:choose> |
161 | <admst:when test="[name='\$temperature' or name='\$vt' or name='idt' or name='ddt' or | |
161 | <admst:when test="[name='\$realtime' or name='\$temperature' or name='\$vt' or name='idt' or name='ddt' or | |
162 | 162 | name='\$param_given' or name='\$given' or name='ddx' or name='flicker_noise' or name='white_noise']"/> |
163 | 163 | <admst:when |
164 | 164 | test="[name='analysis' or name='\$analysis' or name='\$simparam' or name='simparam' or |
2470 | 2470 | free(newtext); |
2471 | 2471 | } |
2472 | 2472 | /*[nepasimprimer]*/ |
2473 | #if defined(STANDALONE) | |
2474 | static void creearbrex(const char*xcode,const char*myadmstfile) | |
2475 | #else | |
2473 | 2476 | static void creearbrex(const char*myadmstfile) |
2477 | #endif | |
2474 | 2478 | { |
2475 | 2479 | char* xdata0; |
2476 | 2480 | #if defined(STANDALONE) |
2562 | 2566 | adms_NAN=adms_dzero/adms_dzero; |
2563 | 2567 | /*admsmain*/ |
2564 | 2568 | rootnew(adms_admsmain_new("admsmain")); |
2569 | if(getenv("adms_info") && !strcmp(getenv("adms_info"), "no")) root()->_info=admse_no; | |
2570 | if(getenv("adms_usage") && !strcmp(getenv("adms_usage"), "no")) root()->_usage=admse_no; | |
2571 | if(getenv("adms_obsolete")&& !strcmp(getenv("adms_obsolete"),"no")) root()->_obsolete=admse_no; | |
2572 | if(getenv("adms_hint") && !strcmp(getenv("adms_hint"), "yes")) root()->_hint=admse_yes; | |
2573 | if(getenv("adms_verbose") && !strcmp(getenv("adms_verbose"), "yes")) root()->_verbose=admse_yes; | |
2574 | if(getenv("adms_debug") && !strcmp(getenv("adms_debug"), "yes")) root()->_debug=admse_yes; | |
2575 | if(getenv("adms_dbg_vla") && !strcmp(getenv("adms_dbg_vla"), "yes")) root()->_dbg_vla=admse_yes; | |
2576 | if(getenv("adms_dbg_xml") && !strcmp(getenv("adms_dbg_xml"), "yes")) root()->_dbg_xml=admse_yes; | |
2565 | 2577 | /*argc,argv*/ |
2566 | 2578 | { |
2567 | 2579 | int i; |
2632 | 2644 | adms_preprocessor_setint_yydebug(1); |
2633 | 2645 | else |
2634 | 2646 | adms_preprocessor_setint_yydebug(0); |
2635 | if(getenv("adms_info") && !strcmp(getenv("adms_info"), "no")) root()->_info=admse_no; | |
2636 | if(getenv("adms_usage") && !strcmp(getenv("adms_usage"), "no")) root()->_usage=admse_no; | |
2637 | if(getenv("adms_obsolete")&& !strcmp(getenv("adms_obsolete"),"no")) root()->_obsolete=admse_no; | |
2638 | if(getenv("adms_hint") && !strcmp(getenv("adms_hint"), "yes")) root()->_hint=admse_yes; | |
2639 | if(getenv("adms_verbose") && !strcmp(getenv("adms_verbose"), "yes")) root()->_verbose=admse_yes; | |
2640 | if(getenv("adms_debug") && !strcmp(getenv("adms_debug"), "yes")) root()->_debug=admse_yes; | |
2641 | if(getenv("adms_dbg_vla") && !strcmp(getenv("adms_dbg_vla"), "yes")) root()->_dbg_vla=admse_yes; | |
2642 | if(getenv("adms_dbg_xml") && !strcmp(getenv("adms_dbg_xml"), "yes")) root()->_dbg_xml=admse_yes; | |
2643 | 2647 | /*[nepasimprimer]*/ |
2644 | 2648 | if( |
2645 | 2649 | (argc==1) |
2811 | 2815 | char*mydbgfile1=".admst1.xml"; |
2812 | 2816 | char*mydbgfile2=".admst2.xml"; |
2813 | 2817 | const char*admstdtduri="http://mot-adms.svn.sourceforge.net/viewvc/mot-adms/trunk/adms/admst.dtd"; |
2818 | #if defined(STANDALONE) | |
2819 | creearbrex(xcode,".interface.xml"); | |
2820 | #else | |
2814 | 2821 | creearbrex(".interface.xml"); |
2822 | #endif | |
2815 | 2823 | if(!(stdadmstdbgimpl=fopen(mydbgfile1,"wb"))) |
2816 | 2824 | adms_message_fatal(("%s: failed to open file [write mode]\n",mydbgfile1)) |
2817 | 2825 | adms_message_admstdbg_impl("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"); |
2837 | 2845 | if(!myskipxmli || myli!=myxargs) |
2838 | 2846 | { |
2839 | 2847 | p_slist l; |
2848 | #if defined(STANDALONE) | |
2849 | creearbrex(xcode,(char*)myli->data); | |
2850 | #else | |
2840 | 2851 | creearbrex((char*)myli->data); |
2852 | #endif | |
2841 | 2853 | adms_message_verbose(("-e file: %s\n",(char*)myli->data)) |
2842 | 2854 | racine.adms(&racine); |
2843 | 2855 | if(root()->_dbg_xml==admse_yes) |
0 | 0 | /* |
1 | Copyright © 2007Accellera Organization, Inc. | |
1 | Copyright C 2007 Accellera Organization, Inc. | |
2 | 2 | Standard definitions |
3 | 3 | This file contains the standard definition package constants.vams for Verilog-AMS HDL. |
4 | 4 | */ |
30 | 30 | `define P_C 2.99792458e8 |
31 | 31 | // Boltzmann's constant in joules/kelvin |
32 | 32 | `define P_K 1.3806503e-23 |
33 | // Planck’s constant in joules*sec | |
33 | // Planck's constant in joules*sec | |
34 | 34 | `define P_H 6.62606876e-34 |
35 | 35 | // permittivity of vacuum in farads/meter |
36 | 36 | `define P_EPS0 8.854187817e-12 |
0 | 0 | /* |
1 | Copyright © 2007Accellera Organization, Inc. | |
1 | Copyright C 2007 Accellera Organization, Inc. | |
2 | 2 | Standard definitions |
3 | 3 | This file contains the standard definition package disciplines.vams for Verilog-AMS HDL. |
4 | 4 | */ |
3091 | 3091 | } |
3092 | 3092 | }\n"; |
3093 | 3093 | } |
3094 | print admstpathYacc_y &L4("#*",130,"retcroixstar(dot)","pc","(p_attribute)lii->data"); | |
3094 | print admstpathYacc_y &L4("#*",130,"retcroixstar(dot)?retcroixstar(dot):NULL","pc","(p_attribute)lii->data"); | |
3095 | 3095 | print admstpathYacc_y &L4("\$var","040","retdollar(dot,mypath)->_value","pn","(p_admst)lii->data"); |
3096 | 3096 | print admstpathYacc_y &L4("\@var","050","retaroba(dot,mypath)->_value","pn","(p_admst)lii->data"); |
3097 | 3097 |
114 | 114 | if(!strcmp(fileName,"discipline.h")||!strcmp(fileName,"disciplines.h")||!strcmp(fileName,"discipline.vams")||!strcmp(fileName,"disciplines.vams")) |
115 | 115 | { |
116 | 116 | adms_message_warning(("[%s]: standard vams file created (not found in -I path) ... '%s'\n",message,fileName)) |
117 | printf("%s",disciplines_vams); | |
117 | 118 | adms_file_fprintf(fileName,disciplines_vams); |
118 | 119 | myfh=adms_file_open_read(fileName); |
119 | 120 | } |
239 | 239 | |
240 | 240 | \${ident} {TKRETURN(yytext,yyleng); return tk_dollar_ident;} |
241 | 241 | {char} {TKSTRIPPEDRETURN(yytext,yyleng); return tk_char;} |
242 | {b8_int} {TKRETURN(yytext,yyleng); return tk_number;} | |
243 | {b10_uint} {TKRETURN(yytext,yyleng); return tk_number;} | |
244 | {b16_int} {TKRETURN(yytext,yyleng); return tk_number;} | |
242 | {b8_int} {TKRETURN(yytext,yyleng); return tk_integer;} | |
243 | {b10_uint} {TKRETURN(yytext,yyleng); return tk_integer;} | |
244 | {b16_int} {TKRETURN(yytext,yyleng); return tk_integer;} | |
245 | 245 | {float} {TKRETURN(yytext,yyleng); return tk_number;} |
246 | 246 | |
247 | 247 | . {POS_UPDATE(yyleng,yytext);return yytext[0];} |
1448 | 1448 | _ Y($$,(p_adms)mymathapply); |
1449 | 1449 | ; |
1450 | 1450 | R_e.atomic |
1451 | | tk_number | |
1452 | _ $$=adms_yaccval_new("unknown source file"); | |
1453 | _ Y($$,(p_adms)adms_number_new($1)); | |
1454 | | tk_number tk_ident | |
1451 | | tk_integer | |
1452 | _ p_number mynumber=adms_number_new($1); | |
1453 | _ $$=adms_yaccval_new("unknown source file"); | |
1454 | _ mynumber->_cast=admse_i; | |
1455 | _ Y($$,(p_adms)mynumber); | |
1456 | | tk_integer tk_ident | |
1455 | 1457 | _ p_number mynumber=adms_number_new($1); |
1456 | 1458 | _ int myunit=admse_1; |
1457 | 1459 | _ $$=adms_yaccval_new("unknown source file"); |
1476 | 1478 | _ else |
1477 | 1479 | _ adms_veriloga_message_fatal(" can not convert symbol to valid unit\n",$2); |
1478 | 1480 | _ mynumber->_scalingunit=myunit; |
1481 | _ mynumber->_cast=admse_i; | |
1482 | _ Y($$,(p_adms)mynumber); | |
1483 | | tk_number | |
1484 | _ $$=adms_yaccval_new("unknown source file"); | |
1485 | _ Y($$,(p_adms)adms_number_new($1)); | |
1486 | | tk_number tk_ident | |
1487 | _ p_number mynumber=adms_number_new($1); | |
1488 | _ int myunit=admse_1; | |
1489 | _ $$=adms_yaccval_new("unknown source file"); | |
1490 | _ if(0) {} | |
1491 | _ else if(!strcmp(mylexval2,"E")) myunit=admse_E; | |
1492 | _ else if(!strcmp(mylexval2,"P")) myunit=admse_P; | |
1493 | _ else if(!strcmp(mylexval2,"T")) myunit=admse_T; | |
1494 | _ else if(!strcmp(mylexval2,"G")) myunit=admse_G; | |
1495 | _ else if(!strcmp(mylexval2,"M")) myunit=admse_M; | |
1496 | _ else if(!strcmp(mylexval2,"k")) myunit=admse_k; | |
1497 | _ else if(!strcmp(mylexval2,"h")) myunit=admse_h; | |
1498 | _ else if(!strcmp(mylexval2,"D")) myunit=admse_D; | |
1499 | _ else if(!strcmp(mylexval2,"d")) myunit=admse_d; | |
1500 | _ else if(!strcmp(mylexval2,"c")) myunit=admse_c; | |
1501 | _ else if(!strcmp(mylexval2,"m")) myunit=admse_m; | |
1502 | _ else if(!strcmp(mylexval2,"u")) myunit=admse_u; | |
1503 | _ else if(!strcmp(mylexval2,"n")) myunit=admse_n; | |
1504 | _ else if(!strcmp(mylexval2,"A")) myunit=admse_A; | |
1505 | _ else if(!strcmp(mylexval2,"p")) myunit=admse_p; | |
1506 | _ else if(!strcmp(mylexval2,"f")) myunit=admse_f; | |
1507 | _ else if(!strcmp(mylexval2,"a")) myunit=admse_a; | |
1508 | _ else | |
1509 | _ adms_veriloga_message_fatal(" can not convert symbol to valid unit\n",$2); | |
1510 | _ mynumber->_scalingunit=myunit; | |
1479 | 1511 | _ Y($$,(p_adms)mynumber); |
1480 | 1512 | | tk_char |
1481 | 1513 | _ adms_veriloga_message_fatal("%s: character are not handled\n",$1); |
73 | 73 | mypparse->_tkid=tktk_croixcroixvariable; |
74 | 74 | } |
75 | 75 | ]]></regexp> |
76 | <regexp id="croixstar"><![CDATA[ else if(*t=='#'&&*(t+1)=='*') | |
77 | { | |
78 | t++; | |
79 | t++; | |
80 | while(isalnum(*t)||*t=='_') t++; | |
81 | mypparse->_tkstart=tstart+1; | |
82 | mypparse->_tklen=(int)(long)(t-(tstart+1)); | |
83 | mypparse->_tkid=tktk_croixstar; | |
84 | } | |
85 | ]]></regexp> | |
76 | 86 | <regexp id="kcroixcroixvariable"><![CDATA[ else if(*t=='#'&&*(t+1)=='#') |
77 | 87 | { |
78 | 88 | t++; |
107 | 117 | } |
108 | 118 | ]]></regexp> |
109 | 119 | <constant value="!=" id="notequal">Boolean not-equal</constant> |
110 | <constant value="#*" id="croixstar">croixstar</constant> | |
111 | 120 | <constant value=">" id="gt">Boolean gt</constant> |
112 | 121 | <constant value="<" id="lt">Boolean lt</constant> |
113 | 122 | <constant value="*" id="star">used to select all children</constant> |