Codebase list adms / b770bc0
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
10 changed file(s) with 80 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
565565 <evalue name="p" info="multiplication factor = 1.0e-12 (pico)"/>
566566 <evalue name="f" info="multiplication factor = 1.0e-15 (femto)"/>
567567 <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"/>
568572 </scalar>
569573 </element>
570574 <element name="function" info="function representation">
00 <?xml version="1.0" encoding="ISO-8859-1"?>
1 <!-- built-in implicit transforms @SVN_VERSION=1115@ -->
1 <!-- built-in implicit transforms @SVN_VERSION=unknown@ -->
22 <!-- this file is saved in local working directory, then downloaded prior any -e xml files -->
33 <!-- unless flag '-x' is specified -->
44
158158 <admst:value-to test="[name='flicker_noise']" select="$globalcontribution/#fixmeflickernoise" path="1"/>
159159 <admst:value-to test="[name='\$temperature']" select="$globalassignment/lhs/TemperatureDependent" string="yes"/>
160160 <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
162162 name='\$param_given' or name='\$given' or name='ddx' or name='flicker_noise' or name='white_noise']"/>
163163 <admst:when
164164 test="[name='analysis' or name='\$analysis' or name='\$simparam' or name='simparam' or
24702470 free(newtext);
24712471 }
24722472 /*[nepasimprimer]*/
2473 #if defined(STANDALONE)
2474 static void creearbrex(const char*xcode,const char*myadmstfile)
2475 #else
24732476 static void creearbrex(const char*myadmstfile)
2477 #endif
24742478 {
24752479 char* xdata0;
24762480 #if defined(STANDALONE)
25622566 adms_NAN=adms_dzero/adms_dzero;
25632567 /*admsmain*/
25642568 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;
25652577 /*argc,argv*/
25662578 {
25672579 int i;
26322644 adms_preprocessor_setint_yydebug(1);
26332645 else
26342646 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;
26432647 /*[nepasimprimer]*/
26442648 if(
26452649 (argc==1)
28112815 char*mydbgfile1=".admst1.xml";
28122816 char*mydbgfile2=".admst2.xml";
28132817 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
28142821 creearbrex(".interface.xml");
2822 #endif
28152823 if(!(stdadmstdbgimpl=fopen(mydbgfile1,"wb")))
28162824 adms_message_fatal(("%s: failed to open file [write mode]\n",mydbgfile1))
28172825 adms_message_admstdbg_impl("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
28372845 if(!myskipxmli || myli!=myxargs)
28382846 {
28392847 p_slist l;
2848 #if defined(STANDALONE)
2849 creearbrex(xcode,(char*)myli->data);
2850 #else
28402851 creearbrex((char*)myli->data);
2852 #endif
28412853 adms_message_verbose(("-e file: %s\n",(char*)myli->data))
28422854 racine.adms(&racine);
28432855 if(root()->_dbg_xml==admse_yes)
00 /*
1 Copyright © 2007Accellera Organization, Inc.
1 Copyright C 2007 Accellera Organization, Inc.
22 Standard definitions
33 This file contains the standard definition package constants.vams for Verilog-AMS HDL.
44 */
3030 `define P_C 2.99792458e8
3131 // Boltzmann's constant in joules/kelvin
3232 `define P_K 1.3806503e-23
33 // Planck’s constant in joules*sec
33 // Planck's constant in joules*sec
3434 `define P_H 6.62606876e-34
3535 // permittivity of vacuum in farads/meter
3636 `define P_EPS0 8.854187817e-12
00 /*
1 Copyright © 2007Accellera Organization, Inc.
1 Copyright C 2007 Accellera Organization, Inc.
22 Standard definitions
33 This file contains the standard definition package disciplines.vams for Verilog-AMS HDL.
44 */
30913091 }
30923092 }\n";
30933093 }
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");
30953095 print admstpathYacc_y &L4("\$var","040","retdollar(dot,mypath)->_value","pn","(p_admst)lii->data");
30963096 print admstpathYacc_y &L4("\@var","050","retaroba(dot,mypath)->_value","pn","(p_admst)lii->data");
30973097
114114 if(!strcmp(fileName,"discipline.h")||!strcmp(fileName,"disciplines.h")||!strcmp(fileName,"discipline.vams")||!strcmp(fileName,"disciplines.vams"))
115115 {
116116 adms_message_warning(("[%s]: standard vams file created (not found in -I path) ... '%s'\n",message,fileName))
117 printf("%s",disciplines_vams);
117118 adms_file_fprintf(fileName,disciplines_vams);
118119 myfh=adms_file_open_read(fileName);
119120 }
239239
240240 \${ident} {TKRETURN(yytext,yyleng); return tk_dollar_ident;}
241241 {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;}
245245 {float} {TKRETURN(yytext,yyleng); return tk_number;}
246246
247247 . {POS_UPDATE(yyleng,yytext);return yytext[0];}
14481448 _ Y($$,(p_adms)mymathapply);
14491449 ;
14501450 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
14551457 _ p_number mynumber=adms_number_new($1);
14561458 _ int myunit=admse_1;
14571459 _ $$=adms_yaccval_new("unknown source file");
14761478 _ else
14771479 _ adms_veriloga_message_fatal(" can not convert symbol to valid unit\n",$2);
14781480 _ 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;
14791511 _ Y($$,(p_adms)mynumber);
14801512 | tk_char
14811513 _ adms_veriloga_message_fatal("%s: character are not handled\n",$1);
7373 mypparse->_tkid=tktk_croixcroixvariable;
7474 }
7575 ]]></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>
7686 <regexp id="kcroixcroixvariable"><![CDATA[ else if(*t=='#'&&*(t+1)=='#')
7787 {
7888 t++;
107117 }
108118 ]]></regexp>
109119 <constant value="!=" id="notequal">Boolean not-equal</constant>
110 <constant value="#*" id="croixstar">croixstar</constant>
111120 <constant value="&gt;" id="gt">Boolean gt</constant>
112121 <constant value="&lt;" id="lt">Boolean lt</constant>
113122 <constant value="*" id="star">used to select all children</constant>