Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 11 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* $Id: print_quartus.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ */ |
1 | /* $Id: print_quartus.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ */ |
2 | /* Quartus pin fit file creator |
2 | /* Quartus pin fit file creator |
3 | * |
3 | * |
4 | * $Log: print_quartus.c,v $ |
4 | * $Log: print_quartus.c,v $ |
5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
6 | * Imported into local repositrory |
6 | * Imported into local repositrory |
7 | * |
7 | * |
Line 55... | Line 55... | ||
55 | * |
55 | * |
56 | * Revision 1.1 2001/06/06 12:10:19 mjames |
56 | * Revision 1.1 2001/06/06 12:10:19 mjames |
57 | * Move from HPUX |
57 | * Move from HPUX |
58 | * */ |
58 | * */ |
59 | /* ********************************************************************** */ |
59 | /* ********************************************************************** */ |
- | 60 | #include <stdio.h> |
|
- | 61 | #include <string.h> |
|
60 | #include "cmdlog.h" |
62 | #include <stdlib.h> |
61 | #include "cmdparse.h" |
63 | #include <ctype.h> |
62 | #include "database.h" |
64 | #include <time.h> |
- | 65 | #include <sys/types.h> |
|
- | 66 | #include <regex.h> |
|
- | 67 | ||
63 | #include "equivalent.h" |
68 | #include "vertcl_main.h" |
64 | #include "expression.h" |
69 | #include "expression.h" |
65 | #include "generic.h" |
70 | #include "generic.h" |
- | 71 | #include "database.h" |
|
- | 72 | #include "printout.h" |
|
66 | #include "print_vhdl.h" |
73 | #include "print_vhdl.h" |
67 | #include "print_vlog.h" |
74 | #include "print_vlog.h" |
68 | #include "printout.h" |
- | |
69 | #include "sorting.h" |
75 | #include "sorting.h" |
70 | #include "vertcl_main.h" |
- | |
71 | - | ||
72 | #include <ctype.h> |
76 | #include "cmdparse.h" |
73 | #include <regex.h> |
- | |
74 | #include <stdio.h> |
- | |
75 | #include <stdlib.h> |
77 | #include "cmdlog.h" |
76 | #include <string.h> |
78 | #include "equivalent.h" |
77 | #include <sys/types.h> |
- | |
78 | #include <time.h> |
- | |
79 | 79 | ||
80 | #if defined NEED_DECODE_PIN |
80 | #if defined NEED_DECODE_PIN |
81 | static char *decode_quartus_pin[] = {"NONE", |
81 | static char * decode_quartus_pin[]= |
- | 82 | { |
|
- | 83 | "NONE", |
|
82 | "input", |
84 | "input", |
83 | "output", |
85 | "output", |
84 | "output", /* buffer is a sort of Output pin (lower case is |
86 | "output", /* buffer is a sort of Output pin (lower case is for info only )*/ |
85 | for info only )*/ |
- | |
86 | "inout", |
87 | "inout", |
87 | "CONFIG_PIN", |
88 | "CONFIG_PIN", |
88 | "POWER_PIN"}; |
89 | "POWER_PIN"}; |
89 | #endif |
90 | #endif |
90 | 91 | ||
- | 92 | ||
91 | void print_quartus_pinfit (FILE *f, socket_t *dev, int options) |
93 | void print_quartus_pinfit(FILE * f,socket_t * dev, int options) |
92 | { |
94 | { |
93 | node_t *n; |
95 | node_t * n; |
- | 96 | ||
- | 97 | /* sort all the nodes into alphabetical order */ |
|
- | 98 | sort_nodes(dev,NO_EXTRACT_XY); |
|
- | 99 | ||
- | 100 | ||
- | 101 | if(dev->is_external) |
|
- | 102 | fprintf(f,"# External Connection\n\n"); |
|
- | 103 | else |
|
- | 104 | fprintf(f,"# Internal Socket\n\n"); |
|
- | 105 | /* if it hasnt got a name, use its identifier */ |
|
- | 106 | ||
- | 107 | if(!ISNULLSTR(dev->name)) |
|
- | 108 | fprintf(f,"CHIP (%s) {\n",check_null_str(dev->name)); |
|
- | 109 | else |
|
- | 110 | fprintf(f,"CHIP (%s) {\n",dev->identifier); |
|
- | 111 | ||
- | 112 | if (!ISNULLSTR(dev->type)) |
|
- | 113 | { |
|
- | 114 | fprintf(f," ASSIGNED TO AN \"%s\";\n",check_null_str(dev->type)); |
|
- | 115 | } |
|
- | 116 | ||
- | 117 | n=dev->nodes; |
|
- | 118 | ||
- | 119 | while(n) { |
|
- | 120 | if(n->net && IS_ROUTABLE(n->net->how_routed) && (n->net->list_ref == &named_list)) { |
|
- | 121 | fprintf(f,"\t%-20s : LOCATION = Pin_%-10s;\n", |
|
- | 122 | n->net->name, |
|
- | 123 | n->identifier); |
|
- | 124 | } |
|
- | 125 | n=n->sktnext; /* traverse to next pin on socket */ |
|
- | 126 | }; |
|
94 | 127 | ||
95 | /* sort all the nodes into alphabetical order */ |
- | |
96 | sort_nodes (dev, NO_EXTRACT_XY); |
128 | fprintf(f," }\n"); |
- | 129 | ||
- | 130 | } |
|
97 | 131 | ||
98 | if (dev->is_external) |
- | |
99 | fprintf (f, "# External Connection\n\n"); |
- | |
100 | else |
- | |
101 | fprintf (f, "# Internal Socket\n\n"); |
- | |
102 | /* if it hasnt got a name, use its identifier */ |
- | |
103 | - | ||
104 | if (!ISNULLSTR (dev->name)) |
- | |
105 | fprintf (f, "CHIP (%s) {\n", check_null_str (dev->name)); |
- | |
106 | else |
- | |
107 | fprintf (f, "CHIP (%s) {\n", dev->identifier); |
- | |
108 | - | ||
109 | if (!ISNULLSTR (dev->type)) |
- | |
110 | { |
- | |
111 | fprintf (f, " ASSIGNED TO AN \"%s\";\n", check_null_str (dev->type)); |
- | |
112 | } |
- | |
113 | - | ||
114 | n = dev->nodes; |
- | |
115 | - | ||
116 | while (n) |
- | |
117 | { |
- | |
118 | if (n->net && IS_ROUTABLE (n->net->how_routed) && |
- | |
119 | (n->net->list_ref == &named_list)) |
- | |
120 | { |
- | |
121 | fprintf ( |
- | |
122 | f, |
- | |
123 | "\t%-20s : LOCATION = Pin_%-10s;\n", |
- | |
124 | n->net->name, |
- | |
125 | n->identifier); |
- | |
126 | } |
- | |
127 | n = n->sktnext; /* traverse to next pin on socket */ |
- | |
128 | }; |
- | |
129 | 132 | ||
130 | fprintf (f, " }\n"); |
- | |
131 | } |
- |