inp006.c
17.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
/*
* inp004.c - test z stepper
*
*/
#include <stdio.h>
#include <stdlib.h>
/*
* G l o b a l s
*/
int startspan_r; /* */
int startspan_g; /* */
int startspan_b; /* */
int startspan_a; /* */
int startspan_z; /* */
int startspan_s; /* */
int startspan_t; /* */
int startspan_w; /* */
int startspan_l; /* */
int ep_st_r; /* [20:0], change in x, s,10.10 */
int ep_st_g; /* [20:0], change in x, s,10.10 */
int ep_st_b; /* [20:0], change in x, s,10.10 */
int ep_st_a; /* [20:0], change in x, s,10.10 */
int ep_st_z; /* [31:0], change in y, s,15.16 */
int ep_st_s; /* [26:0], change in y, s,15.16 */
int ep_st_t; /* [26:0], change in y, s,15.16 */
int ep_st_w; /* [26:0], change in y, s,15.16 */
int ep_st_l; /* [26:0], change in y, s,15.16 */
int at_st_dxr; /* [21:0], change in x, s,10.11 */
int at_st_dxg; /* [21:0], change in x, s,10.11 */
int at_st_dxb; /* [21:0], change in x, s,10.11 */
int at_st_dxa; /* [21:0], change in x, s,10.11 */
int at_st_dxz; /* [31:0], change in x, s,15.16 */
int at_st_dxs; /* [26:0], change in x, s,15.16 */
int at_st_dxt; /* [26:0], change in x, s,15.16 */
int at_st_dxw; /* [26:0], change in x, s,15.16 */
int at_st_dxl; /* [26:0], change in x, s,15.16 */
int at_st_dyr; /* [12:0], change in y, s,10.2 */
int at_st_dyg; /* [12:0], change in y, s,10.2 */
int at_st_dyb; /* [12:0], change in y, s,10.2 */
int at_st_dya; /* [12:0], change in y, s,10.2 */
int at_st_dyz; /* [21:0], change in y, s,10.11 */
int x_offsetr; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetg; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetb; /* [1:0], subpixel offset in x, 0.2 */
int x_offseta; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetz; /* [1:0], subpixel offset in x, 0.2 */
int y_offsetr; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetg; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetb; /* [1:0], subpixel offset in y, 0.2 */
int y_offseta; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetz; /* [1:0], subpixel offset in y, 0.2 */
int ncyc_r; /* */
int ncyc_g; /* */
int ncyc_b; /* */
int ncyc_a; /* */
int ncyc_z; /* */
int ncyc_s; /* */
int ncyc_t; /* */
int ncyc_w; /* */
int ncyc_l; /* */
int left_r; /* */
int left_g; /* */
int left_b; /* */
int left_a; /* */
int left_z; /* */
int left_s; /* */
int left_t; /* */
int left_w; /* */
int left_l; /* */
int dv;
int exit1;
static void
print_vectors( char *prog_name )
{
static int first_time = 1;
if(first_time)
{
first_time = 0;
printf("#\n");
printf("# created by %s.c\n", prog_name);
printf("#\n");
printf("gclk @C 1(8) 0(8)\n");
printf("startspan_r @I @E 0\n");
printf("startspan_g @I @E 0\n");
printf("startspan_b @I @E 0\n");
printf("startspan_a @I @E 0\n");
printf("startspan_z @I @E 0\n");
printf("startspan_s @I @E 0\n");
printf("startspan_t @I @E 0\n");
printf("startspan_w @I @E 0\n");
printf("startspan_l @I @E 0\n");
printf("ep_st_r[20:0] @I @E 0\n");
printf("ep_st_g[20:0] @I @E 0\n");
printf("ep_st_b[20:0] @I @E 0\n");
printf("ep_st_a[20:0] @I @E 0\n");
printf("ep_st_z[31:0] @I @E 0\n");
printf("ep_st_s[26:0] @I @E 0\n");
printf("ep_st_t[26:0] @I @E 0\n");
printf("ep_st_w[26:0] @I @E 0\n");
printf("ep_st_l[26:0] @I @E 0\n");
printf("at_st_dxr[21:0] @I @E 0\n");
printf("at_st_dxg[21:0] @I @E 0\n");
printf("at_st_dxb[21:0] @I @E 0\n");
printf("at_st_dxa[21:0] @I @E 0\n");
printf("at_st_dxz[31:0] @I @E 0\n");
printf("at_st_dxs[26:0] @I @E 0\n");
printf("at_st_dxt[26:0] @I @E 0\n");
printf("at_st_dxw[26:0] @I @E 0\n");
printf("at_st_dxl[26:0] @I @E 0\n");
printf("at_st_dyr[12:0] @I @E 0\n");
printf("at_st_dyg[12:0] @I @E 0\n");
printf("at_st_dyb[12:0] @I @E 0\n");
printf("at_st_dya[12:0] @I @E 0\n");
printf("at_st_dyz[21:0] @I @E 0\n");
printf("x_offsetr[1:0] @I @E 0\n");
printf("x_offsetg[1:0] @I @E 0\n");
printf("x_offsetb[1:0] @I @E 0\n");
printf("x_offseta[1:0] @I @E 0\n");
printf("x_offsetz[1:0] @I @E 0\n");
printf("y_offsetr[1:0] @I @E 0\n");
printf("y_offsetg[1:0] @I @E 0\n");
printf("y_offsetb[1:0] @I @E 0\n");
printf("y_offseta[1:0] @I @E 0\n");
printf("y_offsetz[1:0] @I @E 0\n");
printf("ncyc_r @I @E 0\n");
printf("ncyc_g @I @E 0\n");
printf("ncyc_b @I @E 0\n");
printf("ncyc_a @I @E 0\n");
printf("ncyc_z @I @E 0\n");
printf("ncyc_s @I @E 0\n");
printf("ncyc_t @I @E 0\n");
printf("ncyc_w @I @E 0\n");
printf("ncyc_l @I @E 0\n");
printf("left_r @I @E 0\n");
printf("left_g @I @E 0\n");
printf("left_b @I @E 0\n");
printf("left_a @I @E 0\n");
printf("left_z @I @E 0\n");
printf("left_s @I @E 0\n");
printf("left_t @I @E 0\n");
printf("left_w @I @E 0\n");
printf("left_l @I @E 0\n");
printf("dv @I @E 0\n");
printf("exit @I @E 0\n");
printf("\n"); /* required newline */
printf("# Initial test of the z stepper \n");
}
/*
* print input signals
*/
printf("%d %d %d %d %d %d %d %d %d ",
startspan_r,
startspan_g,
startspan_b,
startspan_a,
startspan_z,
startspan_s,
startspan_t,
startspan_w,
startspan_l );
printf(" 0x%.6x 0x%.6x 0x%.6x 0x%.6x 0x%.8x 0x%.7x 0x%.7x 0x%.7x 0x%.7x ",
ep_st_r,
ep_st_g,
ep_st_b,
ep_st_a,
ep_st_z,
ep_st_s,
ep_st_t,
ep_st_w,
ep_st_l );
printf(" 0x%.6x 0x%.6x 0x%.6x 0x%.6x 0x%.8x 0x%.7x 0x%.7x 0x%.7x 0x%.7x ",
at_st_dxr,
at_st_dxg,
at_st_dxb,
at_st_dxa,
at_st_dxz,
at_st_dxs,
at_st_dxt,
at_st_dxw,
at_st_dxl );
printf(" 0x%.4x 0x%.4x 0x%.4x 0x%.4x 0x%.6x ",
at_st_dyr,
at_st_dyg,
at_st_dyb,
at_st_dya,
at_st_dyz );
printf(" 0x%.1x 0x%.1x 0x%.1x 0x%.1x 0x%.1x ",
x_offsetr,
x_offsetg,
x_offsetb,
x_offseta,
x_offsetz );
printf(" 0x%.1x 0x%.1x 0x%.1x 0x%.1x 0x%.1x ",
y_offsetr,
y_offsetg,
y_offsetb,
y_offseta,
y_offsetz);
printf(" %d %d %d %d %d %d %d %d %d ",
ncyc_r,
ncyc_g,
ncyc_b,
ncyc_a,
ncyc_z,
ncyc_s,
ncyc_t,
ncyc_w,
ncyc_l);
printf(" %d %d %d %d %d %d %d %d %d ",
left_r,
left_g,
left_b,
left_a,
left_z,
left_s,
left_t,
left_w,
left_l);
printf(" %d %d\n", dv, exit1);
}
printsignals(char **argv, int reps)
{
int i;
print_vectors(argv[0]);
startspan_z = 0;
for (i=0; i<reps; i++)
print_vectors(argv[0]);
}
void allzerozero(char **argv, int reps)
{
int i;
ep_st_z = 0;
at_st_dxz = 0;
startspan_z = 1;
printsignals(argv,reps);
}
void all16negone(char **argv, int reps)
{
int i;
ep_st_z = 0x400;
at_st_dxz = 0xffff0000;
startspan_z = 1;
printsignals(argv,reps);
}
void foo1(char **argv, int reps, int zval, int deltax, int deltay)
{
int i;
ep_st_z = zval;
at_st_dxz = deltax;
at_st_dyz = deltay;
startspan_z = 1;
printsignals(argv,reps);
}
void foo2(char **argv, int reps, int zval, int deltax, int deltay, int offsetxz, int offsetyz)
{
x_offsetz = offsetxz;
y_offsetz = offsetyz;
foo1(argv, reps, zval, deltax, deltay);
}
void onestartspans(void)
{
startspan_r = 1;
startspan_g = 1;
startspan_b = 1;
startspan_a = 1;
startspan_z = 1;
startspan_s = 1;
startspan_t = 1;
startspan_w = 1;
startspan_l = 1;
}
void onelefts(void)
{
left_r = 1;
left_g = 1;
left_b = 1;
left_a = 1;
left_z = 1;
left_s = 1;
left_t = 1;
left_w = 1;
left_l = 1;
}
void zerolefts(void)
{
left_r = 0;
left_g = 0;
left_b = 0;
left_a = 0;
left_z = 0;
left_s = 0;
left_t = 0;
left_w = 0;
left_l = 0;
}
void onencycs(void)
{
ncyc_r = 1;
ncyc_g = 1;
ncyc_b = 1;
ncyc_a = 1;
ncyc_z = 1;
ncyc_s = 1;
ncyc_t = 1;
ncyc_w = 1;
ncyc_l = 1;
}
void zeroncycs(void)
{
ncyc_r = 0;
ncyc_g = 0;
ncyc_b = 0;
ncyc_a = 0;
ncyc_z = 0;
ncyc_s = 0;
ncyc_t = 0;
ncyc_w = 0;
ncyc_l = 0;
}
void test01(char **argv)
{
printf("# test01 \n");
printf("# ep_st_z = 0.0, at_st_dxz = 0.0, st_bl_z be zero and steady, 1 cycle mode \n");
zeroncycs(); onelefts();
allzerozero(argv, 10);
printf("# ep_st_z = 0.0, at_st_dxz = 0.0, st_bl_z be zero and steady , 2 cycle mode\n");
onencycs(); onelefts();
allzerozero(argv, 20);
printf("# ep_st_z = 0.0, at_st_dxz = 0.0, st_bl_z be zero and steady, 1 cycle mode \n");
zeroncycs(); zerolefts();
allzerozero(argv, 10);
printf("# ep_st_z = 0.0, at_st_dxz = 0.0, st_bl_z be zero and steady, 2 cycle mode \n");
onencycs(); zerolefts();
allzerozero(argv, 20);
}
void test02(char **argv)
{
printf("# test02 \n");
printf("# ep_st_z = 16.0, at_st_dxz = -1.0, st_bl_z should decrement down to zero and hold, 1 cycle mode \n");
zeroncycs(); onelefts();
all16negone(argv, 20);
printf("# ep_st_z = 16.0, at_st_dxz = -1.0, st_bl_z should decrement down to zero and hold, 2 cycle mode \n");
onencycs(); onelefts();
all16negone(argv, 40);
printf("# ep_st_z = 16.0, at_st_dxz = -1.0, st_bl_z should increment from 16.0, 1 cycle mode \n");
zeroncycs(); zerolefts();
all16negone(argv, 20);
printf("# ep_st_z = 16.0, at_st_dxz = -1.0, st_bl_z should increment from 16.0, 2 cycle mode \n");
onencycs(); zerolefts();
all16negone(argv, 40);
}
void test03(char **argv)
{
printf("# test03 \n");
printf("# ep_st_z = 240.25, at_st_dxz = 3.5, st_bl_z should increment to 255 and hold, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200, 0x3c10, 0x00038000, 0xe);
printf("# ep_st_z = 240.25, at_st_dxz = 3.5, st_bl_z should increment to 255 and hold, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400, 0x3c10, 0x00038000, 0xe);
printf("# ep_st_z = 240.25, at_st_dxz = 3.5, st_bl_z should decrement from 240.25, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200, 0x3c10, 0x00038000, 0xe);
printf("# ep_st_z = 240.25, at_st_dxz = 3.5, st_bl_z should decrement from 240.25, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400, 0x3c10, 0x00038000, 0xe);
}
void test04(char **argv)
{
printf("# test04 \n");
printf("# ep_st_z = 240.25, at_st_dxz = -3.5, st_bl_z should decrement from 240.25, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200, 0x3c10, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = 240.25, at_st_dxz = -3.5, st_bl_z should decrement from 240.25, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400, 0x3c10, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = 240.25, at_st_dxz = -3.5, st_bl_z should increment from 240.25, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200, 0x3c10, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = 240.25, at_st_dxz = -3.5, st_bl_z should increment from 240.25, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400, 0x3c10, 0xfffc8000, 0x1ff2);
}
void test05(char **argv)
{
printf("# test05 \n");
printf("# ep_st_z = -240.25, at_st_dxz = 3.5, st_bl_z should increment from -240.25, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200,0x3fc3f0, 0x00038000, 0xe);
printf("# ep_st_z = -240.25, at_st_dxz = 3.5, st_bl_z should increment from -240.25, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400,0x3fc3f0, 0x00038000, 0xe);
printf("# ep_st_z = -240.25, at_st_dxz = 3.5, st_bl_z should decrement from -240.25, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200,0x3fc3f0, 0x00038000, 0xe);
printf("# ep_st_z = -240.25, at_st_dxz = 3.5, st_bl_z should decrement from -240.25, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400,0x3fc3f0, 0x00038000, 0xe);
}
void test06(char **argv)
{
printf("# test06 \n");
printf("# ep_st_z = -240.25, at_st_dxz = -3.5, st_bl_z should decrement from -240.25, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200,0x3fc3f0, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = -240.25, at_st_dxz = -3.5, st_bl_z should decrement from -240.25, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400,0x3fc3f0, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = -240.25, at_st_dxz = -3.5, st_bl_z should increment from -240.25, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200,0x3fc3f0, 0xfffc8000, 0x1ff2);
printf("# ep_st_z = -240.25, at_st_dxz = -3.5, st_bl_z should increment from -240.25, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400,0x3fc3f0, 0xfffc8000, 0x1ff2);
}
void test07(char **argv)
{
printf("# test07 \n");
printf("# ep_st_z = 113.8388, at_st_dxz = 237.43408, st_bl_z should increment from 113.8388, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200, 0x1c75, 0x00ed6f20, 0x3b5);
printf("# ep_st_z = 113.8388, at_st_dxz = 237.43408, st_bl_z should increment from 113.8388, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400, 0x1c75, 0x00ed6f20, 0x3b5);
printf("# ep_st_z = 113.8388, at_st_dxz = 237.43408, st_bl_z should decrement from 113.8388, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200, 0x1c75, 0x00ed6f20, 0x3b5);
printf("# ep_st_z = 113.8388, at_st_dxz = 237.43408, st_bl_z should decrement from 113.8388, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400, 0x1c75, 0x00ed6f20, 0x3b5);
}
void test08(char **argv)
{
printf("# test08 \n");
printf("# ep_st_z = -113.8388, at_st_dxz = -237.43408, st_bl_z should decrement from -113.8388, 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200, 0x3fe38a, 0xff1290e0, 0x1c4a);
printf("# ep_st_z = -113.8388, at_st_dxz = -237.43408, st_bl_z should decrement from -113.8388, 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400, 0x3fe38a, 0xff1290e0, 0x1c4a);
printf("# ep_st_z = -113.8388, at_st_dxz = -237.43408, st_bl_z should increment from -113.8388, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200, 0x3fe38a, 0xff1290e0, 0x1c4a);
printf("# ep_st_z = -113.8388, at_st_dxz = -237.43408, st_bl_z should increment from -113.8388, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400, 0x3fe38a, 0xff1290e0, 0x1c4a);
}
void test09(char **argv)
{
printf("# test09 \n");
printf("# ep_st_z = -max, at_st_dxz = -.0000001, st_bl_z should wrap to tiny positive (0 after truncate), 1 cycle mode \n");
zeroncycs(); onelefts();
foo1(argv, 200, 0x3fffff, 0xffffffff, 0x1fff);
printf("# ep_st_z = -max, at_st_dxz = -.0000001, st_bl_z should wrap to tiny positive (0 after truncate), 2 cycle mode \n");
onencycs(); onelefts();
foo1(argv, 400, 0x3fffff, 0xffffffff, 0x1fff);
printf("# ep_st_z = -max, at_st_dxz = -.0000001, st_bl_z should clamp to 0, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo1(argv, 200, 0x3fffff, 0xffffffff, 0x1fff);
printf("# ep_st_z = -max, at_st_dxz = -.0000001, st_bl_z should clamp to 0, 2 cycle mode \n");
onencycs(); zerolefts();
foo1(argv, 400, 0x3fffff, 0xffffffff, 0x1fff);
}
void test10(char **argv)
{
printf("# test10 \n");
printf("# ep_st_z = 0.0, at_st_dxz = 10.0, st_bl_z should increment from 0, 1 cycle mode \n");
zeroncycs(); onelefts();
foo2(argv, 200, 0x0, 0xa0000, 0x0, 0x0, 0x0);
printf("# ep_st_z = 0.0, at_st_dxz = 10.0, st_bl_z should increment from 0, 2 cycle mode \n");
onencycs(); onelefts();
foo2(argv, 400, 0x0, 0xa0000, 0x0, 0x0, 0x0);
printf("# ep_st_z = 0.0, at_st_dxz = 10.0, st_bl_z should decrement from 0, 1 cycle mode \n");
zeroncycs(); zerolefts();
foo2(argv, 200, 0x0, 0xa0000, 0x0, 0x0, 0x0);
printf("# ep_st_z = 0.0, at_st_dxz = 10.0, st_bl_z should decrement from 0, 2 cycle mode \n");
onencycs(); zerolefts();
foo2(argv, 400, 0x0, 0xa0000, 0x0, 0x0, 0x0);
}
void test11(char **argv)
{
printf("# test11 \n");
printf("# to test if get a carry error in c-sim \n");
printf("# 1 cycle, left major \n");
zeroncycs(); onelefts();
foo2(argv, 100, 0x3c0, 0x00000400, 0x1, 0x3, 0x3);
printf("# 2 cycle, left major \n");
onencycs(); onelefts();
foo2(argv, 100, 0x3c0, 0x00000400, 0x1, 0x3, 0x3);
printf("# 1 cycle, right major \n");
zeroncycs(); zerolefts();
foo2(argv, 100, 0x3c0, 0x00000400, 0x1, 0x3, 0x3);
printf("# 2 cycle, right major \n");
onencycs(); zerolefts();
foo2(argv, 100, 0x3c0, 0x00000400, 0x1, 0x3, 0x3);
}
dotests(char **argv)
{
test01(argv);
test02(argv);
test03(argv);
test04(argv);
test05(argv);
test06(argv);
test07(argv);
test08(argv);
test09(argv);
}
int
main(int argc, char **argv)
{
int i, j;
/* print header */
print_vectors(argv[0]);
dv = 1;
onestartspans();
/* now do tests */
for (i=0; i<4; i++)
{
for (j=0; j<4; j++)
{
x_offsetz = i;
y_offsetz = j;
dotests(argv);
}
}
test10(argv);
test11(argv);
/* clean up */
exit1 = 1;
print_vectors(argv[0]);
}