home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume2 / wire / part1 next >
Encoding:
Internet Message Format  |  1986-11-30  |  47.2 KB

  1. From: panda!talcott!uwvax!geowhiz!karsh
  2. Subject: Wirewrap program, part 01 of 02
  3. Reply-To: karsh@geowhiz.UUCP (Bruce Karsh)
  4. Keywords: wirewrap circuit board construction cad cadcam cam pc chip
  5. Newsgroups: mod.sources
  6. Approved: john@genrad.UUCP
  7.  
  8. Mod.sources:  Volume 2, Issue 36
  9. Submitted by: karsh@geowhiz.UUCP (Bruce Karsh) <uwvax!geowhiz!karsh>
  10.  
  11.  
  12. #!/bin/sh
  13. #
  14. # This is a release of my wirewrap program.  It has been used
  15. # to make several boards here, and seems to be pretty reliable. 
  16. # It was written on a Masscomp MC500, but I don't think there
  17. # are any serious machine dependencies in it.  (But then again,
  18. # I'm often suprised by how easy it is to inadvertantly write
  19. # machine dependent code.)
  20. # I'd like to hear some bug reports and success stories.  I will
  21. # try to send out bug fixes as quickly as I can.
  22. # As usual, unpack all parts by running through sh, then run make.
  23. # Unix Wirewrap Source Code:
  24. # cnvtnum.c    gettoken.c    getwired.c    getwirelen.c    header1.c
  25. # header2.c    initialize.c    insertname.c    insertx.c    main.c
  26. # mywrite.c    mywrite2.c    namecmp.c    namecmp2.c    output1.c
  27. # output2.c    output3.c    readin.c    setptr.c    setrowandcol.c
  28. # sort1.c        sort2.c        test.c
  29. # .h files:
  30. #   wirewrap.h
  31. # Documentation:
  32. #   wirewrap.1 README PACKINGLIST
  33. # Unix wirewrap makefile:
  34. #   Makefile
  35. # Test Data:
  36. #   autocal
  37. # Example listing:
  38. #   autocal.listing
  39. # ----
  40. # Bruce Karsh
  41. # U. Wisc. Dept. Geology and Geophysics
  42. # 1215 W Dayton, Madison, WI 53706
  43. # (608) 262-1697
  44. # {ihnp4,seismo}!uwvax!geowhiz!karsh
  45. #
  46. echo 'Start of wirewrap program, part 01 of 02:'
  47. echo 'x - autocal.listing'
  48. sed 's/^X//' > autocal.listing << '/'
  49. X          chip         pin  chip
  50. X         name         num  position      row col
  51. X+            Special
  52. X         and.4081      14   4g           (17,20)
  53. X         runff.4013    14   3g           (17,14)
  54. X         or.4071       14   3h           (8,14)
  55. X         count.4020    16   2h           (8,8)
  56. X         syncff.4013   14   6h           (8,32)
  57. X         shift.4015    16   5h           (8,26)
  58. X         xor.4030      14   4h           (8,20)
  59. X         shift.4015    16   5g           (17,26)
  60. X-            Special
  61. X         and.4081      7    4g           (11,17)
  62. X         syncff.4013   7    6h           (2,29)
  63. X         or.4071       7    3h           (2,11)
  64. X         shift.4015    8    5g           (10,23)
  65. X         runff.4013    7    3g           (11,11)
  66. X         count.4020    8    2h           (1,5)
  67. X         xor.4030      7    4h           (2,17)
  68. X         shift.4015    8    5h           (1,23)
  69. X.           
  70. X         I/O-edge      8    1a           (49,1)
  71. X         I/O-edge      2    1a           (55,1)
  72. X         I/O-edge      12   1a           (45,1)
  73. X         I/O-edge      20   1a           (37,1)
  74. X         I/O-edge      10   1a           (47,1)
  75. X         I/O-edge      6    1a           (51,1)
  76. X         I/O-edge      5    1a           (52,1)
  77. X         I/O-edge      24   1a           (33,1)
  78. X         I/O-edge      17   1a           (40,1)
  79. X         I/O-edge      26   1a           (31,1)
  80. X         I/O-edge      73   1a           (49,3)
  81. X         RUN.FF1       11   8c           (50,44)
  82. X         I/O-edge      1    1a           (56,1)
  83. X         I/O-edge      30   1a           (27,1)
  84. X         I/O-edge      13   1a           (44,1)
  85. X         I/O-edge      80   1a           (56,3)
  86. X         I/O-edge      33   1a           (24,1)
  87. X         I/O-edge      34   1a           (23,1)
  88. X         I/O-edge      27   1a           (30,1)
  89. X         count.4020    5    2h           (4,5)
  90. X         I/O-edge      37   1a           (20,1)
  91. X         I/O-edge      38   1a           (19,1)
  92. X         I/O-edge      35   1a           (22,1)
  93. X         RUN.FF2       9    2e           (28,8)
  94. X         I/O-edge      41   1a           (17,3)
  95. X         I/O-edge      42   1a           (18,3)
  96. X         I/O-edge      3    1a           (54,1)
  97. X         I/O-edge      44   1a           (20,3)
  98. X         I/O-edge      45   1a           (21,3)
  99. X         I/O-edge      14   1a           (43,1)
  100. X         I/O-edge      11   1a           (46,1)
  101. X         I/O-edge      48   1a           (24,3)
  102. X         Buffer.4050   2    2g           (16,5)
  103. X         I/O-edge      18   1a           (39,1)
  104. X         I/O-edge      19   1a           (38,1)
  105. X         I/O-edge      52   1a           (28,3)
  106. X         I/O-edge      21   1a           (36,1)
  107. X         I/O-edge      54   1a           (30,3)
  108. X         Buffer.4050   4    2g           (14,5)
  109. X          chip         pin  chip
  110. X         name         num  position      row col
  111. X         I/O-edge      56   1a           (32,3)
  112. X         I/O-edge      25   1a           (32,1)
  113. X         I/O-edge      58   1a           (34,3)
  114. X         I/O-edge      59   1a           (35,3)
  115. X         Buffer.4050   13   2g           (14,8)
  116. X         I/O-edge      61   1a           (37,3)
  117. X         I/O-edge      62   1a           (38,3)
  118. X         I/O-edge      63   1a           (39,3)
  119. X         I/O-edge      32   1a           (25,1)
  120. X         I/O-edge      65   1a           (41,3)
  121. X         I/O-edge      66   1a           (42,3)
  122. X         I/O-edge      67   1a           (43,3)
  123. X         I/O-edge      68   1a           (44,3)
  124. X         I/O-edge      69   1a           (45,3)
  125. X         I/O-edge      70   1a           (46,3)
  126. X         I/O-edge      55   1a           (31,3)
  127. X         I/O-edge      72   1a           (48,3)
  128. X         RUN.FF2       10   2e           (29,8)
  129. X         I/O-edge      74   1a           (50,3)
  130. X         I/O-edge      75   1a           (51,3)
  131. X         I/O-edge      76   1a           (52,3)
  132. X         I/O-edge      77   1a           (53,3)
  133. X         I/O-edge      78   1a           (54,3)
  134. X         I/O-edge      47   1a           (23,3)
  135. X         Buffer.4050   1    2g           (17,5)
  136. X         runff.4013    2    3g           (16,11)
  137. X         RUN.FF1       1    8c           (53,41)
  138. X         RUN.FF1       2    8c           (52,41)
  139. X         RUN.FF1       3    8c           (51,41)
  140. X         RUN.FF1       4    8c           (50,41)
  141. X         RUN.FF1       5    8c           (49,41)
  142. X         I/O-edge      23   1a           (34,1)
  143. X         RUN.FF1       7    8c           (47,41)
  144. X         shift.4015    2    5h           (7,23)
  145. X         RUN.FF1       9    8c           (48,44)
  146. X         RUN.FF1       10   8c           (49,44)
  147. X         shift.4015    5    5h           (4,23)
  148. X         RUN.FF1       12   8c           (51,44)
  149. X         RUN.FF1       13   8c           (52,44)
  150. X         I/O-edge      31   1a           (26,1)
  151. X         RUN.FF2       1    2e           (35,5)
  152. X         RUN.FF2       2    2e           (34,5)
  153. X         RUN.FF2       3    2e           (33,5)
  154. X         RUN.FF2       4    2e           (32,5)
  155. X         shift.4015    13   5h           (5,26)
  156. X         RUN.FF2       6    2e           (30,5)
  157. X         RUN.FF2       7    2e           (29,5)
  158. X         I/O-edge      39   1a           (18,1)
  159. X         count.4020    9    2h           (1,8)
  160. X         Buffer.4050   10   2g           (11,8)
  161. X         RUN.FF2       11   2e           (30,8)
  162. X         RUN.FF2       12   2e           (31,8)
  163. X         RUN.FF2       13   2e           (32,8)
  164. X         RUN.FF2       14   2e           (33,8)
  165. X         I/O-edge      46   1a           (22,3)
  166. X         RUN.FF2       16   2e           (35,8)
  167. X         count.4020    1    2h           (8,5)
  168. X         I/O-edge      57   1a           (33,3)
  169. X          chip         pin  chip
  170. X         name         num  position      row col
  171. X         Buffer.4050   3    2g           (15,5)
  172. X         syncff.4013   12   6h           (6,32)
  173. X         Buffer.4050   5    2g           (13,5)
  174. X         I/O-edge      53   1a           (29,3)
  175. X         Buffer.4050   7    2g           (11,5)
  176. X         Buffer.4050   8    2g           (10,5)
  177. X         Buffer.4050   9    2g           (10,8)
  178. X         I/O-edge      29   1a           (28,1)
  179. X         shift.4015    3    5h           (6,23)
  180. X         shift.4015    4    5h           (5,23)
  181. X         count.4020    13   2h           (5,8)
  182. X         Buffer.4050   6    2g           (12,5)
  183. X         RUN.FF2       15   2e           (34,8)
  184. X         Buffer.4050   16   2g           (17,8)
  185. X         I/O-edge      64   1a           (40,3)
  186. X         count.4020    6    2h           (3,5)
  187. X         shift.4015    11   5h           (3,26)
  188. X         count.4020    4    2h           (5,5)
  189. X         I/O-edge      36   1a           (21,1)
  190. X         I/O-edge      7    1a           (50,1)
  191. X         count.4020    7    2h           (2,5)
  192. X         RUN.FF2       8    2e           (28,5)
  193. X         shift.4015    13   5g           (14,26)
  194. X         count.4020    12   2h           (4,8)
  195. X         shift.4015    3    5g           (15,23)
  196. X         I/O-edge      79   1a           (55,3)
  197. X         syncff.4013   13   6h           (7,32)
  198. X         I/O-edge      15   1a           (42,1)
  199. X         count.4020    15   2h           (7,8)
  200. X         I/O-edge      71   1a           (47,3)
  201. X         I/O-edge      22   1a           (35,1)
  202. X         shift.4015    12   5h           (4,26)
  203. X         shift.4015    11   5g           (12,26)
  204. X         I/O-edge      43   1a           (19,3)
  205. X         I/O-edge      50   1a           (26,3)
  206. X         RUN.FF1       6    8c           (48,41)
  207. X         shift.4015    4    5g           (14,23)
  208. X         RUN.FF1       14   8c           (53,44)
  209. X10SEC       
  210. X         I/O-edge      9    1a           (48,1)   
  211. X         runff.4013    3    3g           (15,11)  
  212. XGAP4        
  213. X         xor.4030      12   4h           (6,20)   
  214. X         I/O-edge      4    1a           (53,1)   
  215. XPD3         
  216. X         and.4081      6    4g           (12,17)  
  217. X         I/O-edge      60   1a           (36,3)   
  218. XQ           
  219. X         UPI/O         1    10a          (37,54)  
  220. X         runff.4013    11   3g           (14,14)  
  221. XRON+        
  222. X         or.4071       13   3h           (7,14)   
  223. X         RUN.FF2       5    2e           (31,5)   
  224. XSKEY-       
  225. X         and.4081      1    4g           (17,17)  
  226. X         I/O-edge      16   1a           (41,1)   
  227. XTST+        
  228. X         and.4081      2    4g           (16,17)  
  229. X          chip         pin  chip
  230. X         name         num  position      row col
  231. X         or.4071       12   3h           (6,14)   
  232. X         I/O-edge      28   1a           (29,1)   
  233. X         and.4081      5    4g           (13,17)  
  234. Xacal        
  235. X         and.4081      10   4g           (13,20)  
  236. X         or.4071       2    3h           (7,11)   
  237. Xap          
  238. X         and.4081      11   4g           (14,20)  
  239. X         or.4071       9    3h           (3,14)   
  240. Xapms        
  241. X         or.4071       10   3h           (4,14)   
  242. X         and.4081      9    4g           (12,20)  
  243. Xbcal+       
  244. X         I/O-edge      51   1a           (27,3)   
  245. X         Buffer.4050   12   2g           (13,8)   
  246. Xbgld-       
  247. X         Buffer.4050   15   2g           (16,8)   
  248. X         I/O-edge      49   1a           (25,3)   
  249. Xcal+        
  250. X         or.4071       3    3h           (6,11)   
  251. X         Buffer.4050   11   2g           (12,8)   
  252. Xcalena+     
  253. X         or.4071       11   3h           (5,14)   
  254. X         runff.4013    9    3g           (12,14)  
  255. Xcalrun-     
  256. X         count.4020    11   2h           (3,8)    
  257. X         syncff.4013   4    6h           (5,29)   
  258. X         runff.4013    1    3g           (17,11)  
  259. X         or.4071       5    3h           (4,11)   
  260. Xclk         
  261. X         xor.4030      11   4h           (5,20)   
  262. X         shift.4015    9    5h           (1,26)   
  263. X         shift.4015    1    5g           (17,23)  
  264. X         shift.4015    9    5g           (10,26)  
  265. X         syncff.4013   3    6h           (6,29)   
  266. X         shift.4015    1    5h           (8,23)   
  267. Xclk/2       
  268. X         syncff.4013   1    6h           (8,29)   
  269. X         count.4020    10   2h           (2,8)    
  270. Xclk/2-      
  271. X         syncff.4013   5    6h           (4,29)   
  272. X         syncff.4013   2    6h           (7,29)   
  273. Xg           
  274. X         I/O-edge      40   1a           (17,1)   
  275. X         syncff.4013   10   6h           (4,32)   
  276. X         xor.4030      13   4h           (7,20)   
  277. X         runff.4013    4    3g           (14,11)  
  278. X         syncff.4013   9    6h           (3,32)   
  279. X         runff.4013    10   3g           (13,14)  
  280. X         syncff.4013   11   6h           (5,32)   
  281. X         syncff.4013   8    6h           (2,32)   
  282. X         syncff.4013   6    6h           (3,29)   
  283. Xgld-        
  284. X         Buffer.4050   14   2g           (15,8)   
  285. X         and.4081      3    4g           (15,17)  
  286. Xjamrun+     
  287. X         RUN.FF1       8    8c           (47,44)  
  288. X         and.4081      8    4g           (11,20)  
  289. X          chip         pin  chip
  290. X         name         num  position      row col
  291. X         runff.4013    12   3g           (15,14)  
  292. Xjamrun-     
  293. X         runff.4013    5    3g           (13,11)  
  294. X         runff.4013    13   3g           (16,14)  
  295. Xmp          
  296. X         and.4081      4    4g           (14,17)  
  297. X         or.4071       1    3h           (8,11)   
  298. Xq10         
  299. X         and.4081      12   4g           (15,20)  
  300. X         count.4020    14   2h           (6,8)    
  301. Xq13         
  302. X         shift.4015    6    5g           (12,23)  
  303. X         shift.4015    6    5h           (3,23)   
  304. X         count.4020    2    2h           (7,5)    
  305. X         shift.4015    14   5g           (15,26)  
  306. X         and.4081      13   4g           (16,20)  
  307. X         shift.4015    14   5h           (6,26)   
  308. Xseq1        
  309. X         shift.4015    5    5g           (13,23)  
  310. X         xor.4030      8    4h           (2,20)   
  311. Xseq12       
  312. X         xor.4030      2    4h           (7,17)   
  313. X         shift.4015    10   5h           (2,26)   
  314. X         shift.4015    15   5h           (7,26)   
  315. Xseq4        
  316. X         shift.4015    10   5g           (11,26)  
  317. X         xor.4030      1    4h           (8,17)   
  318. X         shift.4015    15   5g           (16,26)  
  319. Xseq6        
  320. X         xor.4030      6    4h           (3,17)   
  321. X         shift.4015    12   5g           (13,26)  
  322. Xseq8        
  323. X         shift.4015    2    5g           (16,23)  
  324. X         shift.4015    7    5h           (2,23)   
  325. Xseqi        
  326. X         or.4071       4    3h           (5,11)   
  327. X         shift.4015    7    5g           (11,23)  
  328. Xseql        
  329. X         xor.4030      3    4h           (6,17)   
  330. X         xor.4030      5    4h           (4,17)   
  331. Xseqm        
  332. X         or.4071       8    3h           (2,14)   
  333. X         xor.4030      10   4h           (4,20)   
  334. X         or.4071       6    3h           (3,11)   
  335. Xseqn        
  336. X         xor.4030      4    4h           (5,17)   
  337. X         xor.4030      9    4h           (3,20)   
  338. Xstop+       
  339. X         runff.4013    8    3g           (11,14)  
  340. X         count.4020    3    2h           (6,5)    
  341. X         runff.4013    6    3g           (12,11)  
  342. X signal       pin inner wire           outer wire
  343. Xname         num
  344. X-            8   SPEC 1,5             SPEC 1,5
  345. X.            9        1,8                  1,8
  346. X-            8   SPEC 1,23            SPEC 1,23
  347. Xclk          9   1.5  1,26 5,20       2.5  1,26 17,23 F
  348. X.            7        2,5                  2,5
  349. Xclk/2        10  3.0  2,8 8,29             2,8
  350. X-            7   SPEC 2,11            SPEC 2,11
  351. Xseqm         8   1.5  2,14 4,20            2,14
  352. X-            7   SPEC 2,17            SPEC 2,17
  353. Xseq1         8   2.0  2,20 13,23           2,20
  354. Xseq8         7   2.5  2,23 16,23           2,23
  355. Xseq12        10  2.0  2,26 7,17       1.5  2,26 7,26 E
  356. X-            7   SPEC 2,29            SPEC 2,29
  357. Xg            8   1.5  2,32 5,32       1.5  2,32 3,29 E
  358. X.            6        3,5                  3,5
  359. Xcalrun-      11  3.0  3,8 5,29             3,8
  360. Xseqm         6        3,11            2.0  3,11 4,20 F
  361. Xap           9   2.0  3,14 14,20           3,14
  362. Xseq6         6   2.0  3,17 13,26           3,17
  363. Xseqn         9   1.5  3,20 5,17            3,20
  364. Xq13          6   2.0  3,23 12,23      3.0  3,23 7,5 F
  365. X.            11       3,26                 3,26
  366. Xg            6        3,29            TEST 3,29 2,32 F
  367. Xg            9   3.0  3,32 13,14      3.5  3,32 14,11 F
  368. X.            5        4,5                  4,5
  369. X.            12       4,8                  4,8
  370. Xcalrun-      5   2.0  4,11 17,11           4,11
  371. Xapms         10  2.0  4,14 12,20           4,14
  372. Xseql         5   1.5  4,17 6,17            4,17
  373. Xseqm         10  TEST 4,20 2,14       TEST 4,20 3,11 E
  374. X.            5        4,23                 4,23
  375. X.            12       4,26                 4,26
  376. Xclk/2-       5   1.5  4,29 7,29            4,29
  377. Xg            10  4.5  4,32 17,1       2.0  4,32 7,20 F
  378. X.            4        5,5                  5,5
  379. X.            13       5,8                  5,8
  380. Xseqi         4   2.0  5,11 11,23           5,11
  381. Xcalena+      11  1.5  5,14 12,14           5,14
  382. Xseqn         4   TEST 5,17 3,20            5,17
  383. Xclk          11  TEST 5,20 1,26            5,20
  384. X.            4        5,23                 5,23
  385. X.            13       5,26                 5,26
  386. Xcalrun-      4   TEST 5,29 3,8        3.0  5,29 17,11 F
  387. Xg            11  TEST 5,32 2,32       3.0  5,32 13,14 F
  388. Xstop+        3   2.0  6,5 11,14       1.5  6,5 12,11 E
  389. Xq10          14  2.5  6,8 15,20            6,8
  390. Xcal+         3   1.5  6,11 12,8            6,11
  391. XTST+         12  2.0  6,14 16,17      3.5  6,14 29,1 F
  392. Xseql         3   TEST 6,17 4,17            6,17
  393. XGAP4         12  6.0  6,20 53,1            6,20
  394. X.            3        6,23                 6,23
  395. Xq13          14  2.0  6,26 16,20           6,26
  396. Xclk          3   1.5  6,29 8,23       1.5  6,29 10,26 F
  397. X.            12       6,32                 6,32
  398. Xq13          2   3.0  7,5 15,26       TEST 7,5 3,23 F
  399. X.            15       7,8                  7,8
  400. Xacal         2   2.0  7,11 13,20           7,11
  401. XRON+         13  3.5  7,14 31,5            7,14
  402. X signal       pin inner wire           outer wire
  403. Xname         num
  404. Xseq12        2   TEST 7,17 2,26            7,17
  405. Xg            13  2.0  7,20 14,11      TEST 7,20 4,32 F
  406. X.            2        7,23                 7,23
  407. Xseq12        15       7,26            TEST 7,26 2,26 F
  408. Xclk/2-       2   TEST 7,29 4,29            7,29
  409. X.            13       7,32                 7,32
  410. X.            1        8,5                  8,5
  411. X+            16  SPEC 8,8             SPEC 8,8
  412. Xmp           1   1.5  8,11 14,17           8,11
  413. X+            14  SPEC 8,14            SPEC 8,14
  414. Xseq4         1   2.0  8,17 11,26      2.0  8,17 16,26 E
  415. X+            14  SPEC 8,20            SPEC 8,20
  416. Xclk          1   TEST 8,23 6,29            8,23
  417. X+            16  SPEC 8,26            SPEC 8,26
  418. Xclk/2        1   TEST 8,29 2,8             8,29
  419. X+            14  SPEC 8,32            SPEC 8,32
  420. X.            8        10,5                 10,5
  421. X.            9        10,8                 10,8
  422. X-            8   SPEC 10,23           SPEC 10,23
  423. Xclk          9   1.5  10,26 17,23     TEST 10,26 6,29 F
  424. X.            7        11,5                 11,5
  425. X.            10       11,8                 11,8
  426. X-            7   SPEC 11,11           SPEC 11,11
  427. Xstop+        8   TEST 11,14 6,5            11,14
  428. X-            7   SPEC 11,17           SPEC 11,17
  429. Xjamrun+      8   5.5  11,20 47,44     1.5  11,20 15,14 E
  430. Xseqi         7   TEST 11,23 5,11           11,23
  431. Xseq4         10  TEST 11,26 8,17           11,26
  432. X.            6        12,5                 12,5
  433. Xcal+         11  TEST 12,8 6,11            12,8
  434. Xstop+        6        12,11           TEST 12,11 6,5 F
  435. Xcalena+      9   TEST 12,14 5,14           12,14
  436. XPD3          6   3.5  12,17 36,3           12,17
  437. Xapms         9   TEST 12,20 4,14           12,20
  438. Xq13          6   TEST 12,23 3,23           12,23
  439. X.            11       12,26                12,26
  440. X.            5        13,5                 13,5
  441. Xbcal+        12  2.5  13,8 27,3            13,8
  442. Xjamrun-      5   1.5  13,11 16,14          13,11
  443. Xg            10  TEST 13,14 3,32      TEST 13,14 5,32 F
  444. XTST+         5   3.0  13,17 29,1           13,17
  445. Xacal         10  TEST 13,20 7,11           13,20
  446. Xseq1         5   TEST 13,23 2,20           13,23
  447. Xseq6         12  TEST 13,26 3,17           13,26
  448. X.            4        14,5                 14,5
  449. X.            13       14,8                 14,8
  450. Xg            4   TEST 14,11 7,20      TEST 14,11 3,32 F
  451. XQ            11  5.5  14,14 37,54          14,14
  452. Xmp           4   TEST 14,17 8,11           14,17
  453. Xap           11  TEST 14,20 3,14           14,20
  454. X.            4        14,23                14,23
  455. X.            13       14,26                14,26
  456. X.            3        15,5                 15,5
  457. Xgld-         14  2.0  15,8 15,17           15,8
  458. X10SEC        3   4.5  15,11 48,1           15,11
  459. Xjamrun+      12       15,14           TEST 15,14 11,20 F
  460. Xgld-         3   TEST 15,17 15,8           15,17
  461. Xq10          12  TEST 15,20 6,8            15,20
  462. X signal       pin inner wire           outer wire
  463. Xname         num
  464. X.            3        15,23                15,23
  465. Xq13          14  TEST 15,26 7,5       1.5  15,26 16,20 F
  466. X.            2        16,5                 16,5
  467. Xbgld-        15  2.0  16,8 25,3            16,8
  468. X.            2        16,11                16,11
  469. Xjamrun-      13  TEST 16,14 13,11          16,14
  470. XTST+         2   TEST 16,17 6,14           16,17
  471. Xq13          13  TEST 16,20 6,26      TEST 16,20 15,26 F
  472. Xseq8         2   TEST 16,23 2,23           16,23
  473. Xseq4         15       16,26           TEST 16,26 8,17 F
  474. Xg            40  TEST 17,1 4,32            17,1
  475. X.            41       17,3                 17,3
  476. X.            1        17,5                 17,5
  477. X.            16       17,8                 17,8
  478. Xcalrun-      1   TEST 17,11 4,11      TEST 17,11 5,29 F
  479. X+            14  SPEC 17,14           SPEC 17,14
  480. XSKEY-        1   4.0  17,17 41,1           17,17
  481. X+            14  SPEC 17,20           SPEC 17,20
  482. Xclk          1   TEST 17,23 10,26     TEST 17,23 1,26 F
  483. X+            16  SPEC 17,26           SPEC 17,26
  484. X.            39       18,1                 18,1
  485. X.            42       18,3                 18,3
  486. X.            38       19,1                 19,1
  487. X.            43       19,3                 19,3
  488. X.            37       20,1                 20,1
  489. X.            44       20,3                 20,3
  490. X.            36       21,1                 21,1
  491. X.            45       21,3                 21,3
  492. X.            35       22,1                 22,1
  493. X.            46       22,3                 22,3
  494. X.            34       23,1                 23,1
  495. X.            47       23,3                 23,3
  496. X.            33       24,1                 24,1
  497. X.            48       24,3                 24,3
  498. X.            32       25,1                 25,1
  499. Xbgld-        49  TEST 25,3 16,8            25,3
  500. X.            31       26,1                 26,1
  501. X.            50       26,3                 26,3
  502. X.            30       27,1                 27,1
  503. Xbcal+        51  TEST 27,3 13,8            27,3
  504. X.            29       28,1                 28,1
  505. X.            52       28,3                 28,3
  506. X.            8        28,5                 28,5
  507. X.            9        28,8                 28,8
  508. XTST+         28  TEST 29,1 13,17      TEST 29,1 6,14 F
  509. X.            53       29,3                 29,3
  510. X.            7        29,5                 29,5
  511. X.            10       29,8                 29,8
  512. X.            27       30,1                 30,1
  513. X.            54       30,3                 30,3
  514. X.            6        30,5                 30,5
  515. X.            11       30,8                 30,8
  516. X.            26       31,1                 31,1
  517. X.            55       31,3                 31,3
  518. XRON+         5   TEST 31,5 7,14            31,5
  519. X.            12       31,8                 31,8
  520. X.            25       32,1                 32,1
  521. X.            56       32,3                 32,3
  522. X signal       pin inner wire           outer wire
  523. Xname         num
  524. X.            4        32,5                 32,5
  525. X.            13       32,8                 32,8
  526. X.            24       33,1                 33,1
  527. X.            57       33,3                 33,3
  528. X.            3        33,5                 33,5
  529. X.            14       33,8                 33,8
  530. X.            23       34,1                 34,1
  531. X.            58       34,3                 34,3
  532. X.            2        34,5                 34,5
  533. X.            15       34,8                 34,8
  534. X.            22       35,1                 35,1
  535. X.            59       35,3                 35,3
  536. X.            1        35,5                 35,5
  537. X.            16       35,8                 35,8
  538. X.            21       36,1                 36,1
  539. XPD3          60  TEST 36,3 12,17           36,3
  540. X.            20       37,1                 37,1
  541. X.            61       37,3                 37,3
  542. XQ            1   TEST 37,54 14,14          37,54
  543. X.            19       38,1                 38,1
  544. X.            62       38,3                 38,3
  545. X.            18       39,1                 39,1
  546. X.            63       39,3                 39,3
  547. X.            17       40,1                 40,1
  548. X.            64       40,3                 40,3
  549. XSKEY-        16  TEST 41,1 17,17           41,1
  550. X.            65       41,3                 41,3
  551. X.            15       42,1                 42,1
  552. X.            66       42,3                 42,3
  553. X.            14       43,1                 43,1
  554. X.            67       43,3                 43,3
  555. X.            13       44,1                 44,1
  556. X.            68       44,3                 44,3
  557. X.            12       45,1                 45,1
  558. X.            69       45,3                 45,3
  559. X.            11       46,1                 46,1
  560. X.            70       46,3                 46,3
  561. X.            10       47,1                 47,1
  562. X.            71       47,3                 47,3
  563. X.            7        47,41                47,41
  564. Xjamrun+      8   TEST 47,44 11,20          47,44
  565. X10SEC        9   TEST 48,1 15,11           48,1
  566. X.            72       48,3                 48,3
  567. X.            6        48,41                48,41
  568. X.            9        48,44                48,44
  569. X.            8        49,1                 49,1
  570. X.            73       49,3                 49,3
  571. X.            5        49,41                49,41
  572. X.            10       49,44                49,44
  573. X.            7        50,1                 50,1
  574. X.            74       50,3                 50,3
  575. X.            4        50,41                50,41
  576. X.            11       50,44                50,44
  577. X.            6        51,1                 51,1
  578. X.            75       51,3                 51,3
  579. X.            3        51,41                51,41
  580. X.            12       51,44                51,44
  581. X.            5        52,1                 52,1
  582. X signal       pin inner wire           outer wire
  583. Xname         num
  584. X.            76       52,3                 52,3
  585. X.            2        52,41                52,41
  586. X.            13       52,44                52,44
  587. XGAP4         4   TEST 53,1 6,20            53,1
  588. X.            77       53,3                 53,3
  589. X.            1        53,41                53,41
  590. X.            14       53,44                53,44
  591. X.            3        54,1                 54,1
  592. X.            78       54,3                 54,3
  593. X.            2        55,1                 55,1
  594. X.            79       55,3                 55,3
  595. X.            1        56,1                 56,1
  596. X.            80       56,3                 56,3
  597. X  WIRE LENGTH SUMMARY
  598. X -------------------
  599. X
  600. X Wire   Number
  601. XLength   Used
  602. X1.5       18
  603. X2.0       19
  604. X2.5       4
  605. X3.0       8
  606. X3.5       4
  607. X4.0       1
  608. X4.5       2
  609. X5.5       2
  610. X6.0       1
  611. XTotal number of wires used: 59
  612. /
  613. echo 'x - readin.c'
  614. sed 's/^X//' > readin.c << '/'
  615. X#include "wirewrap.h"
  616. X#include <ctype.h>
  617. X#define GETLINE(A) { scanf("%79[^\n]%*[^\n]%*c",A); inputline++;}
  618. X#define PAD(A) {for(j=strlen(A);j<NAMELENGTH;j++)A[j]=' '; A[NAMELENGTH]=0; }
  619. Xextern char *cnvtnump; /* Defined in cmvtnump.c */
  620. Xextern int *cnvtnumv; /* Defined in cmvtnump.c */
  621. Xint errorlevel=0;
  622. X/*
  623. X** readin - read in the chip description file.
  624. X**
  625. X** Sorry about all the gotos.  This is a finite
  626. X** state machine.
  627. X*/
  628. X
  629. X/* getcmd - try to get a command from the input stream.
  630. X** Branches to: 
  631. X**   endinput     if eof occurs.
  632. X**   dochip       if a :chip command occurs.
  633. X**   dospecial    if a :special command occurs.
  634. X**   getcmd       if anything else occurs.
  635. X*/
  636. Xreadin()
  637. X{
  638. Xstruct chip *newchip;
  639. Xstruct signallist *setptr(),*localptr;
  640. Xchar token[80],errorline[132];
  641. Xint count,i,j,stat,found;
  642. X
  643. Xgetcmd:
  644. X  stat=gettoken(token);
  645. X  if(stat == -1) goto endinput;
  646. X  if(token[0] == ':')
  647. X    {
  648. X    if(strlen(token) <= NAMELENGTH)
  649. X      {
  650. X      PAD(token);
  651. X      if(!namecmp2(token,CHIPTOKEN))
  652. X        goto dochip;
  653. X      if(!namecmp2(token,SPECIALTOKEN))
  654. X        goto dospecial;
  655. X      }
  656. X    sprintf(errorline,"Invalid command: %15.15s",token);
  657. X    error(errorline);
  658. X    goto getcmd;
  659. X    }
  660. X  sprintf(errorline,"Invalid item: %15.15s",token);
  661. X  error(errorline);
  662. X  goto getcmd;
  663. X
  664. X/* dochip - Processes a :chip command.
  665. X** Branches to:
  666. X**   endinput     if eof occurs.
  667. X**   dochip       if a :chip command occurs.
  668. X**   dospecial    if a :special command occurs.
  669. X*/
  670. Xdochip:
  671. X  stat=gettoken(token); /* Trying to get a chip name. */
  672. X  if(stat == -1)
  673. X    {
  674. X    error("End of file reached too soon.");
  675. X    goto endinput;
  676. X    }
  677. X  if(token[0] == ':')
  678. X    {
  679. X    if(strlen(token) <= NAMELENGTH)
  680. X      {
  681. X      PAD(token);
  682. X      if(!namecmp2(token,CHIPTOKEN))
  683. X        {
  684. X        sprintf(errorline,"Duplicate :chip command");
  685. X        error(errorline);
  686. X    goto dochip;
  687. X        }
  688. X      if(!namecmp2(token,SPECIALTOKEN))
  689. X        {
  690. X        sprintf(errorline,
  691. X           "The rest of the preceeding :chip command is missing:",
  692. X           token);
  693. X        error(errorline);
  694. X        goto dospecial;
  695. X        }
  696. X      }
  697. X    sprintf(errorline,"Invalid command: %15.15s",token);
  698. X    error(errorline);
  699. X    goto getcmd;
  700. X    }
  701. X  if(strlen(token) > NAMELENGTH)
  702. X    {
  703. X    sprintf(errorline,"Chip name is too long: %15.15s",token);
  704. X    error(errorline);
  705. X    }
  706. X  PAD(token);
  707. X  /* Allocate a new chip. */
  708. X  newchip = (struct chip *) malloc( sizeof(struct chip));
  709. X  if(!newchip)
  710. X    {
  711. X    sprintf(errorline,"No space for chip: %15.15s",token);
  712. X    fatal(errorline);  /* No return */
  713. X    }
  714. X  /* Fill in the chipname field. */
  715. X  PAD(token);
  716. X  for(i=0;i<NAMELENGTH;i++)newchip->name[i]=token[i];
  717. X
  718. X  stat=gettoken(token); /* Trying to get a chip position. */
  719. X  if(stat == -1)
  720. X    {
  721. X    error("End of file reached too soon.");
  722. X    goto endinput;
  723. X    }
  724. X  if(token[0] == ':')
  725. X    {
  726. X    if(strlen(token) <= NAMELENGTH)
  727. X      {
  728. X      PAD(token);
  729. X      if( !namecmp2(token,CHIPTOKEN) )
  730. X        {
  731. X        error("The rest of the preceeding :chip command is missing");
  732. X        goto dochip;
  733. X        }
  734. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  735. X        {
  736. X        sprintf(errorline,
  737. X           "The rest of the preceeding :chip command is missing:",
  738. X           token);
  739. X        error(errorline);
  740. X        }
  741. X      }
  742. X    sprintf(errorline,"Invalid command: %15.15s",token);
  743. X    error(errorline);
  744. X    goto getcmd;
  745. X    }
  746. X  if(strlen(token) >= NAMELENGTH)
  747. X    {
  748. X    sprintf(errorline,"Chip position name is too long: %15.15s",token);
  749. X    error(errorline);
  750. X    }
  751. X  PAD(token);
  752. X  for(i=0;i<NAMELENGTH;i++)newchip->position[i]=token[i];
  753. X
  754. X  stat=gettoken(token); /* Trying to get a pincount. */
  755. X  if(stat == -1)
  756. X    {
  757. X    error("End of file reached too soon.");
  758. X    goto endinput;
  759. X    }
  760. X  if(token[0] == ':')
  761. X    {
  762. X    if(strlen(token) <= NAMELENGTH)
  763. X      {
  764. X      if( !namecmp2(token,CHIPTOKEN) )
  765. X        {
  766. X        error("The rest of the preceeding :chip command is missing");
  767. X        goto dochip;
  768. X        }
  769. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  770. X        {
  771. X        sprintf(errorline,
  772. X           "The rest of the preceeding :chip command is missing:",
  773. X           token);
  774. X        error(errorline);
  775. X        goto dospecial;
  776. X        }
  777. X      }
  778. X    sprintf(errorline,"Invalid command: %15.15s",token);
  779. X    error(errorline);
  780. X    goto getcmd;
  781. X    }
  782. X  i=cnvtnum(token);
  783. X  newchip->pincount=i;
  784. X  if(!cnvtnumv)
  785. X    {
  786. X    sprintf(errorline,"Invalid pin count specified: %15.15s",token);
  787. X    error(errorline);
  788. X    }
  789. X  else if(*cnvtnump != 0)
  790. X    {
  791. X    sprintf(errorline,"Pin count field is badly formatted: %15.15s",token);
  792. X    error(errorline);
  793. X    }
  794. X  else if(i < 0)
  795. X    {
  796. X    sprintf(errorline,"Pin count field is negative: %15.15s",token);
  797. X    error(errorline);
  798. X    }
  799. X  else if(i < 0)
  800. X    {
  801. X    sprintf(errorline,"Pin count field is zero.");
  802. X    error(errorline);
  803. X    }
  804. X
  805. X  stat=gettoken(token); /* Trying to get a chip width. */
  806. X  if(stat == -1)
  807. X    {
  808. X    error("End of file reached too soon.");
  809. X    goto endinput;
  810. X    }
  811. X  if(token[0] == ':')
  812. X    {
  813. X    if(strlen(token) <= NAMELENGTH)
  814. X      {
  815. X      if( !namecmp2(token,CHIPTOKEN) )
  816. X        {
  817. X        error("The rest of the preceeding :chip command is missing");
  818. X        goto dochip;
  819. X        }
  820. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  821. X        {
  822. X        sprintf(errorline,
  823. X           "The rest of the preceeding :chip command is missing:",
  824. X           token);
  825. X        error(errorline);
  826. X        goto dospecial;
  827. X        }
  828. X      }
  829. X    sprintf(errorline,"Invalid command: %15.15s",token);
  830. X    error(errorline);
  831. X    goto getcmd;
  832. X    }
  833. X  i=cnvtnum(token);
  834. X  newchip->width=i;
  835. X  if(!cnvtnumv)
  836. X    {
  837. X    sprintf(errorline,"Invalid width specified: %15.15s",token);
  838. X    error(errorline);
  839. X    }
  840. X  else if(*cnvtnump != 0)
  841. X    {
  842. X    sprintf(errorline,"Width field is badly formatted: %15.15s",token);
  843. X    error(errorline);
  844. X    }
  845. X  else if(i < 0)
  846. X    {
  847. X    sprintf(errorline,"Width field is negative: %15.15s",token);
  848. X    error(errorline);
  849. X    }
  850. X
  851. X  stat=gettoken(token); /* Trying to get pin 1's row number. */
  852. X  if(stat == -1)
  853. X    {
  854. X    error("End of file reached too soon.");
  855. X    goto endinput;
  856. X    }
  857. X  if(token[0] == ':')
  858. X    {
  859. X    if(strlen(token) <= NAMELENGTH)
  860. X      {
  861. X      if( !namecmp2(token,CHIPTOKEN) )
  862. X        {
  863. X        error("The rest of the preceeding :chip command is missing");
  864. X        goto dochip;
  865. X        }
  866. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  867. X        {
  868. X        sprintf(errorline,
  869. X           "The rest of the preceeding :chip command is missing:",
  870. X           token);
  871. X        error(errorline);
  872. X        goto dospecial;
  873. X        }
  874. X      }
  875. X    sprintf(errorline,"Invalid command: %15.15s",token);
  876. X    error(errorline);
  877. X    goto getcmd;
  878. X    }
  879. X  i=cnvtnum(token);
  880. X  newchip->row1=i;
  881. X  if(!cnvtnumv)
  882. X    {
  883. X    sprintf(errorline,"Invalid row specified: %15.15s",token);
  884. X    error(errorline);
  885. X    }
  886. X  else if(*cnvtnump != 0)
  887. X    {
  888. X    sprintf(errorline,"Row field is badly formatted: %15.15s",token);
  889. X    error(errorline);
  890. X    }
  891. X
  892. X  stat=gettoken(token); /* Trying to get pin 1's column number. */
  893. X  if(stat == -1)
  894. X    {
  895. X    error("End of file reached too soon.");
  896. X    goto endinput;
  897. X    }
  898. X  if(token[0] == ':')
  899. X    {
  900. X    if(strlen(token) <= NAMELENGTH)
  901. X      {
  902. X      if( !namecmp2(token,CHIPTOKEN) )
  903. X        {
  904. X        error("The rest of the preceeding :chip command is missing");
  905. X        goto dochip;
  906. X        }
  907. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  908. X        {
  909. X        sprintf(errorline,
  910. X           "The rest of the preceeding :chip command is missing:",
  911. X           token);
  912. X        error(errorline);
  913. X        goto dospecial;
  914. X        }
  915. X      }
  916. X    sprintf(errorline,"Invalid command: %15.15s",token);
  917. X    error(errorline);
  918. X    goto getcmd;
  919. X    }
  920. X  i=cnvtnum(token);
  921. X  newchip->col1=i;
  922. X  if(!cnvtnumv)
  923. X    {
  924. X    sprintf(errorline,"Invalid col specified: %15.15s",token);
  925. X    error(errorline);
  926. X    }
  927. X  else if(*cnvtnump != 0)
  928. X    {
  929. X    sprintf(errorline,"Col field is badly formatted: %15.15s",token);
  930. X    error(errorline);
  931. X    }
  932. X
  933. X  stat=gettoken(token); /* Trying to get pin 1's orientation number. */
  934. X  if(stat == -1)
  935. X    {
  936. X    error("End of file reached too soon.");
  937. X    goto endinput;
  938. X    }
  939. X  if(token[0] == ':')
  940. X    {
  941. X    if(strlen(token) <= NAMELENGTH)
  942. X      {
  943. X      if( !namecmp2(token,CHIPTOKEN) )
  944. X        {
  945. X        error("The rest of the preceeding :chip command is missing");
  946. X        goto dochip;
  947. X        }
  948. X      if( (!namecmp2(token,SPECIALTOKEN)) || (!namecmp2(token,CHIPTOKEN)) )
  949. X        {
  950. X        sprintf(errorline,
  951. X           "The rest of the preceeding :chip command is missing:",
  952. X           token);
  953. X        error(errorline);
  954. X        goto dospecial;
  955. X        }
  956. X      }
  957. X    sprintf(errorline,"Invalid command: %15.15s",token);
  958. X    error(errorline);
  959. X    goto getcmd;
  960. X    }
  961. X  i=cnvtnum(token);
  962. X  newchip->orientation=i;
  963. X  if(!cnvtnumv)
  964. X    {
  965. X    sprintf(errorline,"Invalid orientation specified: %15.15s",token);
  966. X    error(errorline);
  967. X    }
  968. X  else if(*cnvtnump != 0)
  969. X    {
  970. X    sprintf(errorline,"Orientation field is badly formatted: %15.15s",token);
  971. X    error(errorline);
  972. X    }
  973. X  else if(i < 1 || i > 4)
  974. X    {
  975. X    sprintf(errorline,
  976. X            "Orientation must be either 1, 2, 3, or 4:  %15.15s",token);
  977. X    error(errorline);
  978. X    }
  979. X
  980. X  for(count=0; count < newchip->pincount; count++)
  981. X    {
  982. X    stat=gettoken(token); /* Trying to get a chip name. */
  983. X    if(stat == -1)
  984. X      {
  985. X      sprintf(errorline,"Not enough signal names read in for chip %12.12s.",
  986. X              newchip->name);
  987. X      goto endinput;
  988. X      }
  989. X    if(token[0] == ':')
  990. X      {
  991. X      if(strlen(token) <= NAMELENGTH)
  992. X        {
  993. X        if(!namecmp2(token,CHIPTOKEN))
  994. X          {
  995. X          sprintf(errorline,
  996. X                  ":chip command occured before all signals were read in.");
  997. X          error(errorline);
  998. X          }
  999. X        if(!namecmp2(token,SPECIALTOKEN))
  1000. X          {
  1001. X          sprintf(errorline,":special command occured before all signals were read in.");
  1002. X          goto dospecial;
  1003. X          }
  1004. X        }
  1005. X      sprintf(errorline,"Invalid command: %15.15s",token);
  1006. X      error(errorline);
  1007. X      goto getcmd;
  1008. X      }
  1009. X    PAD(token);
  1010. X    if(strlen(token) != NAMELENGTH)
  1011. X      {
  1012. X      sprintf(errorline,"Signal name is too long: %5.15s",token);
  1013. X      error(errorline);
  1014. X      }
  1015. X    PAD(token);
  1016. X    if(nextfree >= numpins)
  1017. X      {
  1018. X      sprintf(errorline,"Too many pins, maximum is %d : %15.15s",numpins,token);
  1019. X      error(errorline);
  1020. X      }
  1021. X    pinarray[nextfree].signalname = setptr(token);
  1022. X    pinarray[nextfree].mychip=newchip;
  1023. X    pinarray[nextfree].pinnum=count+1;
  1024. X    pinarray[nextfree].inner = -1;
  1025. X    pinarray[nextfree].outer = -1;
  1026. X    setrowandcol(&pinarray[nextfree]);
  1027. X    nextfree = nextfree + 1;
  1028. X    }
  1029. X
  1030. X  for(;;)
  1031. X    {
  1032. X    stat=gettoken(token); /* Trying to get any excess signal names. */
  1033. X    if(stat == -1) goto endinput;
  1034. X    if(token[0] == ':')
  1035. X      {
  1036. X      if(strlen(token) <= NAMELENGTH)
  1037. X        {
  1038. X        PAD(token);
  1039. X        if(!namecmp2(token,CHIPTOKEN))
  1040. X          goto dochip;
  1041. X        if(!namecmp2(token,SPECIALTOKEN))
  1042. X          goto dospecial;
  1043. X        }
  1044. X      sprintf(errorline,"Invalid command: %15.15s",token);
  1045. X      error(errorline);
  1046. X      goto getcmd;
  1047. X      }
  1048. X    sprintf(errorline,"More signals than pins on chip %12.12s : %15.15s"
  1049. X          ,newchip->name,token);
  1050. X    error(errorline);
  1051. X    }
  1052. X
  1053. Xdospecial:
  1054. X/* 
  1055. X** dospecial - Processes a :special command.
  1056. X** Branches to:
  1057. X**   getcmd
  1058. X**   dospecial
  1059. X**   endinput
  1060. X**   dochip
  1061. X*/
  1062. Xstat=gettoken(token);
  1063. Xif(stat == -1) goto endinput;
  1064. Xif(token[0] == ':')
  1065. X  {
  1066. X  if(strlen(token) <= NAMELENGTH)
  1067. X    {
  1068. X    if(!namecmp2(token,CHIPTOKEN))
  1069. X      {
  1070. X      error(":CHIP statements must not follow :special statements");
  1071. X      goto dochip;
  1072. X      }
  1073. X    if(!namecmp2(token,SPECIALTOKEN))
  1074. X      {
  1075. X      error("Duplicate :SPECIAL command.");
  1076. X      goto dospecial;
  1077. X      }
  1078. X    }
  1079. X  sprintf(errorline,"Invalid command: %15.15s",token);
  1080. X  error(errorline);
  1081. X  goto getcmd;
  1082. X  }
  1083. Xif(strlen(token) > NAMELENGTH)
  1084. X  {
  1085. X  sprintf(errorline,"Special name is too long: %15.15s",token);
  1086. X  error(errorline);
  1087. X  goto dospecial;
  1088. X  }
  1089. Xfound=0;
  1090. Xlocalptr=siglistleader;
  1091. XPAD(token);
  1092. Xwhile((localptr != 0) && (!found))
  1093. X  {
  1094. X  if(namecmp2(localptr->signalname,token))
  1095. X    localptr = localptr->succ;
  1096. X  else
  1097. X    {
  1098. X    localptr->special=1;
  1099. X    found=1;
  1100. X    }
  1101. X  }
  1102. Xif(!found)
  1103. X  {
  1104. X  sprintf(errorline,"Special signal is never used: %12.12s",token);
  1105. X  error(errorline);
  1106. X  }
  1107. Xgoto dospecial;
  1108. X
  1109. X/*
  1110. X** endinput - end of input processor.
  1111. X*/
  1112. Xendinput: ;
  1113. X  if(errorlevel != 0)
  1114. X    {
  1115. X    printf("Errors were detected.  Program terminated.\n");
  1116. X    exit(9);
  1117. X    }
  1118. X  return;
  1119. X}
  1120. Xerror(s)
  1121. Xchar *s;
  1122. X{
  1123. Xerrorlevel=1;
  1124. Xprintf("Error, Line %d, %s\n",inputline,s);
  1125. Xlinenum++;
  1126. X}
  1127. Xfatal(s)
  1128. Xchar *s;
  1129. X{
  1130. Xerrorlevel=1;
  1131. Xprintf("Fatal, Line %d, %s\n",inputline,s);
  1132. Xprintf("Error was fatal, Program terminated\n");
  1133. Xexit(10);
  1134. X}
  1135. /
  1136. echo 'x - setptr.c'
  1137. sed 's/^X//' > setptr.c << '/'
  1138. X/***********************************************************
  1139. X*  setptr - Converts from a signal name to a pointer       *
  1140. X*           to an entry in the signallist.  If the       *
  1141. X*           signal name isn't already in the signallist,   *
  1142. X*           then an entry for it is added.               *
  1143. X***********************************************************/
  1144. X
  1145. X#include "wirewrap.h"
  1146. X
  1147. Xstruct signallist *setptr(signalname)
  1148. Xchar *signalname;
  1149. X{
  1150. Xint i;
  1151. Xstruct signallist *localptr;
  1152. X
  1153. Xlocalptr = siglistleader;
  1154. Xwhile (localptr != 0)
  1155. X  {
  1156. X  if(namecmp(localptr->signalname,signalname))
  1157. X    localptr = localptr->succ;
  1158. X  else
  1159. X    break;
  1160. X  }
  1161. Xif(localptr==0)
  1162. X  {
  1163. X  localptr=(struct signallist *)malloc(sizeof(struct signallist));
  1164. X  for(i=0;i<12;i++)localptr->signalname[i]=signalname[i];
  1165. X  localptr->succ = siglistleader;
  1166. X  localptr->special = 0;
  1167. X  siglistleader = localptr;
  1168. X  }
  1169. X return(localptr);
  1170. X}
  1171. /
  1172. echo 'x - wirewrap.1'
  1173. sed 's/^X//' > wirewrap.1 << '/'
  1174. X.tr ~.
  1175. X.TH WIREWRAP 1 geowhiz
  1176. X.SH NAME
  1177. Xwirewrap - Wire Wrap List Generator
  1178. X.SH SYNOPSIS
  1179. X.I wirewrap
  1180. X> outputfile < inputfile
  1181. X.SH DESCRIPTION
  1182. X.I Wirewrap
  1183. Xinputs a file consisting of description of 
  1184. Xa wirewrap board.  It outputs three listings which
  1185. Xare intended to aid the wrapping, debugging, and maintanance of
  1186. Xthe board.  The input data file is designed to be easy to prepare
  1187. Xfrom a schematic diagram of the board.
  1188. X.PP
  1189. XThe input consists of a list of descriptions of the placements and
  1190. Xsignals for each chip.  Following this list is (optionally) a blank
  1191. Xline followed by a list of "special signal names" which will be
  1192. Xdescribed later.
  1193. X.SH INPUT FORMAT
  1194. XData is entered in free format.  Comments are surrounded by /* ... */ as
  1195. Xin C source programs.  The input consists of a sequence of :chip statements
  1196. Xoptionally followed by a sequence of :special statements.
  1197. X.PP
  1198. XThe :chip statement describes the 
  1199. Xlocation of a component and the signals on its pins.
  1200. XThe :chip statement is made up of the word ``:chip'' followed by:
  1201. X.PP
  1202. X.TP 10
  1203. X.B Name
  1204. X( IC1, 74c123, Stuffer, FF3, etc )
  1205. X.RE
  1206. X.TP 10
  1207. X.B Grid
  1208. X( Position in the component matrix; A5, B2, etc )
  1209. X.RE
  1210. X.TP 10
  1211. X.B Npins
  1212. X( Number of pins for this component; 8, 14, 16, 20, etc )
  1213. X.RE
  1214. X.TP 10
  1215. X.B Width
  1216. X( Spacing between rows of pins on this component in 1/10'th inches.
  1217. X0=SIP, 3=normal dip)
  1218. X.RE
  1219. X.TP 10
  1220. X.B Row
  1221. X( Position of pin 1 in the pin matrix )
  1222. X.RE
  1223. X.TP 10
  1224. X.B Column
  1225. X( Position of pin 1 in the pin matrix )
  1226. X.RE
  1227. X.TP 10
  1228. X.B Orientation
  1229. X( Orientation (i.e. rotation) of component; 1-4. SEE BELOW )
  1230. X.RE
  1231. X.TP 10
  1232. X.B Sig_name_for_pin_1
  1233. X.RE
  1234. X.TP 10
  1235. X.B Sig_name_for_pin_2
  1236. X.RE
  1237. X.TP 10
  1238. X\(bu
  1239. X.RE
  1240. X.TP 10
  1241. X\(bu
  1242. X.RE
  1243. X.TP 10
  1244. X\(bu
  1245. X.RE
  1246. X.TP 10
  1247. X.B Sig_name_for_pin_Npin
  1248. X.RE
  1249. X.PP
  1250. XA pin without a signal on it must have a ``.'' entry to show that it's `unused'.
  1251. X.PP
  1252. X.ne 10
  1253. XThe orientation entrys are as follows (viewing component side):
  1254. X.PP
  1255. X.nf
  1256. X.cs 1 21
  1257. X                        +----+               1         1/----+
  1258. X        +--------+      |    |      +--------\\          |    |
  1259. X        |   1    |      |  2 |      |   3    |          |  4 |
  1260. X        \\--------+      |    |      +--------+          |    |
  1261. X        1               +----/1                         +----+
  1262. X.cs
  1263. X.fi
  1264. X.PP
  1265. X.ne 15
  1266. XThe Row,Col numbering system is as follows:
  1267. X.PP
  1268. X.nf
  1269. X.cs 1 21
  1270. X                                                0   C o l #
  1271. X                ^                             0 +--------------->
  1272. X                |                               |
  1273. X              R |   Component                 R |   Wireing
  1274. X              o |   Side                      o |   Side
  1275. X              w |   Viewing                   w |   Viewing
  1276. X              # |   Chips                     # |   Pins
  1277. X                |                               |
  1278. X              0 +--------------->               V
  1279. X                0   C o l #
  1280. X.cs
  1281. X.fi
  1282. X.PP
  1283. XThe Name and Grid fields are provided as a means of identifying
  1284. Xthe components.  The wirewrap program does not use these fields
  1285. Xfor placement or routing.  They are passed through to the output
  1286. Xlistings as a way to refer the listings back to the schematics.
  1287. X.PP
  1288. XThe :special statement can direct the wirewrap program to handle special
  1289. Xsignals like power and ground, or any signal requiring special attention
  1290. Xfor routing.  These signal names are entered following the word ``:special''.
  1291. X.SH EXAMPLE
  1292. X.PP
  1293. X.nf
  1294. X.cs 1 21
  1295. X                         SIGA
  1296. X    ______________________________________________________________
  1297. X    |                                                            |
  1298. X    |   |---- \\              |---- \\              |---- \\        |
  1299. X    ----|1      \\   SIGB  ---|4      \\   SIGC  ---|8      \\      |
  1300. X     |  |      3 |0-------|  |      6 |0-------|  |     10 |0----|  
  1301. X     ---|2      /         ---|5      /         ---|9      /    
  1302. X        |---- /              |---- /              |---- /      
  1303. X.cs
  1304. X.fi
  1305. X.PP
  1306. X.PP
  1307. XIn this example, a 3 stage ring oscillator is made up of a single chip.
  1308. XThe chip is packaged as a standard 14 pin DIP.
  1309. XThe chip is placed in the lower left corner of the board, in orientation
  1310. X1.
  1311. X(Viewing from the wiring side, facing pins, as in the above diagram.)
  1312. XThis is postion A1 on the circuit board.
  1313. XThe power and ground for this circuit are on pins 14 and 7 respectively,
  1314. Xand are both special signals since, for example, they are implemented by
  1315. Xetched traces on the board.
  1316. X.PP
  1317. X:chip
  1318. X.br
  1319. XIC1-Osc                       /* Name */
  1320. X.br
  1321. XA1                            /* Grid */
  1322. X.br
  1323. X14                            /* Npins */
  1324. X.br
  1325. X3                             /* Width */
  1326. X.br
  1327. X0                             /* Row */
  1328. X.br
  1329. X0                             /* Col */
  1330. X.br
  1331. X1                             /* Orientation */
  1332. X.br
  1333. XSIGA                          /* Pin 1. */
  1334. X.br
  1335. XSIGA                          /* Pin 2. */
  1336. X.br
  1337. XSIGB                          /* Pin 3. */
  1338. X.br
  1339. XSIGB                          /* Pin 4. */
  1340. X.br
  1341. XSIGB                          /* Pin 5. */
  1342. X.br
  1343. XSIGC                          /* Pin 6. */
  1344. X.br
  1345. XGND                           /* Pin 7. */
  1346. X.br
  1347. XSIGC                          /* Pin 8. */
  1348. X.br
  1349. XSIGC                          /* Pin 9. */
  1350. X.br
  1351. XSIGA                          /* Pin 10. */
  1352. X.br
  1353. X~                             /* Pin 11. */
  1354. X.br
  1355. X~                             /* Pin 12. */
  1356. X.br
  1357. X~                             /* Pin 13. */
  1358. X.br
  1359. X5V                            /* Pin 14. */
  1360. X.br
  1361. X:special                      /* Start of special signals */
  1362. X.br
  1363. X5V                            /* 5V is a special signal. */
  1364. X.br
  1365. XGND                           /* GND is also a special signal. */
  1366. X.PP
  1367. X.ne 10
  1368. XSince the input is free format, This could be written more succinctly as:
  1369. X.PP
  1370. X:chip
  1371. XIC1-Osc A1 14 3 0 0 1
  1372. X.br
  1373. XSIGA SIGA SIGB SIGB SIGB SIGC GND
  1374. X.br
  1375. XSIGC SIGC SIGA .    .    .    5V
  1376. X.br
  1377. X:special 5V GND
  1378. X.SH AUTHOR
  1379. XBruce Karsh, University of Wisconsin, Department of Geology & Geophysics
  1380. X.br
  1381. XAugust 16, 1985
  1382. /
  1383. echo 'Part 01 of wirewrap program complete.'
  1384. exit
  1385.  
  1386.  
  1387.