[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-223-g79ab7bd)
The branch, master has been updated
via 79ab7bd82c3f2bb5266a6065512730157798ec2d (commit)
from 87a19a19e52a37f8ad14ae0c4c68f3292b0c3285 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
gnetlist/docs/gnetlist.1 | 2 +
gnetlist/scheme/Makefile.am | 2 +-
gnetlist/scheme/gnet-liquidpcb.scm | 115 ++++++++++++++++++++++++++++++++++
gnetlist/tests/Makefile.am | 10 +++
gnetlist/tests/powersupply.liquidpcb | 57 +++++++++++++++++
gnetlist/tests/singlenet.liquidpcb | 22 +++++++
6 files changed, 207 insertions(+), 1 deletions(-)
create mode 100644 gnetlist/scheme/gnet-liquidpcb.scm
create mode 100644 gnetlist/tests/powersupply.liquidpcb
create mode 100644 gnetlist/tests/singlenet.liquidpcb
=================
Commit Messages
=================
commit 79ab7bd82c3f2bb5266a6065512730157798ec2d
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Mon Oct 13 21:44:38 2008 -0400
Added first cut of the LiquidPCB (http://www.liquidpcb.org) backend
Also added a couple of trivial tests for this new backend
as well as updated the man page for gnetlist.
:100644 100644 2b4ecaa... 4803c2f... M gnetlist/docs/gnetlist.1
:100644 100644 43d69bf... 6f96601... M gnetlist/scheme/Makefile.am
:000000 100644 0000000... 076dd3a... A gnetlist/scheme/gnet-liquidpcb.scm
:100644 100644 b232426... 4cb223d... M gnetlist/tests/Makefile.am
:000000 100644 0000000... 8089953... A gnetlist/tests/powersupply.liquidpcb
:000000 100644 0000000... 6039e38... A gnetlist/tests/singlenet.liquidpcb
=========
Changes
=========
commit 79ab7bd82c3f2bb5266a6065512730157798ec2d
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date: Mon Oct 13 21:44:38 2008 -0400
Added first cut of the LiquidPCB (http://www.liquidpcb.org) backend
Also added a couple of trivial tests for this new backend
as well as updated the man page for gnetlist.
diff --git a/gnetlist/docs/gnetlist.1 b/gnetlist/docs/gnetlist.1
index 2b4ecaa..4803c2f 100644
--- a/gnetlist/docs/gnetlist.1
+++ b/gnetlist/docs/gnetlist.1
@@ -81,6 +81,8 @@ Osmond format netlist backend (-g osmond)
Eagle netlist format (-g eagle)
.IP \[bu]
Netlister for symbolic circuit analysis using Mathematica (-g mathematica)
+.IP \[bu]
+LiquidPCB format netlist backend (-g liquidpcb )
For more info on these formats please look at the README.*
diff --git a/gnetlist/scheme/Makefile.am b/gnetlist/scheme/Makefile.am
index 43d69bf..6f96601 100644
--- a/gnetlist/scheme/Makefile.am
+++ b/gnetlist/scheme/Makefile.am
@@ -20,7 +20,7 @@ DIST_SCM = gnet-PCB.scm gnet-allegro.scm gnet-bom.scm gnet-geda.scm \
gnet-futurenet2.scm gnet-cascade.scm \
gnet-redac.scm gnet-systemc.scm gnet-eagle.scm \
gnet-pcbpins.scm gnet-calay.scm gnet-osmond.scm \
- gnet-mathematica.scm
+ gnet-mathematica.scm gnet-liquidpcb.scm
EXTRA_DIST = $(DIST_SCM) $(SCM_SRCS)
diff --git a/gnetlist/scheme/gnet-liquidpcb.scm b/gnetlist/scheme/gnet-liquidpcb.scm
new file mode 100644
index 0000000..076dd3a
--- /dev/null
+++ b/gnetlist/scheme/gnet-liquidpcb.scm
@@ -0,0 +1,115 @@
+;;; gEDA - GPL Electronic Design Automation
+;;; gnetlist - gEDA Netlist
+;;; Copyright (C) 2008 Ales Hvezda
+;;;
+;;; This program is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 2 of the License, or
+;;; (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program; if not, write to the Free Software
+;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; --------------------------------------------------------------------------
+;;
+;; liquid pcb gnetlist backend
+;;
+
+;;
+;; Top level header
+;;
+(define liquidpcb:write-top-header
+ (lambda (p)
+ (display "<LiquidPCB>" p)
+ (newline p)))
+
+;;
+;; Bottom footer
+;;
+(define liquidpcb:write-bottom-footer
+ (lambda (p)
+ (display "</LiquidPCB>" p)
+ (newline p)))
+
+;;
+;; Header for netlist section
+;;
+(define liquidpcb:start-netlist
+ (lambda (p)
+ (display " <netlist name=\"Main netlist\">" p)
+ (newline p)))
+
+;;
+;; footer for netlist section
+;;
+(define liquidpcb:end-netlist
+ (lambda (p)
+ (display " </netlist>" p)
+ (newline p)))
+
+;;
+;; Write the individual net connections
+;;
+(define liquidpcb:write-connections
+ (lambda (nets port)
+ (if (not (null? nets))
+ (begin
+ (display " <netnode component=\"" port)
+ (display (car (car nets)) port)
+ (display "\" pin=" port)
+ (display (car (cdr (car nets))) port)
+ (display " />" port)
+ (newline port)
+ (liquidpcb:write-connections (cdr nets) port)))))
+
+
+;;
+;; Write netname : uref pin, uref pin, ...
+;;
+(define liquidpcb:write-net
+ (lambda (port netnames)
+ (if (not (null? netnames))
+ (let ((netname (car netnames)))
+ (begin
+ (display " <net name=\"" port)
+ (display netname port)
+ (display "\">" port)
+ (newline port)
+ (liquidpcb:write-connections (gnetlist:get-all-connections netname) port)
+ (display " </net>" port)
+ (newline port)
+ (liquidpcb:write-net port (cdr netnames)))))))
+
+;;
+;; Write the netlist section of the liquidPCB format
+;;
+(define liquidpcb:write-netlist
+ (lambda (port)
+ (let ((all-uniq-nets (gnetlist:get-all-unique-nets "dummy")))
+ (liquidpcb:write-net port all-uniq-nets))))
+
+;;
+;; Highest level function
+;;
+(define liquidpcb
+ (lambda (output-filename)
+ (let ((port (open-output-file output-filename)))
+ (begin
+ (liquidpcb:write-top-header port)
+ (liquidpcb:start-netlist port)
+ (liquidpcb:write-netlist port)
+ (liquidpcb:end-netlist port))
+ (liquidpcb:write-bottom-footer port)
+ (close-output-port port))))
+
+;;
+;; liquid PCB netlist backend ends
+;;
+;; --------------------------------------------------------------------------
+
diff --git a/gnetlist/tests/Makefile.am b/gnetlist/tests/Makefile.am
index b232426..4cb223d 100644
--- a/gnetlist/tests/Makefile.am
+++ b/gnetlist/tests/Makefile.am
@@ -9,8 +9,10 @@ EXTRA_DIST = runtest.sh \
powersupply.bae powersupply.geda powersupply.maxascii \
powersupply.pads powersupply.protelII powersupply.sch \
powersupply.tango singlenet.PCB singlenet.geda singlenet.pads \
+ powersupply.liquidpcb \
singlenet.pcbpins \
singlenet.protelII singlenet.sch stack_1.geda amp.spice-sdb \
+ singlenet.liquidpcb \
darlington.spice-sdb skt.switcap test.ana multiequal.sch \
multiequal.spice-sdb gnetlistrc.vhdl
@@ -54,6 +56,10 @@ tests:
$(SRCDIR)/runtest.sh $(SRCDIR)/singlenet.sch protelII \
$(BUILDDIR) $(SRCDIR)
+# singlenet liquidpcb
+ $(SRCDIR)/runtest.sh $(SRCDIR)/singlenet.sch liquidpcb \
+ $(BUILDDIR) $(SRCDIR)
+
# powersupply PCB
$(SRCDIR)/runtest.sh $(SRCDIR)/powersupply.sch PCB \
$(BUILDDIR) $(SRCDIR)
@@ -86,6 +92,10 @@ tests:
$(SRCDIR)/runtest.sh $(SRCDIR)/powersupply.sch tango \
$(BUILDDIR) $(SRCDIR)
+# powersupply liquidpcb
+ $(SRCDIR)/runtest.sh $(SRCDIR)/powersupply.sch liquidpcb \
+ $(BUILDDIR) $(SRCDIR)
+
# multiple equals in attributes SPICE-SDB
$(SRCDIR)/runtest.sh $(SRCDIR)/multiequal.sch spice-sdb \
$(BUILDDIR) $(SRCDIR)
diff --git a/gnetlist/tests/powersupply.liquidpcb b/gnetlist/tests/powersupply.liquidpcb
new file mode 100644
index 0000000..8089953
--- /dev/null
+++ b/gnetlist/tests/powersupply.liquidpcb
@@ -0,0 +1,57 @@
+<LiquidPCB>
+ <netlist name="Main netlist">
+ <net name="ten">
+ <netnode component="U2" pin=1 />
+ <netnode component="R1" pin=2 />
+ <netnode component="C3" pin=1 />
+ <netnode component="R2" pin=1 />
+ </net>
+ <net name="eleven">
+ <netnode component="U2" pin=2 />
+ <netnode component="C4" pin=1 />
+ <netnode component="R2" pin=2 />
+ </net>
+ <net name="GND">
+ <netnode component="CONN1" pin=3 />
+ </net>
+ <net name="one">
+ <netnode component="S1" pin=1 />
+ <netnode component="CONN1" pin=1 />
+ </net>
+ <net name="five">
+ <netnode component="CONN1" pin=2 />
+ <netnode component="T1" pin=2 />
+ </net>
+ <net name="three">
+ <netnode component="T1" pin=1 />
+ <netnode component="F1" pin=2 />
+ </net>
+ <net name="two">
+ <netnode component="S1" pin=2 />
+ <netnode component="F1" pin=1 />
+ </net>
+ <net name="six">
+ <netnode component="T1" pin=3 />
+ <netnode component="U1" pin=4 />
+ </net>
+ <net name="seven">
+ <netnode component="T1" pin=4 />
+ <netnode component="U1" pin=3 />
+ </net>
+ <net name="nine">
+ <netnode component="C4" pin=2 />
+ <netnode component="C3" pin=2 />
+ <netnode component="R1" pin=3 />
+ <netnode component="R1" pin=1 />
+ <netnode component="C2" pin=2 />
+ <netnode component="C1" pin=2 />
+ <netnode component="U1" pin=2 />
+ </net>
+ <net name="eight">
+ <netnode component="U2" pin=3 />
+ <netnode component="C2" pin=1 />
+ <netnode component="C1" pin=1 />
+ <netnode component="U1" pin=1 />
+ </net>
+ </netlist>
+</LiquidPCB>
diff --git a/gnetlist/tests/singlenet.liquidpcb b/gnetlist/tests/singlenet.liquidpcb
new file mode 100644
index 0000000..6039e38
--- /dev/null
+++ b/gnetlist/tests/singlenet.liquidpcb
@@ -0,0 +1,22 @@
+<LiquidPCB>
+ <netlist name="Main netlist">
+ <net name="SINGLE_NET2">
+ <netnode component="U100" pin=1 />
+ <netnode component="U100" pin=3 />
+ </net>
+ <net name="GND">
+ <netnode component="U100" pin=7 />
+ </net>
+ <net name="Vcc">
+ <netnode component="U100" pin=14 />
+ </net>
+ <net name="SINGLE_NET">
+ <netnode component="U100" pin=4 />
+ <netnode component="U100" pin=5 />
+ <netnode component="U100" pin=10 />
+ <netnode component="U100" pin=8 />
+ <netnode component="U100" pin=9 />
+ <netnode component="U100" pin=6 />
+ </net>
+ </netlist>
+</LiquidPCB>
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs