From d637068b6209bf4552d4bc7d2fe6b8b769c9b8e4 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 9 Sep 2007 14:55:11 +0200 Subject: Added HE14 connectors library and device creation ULP script. Some Xilinx CPLD library fixes. --- tools/eagle/lbr/apbteam_con-amp-he14.lbr | Bin 0 -> 33582 bytes tools/eagle/lbr/apbteam_xilinx-cpld.lbr | Bin 41038 -> 41093 bytes tools/eagle/lbr/make-con-amp-he14-devices.ulp | 51 ++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 tools/eagle/lbr/apbteam_con-amp-he14.lbr create mode 100644 tools/eagle/lbr/make-con-amp-he14-devices.ulp diff --git a/tools/eagle/lbr/apbteam_con-amp-he14.lbr b/tools/eagle/lbr/apbteam_con-amp-he14.lbr new file mode 100644 index 00000000..debeefe3 Binary files /dev/null and b/tools/eagle/lbr/apbteam_con-amp-he14.lbr differ diff --git a/tools/eagle/lbr/apbteam_xilinx-cpld.lbr b/tools/eagle/lbr/apbteam_xilinx-cpld.lbr index 3402bb1d..7e1ca5bf 100644 Binary files a/tools/eagle/lbr/apbteam_xilinx-cpld.lbr and b/tools/eagle/lbr/apbteam_xilinx-cpld.lbr differ diff --git a/tools/eagle/lbr/make-con-amp-he14-devices.ulp b/tools/eagle/lbr/make-con-amp-he14-devices.ulp new file mode 100644 index 00000000..5cb4ef0f --- /dev/null +++ b/tools/eagle/lbr/make-con-amp-he14-devices.ulp @@ -0,0 +1,51 @@ +// ULP to automatically create devices. +// Created by Nicolas Schodet. + +string make_device (int npad) { + int i, j; + string dev; + sprintf (dev, "E?1X%02d", npad); + string pac[] = { "C", "D" }; + string devcmd = "EDIT " + dev + ".dev;\n"; + devcmd += "PREFIX 'J';\n"; + string npads; + sprintf (npads, "%d", npad); + devcmd += "DESCRIPTION 'Male header simple row, " + npads + " positions';\n"; + devcmd += "VALUE OFF;\n"; + real pos = (npad - 1) * 0.2 / 2; + for (i = 1; i <= npad; i++) { + string sym = i == 1 ? "MS" : "M"; + string addsym; + sprintf (addsym, "ADD %s '-%d' 0 Always (0 %.1f);\n", sym, i, pos); + devcmd += addsym; + pos -= 0.2; + } + for (j = 0; j < 2; j++) { + string pacs; + sprintf (pacs, "E%s1X%02d", pac[j], npad); + devcmd += "PACKAGE '" + pacs + "' '" + pac[j] + "';\n"; + for (i = 1; i <= npad; i++) { + string is; + sprintf (is, "%d", i); + devcmd += "CONNECT '-" + is + ".S' '" + is + "';\n"; + } + } + devcmd += "TECHNOLOGY '';\n"; + devcmd += "WIN FIT;\n"; + return devcmd; +} + +if (0) { + int res = dlgDialog ("Device creation") { + dlgTextView (make_device (4)); + }; + exit (0); +} else { + int i + string allcmd = ""; + for (i = 1; i <= 10; i++) + allcmd += make_device (i); + exit (allcmd); +} + +// vim:ft=conf:sw=4: -- cgit v1.2.3