forked from JackHack96/logic-synthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjedi.c
76 lines (66 loc) · 1.38 KB
/
jedi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* Symbolic encoding program for compiling a symbolic
* description into a binary representation. Target
* is multi-level logic synthesis
*
* History:
*
* Bill Lin
* University of California, Berkeley
* Comments to [email protected]
*
* Copyright (c) 1989 Bill Lin, UC Berkeley CAD Group
* Permission is granted to do anything with this
* code except sell it or remove this message.
*/
#include "jedi.h"
FILE *infp; /* input file pointer */
FILE *outfp; /* output file pointer */
main(argc, argv)
int argc;
char **argv;
{
/*
* parse options
*/
parse_options(argc, argv);
/*
* read input from stdin
*/
if (kissFlag) {
read_kiss(infp, outfp);
} else {
read_input(infp, outfp);
}
/*
* check if one hot
*/
if (hotFlag) {
write_one_hot(outfp);
(void) exit(0);
}
/*
* compute weights
*/
if (!sequentialFlag && !srandomFlag && !drandomFlag) {
compute_weights();
}
/*
* solve the embedding problem
*/
if (srandomFlag || drandomFlag) {
random_embedding();
} else if (clusterFlag) {
cluster_embedding();
} else if (!sequentialFlag) {
opt_embedding();
}
if (kissFlag && !plaFlag) {
write_blif(outfp);
} else if (kissFlag && plaFlag) {
write_output(outfp);
} else {
write_output(outfp);
}
(void) exit(0);
} /* end of main */