1 /* Copyright (c) 1991-2007 Pragmatic C Software Corp. */
2 
3 /*
4    This program is free software; you can redistribute it and/or modify it
5    under the terms of the GNU General Public License as published by the
6    Free Software Foundation; either version 2 of the License, or (at your
7    option) any later version.
8 
9    This program is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License along
15    with this program; if not, write to the Free Software Foundation, Inc.,
16    59 Temple Place, Suite 330, Boston, MA, 02111-1307.
17 
18    There is also a commerically supported faster new version of Cver that is
19    not released under the GPL.   See file commerical-cver.txt, or web site
20    www.pragmatic-c.com/commercial-cver or contact sales@pragmatic-c.com to
21    learn more about commerical Cver.
22 
23  */
24 
25 
26 /*
27  * system function id numbers
28  * notice no patters other than pli tf_ start above these (at 1000 for now)
29  */
30 
31 /* functions for converting reals */
32 #define STN_BITSTOREAL 1
33 #define STN_ITOR 2
34 #define STN_REALTOBITS 3
35 #define STN_RTOI 4
36 
37 /* time related system functions */
38 #define STN_REALTIME 5
39 #define STN_STIME 6
40 #define STN_TIME 7
41 #define STN_SCALE 8
42 
43 /* random number generators */
44 #define STN_RANDOM 9
45 #define STN_DIST_UNIFORM 10
46 #define STN_DIST_NORMAL 11
47 #define STN_DIST_EXPONENTIAL 12
48 #define STN_DIST_POISSON 13
49 #define STN_DIST_CHI_SQUARE 14
50 #define STN_DIST_T 15
51 #define STN_DIST_ERLANG 16
52 
53 /* misc. system functions */
54 #define STN_TESTPLUSARGS 17
55 #define STN_FOPEN 18
56 #define STN_COUNT_DRIVERS 19
57 #define STN_RESET_COUNT 21
58 #define STN_RESET_VALUE 22
59 #define STN_GETPATTERN 20
60 #define STN_Q_FULL 23
61 
62 /* AIV 09/08/03 - new P1364 2001 fileio sys funcs */
63 #define STN_FGETC 24
64 #define STN_UNGETC 25
65 #define STN_FGETS 26
66 #define STN_FTELL 27
67 #define STN_REWIND 28
68 #define STN_FSEEK 29
69 #define STN_FERROR 30
70 #define STN_FREAD 31
71 #define STN_FSCANF 32
72 #define STN_SSCANF 33
73 
74 /* system task id numbers */
75 
76 /* display type tasks */
77 #define STN_FCLOSE 100
78 /* formated procedural display - implied cr */
79 #define STN_DISPLAY 101
80 #define STN_DISPLAYB 102
81 #define STN_DISPLAYH 103
82 #define STN_DISPLAYO 104
83 #define STN_FDISPLAY 105
84 #define STN_FDISPLAYH 106
85 #define STN_FDISPLAYB 107
86 #define STN_FDISPLAYO 108
87 
88 /* formated procedural display - no implied cr */
89 #define STN_WRITE 109
90 #define STN_WRITEH 110
91 #define STN_WRITEB 111
92 #define STN_WRITEO 112
93 #define STN_FWRITE 113
94 #define STN_FWRITEH 114
95 #define STN_FWRITEB 115
96 #define STN_FWRITEO 116
97 
98 /* like display except write at end of current time */
99 #define STN_STROBE 117
100 #define STN_STROBEH 118
101 #define STN_STROBEB 119
102 #define STN_STROBEO 120
103 #define STN_FSTROBE 121
104 #define STN_FSTROBEH 122
105 #define STN_FSTROBEB 123
106 #define STN_FSTROBEO 124
107 
108 #define STN_MONITOR 125
109 #define STN_MONITOROFF 126
110 #define STN_MONITORON 127
111 #define STN_FMONITOR 128
112 #define STN_MONITORH 129
113 #define STN_MONITORB 130
114 #define STN_MONITORO 131
115 #define STN_FMONITORH 132
116 #define STN_FMONITORB 133
117 #define STN_FMONITORO 134
118 
119 /* time releated system tasks */
120 #define STN_PRINTTIMESCALE 135
121 #define STN_TIMEFORMAT 136
122 
123 /* notice specify section timing checks not here - no exec - built in tevs */
124 #define STN_READMEMB 137
125 #define STN_READMEMH 138
126 #define STN_SREADMEMB 139
127 #define STN_SREADMEMH 140
128 
129 /* dump variables tasks */
130 #define STN_DUMPVARS 141
131 #define STN_DUMPALL 142
132 #define STN_DUMPFILE 143
133 #define STN_DUMPFLUSH 144
134 #define STN_DUMPLIMIT 145
135 #define STN_DUMPOFF 146
136 #define STN_DUMPON 147
137 
138 /* mainly interactive system tasks */
139 #define STN_KEY 148
140 #define STN_NOKEY 149
141 #define STN_LIST 150
142 #define STN_LOG 151
143 #define STN_NOLOG 152
144 #define STN_HISTORY 153
145 #define STN_SAVE 154
146 #define STN_INCSAVE 155
147 #define STN_INPUT 156
148 #define STN_RESTART 157
149 #define STN_SETTRACE 158
150 #define STN_CLEARTRACE 159
151 #define STN_RESET 160
152 #define STN_FINISH 161
153 #define STN_STOP 162
154 #define STN_KEEPCMDS 163
155 #define STN_NOKEEPCMDS 164
156 
157 /* internal simulation state printng tasks */
158 #define STN_SCOPE 165
159 #define STN_SHOWALLINSTANCES 166
160 #define STN_SHOWEXPANDEDNETS 167
161 #define STN_SHOWSCOPES 168
162 #define STN_SHOWVARIABLES 169
163 #define STN_SHOWVARS 170
164 
165 /* q manipulation tasks - also q_full function */
166 #define STN_Q_INITIALIZE 171
167 #define STN_Q_ADD 172
168 #define STN_Q_REMOVE 173
169 #define STN_Q_EXAM 174
170 
171 /* sdf annotate system task */
172 #define STN_SDF_ANNOTATE 175
173 
174 /* new P1364 2001 special signed/word32 conversion system functions */
175 #define STN_SIGNED 176
176 #define STN_UNSIGNED 177
177 
178 /* graphical output tasks */
179 #define STN_GRREMOTE 180
180 #define STN_PSWAVES 181
181 #define STN_GRSYNCHON 182
182 #define STN_GRREGS 183
183 #define STN_GRWAVES 184
184 #define STN_FREEZEWAVES 185
185 #define STN_DEFINEGROUPWAVES 186
186 
187 /* Cver extension (system tasks or functions) */
188 #define STN_SETDEBUG 190
189 #define STN_CLEARDEBUG 191
190 #define STN_SETEVTRACE 192
191 #define STN_CLEAREVTRACE 193
192 #define STN_TRACEFILE 194
193 #define STN_STICKSTIME 195
194 #define STN_TICKSTIME 196
195 #define STN_SNAPSHOT 197
196 #define STN_SYSTEM 198
197 #define STN_SUPWARNS 199
198 #define STN_ALLOWWARNS 200
199 #define STN_MEMUSE 201
200 #define STN_FLUSHLOG 202
201 #define STN_SCANPLUSARGS 203
202 #define STN_VALUEPLUSARGS 204
203 
204 /* new ams transcendental function extension but works in digital */
205 /* SJM 10/01/03 - leaving in for now */
206 #define STN_COS 217
207 #define STN_SIN 218
208 #define STN_TAN 219
209 #define STN_ACOS 220
210 #define STN_ASIN 221
211 #define STN_ATAN 222
212 #define STN_ATAN2 223
213 #define STN_COSH 224
214 #define STN_SINH 225
215 #define STN_TANH 226
216 #define STN_ACOSH 227
217 #define STN_ASINH 228
218 #define STN_ATANH 229
219 
220 #define STN_INT 230
221 #define STN_SGN 231
222 #define STN_LN 232
223 #define STN_LOG10 233
224 #define STN_ABS 234
225 #define STN_POW 235
226 #define STN_SQRT 236
227 #define STN_EXP 237
228 #define STN_MIN 238
229 #define STN_MAX 239
230 
231 #define STN_HSQRT 240
232 #define STN_HPOW 241
233 #define STN_HPWR 242
234 #define STN_HLOG 243
235 #define STN_HLOG10 244
236 #define STN_HDB 245
237 #define STN_HSIGN 246
238 #define STN_HYPOT 247
239 
240 /* AIV 09/08/03 - new P1364 2001 fileio sys tasks */
241 #define STN_FFLUSH 248
242 #define STN_SWRITE 249
243 #define STN_SWRITEB 250
244 #define STN_SWRITEH 251
245 #define STN_SWRITEO 252
246 #define STN_SFORMAT 253
247 
248