Previous 199869 Revisions Next

r17667 Wednesday 5th September, 2012 at 22:44:28 UTC by Tafoid
Numerous jedutil tool improvements.  [Kevin Eshbach]

Made some modifications to the jedutil tool to allow the viewing of simple combinatorial jeds (adding support for registered and gals in the future) by taking a jed file and printing out human-readable equations.  Changed the command line options of the jedutil tool to know take an initial argument to specify what the tool should do.

For example to convert a jed to bin the command is now:
jedutil –convert <source.jed> <dest.bin>
jedutil –convert <source.bin> <dest.jed>

To view a jed file with human-readable equations the command is
jedutil –view <source.jed> <pal type>

Added a simple regression test for the tool that just verifies that the currently known pals have the row and column fuse location mapped correctly and at the moment this tool runs under windows only.
Under the directory src/regtests/jedutil there is a Windows Script File with the name jedtest.wsf that if run from the command line with the command “cscript jedtest.wsf” will verify that a dump of the jeds in src/regtests/jedutil/jeds matches the good dumps in src/regtests/jedutil/baseline.  Reference jed files created using the tool eqn2jed which is included with Opal Jr and these files are in src/regtests/jedutil/eqns.
[src/regtests/jedutil]jedtest.wsf*
[src/regtests/jedutil/baseline]pal10h8.txt* pal10l8.txt* pal12h6.txt* pal12l6.txt* pal14h4.txt* pal14l4.txt* pal16h2.txt* pal16l2.txt* pal16l8.txt* pal20l10.txt* pal20l8.txt*
[src/regtests/jedutil/eqns]pal10h8.eqn* pal10l8.eqn* pal12h6.eqn* pal12l6.eqn* pal14h4.eqn* pal14l4.eqn* pal16h2.eqn* pal16l2.eqn* pal16l8.eqn* pal20l10.eqn* pal20l8.eqn* readme.txt*
[src/regtests/jedutil/jeds]pal10h8.jed* pal10l8.jed* pal12h6.jed* pal12l6.jed* pal14h4.jed* pal14l4.jed* pal16h2.jed* pal16l2.jed* pal16l8.jed* pal20l10.jed* pal20l8.jed*
[src/tools]jedutil.c

trunk/src/tools/jedutil.c
r17666r17667
6464
6565        PAL16L8     = QP20 QF2048
6666
67        PAL16R4     = QP20
68        PAL16R6     = QP20
69        PAL16R8     = QP20
6770        PAL16RA8    = QP20 QF2056
6871
6972        PAL16V8R    = QP20 QF2194
r17666r17667
7376        18CV8       = QP20 QF2696
7477
7578    24-pin devices:
79        PAL20L8     = QP24
80        PAL20L10    = QP24
81        PAL20R4     = QP24
82        PAL20R6     = QP24
83        PAL20R8     = QP24
84
85        PAL20X4     = QP24
86        PAL20X8     = QP24
87        PAL20X10    = QP24
88
89        PAL22V10    = QP24
90
7691        GAL20V8A    = QP24 QF2706
7792        GAL22V10    = QP24 QF5892
7893
r17666r17667
90105
91106
92107/***************************************************************************
108    TYPE DEFINITIONS
109***************************************************************************/
110
111typedef int (*command_func_type)(int argc, char *argv[]);
112
113typedef struct _command_entry command_entry;
114struct _command_entry
115{
116    const char *command;
117    command_func_type command_func;
118};
119
120
121
122/* Pin fuse row configuration */
123#define CNoOutputEnableFuseRow (UINT16)~0
124
125
126
127/* Pin fuse row configuration */
128typedef struct _pin_fuse_rows pin_fuse_rows;
129struct _pin_fuse_rows
130{
131    UINT16 pin;                  /* Pin number */
132    UINT16 fuserowoutputenable; /* Fuse row for the output enable */
133    UINT16 fuserowtermstart;    /* Fuse row for the first term */
134    UINT16 fuserowtermend;      /* Fuse row for the last term */
135};
136
137
138
139/* Pin fuse column configuration */
140typedef struct _pin_fuse_columns pin_fuse_columns;
141struct _pin_fuse_columns
142{
143    UINT16 pin;             /* Pin number */
144    UINT16 lowfusecolumn;  /* Column number for low output */
145    UINT16 highfusecolumn; /* Column number for high output */
146};
147
148
149typedef struct _pal_data pal_data;
150
151typedef void (*print_product_terms_func)(const pal_data* pal, const jed_data* jed);
152
153struct _pal_data
154{
155    const char *name;
156    const pin_fuse_rows *pinfuserows;
157    UINT16 pinfuserowscount;
158    const pin_fuse_columns *pinfusecolumns;
159    UINT16 pinfusecolumnscount;
160    print_product_terms_func print_product_terms;
161};
162
163
164
165/***************************************************************************
166    FUNCTION PROTOTYPES
167***************************************************************************/
168
169static void print_pal10l8_product_terms(const pal_data* pal, const jed_data* jed);
170static void print_pal10h8_product_terms(const pal_data* pal, const jed_data* jed);
171static void print_pal12l6_product_terms(const pal_data* pal, const jed_data* jed);
172static void print_pal12h6_product_terms(const pal_data* pal, const jed_data* jed);
173static void print_pal14l4_product_terms(const pal_data* pal, const jed_data* jed);
174static void print_pal14h4_product_terms(const pal_data* pal, const jed_data* jed);
175static void print_pal16l2_product_terms(const pal_data* pal, const jed_data* jed);
176static void print_pal16h2_product_terms(const pal_data* pal, const jed_data* jed);
177static void print_pal16c1_product_terms(const pal_data* pal, const jed_data* jed);
178static void print_pal16l8_product_terms(const pal_data* pal, const jed_data* jed);
179static void print_pal16r4_product_terms(const pal_data* pal, const jed_data* jed);
180static void print_pal16r6_product_terms(const pal_data* pal, const jed_data* jed);
181static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed);
182static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* jed);
183static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed);
184static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* jed);
185static void print_pal20r4_product_terms(const pal_data* pal, const jed_data* jed);
186static void print_pal20r6_product_terms(const pal_data* pal, const jed_data* jed);
187static void print_pal20r8_product_terms(const pal_data* pal, const jed_data* jed);
188
189
190
191/***************************************************************************
93192    GLOBAL VARIABLES
94193***************************************************************************/
95194
r17666r17667
99198static UINT8 *dstbuf;
100199static size_t dstbuflen;
101200
201static UINT16 inputpins[26];
202static UINT16 inputpinscount;
102203
204static UINT16 outputpins[26];
205static UINT16 outputpinscount;
103206
207static pin_fuse_rows pal10l8pinfuserows[] = {
208    {12, CNoOutputEnableFuseRow, 280, 300},
209    {13, CNoOutputEnableFuseRow, 240, 260},
210    {14, CNoOutputEnableFuseRow, 200, 220},
211    {15, CNoOutputEnableFuseRow, 160, 180},
212    {16, CNoOutputEnableFuseRow, 120, 140},
213    {17, CNoOutputEnableFuseRow, 80, 100},
214    {18, CNoOutputEnableFuseRow, 40, 60},
215    {19, CNoOutputEnableFuseRow, 0, 20}};
216
217static pin_fuse_rows pal10h8pinfuserows[] = {
218    {12, CNoOutputEnableFuseRow, 280, 300},
219    {13, CNoOutputEnableFuseRow, 240, 260},
220    {14, CNoOutputEnableFuseRow, 200, 220},
221    {15, CNoOutputEnableFuseRow, 160, 180},
222    {16, CNoOutputEnableFuseRow, 120, 140},
223    {17, CNoOutputEnableFuseRow, 80, 100},
224    {18, CNoOutputEnableFuseRow, 40, 60},
225    {19, CNoOutputEnableFuseRow, 0, 20}};
226
227static pin_fuse_rows pal12l6pinfuserows[] = {
228    {13, CNoOutputEnableFuseRow, 288, 360},
229    {14, CNoOutputEnableFuseRow, 240, 264},
230    {15, CNoOutputEnableFuseRow, 192, 216},
231    {16, CNoOutputEnableFuseRow, 144, 168},
232    {17, CNoOutputEnableFuseRow, 96, 120},
233    {18, CNoOutputEnableFuseRow, 0, 72}};
234
235static pin_fuse_rows pal12h6pinfuserows[] = {
236    {13, CNoOutputEnableFuseRow, 288, 360},
237    {14, CNoOutputEnableFuseRow, 240, 264},
238    {15, CNoOutputEnableFuseRow, 192, 216},
239    {16, CNoOutputEnableFuseRow, 144, 168},
240    {17, CNoOutputEnableFuseRow, 96, 120},
241    {18, CNoOutputEnableFuseRow, 0, 72}};
242
243static pin_fuse_rows pal14l4pinfuserows[] = {
244    {14, CNoOutputEnableFuseRow, 336, 420},
245    {15, CNoOutputEnableFuseRow, 224, 308},
246    {16, CNoOutputEnableFuseRow, 112, 196},
247    {17, CNoOutputEnableFuseRow, 0, 84}};
248
249static pin_fuse_rows pal14h4pinfuserows[] = {
250    {14, CNoOutputEnableFuseRow, 336, 420},
251    {15, CNoOutputEnableFuseRow, 224, 308},
252    {16, CNoOutputEnableFuseRow, 112, 196},
253    {17, CNoOutputEnableFuseRow, 0, 84}};
254
255static pin_fuse_rows pal16l2pinfuserows[] = {
256    {15, CNoOutputEnableFuseRow, 256, 480},
257    {16, CNoOutputEnableFuseRow, 0, 224}};
258
259static pin_fuse_rows pal16h2pinfuserows[] = {
260    {15, CNoOutputEnableFuseRow, 256, 480},
261    {16, CNoOutputEnableFuseRow, 0, 224}};
262
263static pin_fuse_rows pal16c1pinfuserows[] = {
264    {15, CNoOutputEnableFuseRow, 256, 480},
265    {16, CNoOutputEnableFuseRow, 0, 224}};
266
267static pin_fuse_rows pal16l8pinfuserows[] = {
268    {12, 1792, 1824, 2016},
269    {13, 1536, 1568, 1760},
270    {14, 1280, 1312, 1504},
271    {15, 1024, 1056, 1248},
272    {16, 768, 800, 992},
273    {17, 512, 544, 736},
274    {18, 256, 288, 480},
275    {19, 0, 32, 224}};
276
277static pin_fuse_rows pal16r4pinfuserows[] = {
278    {12, 1792, 1824, 2016},
279    {13, 1536, 1568, 1760},
280    {14, CNoOutputEnableFuseRow, 1280, 1504}, /* Registered Output */
281    {15, CNoOutputEnableFuseRow, 1024, 1248}, /* Registered Output */
282    {16, CNoOutputEnableFuseRow, 768, 992},   /* Registered Output */
283    {17, CNoOutputEnableFuseRow, 512, 736},   /* Registered Output */
284    {18, 256, 288, 480},
285    {19, 0, 32, 224}};
286
287static pin_fuse_rows pal16r6pinfuserows[] = {
288    {12, 1792, 1824, 2016},
289    {13, CNoOutputEnableFuseRow, 1536, 1760}, /* Registered Output */
290    {14, CNoOutputEnableFuseRow, 1280, 1504}, /* Registered Output */
291    {15, CNoOutputEnableFuseRow, 1024, 1248}, /* Registered Output */
292    {16, CNoOutputEnableFuseRow, 768, 992},   /* Registered Output */
293    {17, CNoOutputEnableFuseRow, 512, 736},   /* Registered Output */
294    {18, CNoOutputEnableFuseRow, 256, 480},   /* Registered Output */
295    {19, 0, 32, 224}};
296
297static pin_fuse_rows pal16r8pinfuserows[] = {
298    {12, CNoOutputEnableFuseRow, 1792, 2016}, /* Registered Output */
299    {13, CNoOutputEnableFuseRow, 1536, 1760}, /* Registered Output */
300    {14, CNoOutputEnableFuseRow, 1280, 1504}, /* Registered Output */
301    {15, CNoOutputEnableFuseRow, 1024, 1248}, /* Registered Output */
302    {16, CNoOutputEnableFuseRow, 768, 992},   /* Registered Output */
303    {17, CNoOutputEnableFuseRow, 512, 736},   /* Registered Output */
304    {18, CNoOutputEnableFuseRow, 256, 480},   /* Registered Output */
305    {19, CNoOutputEnableFuseRow, 0, 224}};    /* Registered Output */
306
307static pin_fuse_rows gal18v10pinfuserows[] = {
308    {9,  3096, 3132, 3384},
309    {11, 2772, 2808, 3060},
310    {12, 2448, 2484, 2736},
311    {13, 2124, 2160, 2412},
312    {14, 1728, 1764, 2088},
313    {15, 1332, 1368, 1692},
314    {16, 1008, 1044, 1296},
315    {17, 684,  720,  972},
316    {18, 360,  396,  648},
317    {19, 36,   72,   324}};
318
319static pin_fuse_rows pal20l8pinfuserows[] = {
320    {15, 2240, 2280, 2520},
321    {16, 1920, 1960, 2200},
322    {17, 1600, 1640, 1880},
323    {18, 1280, 1320, 1560},
324    {19, 960, 1000, 1240},
325    {20, 640, 680, 920},
326    {21, 320, 360, 600},
327    {22, 0, 40, 280}};
328
329static pin_fuse_rows pal20l10pinfuserows[] = {
330    {14, 1440, 1480, 1560},
331    {15, 1280, 1320, 1400},
332    {16, 1120, 1160, 1240},
333    {17, 960,  1000, 1080},
334    {18, 800,  840,  920},
335    {19, 640,  680,  760},
336    {20, 480,  520,  600},
337    {21, 320,  360,  440},
338    {22, 160,  200,  280},
339    {23, 0,    40,   120}};
340
341static pin_fuse_rows pal20r4pinfuserows[] = {
342    {15, 2240, 2280, 2520},
343    {16, 1920, 1960, 2200},
344    {17, 1600, 1640, 1840},
345    {18, 1280, 1320, 1560},
346    {19, 960, 1000, 1240},
347    {20, 640, 680, 920},
348    {21, 320, 360, 600},
349    {22, 0, 40, 280}};
350
351static pin_fuse_rows pal20r6pinfuserows[] = {
352    {15, 2240, 2280, 2520},
353    {16, 1920, 1960, 2200},
354    {17, 1600, 1640, 1840},
355    {18, 1280, 1320, 1560},
356    {19, 960, 1000, 1240},
357    {20, 640, 680, 920},
358    {21, 320, 360, 600},
359    {22, 0, 40, 280}};
360
361static pin_fuse_rows pal20r8pinfuserows[] = {
362    {15, 2240, 2280, 2520},
363    {16, 1920, 1960, 2200},
364    {17, 1600, 1640, 1840},
365    {18, 1280, 1320, 1560},
366    {19, 960, 1000, 1240},
367    {20, 640, 680, 920},
368    {21, 320, 360, 600},
369    {22, 0, 40, 280}};
370
371static pin_fuse_columns pal10l8pinfusecolumns[] = {
372    {1, 3, 2},
373    {2, 1, 0},
374    {3, 5, 4},
375    {4, 7, 6},
376    {5, 9, 8},
377    {6, 11, 10},
378    {7, 13, 12},
379    {8, 15, 14},
380    {9, 17, 16},
381    {11, 19, 18}};
382
383static pin_fuse_columns pal10h8pinfusecolumns[] = {
384    {1, 3, 2},
385    {2, 1, 0},
386    {3, 5, 4},
387    {4, 7, 6},
388    {5, 9, 8},
389    {6, 11, 10},
390    {7, 13, 12},
391    {8, 15, 14},
392    {9, 17, 16},
393    {11, 19, 18}};
394
395static pin_fuse_columns pal12l6pinfusecolumns[] = {
396    {1, 3, 2},
397    {2, 1, 0},
398    {3, 5, 4},
399    {4, 9, 8},
400    {5, 11, 10},
401    {6, 13, 12},
402    {7, 15, 14},
403    {8, 17, 16},
404    {9, 21, 20},
405    {11, 23, 22},
406    {12, 19, 18},
407    {19, 7, 6}};
408
409static pin_fuse_columns pal12h6pinfusecolumns[] = {
410    {1, 3, 2},
411    {2, 1, 0},
412    {3, 5, 4},
413    {4, 9, 8},
414    {5, 11, 10},
415    {6, 13, 12},
416    {7, 15, 14},
417    {8, 17, 16},
418    {9, 21, 20},
419    {11, 23, 22},
420    {12, 19, 18},
421    {19, 7, 6}};
422
423static pin_fuse_columns pal14l4pinfusecolumns[] = {
424    {1, 3, 2},
425    {2, 1, 0},
426    {3, 5, 4},
427    {4, 9, 8},
428    {5, 13, 12},
429    {6, 15, 14},
430    {7, 17, 16},
431    {8, 21, 20},
432    {9, 25, 24},
433    {11, 27, 26},
434    {12, 23, 22},
435    {13, 19, 18},
436    {18, 11, 10},
437    {19, 7, 6}};
438
439static pin_fuse_columns pal14h4pinfusecolumns[] = {
440    {1, 3, 2},
441    {2, 1, 0},
442    {3, 5, 4},
443    {4, 9, 8},
444    {5, 13, 12},
445    {6, 15, 14},
446    {7, 17, 16},
447    {8, 21, 20},
448    {9, 25, 24},
449    {11, 27, 26},
450    {12, 23, 22},
451    {13, 19, 18},
452    {18, 11, 10},
453    {19, 7, 6}};
454
455static pin_fuse_columns pal16l2pinfusecolumns[] = {
456    {1, 3, 2},
457    {2, 1, 0},
458    {3, 5, 4},
459    {4, 9, 8},
460    {5, 13, 12},
461    {6, 17, 16},
462    {7, 21, 20},
463    {8, 25, 24},
464    {9, 29, 28},
465    {11, 31, 30},
466    {12, 27, 26},
467    {13, 23, 22},
468    {14, 19, 18},
469    {17, 15, 14},
470    {18, 11, 10},
471    {19, 7, 6}};
472
473static pin_fuse_columns pal16h2pinfusecolumns[] = {
474    {1, 3, 2},
475    {2, 1, 0},
476    {3, 5, 4},
477    {4, 9, 8},
478    {5, 13, 12},
479    {6, 17, 16},
480    {7, 21, 20},
481    {8, 25, 24},
482    {9, 29, 28},
483    {11, 31, 30},
484    {12, 27, 26},
485    {13, 23, 22},
486    {14, 19, 18},
487    {17, 15, 14},
488    {18, 11, 10},
489    {19, 7, 6}};
490
491static pin_fuse_columns pal16c1pinfusecolumns[] = {
492    {1, 3, 2},
493    {2, 1, 0},
494    {3, 5, 4},
495    {4, 9, 8},
496    {5, 13, 12},
497    {6, 17, 16},
498    {7, 21, 20},
499    {8, 25, 24},
500    {9, 29, 28},
501    {11, 31, 30},
502    {12, 27, 26},
503    {13, 23, 22},
504    {14, 19, 18},
505    {17, 15, 14},
506    {18, 11, 10},
507    {19, 7, 6}};
508
509static pin_fuse_columns pal16l8pinfusecolumns[] = {
510    {1, 3, 2},
511    {2, 1, 0},
512    {3, 5, 4},
513    {4, 9, 8},
514    {5, 13, 12},
515    {6, 17, 16},
516    {7, 21, 20},
517    {8, 25, 24},
518    {9, 29, 28},
519    {11, 31, 30},
520    {13, 27, 26},
521    {14, 23, 22},
522    {15, 19, 18},
523    {16, 15, 14},
524    {17, 11, 10},
525    {18, 7, 6}};
526
527static pin_fuse_columns pal16r4pinfusecolumns[] = {
528    {2, 1, 0},
529    {3, 5, 4},
530    {4, 9, 8},
531    {5, 13, 12},
532    {6, 17, 16},
533    {7, 21, 20},
534    {8, 25, 24},
535    {9, 29, 28},
536    {12, 31, 30},
537    {13, 27, 26},
538    {14, 23, 22}, /* Registered Output */
539    {15, 19, 18}, /* Registered Output */
540    {16, 15, 14}, /* Registered Output */
541    {17, 11, 10}, /* Registered Output */
542    {18, 7, 6},
543    {19, 3, 2}};
544
545static pin_fuse_columns pal16r6pinfusecolumns[] = {
546    {2, 1, 0},
547    {3, 5, 4},
548    {4, 9, 8},
549    {5, 13, 12},
550    {6, 17, 16},
551    {7, 21, 20},
552    {8, 25, 24},
553    {9, 29, 28},
554    {12, 31, 30},
555    {13, 27, 26}, /* Registered Output */
556    {14, 23, 22}, /* Registered Output */
557    {15, 19, 18}, /* Registered Output */
558    {16, 15, 14}, /* Registered Output */
559    {17, 11, 10}, /* Registered Output */
560    {18, 7, 6},   /* Registered Output */
561    {19, 3, 2}};
562
563static pin_fuse_columns pal16r8pinfusecolumns[] = {
564    {2, 1, 0},
565    {3, 5, 4},
566    {4, 9, 8},
567    {5, 13, 12},
568    {6, 17, 16},
569    {7, 21, 20},
570    {8, 25, 24},
571    {9, 29, 28},
572    {12, 31, 30}, /* Registered Output */
573    {13, 27, 26}, /* Registered Output */
574    {14, 23, 22}, /* Registered Output */
575    {15, 19, 18}, /* Registered Output */
576    {16, 15, 14}, /* Registered Output */
577    {17, 11, 10}, /* Registered Output */
578    {18, 7, 6},   /* Registered Output */
579    {19, 3, 2}};  /* Registered Output */
580
581static pin_fuse_columns gal18v10pinfusecolumns[] = {
582    {1,  1,  0},
583    {2,  5,  4},
584    {3,  9,  8},
585    {4,  13, 12},
586    {5,  17, 16},
587    {6,  21, 20},
588    {7,  25, 24},
589    {8,  29, 28},
590    {9,  35, 34},
591    {11, 33, 32},
592    {12, 31, 30},
593    {13, 27, 26},
594    {14, 23, 22},
595    {15, 19, 18},
596    {16, 15, 14},
597    {17, 11, 10},
598    {18, 7,  6},
599    {19, 3,  2}};
600
601static pin_fuse_columns pal20l8pinfusecolumns[] = {
602    {1, 3, 2},
603    {2, 1, 0},
604    {3, 5, 4},
605    {4, 9, 8},
606    {5, 13, 12},
607    {6, 17, 16},
608    {7, 21, 20},
609    {8, 25, 24},
610    {9, 29, 28},
611    {10, 33, 32},
612    {11, 37, 36},
613    {13, 39, 38},
614    {14, 35, 34},
615    {16, 31, 30},
616    {17, 27, 26},
617    {18, 23, 22},
618    {19, 19, 18},
619    {20, 15, 14},
620    {21, 11, 10},
621    {23, 7, 6}};
622
623static pin_fuse_columns pal20l10pinfusecolumns[] = {
624    {1, 3, 2},
625    {2, 1, 0},
626    {3, 5, 4},
627    {4, 9, 8},
628    {5, 13, 12},
629    {6, 17, 16},
630    {7, 21, 20},
631    {8, 25, 24},
632    {9, 29, 28},
633    {10, 33, 32},
634    {11, 37, 36},
635    {13, 39, 38},
636    {15, 35, 34},
637    {16, 31, 30},
638    {17, 27, 26},
639    {18, 23, 22},
640    {19, 19, 18},
641    {20, 15, 14},
642    {21, 11, 10},
643    {22, 7, 6}};
644
645static pin_fuse_columns pal20r4pinfusecolumns[] = {
646    {2, 1, 0},
647    {3, 5, 4},
648    {4, 9, 8},
649    {5, 13, 12},
650    {6, 17, 16},
651    {7, 21, 20},
652    {8, 25, 24},
653    {9, 29, 28},
654    {10, 33, 32},
655    {11, 37, 36},
656    {14, 39, 38},
657    {15, 35, 34},
658    {16, 31, 30},
659    {17, 27, 26},
660    {18, 23, 22},
661    {19, 19, 18},
662    {20, 15, 14},
663    {21, 11, 10},
664    {22, 7, 6},
665    {23, 3, 2}};
666
667static pin_fuse_columns pal20r6pinfusecolumns[] = {
668    {2, 1, 0},
669    {3, 5, 4},
670    {4, 9, 8},
671    {5, 13, 12},
672    {6, 17, 16},
673    {7, 21, 20},
674    {8, 25, 24},
675    {9, 29, 28},
676    {10, 33, 32},
677    {11, 37, 36},
678    {14, 39, 38},
679    {15, 35, 34},
680    {16, 31, 30},
681    {17, 27, 26},
682    {18, 23, 22},
683    {19, 19, 18},
684    {20, 15, 14},
685    {21, 11, 10},
686    {22, 7, 6},
687    {23, 3, 2}};
688
689static pin_fuse_columns pal20r8pinfusecolumns[] = {
690    {2, 1, 0},
691    {3, 5, 4},
692    {4, 9, 8},
693    {5, 13, 12},
694    {6, 17, 16},
695    {7, 21, 20},
696    {8, 25, 24},
697    {9, 29, 28},
698    {10, 33, 32},
699    {11, 37, 36},
700    {14, 39, 38},
701    {15, 35, 34},
702    {16, 31, 30},
703    {17, 27, 26},
704    {18, 23, 22},
705    {19, 19, 18},
706    {20, 15, 14},
707    {21, 11, 10},
708    {22, 7, 6},
709    {23, 3, 2}};
710
711static pal_data paldata[] = {
712    {"PAL10L8",
713        pal10l8pinfuserows,
714        sizeof(pal10l8pinfuserows) / sizeof(pal10l8pinfuserows[0]),
715        pal10l8pinfusecolumns,
716        sizeof(pal10l8pinfusecolumns) / sizeof(pal10l8pinfusecolumns[0]),
717        print_pal10l8_product_terms},
718    {"PAL10H8",
719        pal10h8pinfuserows,
720        sizeof(pal10h8pinfuserows) / sizeof(pal10h8pinfuserows[0]),
721        pal10h8pinfusecolumns,
722        sizeof(pal10h8pinfusecolumns) / sizeof(pal10h8pinfusecolumns[0]),
723        print_pal10h8_product_terms},
724    {"PAL12H6",
725        pal12h6pinfuserows,
726        sizeof(pal12h6pinfuserows) / sizeof(pal12h6pinfuserows[0]),
727        pal12h6pinfusecolumns,
728        sizeof(pal12h6pinfusecolumns) / sizeof(pal12h6pinfusecolumns[0]),
729        print_pal12h6_product_terms},
730    {"PAL14H4",
731        pal14h4pinfuserows,
732        sizeof(pal14h4pinfuserows) / sizeof(pal14h4pinfuserows[0]),
733        pal14h4pinfusecolumns,
734        sizeof(pal14h4pinfusecolumns) / sizeof(pal14h4pinfusecolumns[0]),
735        print_pal14h4_product_terms},
736    {"PAL16H2",
737        pal16h2pinfuserows,
738        sizeof(pal16h2pinfuserows) / sizeof(pal16h2pinfuserows[0]),
739        pal16h2pinfusecolumns,
740        sizeof(pal16h2pinfusecolumns) / sizeof(pal16h2pinfusecolumns[0]),
741        print_pal16h2_product_terms},
742    {"PAL16C1",
743        pal16c1pinfuserows,
744        sizeof(pal16c1pinfuserows) / sizeof(pal16c1pinfuserows[0]),
745        pal16c1pinfusecolumns,
746        sizeof(pal16c1pinfusecolumns) / sizeof(pal16c1pinfusecolumns[0]),
747        print_pal16c1_product_terms},
748    {"PAL12L6",
749        pal12l6pinfuserows,
750        sizeof(pal12l6pinfuserows) / sizeof(pal12l6pinfuserows[0]),
751        pal12l6pinfusecolumns,
752        sizeof(pal12l6pinfusecolumns) / sizeof(pal12l6pinfusecolumns[0]),
753        print_pal12l6_product_terms},
754    {"PAL14L4",
755        pal14l4pinfuserows,
756        sizeof(pal14l4pinfuserows) / sizeof(pal14l4pinfuserows[0]),
757        pal14l4pinfusecolumns,
758        sizeof(pal14l4pinfusecolumns) / sizeof(pal14l4pinfusecolumns[0]),
759        print_pal14l4_product_terms},
760    {"PAL16L2",
761        pal16l2pinfuserows,
762        sizeof(pal16l2pinfuserows) / sizeof(pal16l2pinfuserows[0]),
763        pal16l2pinfusecolumns,
764        sizeof(pal16l2pinfusecolumns) / sizeof(pal16l2pinfusecolumns[0]),
765        print_pal16l2_product_terms},
766    {"15S8", NULL, 0, NULL, 0, NULL},
767    {"PLS153", NULL, 0, NULL, 0, NULL},
768    {"PAL16L8",
769        pal16l8pinfuserows,
770        sizeof(pal16l8pinfuserows) / sizeof(pal16l8pinfuserows[0]),
771        pal16l8pinfusecolumns,
772        sizeof(pal16l8pinfusecolumns) / sizeof(pal16l8pinfusecolumns[0]),
773        print_pal16l8_product_terms},
774    {"PAL16R4",
775        pal16r4pinfuserows,
776        sizeof(pal16r4pinfuserows) / sizeof(pal16r4pinfuserows[0]),
777        pal16r4pinfusecolumns,
778        sizeof(pal16r4pinfusecolumns) / sizeof(pal16r4pinfusecolumns),
779        print_pal16r4_product_terms},
780    {"PAL16R6",
781        pal16r6pinfuserows,
782        sizeof(pal16r6pinfuserows) / sizeof(pal16r6pinfuserows[0]),
783        pal16r6pinfusecolumns,
784        sizeof(pal16r6pinfusecolumns) / sizeof(pal16r6pinfusecolumns),
785        print_pal16r6_product_terms},
786    {"PAL16R8",
787        pal16r8pinfuserows,
788        sizeof(pal16r8pinfuserows) / sizeof(pal16r8pinfuserows[0]),
789        pal16r8pinfusecolumns,
790        sizeof(pal16r8pinfusecolumns) / sizeof(pal16r8pinfusecolumns),
791        print_pal16r8_product_terms},
792    {"PAL16RA8", NULL, 0, NULL, 0, NULL},
793    {"PAL16V8R", NULL, 0, NULL, 0, NULL},
794    {"PALCE16V8", NULL, 0, NULL, 0, NULL},
795    {"GAL16V8A", NULL, 0, NULL, 0, NULL},
796    {"18CV8", NULL, 0, NULL, 0, NULL},
797    {"GAL18V10",
798        gal18v10pinfuserows,
799        sizeof(gal18v10pinfuserows) / sizeof(gal18v10pinfuserows[0]),
800        gal18v10pinfusecolumns,
801        sizeof(gal18v10pinfusecolumns) / sizeof(gal18v10pinfusecolumns),
802        print_gal18v10_product_terms},
803    {"PAL20L8",
804        pal20l8pinfuserows,
805        sizeof(pal20l8pinfuserows) / sizeof(pal20l8pinfuserows[0]),
806        pal20l8pinfusecolumns,
807        sizeof(pal20l8pinfusecolumns) / sizeof(pal20l8pinfusecolumns[0]),
808        print_pal20l8_product_terms},
809    {"PAL20L10",
810        pal20l10pinfuserows,
811        sizeof(pal20l10pinfuserows) / sizeof(pal20l10pinfuserows[0]),
812        pal20l10pinfusecolumns,
813        sizeof(pal20l10pinfusecolumns) / sizeof(pal20l10pinfusecolumns[0]),
814        print_pal20l10_product_terms},
815    {"PAL20R4",
816        pal20r4pinfuserows,
817        sizeof(pal20r4pinfuserows) / sizeof(pal20r4pinfuserows[0]),
818        pal20r4pinfusecolumns,
819        sizeof(pal20r4pinfusecolumns) / sizeof(pal20r4pinfusecolumns[0]),
820        print_pal20r4_product_terms},
821    {"PAL20R6",
822        pal20r6pinfuserows,
823        sizeof(pal20r6pinfuserows) / sizeof(pal20r6pinfuserows[0]),
824        pal20r6pinfusecolumns,
825        sizeof(pal20r6pinfusecolumns) / sizeof(pal20r6pinfusecolumns[0]),
826        print_pal20r6_product_terms},
827    {"PAL20R8",
828        pal20r8pinfuserows,
829        sizeof(pal20r8pinfuserows) / sizeof(pal20r8pinfuserows[0]),
830        pal20r8pinfusecolumns,
831        sizeof(pal20r8pinfusecolumns) / sizeof(pal20r8pinfusecolumns[0]),
832        print_pal20r8_product_terms},
833    {"PAL20X4", NULL, 0, NULL, 0, NULL},
834    {"PAL20X8", NULL, 0, NULL, 0, NULL},
835    {"PAL20X10", NULL, 0, NULL, 0, NULL},
836    {"PAL22V10", NULL, 0, NULL, 0, NULL},
837    {"GAL20V8A", NULL, 0, NULL, 0, NULL},
838    {"GAL22V10", NULL, 0, NULL, 0, NULL},
839    {"PLS100", NULL, 0, NULL, 0, NULL}};
840
841
842
104843/***************************************************************************
105844    CORE IMPLEMENTATION
106845***************************************************************************/
107846
108847/*-------------------------------------------------
848    is_jed_file - test if the file extension is
849    that of a JED file
850-------------------------------------------------*/
851
852static int is_jed_file(const char *file)
853{
854   int len;
855
856   /* does the source end in '.jed'? */
857   len = strlen(file);
858
859   return (file[len - 4] == '.' &&
860           tolower((UINT8)file[len - 3]) == 'j' &&
861           tolower((UINT8)file[len - 2]) == 'e' &&
862           tolower((UINT8)file[len - 1]) == 'd');
863}
864
865
866
867/*-------------------------------------------------
868    find_pal_data - finds the data associated
869    with a pal name
870-------------------------------------------------*/
871
872static pal_data* find_pal_data(const char *name)
873{
874    int index;
875
876    for (index = 0; index < sizeof(paldata) / sizeof(paldata[0]);
877         ++index)
878    {
879        if (!strcmpi(name, paldata[index].name))
880        {
881            return &paldata[index];
882        }
883    }
884
885    return NULL;
886}
887
888
889
890/*-------------------------------------------------
891    calc_fuse_column_count - calculates the total
892    columns of a pal
893-------------------------------------------------*/
894
895static UINT16 calc_fuse_column_count(const pal_data* pal)
896{
897    return pal->pinfusecolumnscount * 2;
898}
899
900
901
902/*-------------------------------------------------
903    is_fuse_row_blown - checks if a fuse row is
904    all blown
905-------------------------------------------------*/
906
907static int is_fuse_row_blown(const pal_data* pal, const jed_data* jed, UINT16 fuserow)
908{
909    UINT16 columncount = calc_fuse_column_count(pal);
910    UINT16 column;
911
912    for (column = 0; column < columncount; ++column)
913    {
914        if (!jed_get_fuse(jed, fuserow + column))
915        {
916            return 0;
917        }
918    }
919
920    return 1;
921}
922
923
924
925/*-------------------------------------------------
926    is_output_pin - determines if the pin is an
927    output pin
928-------------------------------------------------*/
929
930static int is_output_pin(UINT16 pin)
931{
932    UINT16 index;
933
934    for (index = 0; index < outputpinscount; ++index)
935    {
936        if (outputpins[index] == pin)
937        {
938            return 1;
939        }
940    }
941
942    return 0;
943}
944
945
946
947/*-------------------------------------------------
948    find_input_pins - finds the input pins of a
949    pal
950-------------------------------------------------*/
951
952static void find_input_pins(const pal_data* pal, const jed_data* jed)
953{
954    UINT16 column;
955
956    inputpinscount = 0;
957
958    for (column = 0; column < pal->pinfusecolumnscount; ++column)
959    {
960        if (!is_output_pin(pal->pinfusecolumns[column].pin))
961        {
962            inputpins[inputpinscount] = pal->pinfusecolumns[column].pin;
963
964            ++inputpinscount;
965        }
966    }
967}
968
969
970
971/*-------------------------------------------------
972    find_output_pins - finds the output pins of a
973    pal
974-------------------------------------------------*/
975
976static void find_output_pins(const pal_data* pal, const jed_data* jed)
977{
978    UINT16 column, columncount, index;
979    int fuseblown;
980
981    outputpinscount = 0;
982    columncount = calc_fuse_column_count(pal);
983
984    for (index = 0; index < pal->pinfuserowscount; ++index)
985    {
986        fuseblown = 0;
987
988        if (pal->pinfuserows[index].fuserowoutputenable == CNoOutputEnableFuseRow)
989        {
990            fuseblown = 1;
991        }
992        else
993        {
994            for (column = 0; column < columncount; ++column)
995            {
996                if (jed_get_fuse(jed, pal->pinfuserows[index].fuserowoutputenable + column) == 1)
997                {
998                    fuseblown = 1;
999                }
1000            }
1001        }
1002
1003        if (fuseblown)
1004        {
1005            outputpins[outputpinscount] = pal->pinfuserows[index].pin;
1006
1007            ++outputpinscount;
1008        }
1009    }
1010}
1011
1012
1013
1014static int is_output_pin_used(const pal_data* pal, const jed_data* jed, const pin_fuse_rows* fuse_rows)
1015{
1016    UINT16 row, column, columncount;
1017
1018    columncount = calc_fuse_column_count(pal);
1019
1020    for (row = fuse_rows->fuserowtermstart;
1021         row <= fuse_rows->fuserowtermend;
1022         row += columncount)
1023    {
1024        for (column = 0; column < columncount; ++column)
1025        {
1026            if (jed_get_fuse(jed, row + column))
1027            {
1028                return 1;
1029            }
1030        }
1031    }
1032
1033    return 0;
1034}
1035
1036
1037
1038/*-------------------------------------------------
1039    generate_product_terms - prints the product terms
1040    for a fuse row
1041-------------------------------------------------*/
1042
1043static void generate_product_terms(const pal_data* pal, const jed_data* jed, UINT16 fuserow, char* buffer)
1044{
1045    UINT16 index;
1046    int lowfusestate, highfusestate, haveterm;
1047    char tmpbuffer[20];
1048
1049    *buffer = 0;
1050    haveterm = 0;
1051
1052    for (index = 0; index < pal->pinfusecolumnscount; ++index)
1053    {
1054        lowfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].lowfusecolumn);
1055        highfusestate = jed_get_fuse(jed, fuserow + pal->pinfusecolumns[index].highfusecolumn);
1056
1057        if (!lowfusestate && highfusestate)
1058        {
1059            if (haveterm)
1060            {
1061                strcat(buffer,  " & ");
1062            }
1063
1064            if (!is_output_pin(pal->pinfusecolumns[index].pin))
1065            {
1066                sprintf(tmpbuffer, "/i%d", pal->pinfusecolumns[index].pin);
1067                strcat(buffer, tmpbuffer);
1068            }
1069            else
1070            {
1071                sprintf(tmpbuffer, "/o%d", pal->pinfusecolumns[index].pin);
1072                strcat(buffer, tmpbuffer);
1073            }
1074
1075            haveterm = 1;
1076        }
1077        else if (lowfusestate && !highfusestate)
1078        {
1079            if (haveterm)
1080            {
1081                strcat(buffer, " & ");
1082            }
1083
1084            if (!is_output_pin(pal->pinfusecolumns[index].pin))
1085            {
1086                sprintf(tmpbuffer, "i%d", pal->pinfusecolumns[index].pin);
1087                strcat(buffer, tmpbuffer);
1088            }
1089            else
1090            {
1091                sprintf(tmpbuffer, "o%d", pal->pinfusecolumns[index].pin);
1092                strcat(buffer, tmpbuffer);
1093            }
1094
1095            haveterm = 1;
1096        }
1097    }
1098}
1099
1100
1101
1102/*-------------------------------------------------
1103    print_product_terms - prints the product terms
1104    for a pal
1105-------------------------------------------------*/
1106
1107static void print_product_terms(const pal_data* pal, const jed_data* jed, int activestate)
1108{
1109    UINT16 index, row, columncount;
1110    char buffer[200];
1111    int haveterms, indent, indentindex;
1112
1113    columncount = calc_fuse_column_count(pal);
1114
1115    for (index = 0; index < pal->pinfuserowscount; ++index)
1116    {
1117        if (is_output_pin(pal->pinfuserows[index].pin) &&
1118            is_output_pin_used(pal, jed, &pal->pinfuserows[index]))
1119        {
1120            indent = 0;
1121
1122            if (!activestate)
1123            {
1124                printf("/");
1125
1126                ++indent;
1127            }
1128
1129            sprintf(buffer, "o%d = ", pal->pinfuserows[index].pin);
1130
1131            printf("%s", buffer);
1132
1133            haveterms = 0;
1134            indent += strlen(buffer);
1135
1136            for (row = pal->pinfuserows[index].fuserowtermstart;
1137                 row <= pal->pinfuserows[index].fuserowtermend;
1138                 row += columncount)
1139            {
1140                generate_product_terms(pal, jed, row, buffer);
1141
1142                if (strlen(buffer) > 0)
1143                {
1144                    if (haveterms)
1145                    {
1146                        printf(" +\n");
1147
1148                        for (indentindex = 0; indentindex < indent; ++indentindex)
1149                        {
1150                            printf(" ");
1151                        }
1152                    }
1153                    else
1154                    {
1155                        haveterms = 1;
1156                    }
1157
1158                    printf("%s", buffer);
1159                }
1160            }
1161
1162            printf("\n");
1163
1164            /* output enable equations */
1165
1166            printf("o%d.oe = ", pal->pinfuserows[index].pin);
1167
1168            if (pal->pinfuserows[index].fuserowoutputenable == CNoOutputEnableFuseRow ||
1169                is_fuse_row_blown(pal, jed, pal->pinfuserows[index].fuserowoutputenable))
1170            {
1171                printf("vcc\n");
1172            }
1173            else
1174            {
1175                generate_product_terms(pal, jed, pal->pinfuserows[index].fuserowoutputenable, buffer);
1176
1177                printf("%s\n", buffer);
1178            }
1179
1180            printf("\n");
1181        }
1182    }
1183
1184    printf("\n");
1185}
1186
1187
1188
1189/*-------------------------------------------------
1190    print_pal10l8_product_terms - prints the product
1191    terms for a PAL10L8
1192-------------------------------------------------*/
1193
1194static void print_pal10l8_product_terms(const pal_data* pal, const jed_data* jed)
1195{
1196    print_product_terms(pal, jed, 0);
1197}
1198
1199
1200
1201/*-------------------------------------------------
1202    print_pal10h8_product_terms - prints the product
1203    terms for a PAL10H8
1204-------------------------------------------------*/
1205
1206static void print_pal10h8_product_terms(const pal_data* pal, const jed_data* jed)
1207{
1208    print_product_terms(pal, jed, 1);
1209}
1210
1211
1212
1213/*-------------------------------------------------
1214    print_pal12l6_product_terms - prints the product
1215    terms for a PAL12L6
1216-------------------------------------------------*/
1217
1218static void print_pal12l6_product_terms(const pal_data* pal, const jed_data* jed)
1219{
1220    print_product_terms(pal, jed, 0);
1221}
1222
1223
1224
1225/*-------------------------------------------------
1226    print_pal12h6_product_terms - prints the product
1227    terms for a PAL12H6
1228-------------------------------------------------*/
1229
1230static void print_pal12h6_product_terms(const pal_data* pal, const jed_data* jed)
1231{
1232    print_product_terms(pal, jed, 1);
1233}
1234
1235
1236
1237/*-------------------------------------------------
1238    print_pal14l4_product_terms - prints the product
1239    terms for a PAL14L4
1240-------------------------------------------------*/
1241
1242static void print_pal14l4_product_terms(const pal_data* pal, const jed_data* jed)
1243{
1244    print_product_terms(pal, jed, 0);
1245}
1246
1247
1248
1249/*-------------------------------------------------
1250    print_pal14h4_product_terms - prints the product
1251    terms for a PAL14H4
1252-------------------------------------------------*/
1253
1254static void print_pal14h4_product_terms(const pal_data* pal, const jed_data* jed)
1255{
1256    print_product_terms(pal, jed, 1);
1257}
1258
1259
1260
1261/*-------------------------------------------------
1262    print_pal16l2_product_terms - prints the product
1263    terms for a PAL16L2
1264-------------------------------------------------*/
1265
1266static void print_pal16l2_product_terms(const pal_data* pal, const jed_data* jed)
1267{
1268    print_product_terms(pal, jed, 0);
1269}
1270
1271
1272
1273/*-------------------------------------------------
1274    print_pal16h2_product_terms - prints the product
1275    terms for a PAL16H2
1276-------------------------------------------------*/
1277
1278static void print_pal16h2_product_terms(const pal_data* pal, const jed_data* jed)
1279{
1280    print_product_terms(pal, jed, 1);
1281}
1282
1283
1284
1285/*-------------------------------------------------
1286    print_pal16h2_product_terms - prints the product
1287    terms for a PAL16C1
1288-------------------------------------------------*/
1289
1290static void print_pal16c1_product_terms(const pal_data* pal, const jed_data* jed)
1291{
1292    printf("Viewing product terms are not supported.\n");
1293}
1294
1295
1296
1297/*-------------------------------------------------
1298    print_pal16l8_product_terms - prints the product
1299    terms for a PAL16L8
1300-------------------------------------------------*/
1301
1302static void print_pal16l8_product_terms(const pal_data* pal, const jed_data* jed)
1303{
1304    print_product_terms(pal, jed, 0);
1305}
1306
1307
1308
1309/*-------------------------------------------------
1310    print_pal16r4_product_terms - prints the product
1311    terms for a PAL16R4
1312-------------------------------------------------*/
1313
1314static void print_pal16r4_product_terms(const pal_data* pal, const jed_data* jed)
1315{
1316    printf("Viewing product terms are not supported.\n");
1317}
1318
1319
1320
1321/*-------------------------------------------------
1322    print_pal16r6_product_terms - prints the product
1323    terms for a PAL16R6
1324-------------------------------------------------*/
1325
1326static void print_pal16r6_product_terms(const pal_data* pal, const jed_data* jed)
1327{
1328    printf("Viewing product terms are not supported.\n");
1329}
1330
1331
1332
1333/*-------------------------------------------------
1334    print_pal16r8_product_terms - prints the product
1335    terms for a PAL16R8
1336-------------------------------------------------*/
1337
1338static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed)
1339{
1340    printf("Viewing product terms are not supported.\n");
1341}
1342
1343
1344
1345/*-------------------------------------------------
1346    print_gal18v10_product_terms - prints the product
1347    terms for a GAL18V10
1348-------------------------------------------------*/
1349
1350static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* jed)
1351{
1352    printf("Viewing product terms are not supported.\n");
1353}
1354
1355
1356
1357/*-------------------------------------------------
1358    print_pal20l8_product_terms - prints the product
1359    terms for a PAL20L8
1360-------------------------------------------------*/
1361
1362static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed)
1363{
1364    print_product_terms(pal, jed, 0);
1365}
1366
1367
1368
1369/*-------------------------------------------------
1370    print_pal20l10_product_terms - prints the product
1371    terms for a PAL20L10
1372-------------------------------------------------*/
1373
1374static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* jed)
1375{
1376    print_product_terms(pal, jed, 0);
1377}
1378
1379
1380
1381/*-------------------------------------------------
1382    print_pal20r4_product_terms - prints the product
1383    terms for a PAL20R4
1384-------------------------------------------------*/
1385
1386static void print_pal20r4_product_terms(const pal_data* pal, const jed_data* jed)
1387{
1388    printf("Viewing product terms are not supported.\n");
1389}
1390
1391
1392
1393/*-------------------------------------------------
1394    print_pal20r6_product_terms - prints the product
1395    terms for a PAL20R6
1396-------------------------------------------------*/
1397
1398static void print_pal20r6_product_terms(const pal_data* pal, const jed_data* jed)
1399{
1400    printf("Viewing product terms are not supported.\n");
1401}
1402
1403
1404
1405/*-------------------------------------------------
1406    print_pal20r8_product_terms - prints the product
1407    terms for a PAL20R8
1408-------------------------------------------------*/
1409
1410static void print_pal20r8_product_terms(const pal_data* pal, const jed_data* jed)
1411{
1412    printf("Viewing product terms are not supported.\n");
1413}
1414
1415
1416
1417/*-------------------------------------------------
1091418    read_source_file - read a raw source file
1101419    into an allocated memory buffer
1111420-------------------------------------------------*/
r17666r17667
1871496
1881497
1891498/*-------------------------------------------------
190    main - primary entry point
1499    print_usage - prints out the supported command
1500    line arguments
1911501-------------------------------------------------*/
1921502
193int main(int argc, char *argv[])
1503static int print_usage()
1941504{
195   const char *srcfile, *dstfile;
1505   fprintf(stderr,
1506      "Usage:\n"
1507      "  jedutil -convert <source.jed> <target.bin> [fuses] -- convert JED to binary form\n"
1508      "  jedutil -convert <source.bin> <target.jed> -- convert binary to JED form\n"
1509        "  jedutil -view <source.jed> <pal name> -- dump JED logic equations\n"
1510        "  jedutil -view <source.bin> <pal name> -- dump binary logic equations\n"
1511   );
1512
1513   return 0;
1514}
1515
1516
1517
1518/*-------------------------------------------------
1519    command_convert - convert files
1520-------------------------------------------------*/
1521
1522static int command_convert(int argc, char *argv[])
1523{
1524    const char *srcfile, *dstfile;
1961525   int src_is_jed, dst_is_jed;
1971526   int numfuses = 0;
1981527   jed_data jed;
199   int len;
2001528   int err;
2011529
202   /* needs at least two arguments */
203   if (argc < 3)
1530   if (argc < 2)
2041531   {
205      fprintf(stderr,
206         "Usage:\n"
207         "  jedutil <source.jed> <target.bin> [fuses] -- convert JED to binary form\n"
208         "  jedutil <source.bin> <target.jed> -- convert binary to JED form\n"
209      );
210      return 0;
1532      return print_usage();
2111533   }
2121534
2131535   /* extract arguments */
214   srcfile = argv[1];
215   dstfile = argv[2];
216   if (argc >= 4)
217      numfuses = atoi(argv[3]);
1536   srcfile = argv[0];
1537   dstfile = argv[1];
1538   if (argc >= 3)
1539      numfuses = atoi(argv[2]);
2181540
2191541   /* does the source end in '.jed'? */
220   len = strlen(srcfile);
221   src_is_jed = (srcfile[len - 4] == '.' &&
222                tolower((UINT8)srcfile[len - 3]) == 'j' &&
223                tolower((UINT8)srcfile[len - 2]) == 'e' &&
224                tolower((UINT8)srcfile[len - 1]) == 'd');
1542   src_is_jed = is_jed_file(srcfile);
2251543
2261544   /* does the destination end in '.jed'? */
227   len = strlen(dstfile);
228   dst_is_jed = (dstfile[len - 4] == '.' &&
229                tolower((UINT8)dstfile[len - 3]) == 'j' &&
230                tolower((UINT8)dstfile[len - 2]) == 'e' &&
231                tolower((UINT8)dstfile[len - 1]) == 'd');
1545   dst_is_jed = is_jed_file(dstfile);
2321546
2331547   /* error if neither or both are .jed */
2341548   if (!src_is_jed && !dst_is_jed)
r17666r17667
3131627      return 1;
3141628
3151629   printf("Target file written successfully\n");
316   return 0;
1630
1631    return 0;
3171632}
1633
1634
1635
1636/*-------------------------------------------------
1637    command_view - views the contents of a file
1638-------------------------------------------------*/
1639
1640static int command_view(int argc, char *argv[])
1641{
1642    const char *srcfile, *palname;
1643   int is_jed;
1644    pal_data* pal;
1645   jed_data jed;
1646   int err;
1647
1648   if (argc < 2)
1649   {
1650      return print_usage();
1651   }
1652
1653    /* extract arguments */
1654   srcfile = argv[0];
1655   palname = argv[1];
1656
1657   /* does the source end in '.jed'? */
1658   is_jed = is_jed_file(srcfile);
1659
1660    /* find the pal entry */
1661    pal = find_pal_data(palname);
1662    if (!pal)
1663    {
1664      fprintf(stderr, "Unknown pal name.\n");
1665      return 1;
1666    }
1667
1668   /* read the source file */
1669   err = read_source_file(srcfile);
1670   if (err != 0)
1671      return 1;
1672
1673   /* if the source is JED, convert to binary */
1674   if (is_jed)
1675   {
1676      /* read the JEDEC data */
1677      err = jed_parse(srcbuf, srcbuflen, &jed);
1678      switch (err)
1679      {
1680         case JEDERR_INVALID_DATA:   fprintf(stderr, "Fatal error: Invalid .JED file\n"); return 1;
1681         case JEDERR_BAD_XMIT_SUM:   fprintf(stderr, "Fatal error: Bad transmission checksum\n"); return 1;
1682         case JEDERR_BAD_FUSE_SUM:   fprintf(stderr, "Fatal error: Bad fusemap checksum\n"); return 1;
1683      }
1684    }
1685    else
1686    {
1687      /* read the binary data */
1688      err = jedbin_parse(srcbuf, srcbuflen, &jed);
1689      switch (err)
1690      {
1691         case JEDERR_INVALID_DATA:   fprintf(stderr, "Fatal error: Invalid binary JEDEC file\n"); return 1;
1692      }
1693    }
1694
1695    /* generate equations from fuse map */
1696
1697    find_output_pins(pal, &jed);
1698    find_input_pins(pal, &jed);
1699
1700    if (pal->print_product_terms)
1701    {
1702        pal->print_product_terms(pal, &jed);
1703    }
1704    else
1705    {
1706        fprintf(stderr, "Viewing product terms not supported for this pal type.");
1707       
1708        return 1;
1709    }
1710
1711    return 0;
1712}
1713
1714
1715
1716/*-------------------------------------------------
1717    main - primary entry point
1718-------------------------------------------------*/
1719
1720int main(int argc, char *argv[])
1721{
1722    command_entry command_entries[] = {
1723        {"-convert", &command_convert},
1724        {"-view",    &command_view}};
1725    int index;
1726
1727   /* needs at least two arguments */
1728   if (argc < 4)
1729   {
1730      return print_usage();
1731   }
1732
1733    for (index = 0; index < sizeof(command_entries) / sizeof(command_entries[0]); ++index)
1734    {
1735        if (!strcmp(argv[1], command_entries[index].command))
1736            return command_entries[index].command_func(argc - 2, &argv[2]);
1737    }
1738
1739    return print_usage();
1740}
trunk/src/regtests/jedutil/jedtest.wsf
r0r17667
1<?xml version="1.0"?>
2<package>
3    <job id="Test"><?job debug="true" error="true"?>
4        <runtime>
5            <description>This script runs regresion tests on the jedutil tool.</description>
6        </runtime>
7
8        <script language="JScript">
9            <![CDATA[
10                var g_Verbose = false;
11
12                function diffFiles(file1, file2)
13                {
14                    var WshShell = WScript.CreateObject("WScript.Shell");
15                    var oExec;
16                   
17                    if (g_Verbose)
18                    {                   
19                        WScript.Echo("Diff File 1: " + file1);
20                        WScript.Echo("Diff File 2: " + file2);
21                        WScript.Echo();
22                    }
23                   
24                    oExec = WshShell.Exec("diff " + file1 + " " + file2);
25
26                    while (!oExec.Status)
27                    {
28                        WScript.Sleep(100);
29                    }
30                   
31                    if (g_Verbose)
32                    {
33                        WScript.StdOut.WriteLine(oExec.StdOut.ReadAll());
34                        WScript.StdErr.WriteLine(oExec.StdErr.ReadAll());
35                    }
36
37                    return oExec.ExitCode;
38                }
39
40                function runCommandAndCaptureOutput(command, outputFile)
41                {
42                    var WshShell = WScript.CreateObject("WScript.Shell");
43                    var fullCommand;
44                   
45                    fullCommand = "%comspec% /c ";
46                    fullCommand += command;
47                    fullCommand += " > ";
48                    fullCommand += outputFile;
49                    fullCommand += " 2>&1";
50                   
51                    if (g_Verbose)
52                    {
53                        WScript.Echo("Running the command : " + command);
54                        WScript.Echo("Output File:          " + outputFile);
55                        WScript.Echo();
56                    }
57
58                    WshShell.Run(fullCommand, 0, true);
59                }
60
61                function findJedTests(jedsPath, baselinePath, outputPath)
62                {
63                    var fso = new ActiveXObject("Scripting.FileSystemObject");
64                    var folder = fso.GetFolder(jedsPath)
65                    var folderCollection = new Enumerator(folder.files);
66                    var jedArray = new Array();
67                   
68                    while (!folderCollection.atEnd())
69                    {
70                        ++jedArray.length;
71
72                        jedArray[jedArray.length - 1] = new Object;
73                       
74                        jedArray[jedArray.length - 1].name = fso.GetBaseName(folderCollection.item().name);
75                        jedArray[jedArray.length - 1].jedfile = folderCollection.item().path;
76                        jedArray[jedArray.length - 1].baselineFile = baselinePath + "\\" +
77                                                                     jedArray[jedArray.length - 1].name +
78                                                                     ".txt";
79                        jedArray[jedArray.length - 1].outputFile = outputPath + "\\" +
80                                                                   jedArray[jedArray.length - 1].name +
81                                                                   ".txt";
82 
83                        folderCollection.moveNext();
84                    }
85                   
86                    return jedArray;
87                }
88           
89                function runViewJedTests(jedArray, jedUtilApp)
90                {
91                    var command;
92               
93                    for (i = 0; i < jedArray.length; ++i)
94                    {
95                        command = jedUtilApp + " -view " + jedArray[i].jedfile + " " +
96                                  jedArray[i].name;
97                   
98                        if (g_Verbose)
99                        {
100                            WScript.Echo("Viewing the JED file: " + jedArray[i].jedfile);
101                            WScript.Echo();
102                        }
103                   
104                        runCommandAndCaptureOutput(command, jedArray[i].outputFile);
105                    }
106                }
107               
108                function runDiffJedTests(jedArray)
109                {
110                    var result = true;
111                   
112                    for (i = 0; i < jedArray.length; ++i)
113                    {
114                        if (g_Verbose)
115                        {
116                            WScript.Echo("Diffing the output from viewing the JED file: " + jedArray[i].jedfile);
117                        }
118                       
119                        if (diffFiles(jedArray[i].baselineFile, jedArray[i].outputFile))
120                        {
121                            WScript.Echo("Results are different for " + jedArray[i].name);
122                            WScript.Echo();                       
123                           
124                            result = false;
125                        }
126                    }
127                   
128                    return result;
129                }
130           
131                function main()
132                {
133                    var result = 0;
134                    var WshShell = WScript.CreateObject("WScript.Shell");
135                    var fso = new ActiveXObject("Scripting.FileSystemObject");
136                    var jedsPath = WshShell.CurrentDirectory + "\\jeds";
137                    var baselinePath = WshShell.CurrentDirectory + "\\baseline";
138                    var outputPath = WshShell.CurrentDirectory + "\\output";
139                    var jedUtilApp = WshShell.CurrentDirectory + "\\..\\..\\..\\jedutil.exe";
140                    var jedArray = new Array();
141
142                    if (g_Verbose)
143                    {
144                        WScript.Echo("JED Path:      " + jedsPath);
145                        WScript.Echo("Baseline Path: " + baselinePath);
146                        WScript.Echo("Output Path:   " + outputPath);
147                        WScript.Echo("jedutil App:   " + jedUtilApp);
148                        WScript.Echo();
149                    }
150                 
151                    if (fso.FolderExists(outputPath))
152                    {
153                        if (g_Verbose)
154                        {
155                            WScript.Echo("Emptying the output directory");
156                            WScript.Echo();
157                        }
158                   
159                        fso.DeleteFile(outputPath + "\\*.*");
160                    }
161                    else
162                    {
163                        if (g_Verbose)
164                        {
165                            WScript.Echo("Creating the output directory");
166                            WScript.Echo();
167                        }
168                       
169                        fso.CreateFolder(outputPath);
170                    }
171                   
172                    jedArray = findJedTests(jedsPath, baselinePath, outputPath);
173
174                    runViewJedTests(jedArray, jedUtilApp);
175
176                    if (!runDiffJedTests(jedArray))
177                    {
178                        result = 1;
179                    }
180
181                    if (!result)
182                    {
183                        WScript.Echo("All tests ran successfully.");
184                    }
185
186                    return result;
187                }
188
189                try
190                {
191                    var result = main();
192
193                    WScript.Quit(result);
194                }
195                catch (e)
196                {
197                    WScript.Echo("Error Occurred");
198                    WScript.Echo("");
199                    WScript.Echo("Name:        " + e.name);
200                    WScript.Echo("Message:     " + e.message);
201                    WScript.Echo("Number:      " + e.number);
202                    WScript.Echo("Description: " + e.description);
203
204                    WScript.Quit(1);
205                }
206            ]]>
207        </script>
208    </job>
209</package>
Property changes on: trunk/src/regtests/jedutil/jedtest.wsf
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal10l8.txt
r0r17667
1/o12 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2       i9 & i11
3o12.oe = vcc
4
5/o13 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
6       /i9 & i11
7o13.oe = vcc
8
9/o14 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
10       i9 & /i11
11o14.oe = vcc
12
13/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
14       /i9 & /i11
15o15.oe = vcc
16
17/o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
18       /i9 & /i11
19o16.oe = vcc
20
21/o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
22       i9 & /i11
23o17.oe = vcc
24
25/o18 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
26       i11
27o18.oe = vcc
28
29/o19 = i1 & i2 & i3 & i4 & i5 & i6 & i7 & /i8 +
30       /i9
31o19.oe = vcc
32
33
Property changes on: trunk/src/regtests/jedutil/baseline/pal10l8.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal12l6.txt
r0r17667
1/o13 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2       i9 & i11 +
3       /i19 +
4       i12
5o13.oe = vcc
6
7/o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
8       /i9 & i11
9o14.oe = vcc
10
11/o15 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
12       i9 & i11
13o15.oe = vcc
14
15/o16 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
16       /i9 & /i11
17o16.oe = vcc
18
19/o17 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
20       /i9 & /i11
21o17.oe = vcc
22
23/o18 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
24       /i9 & i11 +
25       i19 +
26       /i12
27o18.oe = vcc
28
29
Property changes on: trunk/src/regtests/jedutil/baseline/pal12l6.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal14l4.txt
r0r17667
1/o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2       /i9 & i11 +
3       i12 & /i13 +
4       i18 & i19
5o14.oe = vcc
6
7/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
8       /i9 & /i11 +
9       /i12 & i13 +
10       /i18 & i19
11o15.oe = vcc
12
13/o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
14       /i9 & /i11 +
15       i12 & i13 +
16       i18 & /i19
17o16.oe = vcc
18
19/o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
20       /i9 & i11 +
21       /i12 & /i13 +
22       /i18 & /i19
23o17.oe = vcc
24
25
Property changes on: trunk/src/regtests/jedutil/baseline/pal14l4.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal16l2.txt
r0r17667
1/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
2       /i9 +
3       /i11 +
4       /i12 +
5       i13 +
6       i14 +
7       i17 +
8       i18 & i19
9o15.oe = vcc
10
11/o16 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
12       i9 +
13       i11 +
14       i12 +
15       /i13 +
16       /i14 +
17       /i17 +
18       /i18 & /i19
19o16.oe = vcc
20
21
Property changes on: trunk/src/regtests/jedutil/baseline/pal16l2.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal20l8.txt
r0r17667
1/o15 = /i1 & i2 & /i3 & i4 & i11 +
2       /i1 & i2 & /i3 & /i5 & /i13 +
3       /i1 & i2 & /i3 & i6 & i14 +
4       /i1 & i2 & /i3 & /i7 & /i23 +
5       /i1 & i2 & /i3 & i8 & /i11 +
6       /i1 & i2 & /i3 & /i9 & i13 +
7       /o16
8o15.oe = o16
9
10/o16 = i1 & /i2 & /o17 +
11       i3 & /i4 +
12       i5 & /i6 +
13       i7 & /i8 +
14       i3 & i9 & o17 +
15       i1 & /i2 & i3 & /i4 & i5 & /i6 & i7 & /i8 & /i9 +
16       /i8 & /i9
17o16.oe = vcc
18
19/o17 = /o18 & /i23 +
20       i10 & o18 +
21       i9 +
22       i8 +
23       /i7 +
24       /i6 +
25       i5
26o17.oe = i4 & i5
27
28/o18 = i1 & /i2 & i3 & /i4 & /i8 & i23 +
29       i1 & i2 & i3 & /i4 & /i5 +
30       /i6 & i7 & i8 & i9 & i10 & /o19 +
31       i11 & i13 & i14 & i23 +
32       /i6 & i7 & i8 & i9 & i10 +
33       i3 & i13 & i14 & i23 +
34       i1 & i2 & i3 & /i4 & /i5 & o19
35o18.oe = i1 & i10 & i23
36
37/o19 = i9 & /i10 & i11 & i23 +
38       i9 +
39       /i10 +
40       i11 & o20 +
41       i23 +
42       i2 & /i10 & i23 +
43       i9 & i11
44o19.oe = i8 & /o20
45
46/o20 = o21 +
47       /i2 +
48       /i3 +
49       /i4 +
50       /i5 +
51       /i6 +
52       /i7 & /o21
53o20.oe = vcc
54
55/o21 = i1 & i8 +
56       /i14 +
57       i1 & /i5 & i8 +
58       i23 +
59       i1 & i8 & /i14 +
60       i13 +
61       i1 & i11
62o21.oe = i5 & i6
63
64/o22 = i1 & /i8 +
65       /i8 +
66       i1 +
67       /i10 +
68       /i23 +
69       i8 & /i13 +
70       /i11
71o22.oe = i3 & /i7
72
73
Property changes on: trunk/src/regtests/jedutil/baseline/pal20l8.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal16l8.txt
r0r17667
1/o12 = i3 & i7 & /i9 +
2       i1 & o13 +
3       i3 +
4       /i6 +
5       i8 +
6       /i9 +
7       i7 & /o13
8o12.oe = vcc
9
10/o13 = i11 & /o14 +
11       /i9 +
12       i8 +
13       /i7 +
14       /i6 & o14 +
15       i5 +
16       i4
17o13.oe = i2 & o14
18
19/o14 = i1 & /o15 +
20       /i8 +
21       i1 & /i8 +
22       i1 & /i2 & /o15 +
23       /i2 +
24       i2 & /i8 & o15 +
25       i3
26o14.oe = vcc
27
28/o15 = i3 & i6 & i7 & /i11 +
29       i6 & o16 +
30       i3 & /o16 +
31       i7 +
32       /i11 +
33       i6 & i7 +
34       i7 & /i11
35o15.oe = vcc
36
37/o16 = /i3 & /o17 +
38       /i4 & /i11 +
39       /i3 & /i4 +
40       /i3 & i4 +
41       /i7 & o17 +
42       /i7 & /i11 +
43       i4
44o16.oe = vcc
45
46/o17 = i2 & i5 & i6 & /i7 +
47       i2 & /o18 +
48       i5 +
49       i6 +
50       /i7 & o18 +
51       i2 & /i7 +
52       i5 & i6
53o17.oe = /o16
54
55/o18 = /i2 & i5 & i6 & /i7 +
56       i3 & i6 & i7 & i11 +
57       i3 +
58       /i2 & /i7 +
59       i3 & i11 +
60       i5 & i6 & /i7 +
61       i7 & i11
62o18.oe = vcc
63
64/o19 = i5 & i6 & /i7 & i11 +
65       i3 & i6 & i7 +
66       i5 +
67       i6 +
68       i7 +
69       i11 +
70       /i7
71o19.oe = vcc
72
73
Property changes on: trunk/src/regtests/jedutil/baseline/pal16l8.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal20l10.txt
r0r17667
1/o14 = /i11 +
2       i10 +
3       i9 & /o15
4o14.oe = o15
5
6/o15 = /i1 & i2 & /i3 & i4 & i11 +
7       /i1 & i2 & /i3 & /i5 & /i13 & o16 +
8       /i1 & i2 & /i3 & i6
9o15.oe = /o16
10
11/o16 = i1 & /i2 & /o17 +
12       i3 & /i4 +
13       i3 & i9 & o17
14o16.oe = vcc
15
16/o17 = /o18 +
17       i10 & o18 +
18       i9
19o17.oe = i4 & i5
20
21/o18 = i1 & /i2 & i3 & /i4 & /i8 +
22       /i6 & i7 & i8 & i9 & i10 & /o19 +
23       i1 & i2 & i3 & /i4 & /i5 & o19
24o18.oe = i1 & i10
25
26/o19 = i11 & o20 +
27       i2 & /i10 +
28       i9 & i11
29o19.oe = i8 & /o20
30
31/o20 = o21 +
32       /i6 +
33       /i7 & /o21
34o20.oe = vcc
35
36/o21 = i1 & i8 +
37       /i4 & /o22 +
38       o22
39o21.oe = i5 & i6
40
41/o22 = i1 & /i8 +
42       /i8 +
43       i1
44o22.oe = i3 & /i7
45
46/o23 = i7 +
47       i11 +
48       /i13
49o23.oe = vcc
50
51
Property changes on: trunk/src/regtests/jedutil/baseline/pal20l10.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal16h2.txt
r0r17667
1o15 = i1 & i2 & i3 & /i4 & i5 & /i6 & i7 & i8 +
2      i9 +
3      /i11 +
4      i12 +
5      /i13 +
6      i14 +
7      /i17 +
8      i18 & /i19
9o15.oe = vcc
10
11o16 = i1 & i2 & /i3 & i4 & /i5 & i6 & i7 & i8 +
12      /i9 +
13      i11 +
14      /i12 +
15      i13 +
16      /i14 +
17      i17 +
18      /i18 & i19
19o16.oe = vcc
20
21
Property changes on: trunk/src/regtests/jedutil/baseline/pal16h2.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal14h4.txt
r0r17667
1o14 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2      i9 & i11 +
3      /i12 & /i13 +
4      i18 & /i19
5o14.oe = vcc
6
7o15 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
8      i9 & /i11 +
9      i12 & i13 +
10      /i18 & i19
11o15.oe = vcc
12
13o16 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
14      /i9 & i11 +
15      i12 & /i13 +
16      /i18 & /i19
17o16.oe = vcc
18
19o17 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
20      i9 & i11 +
21      /i12 & i13 +
22      i18 & i19
23o17.oe = vcc
24
25
Property changes on: trunk/src/regtests/jedutil/baseline/pal14h4.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal12h6.txt
r0r17667
1o13 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2      i9 & i11 +
3      /i19 +
4      i12
5o13.oe = vcc
6
7o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
8      /i9 & i11
9o14.oe = vcc
10
11o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
12      /i9 & /i11
13o15.oe = vcc
14
15o16 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
16      i9 & /i11
17o16.oe = vcc
18
19o17 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
20      /i9 & /i11
21o17.oe = vcc
22
23o18 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
24      /i9 & i11 +
25      i19 +
26      /i12
27o18.oe = vcc
28
29
Property changes on: trunk/src/regtests/jedutil/baseline/pal12h6.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/baseline/pal10h8.txt
r0r17667
1o12 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
2      i9 & i11
3o12.oe = vcc
4
5o13 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
6      /i9 & i11
7o13.oe = vcc
8
9o14 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
10      i9 & /i11
11o14.oe = vcc
12
13o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
14      /i9 & /i11
15o15.oe = vcc
16
17o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
18      /i9 & /i11
19o16.oe = vcc
20
21o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
22      i9 & /i11
23o17.oe = vcc
24
25o18 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
26      /i9 & i11
27o18.oe = vcc
28
29o19 = i1 & i2 & i3 & i4 & i5 & i6 & i7 & /i8 +
30      i11
31o19.oe = vcc
32
33
Property changes on: trunk/src/regtests/jedutil/baseline/pal10h8.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal10l8.jed
r0r17667
1
2PAL10L8
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal10l8.eqn". Date: 8-27-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 o12:12 o13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS o19:19 VCC:20*
10QF0320*QP20*F0*
11L0000
1201010101010101101111
1311111111111111111011*
14L0040
1501010101010110011111
1611111111111111111101*
17L0080
1801010101011001011111
1911111111111111110110*
20L0120
2101010101100101011111
2211111111111111111010*
23L0160
2401010110010101011111
2511111111111111111010*
26L0200
2701011001010101011111
2811111111111111110110*
29L0240
3010010101010101011111
3111111111111111111001*
32L0280
3301100101010101011111
3411111111111111110101*
35C1E6E*
360000
Property changes on: trunk/src/regtests/jedutil/jeds/pal10l8.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal12l6.jed
r0r17667
1
2PAL12L6
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal12l6.eqn". Date: 8-27-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 o13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS i19:19 VCC:20*
10QF0384*QP20*F0*
11L0000
12010101110101100101111111
13111111111111111111111001
14111111011111111111111111
15111111111111111111101111*
16L0096
17010101110110010101111111
18111111111111111111111010*
19L0144
20010101111001010101111111
21111111111111111111111010*
22L0192
23010110110101010101111111
24111111111111111111110101*
25L0240
26100101110101010101111111
27111111111111111111111001*
28L0288
29011001110101010101111111
30111111111111111111110101
31111111101111111111111111
32111111111111111111011111*
33C29B8*
340000
Property changes on: trunk/src/regtests/jedutil/jeds/pal12l6.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal14l4.jed
r0r17667
1
2PAL14L4
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "PAL14L4.eqn". Date: 8-24-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 i13:13 o14:14 o15:15 o16:16 o17:17 i18:18*
9NOTE PINS i19:19 VCC:20*
10QF0448*QP20*F0*
11L0000
120101011101110110011101111111
131111111111111111111111111001
141111111111111111111011101111
151111111011101111111111111111*
16L0112
170101011101111001011101111111
181111111111111111111111111010
191111111111111111110111011111
201111111011011111111111111111*
21L0224
220101011110110101011101111111
231111111111111111111111111010
241111111111111111110111101111
251111110111101111111111111111*
26L0336
271001011101110101011101111111
281111111111111111111111111001
291111111111111111111011011111
301111110111011111111111111111*
31C306A*
320000
Property changes on: trunk/src/regtests/jedutil/jeds/pal14l4.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal16l2.jed
r0r17667
1
2PAL16L2
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "PAL16L2.eqn". Date: 8-24-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 i13:13 i14:14 o15:15 o16:16 i17:17 i18:18*
9NOTE PINS i19:19 VCC:20*
10QF0512*QP20*F0*
11L0000
1201010111011101110111101101111111
1311111111111111111111111111110111
1411111111111111111111111111111101
1511111111111111111111111111011111
1611111111111111111111111011111111
1711111111111111111110111111111111
1811111111111111101111111111111111
1911111110111011111111111111111111*
20L0256
2101010111101101110111011101111111
2211111111111111111111111111111011
2311111111111111111111111111111110
2411111111111111111111111111101111
2511111111111111111111110111111111
2611111111111111111101111111111111
2711111111111111011111111111111111
2811111101110111111111111111111111*
29C3BEB*
300000
Property changes on: trunk/src/regtests/jedutil/jeds/pal16l2.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal20l8.jed
r0r17667
1
2PAL20L8
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "PAL20L8.eqn". Date: 8-30-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 i10:10*
8NOTE PINS i11:11 GND:12 i13:13 i14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS o19:19 o20:20 o21:21 o22:22 i23:23 VCC:24*
10QF2560*QP24*F0*
11L0000
121111011111111111111110111111111111111111
131101111111111111111111111011111111111111
141111111111111111111111111011111111111111
151101111111111111111111111111111111111111
161111111111111111111111111111111110111111
171111111011111111111111111111111111111111
181111111111111111111111110111111111111110
191111111111111111111111111111111111111011*
20L0320
211111111111110111011111111111111111111111
221101111111111111111111110111111111111111
231111111111111111111111111111111111101111
241101111111111011111111110111111111111111
251111110111111111111111111111111111111111
261101111111111111111111110111111111101111
271111111111111111111111111111111111111101
281101111111111111111111111111111111110111*
29L0640
301111111111111111111111111111111111111111
311111111111011111111111111111111111111111
321011111111111111111111111111111111111111
331111101111111111111111111111111111111111
341111111110111111111111111111111111111111
351111111111111011111111111111111111111111
361111111111111111101111111111111111111111
371111111111101111111110111111111111111111*
38L0960
391111111111111110111111110111111111111111
401111110111111111111111111111011110110111
411111111111111111111111111111011111111111
421111111111111111111111111111111110111111
431111111111111101111111111111111111110111
441111110111111111111111111111111111111111
450111110111111111111111111111111110111111
461111111111111111111111111111011111110111*
47L1280
481101110111111111111111111111111101111111
491001010110111111111111111011111111111111
500101011110111011111111111111111111111111
511111111111111111101001110111011101111111
521111110111111111111111111111111111010101
531111111111111111101101110111011101111111
541111010111111111111111111111111111011101
550101011110111011110111111111111111111111*
56L1600
571111111101110111111111111111111111111111
581111111011111111111111101111111111111111
591111111111111111111111011111111101111111
601111111111111111111111111111011111111111
611111111111111111111111110111111111111111
621111111111111111111110111111111111111111
631111111111111111101111111111111111111111
641111111111110111111111111111111111111111*
65L1920
661111111111111111111111111111111111111111
671001111111111111111111111110111111111111
681111011110111111111111111111111111111111
691111111111110111101111111111111111111111
701111111111111111111101111011111111111111
711111011111111111111111111101011111111111
721001011110110111101101111011101111111111
731111111111111111111111111011101111111111*
74L2240
751111111111111111111111111111110111111111
760110101101111111111111111111111111110111
770110101111111011111111111111111111111110
780110101111111111011111111111111111011111
790110101011111111111110111111111111111111
800110101111111111111111110111111111111011
810110101111111111111111111111101111111101
821111111111111111111111111111111011111111*
83C3192*
840000
Property changes on: trunk/src/regtests/jedutil/jeds/pal20l8.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal16l8.jed
r0r17667
1
2PAL16L8
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal16l8.eqn". Date: 8-29-112
6md
7*
8NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
9NOTE PINS i11:11 o12:12 o13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
10NOTE PINS o19:19 VCC:20*
11QF2048*QP20*F0*
12L0000
1311111111111111111111111111111111
1411111111111101110111101111111101
1511110111111111110111011111111111
1611111111111101111111111111111111
1711111111111111110111111111111111
1811111111111111111111011111111111
1911111111111111111111111111111101
2011111111111111111111101111111111*
21L0256
2211111111111111111111111111111111
2310111111111101110111101111111111
2411110111111111110111011111111101
2511110111111111111111111111111111
2610111111111111111111101111111111
2711110111111111111111111111111101
2811111111111101110111101111111111
2911111111111111111111011111111101*
30L0512
3111111111111111101111111111111111
3201111111111101110111101111111111
3301111110111111111111111111111111
3411111111111101111111111111111111
3511111111111111110111111111111111
3611111101111111111111101111111111
3701111111111111111111101111111111
3811111111111101110111111111111111*
39L0768
4011111111111111111111111111111111
4111111011111011111111111111111111
4211111111101111111111111111111110
4311111011101111111111111111111111
4411111011011111111111111111111111
4511111111110111111111101111111111
4611111111111111111111101111111110
4711111111011111111111111111111111*
48L1024
4911111111111111111111111111111111
5011110111111111110111011111111110
5111111111111111010111111111111111
5211110111111111101111111111111111
5311111111111111111111011111111111
5411111111111111111111111111111110
5511111111111111110111011111111111
5611111111111111111111011111111110*
57L1280
5811111111111111111111111111111111
5911011111111111111110111111111111
6011111111111111111111111110111111
6111011111111111111111111110111111
6210011111111111111110111111111111
6310111111111111111111111111111111
6401111111111111111101111110111111
6511110111111111111111111111111111*
66L1536
6701111111111111111111110111111111
6811111111111111111111111011111101
6911111111111111111111111111111011
7011111111111111111111111101111111
7111111111111111111111101111111111
7211111111111111111011110111111111
7311111111111101111111111111111111
7411111111011111111111111111111111*
75L1792
7611111111111111111111111111111111
7711110111111111111111011111111011
7811011111111111111111111111011111
7911110111111111111111111111111111
8011111111111111111011111111111111
8111111111111111111111111101111111
8211111111111111111111111111111011
8311111111111111111111011111101111*
84CF3C8*
850000
Property changes on: trunk/src/regtests/jedutil/jeds/pal16l8.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal20l10.jed
r0r17667
1
2PAL20L10
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal20l10.eqn". Date: 8-31-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 i10:10*
8NOTE PINS i11:11 GND:12 i13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS o19:19 o20:20 o21:21 o22:22 o23:23 VCC:24*
10QF1600*QP24*F0*
11L0000
121111111111111111111111111111111111111111
131111111111111111111101111111111111111111
141111111111111111111111111111111111110111
151111111111111111111111111111111111111110*
16L0160
171111011111111111111110111111111111111111
181101111111111111111111111011111111111111
191111111111111111111111111011111111111111
201101111111111111111111111111111111111111*
21L0320
221111111111110111011111111111111111111111
231101111111111111111111110111111111111111
241111111010111111111111111111111111111111
251111110111111111111111111111111111111111*
26L0480
271111111111111111111111111111111111111111
281111111111011111111111111111111111111111
291111111111111111101111111111111111111111
301111111111101111111110111111111111111111*
31L0640
321111111111111110111111110111111111111111
331111111111111101111111111111111111110111
340111111111111111111111111111111110111111
351111111111111111111111111111011111110111*
36L0800
371101111111111111111111111111111101111111
381001011110111111111111111011111111111111
391111111111111111101001110111011101111111
400101011110111011110111111111111111111111*
41L0960
421111111101110111111111111111111111111111
431111111111111111111111101111111111111111
441111111111111111111111011111111101111111
451111111111111111111111111111011111111111*
46L1120
471111111111111111111111111111111111111111
481001111111111111111111111110111111111111
491111011110111111111111111111111111111111
501111011111111111111111111101011111111111*
51L1280
521111111111111111111111111111111011111111
530110101101111111111111111111111111110111
540110101111111011111111111111110111111110
550110101111111111011111111111111111111111*
56L1440
571111111111111111111111111111111111011111
581111111111111111111111111111111111111011
591111111111111111111111111111111101111111
601111111111111111111111111111011111101111*
61CC08C*
620000
Property changes on: trunk/src/regtests/jedutil/jeds/pal20l10.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal16h2.jed
r0r17667
1
2PAL16H2
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "PAL16H2.eqn". Date: 8-24-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 i13:13 i14:14 o15:15 o16:16 i17:17 i18:18*
9NOTE PINS i19:19 VCC:20*
10QF0512*QP20*F0*
11L0000
1201011011011110110111011101111111
1311111111111111111111111111111011
1411111111111111111111111111111101
1511111111111111111111111111101111
1611111111111111111111110111111111
1711111111111111111110111111111111
1811111111111111011111111111111111
1911111101111011111111111111111111*
20L0256
2101010111101101111011011101111111
2211111111111111111111111111110111
2311111111111111111111111111111110
2411111111111111111111111111011111
2511111111111111111111111011111111
2611111111111111111101111111111111
2711111111111111101111111111111111
2811111110110111111111111111111111*
29C3BDA*
300000
Property changes on: trunk/src/regtests/jedutil/jeds/pal16h2.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal14h4.jed
r0r17667
1
2PAL14H4
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "PAL14H4.eqn". Date: 8-24-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 i13:13 o14:14 o15:15 o16:16 o17:17 i18:18*
9NOTE PINS i19:19 VCC:20*
10QF0448*QP20*F0*
11L0000
120101011110110101011101111111
131111111111111111111111110101
141111111111111111110111101111
151111110111011111111111111111*
16L0112
170101101101110101011101111111
181111111111111111111111111001
191111111111111111111011011111
201111111011101111111111111111*
21L0224
221001011101110101011101111111
231111111111111111111111110110
241111111111111111110111011111
251111110111101111111111111111*
26L0336
270110011101110101011101111111
281111111111111111111111110101
291111111111111111111011101111
301111111011011111111111111111*
31C3116*
320000
Property changes on: trunk/src/regtests/jedutil/jeds/pal14h4.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal12h6.jed
r0r17667
1
2PAL12H6
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal12h6.eqn". Date: 8-27-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 i12:12 o13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS i19:19 VCC:20*
10QF0384*QP20*F0*
11L0000
12010101110101100101111111
13111111111111111111111001
14111111011111111111111111
15111111111111111111101111*
16L0096
17010101110110010101111111
18111111111111111111111010*
19L0144
20010101110101011001111111
21111111111111111111110110*
22L0192
23010101111001010101111111
24111111111111111111111010*
25L0240
26100101110101010101111111
27111111111111111111111001*
28L0288
29011001110101010101111111
30111111111111111111110101
31111111101111111111111111
32111111111111111111011111*
33C2948*
340000
Property changes on: trunk/src/regtests/jedutil/jeds/pal12h6.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/jeds/pal10h8.jed
r0r17667
1
2PAL10H8
3EQN2JED - Boolean Equations to JEDEC file assembler (Version V101)
4Copyright (c) National Semiconductor Corporation 1990-1993
5Assembled from "pal10h8.eqn". Date: 8-27-112
6*
7NOTE PINS i1:1 i2:2 i3:3 i4:4 i5:5 i6:6 i7:7 i8:8 i9:9 GND:10*
8NOTE PINS i11:11 o12:12 o13:13 o14:14 o15:15 o16:16 o17:17 o18:18*
9NOTE PINS o19:19 VCC:20*
10QF0320*QP20*F0*
11L0000
1201010101010101101111
1311111111111111111101*
14L0040
1501010101010110011111
1611111111111111111001*
17L0080
1801010101011001011111
1911111111111111110110*
20L0120
2101010101100101011111
2211111111111111111010*
23L0160
2401010110010101011111
2511111111111111111010*
26L0200
2701011001010101011111
2811111111111111110110*
29L0240
3010010101010101011111
3111111111111111111001*
32L0280
3301100101010101011111
3411111111111111110101*
35C1E2E*
360000
Property changes on: trunk/src/regtests/jedutil/jeds/pal10h8.jed
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal10h8.eqn
r0r17667
1chip 2000 PAL10H8
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4o12=12 o13=13 o14=14 o15=15 o16=16 o17=17 o18=18 o19=19 VCC=20
5
6equations
7
8o12 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9      i9 & i11
10
11o13 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
12      /i9 & i11
13
14o14 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
15      i9 & /i11
16
17o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
18      /i9 & /i11
19
20o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
21      /i9 & /i11
22
23o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
24      i9 & /i11
25
26o18 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
27      /i9 & i11
28
29o19 = i1 & i2 & i3 & i4 & i5 & i6 & i7 & /i8 +
30      i11
Property changes on: trunk/src/regtests/jedutil/eqns/pal10h8.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal12h6.eqn
r0r17667
1chip 2000 PAL12H6
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 o13=13 o14=14 o15=15 o16=16 o17=17 o18=18 i19=19 VCC=20
5
6equations
7
8o13 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9      i9 & i11 +
10      /i19 +
11      i12
12
13o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
14      /i9 & i11
15
16o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
17      /i9 & /i11
18
19o16 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
20      i9 & /i11
21
22o17 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
23      /i9 & /i11
24
25o18 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
26      /i9 & i11 +
27      i19 +
28      /i12
Property changes on: trunk/src/regtests/jedutil/eqns/pal12h6.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal14h4.eqn
r0r17667
1chip 2000 PAL14H4
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 i13=13 o14=14 o15=15 o16=16 o17=17 i18=18 i19=19 VCC=20
5
6equations
7
8o14 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9      i9 & i11 +
10      /i12 & /i13 +
11      i18 & /i19
12
13o15 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
14      i9 & /i11 +
15      i12 & i13 +
16      /i18 & i19
17
18o16 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
19      /i9 & i11 +
20      i12 & /i13 +
21      /i18 & /i19
22
23o17 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
24      i9 & i11 +
25      /i12 & i13 +
26      i18 & i19
Property changes on: trunk/src/regtests/jedutil/eqns/pal14h4.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal16h2.eqn
r0r17667
1chip 2000 PAL16H2
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 i13=13 i14=14 o15=15 o16=16 i17=17 i18=18 i19=19 VCC=20
5
6equations
7
8o15 = i1 & i2 & i3 & /i4 & i5 & /i6 & i7 & i8 +
9      i9 +
10      /i11 +
11      i12 +
12      /i13 +
13      i14 +
14      /i17 +
15      i18 & /i19
16
17o16 = i1 & i2 & /i3 & i4 & /i5 & i6 & i7 & i8 +
18      /i9 +
19      i11 +
20      /i12 +
21      i13 +
22      /i14 +
23      i17 +
24      /i18 & i19
Property changes on: trunk/src/regtests/jedutil/eqns/pal16h2.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal16l2.eqn
r0r17667
1chip 2000 PAL16L2
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 i13=13 i14=14 o15=15 o16=16 i17=17 i18=18 i19=19 VCC=20
5
6equations
7
8/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
9       /i9 +
10       /i11 +
11       /i12 +
12       i13 +
13       i14 +
14       i17 +
15       i18 & i19
16
17/o16 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
18       i9 +
19       i11 +
20       i12 +
21       /i13 +
22       /i14 +
23       /i17 +
24       /i18 & /i19
Property changes on: trunk/src/regtests/jedutil/eqns/pal16l2.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal14l4.eqn
r0r17667
1chip 2000 PAL14L4
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 i13=13 o14=14 o15=15 o16=16 o17=17 i18=18 i19=19 VCC=20
5
6equations
7
8/o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9       /i9 & i11 +
10       i12 & /i13 +
11       i18 & i19
12
13/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
14       /i9 & /i11 +
15       /i12 & i13 +
16       /i18 & i19
17
18/o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
19       /i9 & /i11 +
20       i12 & i13 +
21       i18 & /i19
22
23/o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
24       /i9 & i11 +
25       /i12 & /i13 +
26       /i18 & /i19
Property changes on: trunk/src/regtests/jedutil/eqns/pal14l4.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal12l6.eqn
r0r17667
1chip 2000 PAL12L6
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4i12=12 o13=13 o14=14 o15=15 o16=16 o17=17 o18=18 i19=19 VCC=20
5
6equations
7
8/o13 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9       i9 & i11 +
10       /i19 +
11       i12
12
13/o14 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
14       /i9 & i11
15
16/o15 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
17       i9 & i11
18
19/o16 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
20       /i9 & /i11
21
22/o17 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
23       /i9 & /i11
24
25/o18 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
26       /i9 & i11 +
27       i19 +
28       /i12
Property changes on: trunk/src/regtests/jedutil/eqns/pal12l6.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal10l8.eqn
r0r17667
1chip 2000 PAL10L8
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 i11=11
4o12=12 o13=13 o14=14 o15=15 o16=16 o17=17 o18=18 o19=19 VCC=20
5
6equations
7
8/o12 = /i1 & i2 & i3 & i4 & i5 & i6 & i7 & i8 +
9       i9 & i11
10
11/o13 = i1 & /i2 & i3 & i4 & i5 & i6 & i7 & i8 +
12       /i9 & i11
13
14/o14 = i1 & i2 & /i3 & i4 & i5 & i6 & i7 & i8 +
15       i9 & /i11
16
17/o15 = i1 & i2 & i3 & /i4 & i5 & i6 & i7 & i8 +
18       /i9 & /i11
19
20/o16 = i1 & i2 & i3 & i4 & /i5 & i6 & i7 & i8 +
21       /i9 & /i11
22
23/o17 = i1 & i2 & i3 & i4 & i5 & /i6 & i7 & i8 +
24       i9 & /i11
25
26/o18 = i1 & i2 & i3 & i4 & i5 & i6 & /i7 & i8 +
27       i11
28
29/o19 = i1 & i2 & i3 & i4 & i5 & i6 & i7 & /i8 +
30       /i9
Property changes on: trunk/src/regtests/jedutil/eqns/pal10l8.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal20l8.eqn
r0r17667
1chip 2000 PAL20L8
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 i10=10 i11=11 GND=12
4i13=13 i14=14 o15=15 o16=16 o17=17 o18=18 o19=19 o20=20 o21=21 o22=22 i23=23 VCC=24
5
6equations
7
8/o15 = /i1 & i2 & /i3 & i4 & i11 +
9       /i1 & i2 & /i3 & /i5 & /i13 +
10       /i1 & i2 & /i3 & i6 & i14 +
11       /i1 & i2 & /i3 & /i7 & /i23 +
12       /i1 & i2 & /i3 & i8 & /i11 +
13       /i1 & i2 & /i3 & /i9 & i13 +
14       /o16
15o15.oe = o16
16
17/o16 = i1 & /i2 & /o17 +
18       i3 & /i4 +
19       i5 & /i6 +
20       i7 & /i8 +
21       i3 & i9 & o17 +
22       i1 & /i2 & i3 & /i4 & i5 & /i6 & i7 & /i8 & /i9 +
23       /i8 & /i9
24o16.oe = vcc
25
26/o17 = /i23 & /o18 +
27       i10 & o18 +
28       i9 +
29       i8 +
30       /i7 +
31       /i6 +
32       i5
33o17.oe = i4 & i5
34
35/o18 = i1 & /i2 & i3 & /i4 & /i8 & i23 +
36       i1 & i2 & i3 & /i4 & /i5 +
37       /i6 & i7 & i8 & i9 & i10 & /o19 +
38       i11 & i13 & i14 & i23 +
39       /i6 & i7 & i8 & i9 & i10 +
40       i3 & i13 & i14 & i23 +
41       i1 & i2 & i3 & /i4 & /i5 & o19
42o18.oe = i1 & i10 & i23
43
44/o19 = i9 & /i10 & i11 & i23 +
45       i9 +
46       /i10 +
47       i11 & o20 +
48       i23 +
49       i2 & /i10 & i23 +
50       i9 & i11
51o19.oe = i8 & /o20
52
53/o20 = o21 +
54       /i2 +
55       /i3 +
56       /i4 +
57       /i5 +
58       /i6 +
59       /i7 & /o21
60o20.oe = vcc
61
62/o21 = i1 & i8 +
63       /i14 +
64       i1 & /i5 & i8 +
65       i23 +
66       i1 & i8 & /i14 +
67       i13 +
68       i1 & i11
69o21.oe = i5 & i6
70
71/o22 = i1 & /i8 +
72       /i8 +
73       i1 +
74       /i10 +
75       /i23 +
76       i8 & /i13 +
77       /i11
78o22.oe = i3 & /i7
Property changes on: trunk/src/regtests/jedutil/eqns/pal20l8.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal16l8.eqn
r0r17667
1md
2chip 2000 PAL16L8
3
4i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10
5i11=11 o12=12 o13=13 o14=14 o15=15 o16=16 o17=17 o18=18 o19=19 VCC=20
6
7equations
8
9/o12 = i3 & i7 & /i9 +
10       i1 & o13 +
11       i3 +
12       /i6 +
13       i8 +
14       /i9 +
15       i7 & /o13
16o12.oe = vcc
17
18/o13 = i11 & /o14 +
19       /i9 +
20       i8 +
21       /i7 +
22       /i6 & o14 +
23       i5 +
24       i4
25o13.oe = i2 & o14
26
27/o14 = i1 & /o15 +
28       /i8 +
29       i1 & /i8 +
30       i1 & /i2 & /o15 +
31       /i2 +
32       i2 & /i8 & o15 +
33       i3
34o14.oe = vcc
35
36/o15 = i3 & i6 & i7 & /i11 +
37       i6 & o16 +
38       i3 & /o16 +
39       i7 +
40       /i11 +
41       i6 & i7 +
42       i7 & /i11
43o15.oe = vcc
44
45/o16 = /i3 & /o17 +
46       /i4 & /i11 +
47       /i4 & /i3 +
48       /i3 & i4 +
49       /i7 & o17 +
50       /i7 & /i11 +
51       i4
52o16.oe = vcc
53
54/o17 = i2 & i5 & i6 & /i7 +
55       i2 & /o18 +
56       i5 +
57       i6 +
58       /i7 & o18 +
59       i2 & /i7 +
60       i5 & i6
61o17.oe = /o16
62
63/o18 = /i2 & i5 & i6 & /i7 +
64       i3 & i6 & i7 & i11 +
65       i3 +
66       /i2 & /i7 +
67       i3 & i11 +
68       i5 & i6 & /i7 +
69       i7 & i11
70o18.oe = vcc
71
72/o19 = i5 & i6 & /i7 & i11 +
73       i3 & i6 & i7 +
74       i5 +
75       i6 +
76       i7 +
77       i11 +
78       /i7
79o19.oe = vcc
Property changes on: trunk/src/regtests/jedutil/eqns/pal16l8.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/readme.txt
r0r17667
1This files are for use with the utility eqn2jed which is a tool included with Opal Jr.  The tools takes this equation files and automatically creates a jed file.
Property changes on: trunk/src/regtests/jedutil/eqns/readme.txt
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
trunk/src/regtests/jedutil/eqns/pal20l10.eqn
r0r17667
1chip 2000 PAL20L10
2
3i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 i10=10 i11=11 GND=12
4i13=13 o14=14 o15=15 o16=16 o17=17 o18=18 o19=19 o20=20 o21=21 o22=22 o23=23 VCC=24
5
6equations
7
8/o14 = /i11 +
9       i10 +
10       i9 & /o15
11o14.oe = o15
12
13/o15 = /i1 & i2 & /i3 & i4 & i11 +
14       /i1 & i2 & /i3 & /i5 & /i13 & o16 +
15       /i1 & i2 & /i3 & i6
16o15.oe = /o16
17
18/o16 = i1 & /i2 & /o17 +
19       i3 & /i4 +
20       i3 & i9 & o17
21o16.oe = vcc
22
23/o17 = /o18 +
24       i10 & o18 +
25       i9
26o17.oe = i4 & i5
27
28/o18 = i1 & /i2 & i3 & /i4 & /i8 +
29       /i6 & i7 & i8 & i9 & i10 & /o19 +
30       i1 & i2 & i3 & /i4 & /i5 & o19
31o18.oe = i1 & i10
32
33/o19 = i11 & o20 +
34       i2 & /i10 +
35       i9 & i11
36o19.oe = i8 & /o20
37
38/o20 = o21 +
39       /i6 +
40       /i7 & /o21
41o20.oe = vcc
42
43/o21 = i1 & i8 +
44       /i4 & /o22 +
45       o22
46o21.oe = i5 & i6
47
48/o22 = i1 & /i8 +
49       /i8 +
50       i1
51o22.oe = i3 & /i7
52
53/o23 = i7 +
54       i11 +
55       /i13
56o23.oe = vcc
Property changes on: trunk/src/regtests/jedutil/eqns/pal20l10.eqn
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Previous 199869 Revisions Next


© 1997-2024 The MAME Team