Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /* $Id: print_quartus.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ */ |
| 11 | mjames | 2 | /* Quartus pin fit file creator |
| 2 | mjames | 3 | * |
| 4 | * $Log: print_quartus.c,v $ |
||
| 5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
||
| 6 | * Imported into local repositrory |
||
| 7 | * |
||
| 8 | * Revision 1.12 2003/01/02 21:37:16 mjames |
||
| 9 | * Experiment on creating NOT_ROUTABLE_H and NOT_ROUTABLE_L |
||
| 10 | * properties on the nets so that pin jumpers can be made without a problem. |
||
| 11 | * |
||
| 12 | * Still need to sort out pin assignments made to these not_routable nets |
||
| 13 | * which will become legal in some cases so that pullups and pulldown |
||
| 14 | * pins can be used on the FPGA. |
||
| 15 | * |
||
| 16 | * Revision 1.11 2002/09/09 10:12:02 mjames |
||
| 17 | * Moved pin remapping function to pin ident editing function from |
||
| 18 | * sorting pin name routine. |
||
| 19 | * |
||
| 20 | * Revision 1.10 2002/08/14 12:06:41 mjames |
||
| 21 | * Removed debug level setting function that should not have been here |
||
| 22 | * |
||
| 23 | * Revision 1.9 2002/08/06 12:52:38 mjames |
||
| 24 | * Merge in from latest version |
||
| 25 | * |
||
| 26 | * |
||
| 27 | * Revision 1.9 2002/04/10 14:29:10 mjames |
||
| 28 | * Moved setting debug level to cmdutil.c |
||
| 29 | * |
||
| 30 | * Amended print external command to list all net names on socket pins |
||
| 31 | * whether routed or not. |
||
| 32 | * |
||
| 33 | * Revision 1.8 2002/01/16 10:08:13 mjames |
||
| 34 | * removed unused variable |
||
| 35 | * |
||
| 36 | * Revision 1.7 2001/10/31 22:20:12 mjames |
||
| 37 | * Tidying up problematical comments caused by CVS |
||
| 38 | * 'intelligent' comment guessing |
||
| 39 | * |
||
| 40 | * Revision 1.6 2001/10/22 10:58:18 mjames |
||
| 41 | * Added required header files |
||
| 42 | * |
||
| 43 | * Revision 1.5 2001/09/21 14:20:38 mjames |
||
| 44 | * Changed layout of printout to include device type if needed |
||
| 45 | * |
||
| 46 | * Revision 1.4 2001/07/09 15:38:02 mjames |
||
| 47 | * Corrected printout errors that made reference to deleted net objects. |
||
| 48 | * |
||
| 49 | * Revision 1.3 2001/07/09 09:34:23 mjames |
||
| 50 | * Printing only named nets that are routable, to create |
||
| 51 | * the correct Quatus configuration file |
||
| 52 | * |
||
| 53 | * Revision 1.2 2001/07/06 12:47:13 MJAMES |
||
| 54 | * Slight changes made for use with Quartus |
||
| 55 | * |
||
| 56 | * Revision 1.1 2001/06/06 12:10:19 mjames |
||
| 57 | * Move from HPUX |
||
| 58 | * */ |
||
| 59 | /* ********************************************************************** */ |
||
| 11 | mjames | 60 | #include <stdio.h> |
| 61 | #include <string.h> |
||
| 62 | #include <stdlib.h> |
||
| 63 | #include <ctype.h> |
||
| 64 | #include <time.h> |
||
| 65 | #include <sys/types.h> |
||
| 66 | #include <regex.h> |
||
| 67 | |||
| 68 | #include "vertcl_main.h" |
||
| 2 | mjames | 69 | #include "expression.h" |
| 70 | #include "generic.h" |
||
| 11 | mjames | 71 | #include "database.h" |
| 72 | #include "printout.h" |
||
| 2 | mjames | 73 | #include "print_vhdl.h" |
| 74 | #include "print_vlog.h" |
||
| 75 | #include "sorting.h" |
||
| 11 | mjames | 76 | #include "cmdparse.h" |
| 77 | #include "cmdlog.h" |
||
| 78 | #include "equivalent.h" |
||
| 2 | mjames | 79 | |
| 80 | #if defined NEED_DECODE_PIN |
||
| 11 | mjames | 81 | static char * decode_quartus_pin[]= |
| 82 | { |
||
| 83 | "NONE", |
||
| 84 | "input", |
||
| 85 | "output", |
||
| 86 | "output", /* buffer is a sort of Output pin (lower case is for info only )*/ |
||
| 87 | "inout", |
||
| 88 | "CONFIG_PIN", |
||
| 89 | "POWER_PIN"}; |
||
| 2 | mjames | 90 | #endif |
| 91 | |||
| 11 | mjames | 92 | |
| 93 | void print_quartus_pinfit(FILE * f,socket_t * dev, int options) |
||
| 2 | mjames | 94 | { |
| 11 | mjames | 95 | node_t * n; |
| 96 | |||
| 97 | /* sort all the nodes into alphabetical order */ |
||
| 98 | sort_nodes(dev,NO_EXTRACT_XY); |
||
| 2 | mjames | 99 | |
| 100 | |||
| 11 | mjames | 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); |
||
| 2 | mjames | 111 | |
| 11 | mjames | 112 | if (!ISNULLSTR(dev->type)) |
| 113 | { |
||
| 114 | fprintf(f," ASSIGNED TO AN \"%s\";\n",check_null_str(dev->type)); |
||
| 115 | } |
||
| 2 | mjames | 116 | |
| 11 | mjames | 117 | n=dev->nodes; |
| 2 | mjames | 118 | |
| 11 | mjames | 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 | }; |
||
| 2 | mjames | 127 | |
| 11 | mjames | 128 | fprintf(f," }\n"); |
| 129 | |||
| 130 | } |
||
| 2 | mjames | 131 | |
| 11 | mjames | 132 |