[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-393-g4ff7f41)



The branch, master has been updated
       via  4ff7f410e4e601b85e5b6d0b8d4b6b930e49072b (commit)
       via  bfd49ad477a49235c3e5ee1eda54e5009f6e347a (commit)
      from  55850bb331afc0596a18dac1807a487cb475b30d (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/scheme/gnet-systemc.scm                   |  275 ++++++++++----------
 .../tests/common/outputs/systemc/JD-output.net     |  101 +++++++
 gnetlist/tests/common/outputs/systemc/JD.retcode   |    2 +-
 .../common/outputs/systemc/JD_Include-output.net   |  101 +++++++
 .../common/outputs/systemc/JD_Include.retcode      |    2 +-
 .../outputs/systemc/JD_Include_nomunge-output.net  |  101 +++++++
 .../outputs/systemc/JD_Include_nomunge.retcode     |    2 +-
 .../common/outputs/systemc/JD_Sort-output.net      |  101 +++++++
 .../tests/common/outputs/systemc/JD_Sort.retcode   |    2 +-
 .../outputs/systemc/JD_Sort_nomunge-output.net     |  101 +++++++
 .../common/outputs/systemc/JD_Sort_nomunge.retcode |    2 +-
 gnetlist/tests/common/outputs/systemc/Makefile.am  |   15 +
 .../outputs/systemc/SlottedOpamps-output.net       |   50 ++++
 .../common/outputs/systemc/SlottedOpamps.retcode   |    2 +-
 .../common/outputs/systemc/TwoStageAmp-output.net  |  168 ++++++++++++
 .../common/outputs/systemc/TwoStageAmp.retcode     |    2 +-
 .../outputs/systemc/TwoStageAmp_Include-output.net |  168 ++++++++++++
 .../outputs/systemc/TwoStageAmp_Include.retcode    |    2 +-
 .../outputs/systemc/TwoStageAmp_Sort-output.net    |  168 ++++++++++++
 .../outputs/systemc/TwoStageAmp_Sort.retcode       |    2 +-
 .../common/outputs/systemc/cascade-output.net      |   77 ++++++
 .../tests/common/outputs/systemc/cascade.retcode   |    2 +-
 .../common/outputs/systemc/multiequal-output.net   |   42 +++
 .../common/outputs/systemc/multiequal.retcode      |    2 +-
 .../common/outputs/systemc/netattrib-output.net    |   59 +++++
 .../tests/common/outputs/systemc/netattrib.retcode |    2 +-
 .../common/outputs/systemc/powersupply-output.net  |  115 ++++++++
 .../common/outputs/systemc/powersupply.retcode     |    2 +-
 .../common/outputs/systemc/singlenet-output.net    |   47 ++++
 .../tests/common/outputs/systemc/singlenet.retcode |    2 +-
 30 files changed, 1572 insertions(+), 145 deletions(-)
 create mode 100644 gnetlist/tests/common/outputs/systemc/JD-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/JD_Include-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/JD_Include_nomunge-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/JD_Sort-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/SlottedOpamps-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/TwoStageAmp-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/cascade-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/multiequal-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/netattrib-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/powersupply-output.net
 create mode 100644 gnetlist/tests/common/outputs/systemc/singlenet-output.net


=================
 Commit Messages
=================

commit 4ff7f410e4e601b85e5b6d0b8d4b6b930e49072b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 18 20:51:48 2008 +0000

    gnetlist: Update common test-suite outputs for "systemc" backend
    
    Updated after fixing the backend to run again.
    
    NB: A cursory inspection of the "golden" files, suggests that the outputs
        being checked in are not actually correct. However, the test-suite
        will serve to tell us if any changes are made in gnetlist which affect
        this backend.

:000000 100644 0000000... 8c3783a... A	gnetlist/tests/common/outputs/systemc/JD-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/JD.retcode
:000000 100644 0000000... 8c3783a... A	gnetlist/tests/common/outputs/systemc/JD_Include-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/JD_Include.retcode
:000000 100644 0000000... 8c3783a... A	gnetlist/tests/common/outputs/systemc/JD_Include_nomunge-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/JD_Include_nomunge.retcode
:000000 100644 0000000... 8c3783a... A	gnetlist/tests/common/outputs/systemc/JD_Sort-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/JD_Sort.retcode
:000000 100644 0000000... 8c3783a... A	gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge.retcode
:100644 100644 991d090... bf3dd39... M	gnetlist/tests/common/outputs/systemc/Makefile.am
:000000 100644 0000000... 8fbb828... A	gnetlist/tests/common/outputs/systemc/SlottedOpamps-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/SlottedOpamps.retcode
:000000 100644 0000000... bc07ad1... A	gnetlist/tests/common/outputs/systemc/TwoStageAmp-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/TwoStageAmp.retcode
:000000 100644 0000000... bc07ad1... A	gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include.retcode
:000000 100644 0000000... bc07ad1... A	gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort.retcode
:000000 100644 0000000... 14254df... A	gnetlist/tests/common/outputs/systemc/cascade-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/cascade.retcode
:000000 100644 0000000... c65bb1a... A	gnetlist/tests/common/outputs/systemc/multiequal-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/multiequal.retcode
:000000 100644 0000000... 295e05c... A	gnetlist/tests/common/outputs/systemc/netattrib-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/netattrib.retcode
:000000 100644 0000000... a12b8de... A	gnetlist/tests/common/outputs/systemc/powersupply-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/powersupply.retcode
:000000 100644 0000000... b65850e... A	gnetlist/tests/common/outputs/systemc/singlenet-output.net
:100644 100644 d00491f... 573541a... M	gnetlist/tests/common/outputs/systemc/singlenet.retcode

commit bfd49ad477a49235c3e5ee1eda54e5009f6e347a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 18 20:44:59 2008 +0000

    gnetlist: Fixup systemc backend
    
    Don't escape < and > characters in strings, as guile doesn't like this.
    
    Apply similar fixes as those made to the VHDL and verilog backends after
    some changes in gnetlist to accomodate slotting in spice-sdb. Since the
    netlist backend is loaded before gnetlist has traversed the schematic, it
    must not execute any code which queries gnetlist on load. All such work
    is to be done only when gnetlist invokes the "systemc" method.
    
    Move (define c_p #f) to outside (systemc:components ...)'s (lambda ...)
    function, since guile doesn't appreciate us mixing declarations and
    expressions. This variable is tested and (set! c_p #t) later on, which
    doesn't feel very scheme like. The fix works for now though.
    
    Check to see if the regexp matched netname, checking for "name<type>" has
    hit a match before trying to get a piece of that match. If the regexp
    returns #f, instead just treat the identifier as a "name" and use that.
    This allows net names which don't conform to the regexp to at least give
    some vaguely sensible output, without crashing the backend.
    
    Comment some debugging prints to stdout, giving a cleaner looking run.

:100644 100644 a9f4a44... 7a6f9ba... M	gnetlist/scheme/gnet-systemc.scm

=========
 Changes
=========

commit 4ff7f410e4e601b85e5b6d0b8d4b6b930e49072b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 18 20:51:48 2008 +0000

    gnetlist: Update common test-suite outputs for "systemc" backend
    
    Updated after fixing the backend to run again.
    
    NB: A cursory inspection of the "golden" files, suggests that the outputs
        being checked in are not actually correct. However, the test-suite
        will serve to tell us if any changes are made in gnetlist which affect
        this backend.

diff --git a/gnetlist/tests/common/outputs/systemc/JD-output.net b/gnetlist/tests/common/outputs/systemc/JD-output.net
new file mode 100644
index 0000000..8c3783a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/JD-output.net
@@ -0,0 +1,101 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "vpulse.h"
+#include "CAPACITOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "PMOS_TRANSISTOR.h"
+#include "LVD.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> Vdd1;
+sc_signal<0> GND;
+sc_signal<0> LVH;
+sc_signal<0> i;
+sc_signal<0> p;
+sc_signal<0> m;
+
+
+/* Package instantiations */
+vpulse V1;
+CAPACITOR Cm;
+model A1;
+RESISTOR Rt;
+PMOS_TRANSISTOR M1;
+LVD X1;
+RESISTOR Rlp;
+VOLTAGE_SOURCE Vdd;
+RESISTOR Rlm;
+CAPACITOR Cp;
+RESISTOR Rb;
+
+SC_CTOR(not found):
+    V1("V1"),
+    Cm("Cm"),
+    A1("A1"),
+    Rt("Rt"),
+    M1("M1"),
+    X1("X1"),
+    Rlp("Rlp"),
+    Vdd("Vdd"),
+    Rlm("Rlm"),
+    Cp("Cp"),
+    Rb("Rb")
+  {
+    V1.1(i);
+    V1.2(GND);
+
+    Cm.1(m);
+    Cm.2(GND);
+
+    Rt.2(m);
+    Rt.1(p);
+
+    M1.S(Vdd1);
+    M1.B(Vdd1);
+    M1.D(LVH);
+    M1.G(LVH);
+
+    X1.4(m);
+    X1.5(p);
+    X1.1(i);
+    X1.3(LVH);
+    X1.2(GND);
+    X1.6(Vdd1);
+    X1.7(GND);
+
+    Rlp.2(Vdd1);
+    Rlp.1(p);
+
+    Vdd.1(Vdd1);
+    Vdd.2(GND);
+
+    Rlm.2(GND);
+    Rlm.1(m);
+
+    Cp.1(p);
+    Cp.2(GND);
+
+    Rb.2(LVH);
+    Rb.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/JD.retcode b/gnetlist/tests/common/outputs/systemc/JD.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/JD.retcode
+++ b/gnetlist/tests/common/outputs/systemc/JD.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Include-output.net b/gnetlist/tests/common/outputs/systemc/JD_Include-output.net
new file mode 100644
index 0000000..8c3783a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/JD_Include-output.net
@@ -0,0 +1,101 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "vpulse.h"
+#include "CAPACITOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "PMOS_TRANSISTOR.h"
+#include "LVD.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> Vdd1;
+sc_signal<0> GND;
+sc_signal<0> LVH;
+sc_signal<0> i;
+sc_signal<0> p;
+sc_signal<0> m;
+
+
+/* Package instantiations */
+vpulse V1;
+CAPACITOR Cm;
+model A1;
+RESISTOR Rt;
+PMOS_TRANSISTOR M1;
+LVD X1;
+RESISTOR Rlp;
+VOLTAGE_SOURCE Vdd;
+RESISTOR Rlm;
+CAPACITOR Cp;
+RESISTOR Rb;
+
+SC_CTOR(not found):
+    V1("V1"),
+    Cm("Cm"),
+    A1("A1"),
+    Rt("Rt"),
+    M1("M1"),
+    X1("X1"),
+    Rlp("Rlp"),
+    Vdd("Vdd"),
+    Rlm("Rlm"),
+    Cp("Cp"),
+    Rb("Rb")
+  {
+    V1.1(i);
+    V1.2(GND);
+
+    Cm.1(m);
+    Cm.2(GND);
+
+    Rt.2(m);
+    Rt.1(p);
+
+    M1.S(Vdd1);
+    M1.B(Vdd1);
+    M1.D(LVH);
+    M1.G(LVH);
+
+    X1.4(m);
+    X1.5(p);
+    X1.1(i);
+    X1.3(LVH);
+    X1.2(GND);
+    X1.6(Vdd1);
+    X1.7(GND);
+
+    Rlp.2(Vdd1);
+    Rlp.1(p);
+
+    Vdd.1(Vdd1);
+    Vdd.2(GND);
+
+    Rlm.2(GND);
+    Rlm.1(m);
+
+    Cp.1(p);
+    Cp.2(GND);
+
+    Rb.2(LVH);
+    Rb.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Include.retcode b/gnetlist/tests/common/outputs/systemc/JD_Include.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/JD_Include.retcode
+++ b/gnetlist/tests/common/outputs/systemc/JD_Include.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge-output.net b/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge-output.net
new file mode 100644
index 0000000..8c3783a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge-output.net
@@ -0,0 +1,101 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "vpulse.h"
+#include "CAPACITOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "PMOS_TRANSISTOR.h"
+#include "LVD.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> Vdd1;
+sc_signal<0> GND;
+sc_signal<0> LVH;
+sc_signal<0> i;
+sc_signal<0> p;
+sc_signal<0> m;
+
+
+/* Package instantiations */
+vpulse V1;
+CAPACITOR Cm;
+model A1;
+RESISTOR Rt;
+PMOS_TRANSISTOR M1;
+LVD X1;
+RESISTOR Rlp;
+VOLTAGE_SOURCE Vdd;
+RESISTOR Rlm;
+CAPACITOR Cp;
+RESISTOR Rb;
+
+SC_CTOR(not found):
+    V1("V1"),
+    Cm("Cm"),
+    A1("A1"),
+    Rt("Rt"),
+    M1("M1"),
+    X1("X1"),
+    Rlp("Rlp"),
+    Vdd("Vdd"),
+    Rlm("Rlm"),
+    Cp("Cp"),
+    Rb("Rb")
+  {
+    V1.1(i);
+    V1.2(GND);
+
+    Cm.1(m);
+    Cm.2(GND);
+
+    Rt.2(m);
+    Rt.1(p);
+
+    M1.S(Vdd1);
+    M1.B(Vdd1);
+    M1.D(LVH);
+    M1.G(LVH);
+
+    X1.4(m);
+    X1.5(p);
+    X1.1(i);
+    X1.3(LVH);
+    X1.2(GND);
+    X1.6(Vdd1);
+    X1.7(GND);
+
+    Rlp.2(Vdd1);
+    Rlp.1(p);
+
+    Vdd.1(Vdd1);
+    Vdd.2(GND);
+
+    Rlm.2(GND);
+    Rlm.1(m);
+
+    Cp.1(p);
+    Cp.2(GND);
+
+    Rb.2(LVH);
+    Rb.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge.retcode b/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge.retcode
+++ b/gnetlist/tests/common/outputs/systemc/JD_Include_nomunge.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Sort-output.net b/gnetlist/tests/common/outputs/systemc/JD_Sort-output.net
new file mode 100644
index 0000000..8c3783a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/JD_Sort-output.net
@@ -0,0 +1,101 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "vpulse.h"
+#include "CAPACITOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "PMOS_TRANSISTOR.h"
+#include "LVD.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> Vdd1;
+sc_signal<0> GND;
+sc_signal<0> LVH;
+sc_signal<0> i;
+sc_signal<0> p;
+sc_signal<0> m;
+
+
+/* Package instantiations */
+vpulse V1;
+CAPACITOR Cm;
+model A1;
+RESISTOR Rt;
+PMOS_TRANSISTOR M1;
+LVD X1;
+RESISTOR Rlp;
+VOLTAGE_SOURCE Vdd;
+RESISTOR Rlm;
+CAPACITOR Cp;
+RESISTOR Rb;
+
+SC_CTOR(not found):
+    V1("V1"),
+    Cm("Cm"),
+    A1("A1"),
+    Rt("Rt"),
+    M1("M1"),
+    X1("X1"),
+    Rlp("Rlp"),
+    Vdd("Vdd"),
+    Rlm("Rlm"),
+    Cp("Cp"),
+    Rb("Rb")
+  {
+    V1.1(i);
+    V1.2(GND);
+
+    Cm.1(m);
+    Cm.2(GND);
+
+    Rt.2(m);
+    Rt.1(p);
+
+    M1.S(Vdd1);
+    M1.B(Vdd1);
+    M1.D(LVH);
+    M1.G(LVH);
+
+    X1.4(m);
+    X1.5(p);
+    X1.1(i);
+    X1.3(LVH);
+    X1.2(GND);
+    X1.6(Vdd1);
+    X1.7(GND);
+
+    Rlp.2(Vdd1);
+    Rlp.1(p);
+
+    Vdd.1(Vdd1);
+    Vdd.2(GND);
+
+    Rlm.2(GND);
+    Rlm.1(m);
+
+    Cp.1(p);
+    Cp.2(GND);
+
+    Rb.2(LVH);
+    Rb.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Sort.retcode b/gnetlist/tests/common/outputs/systemc/JD_Sort.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/JD_Sort.retcode
+++ b/gnetlist/tests/common/outputs/systemc/JD_Sort.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge-output.net b/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge-output.net
new file mode 100644
index 0000000..8c3783a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge-output.net
@@ -0,0 +1,101 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "vpulse.h"
+#include "CAPACITOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "PMOS_TRANSISTOR.h"
+#include "LVD.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> Vdd1;
+sc_signal<0> GND;
+sc_signal<0> LVH;
+sc_signal<0> i;
+sc_signal<0> p;
+sc_signal<0> m;
+
+
+/* Package instantiations */
+vpulse V1;
+CAPACITOR Cm;
+model A1;
+RESISTOR Rt;
+PMOS_TRANSISTOR M1;
+LVD X1;
+RESISTOR Rlp;
+VOLTAGE_SOURCE Vdd;
+RESISTOR Rlm;
+CAPACITOR Cp;
+RESISTOR Rb;
+
+SC_CTOR(not found):
+    V1("V1"),
+    Cm("Cm"),
+    A1("A1"),
+    Rt("Rt"),
+    M1("M1"),
+    X1("X1"),
+    Rlp("Rlp"),
+    Vdd("Vdd"),
+    Rlm("Rlm"),
+    Cp("Cp"),
+    Rb("Rb")
+  {
+    V1.1(i);
+    V1.2(GND);
+
+    Cm.1(m);
+    Cm.2(GND);
+
+    Rt.2(m);
+    Rt.1(p);
+
+    M1.S(Vdd1);
+    M1.B(Vdd1);
+    M1.D(LVH);
+    M1.G(LVH);
+
+    X1.4(m);
+    X1.5(p);
+    X1.1(i);
+    X1.3(LVH);
+    X1.2(GND);
+    X1.6(Vdd1);
+    X1.7(GND);
+
+    Rlp.2(Vdd1);
+    Rlp.1(p);
+
+    Vdd.1(Vdd1);
+    Vdd.2(GND);
+
+    Rlm.2(GND);
+    Rlm.1(m);
+
+    Cp.1(p);
+    Cp.2(GND);
+
+    Rb.2(LVH);
+    Rb.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge.retcode b/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge.retcode
+++ b/gnetlist/tests/common/outputs/systemc/JD_Sort_nomunge.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/Makefile.am b/gnetlist/tests/common/outputs/systemc/Makefile.am
index 991d090..bf3dd39 100644
--- a/gnetlist/tests/common/outputs/systemc/Makefile.am
+++ b/gnetlist/tests/common/outputs/systemc/Makefile.am
@@ -1,15 +1,30 @@
 EXTRA_DIST= \
+	cascade-output.net \
 	cascade.retcode \
+	JD_Include_nomunge-output.net \
 	JD_Include_nomunge.retcode \
+	JD_Include-output.net \
 	JD_Include.retcode \
+	JD_nomunge-output.net \
+	JD-output.net \
 	JD.retcode \
+	JD_Sort_nomunge-output.net \
 	JD_Sort_nomunge.retcode \
+	JD_Sort-output.net \
 	JD_Sort.retcode \
+	multiequal-output.net \
 	multiequal.retcode \
+	netattrib-output.net \
 	netattrib.retcode \
+	powersupply-output.net \
 	powersupply.retcode \
+	singlenet-output.net \
 	singlenet.retcode \
+	SlottedOpamps-output.net \
 	SlottedOpamps.retcode \
+	TwoStageAmp_Include-output.net \
 	TwoStageAmp_Include.retcode \
+	TwoStageAmp-output.net \
 	TwoStageAmp.retcode \
+	TwoStageAmp_Sort-output.net \
 	TwoStageAmp_Sort.retcode
diff --git a/gnetlist/tests/common/outputs/systemc/SlottedOpamps-output.net b/gnetlist/tests/common/outputs/systemc/SlottedOpamps-output.net
new file mode 100644
index 0000000..8fbb828
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/SlottedOpamps-output.net
@@ -0,0 +1,50 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "LM324.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> minusin_slot4_pin13_b;
+sc_signal<0> plusin_slot4_pin12_a;
+sc_signal<0> minusin_slot3_pin_b;
+sc_signal<0> plusin_slot3_pin10_a;
+sc_signal<0> minusin_slot2_pin6_b;
+sc_signal<0> plusin_slot2_pin5_a;
+sc_signal<0> samenet_output_c;
+sc_signal<0> minusin_slot1_pin_b;
+sc_signal<0> plusin_slot1_pin3_a;
+
+
+/* Package instantiations */
+LM324 U1;
+
+SC_CTOR(not found):
+    U1("U1")
+  {
+    U1.3(plusin_slot1_pin3_a);
+    U1.2(minusin_slot1_pin_b);
+    U1.1(samenet_output_c);
+    U1.5(plusin_slot2_pin5_a);
+    U1.6(minusin_slot2_pin6_b);
+    U1.7(samenet_output_c);
+    U1.10(plusin_slot3_pin10_a);
+    U1.9(minusin_slot3_pin_b);
+    U1.8(samenet_output_c);
+    U1.12(plusin_slot4_pin12_a);
+    U1.13(minusin_slot4_pin13_b);
+    U1.14(samenet_output_c);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/SlottedOpamps.retcode b/gnetlist/tests/common/outputs/systemc/SlottedOpamps.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/SlottedOpamps.retcode
+++ b/gnetlist/tests/common/outputs/systemc/SlottedOpamps.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp-output.net b/gnetlist/tests/common/outputs/systemc/TwoStageAmp-output.net
new file mode 100644
index 0000000..bc07ad1
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp-output.net
@@ -0,0 +1,168 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "directive.h"
+#include "RESISTOR.h"
+#include "include.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "vsin.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> unnamed_net2;
+sc_signal<0> Vbase2;
+sc_signal<0> Vem2;
+sc_signal<0> Vout;
+sc_signal<0> VColl2;
+sc_signal<0> GND;
+sc_signal<0> Vcc;
+sc_signal<0> Vin;
+sc_signal<0> unnamed_net1;
+sc_signal<0> Vbase1;
+sc_signal<0> Vem1;
+sc_signal<0> Vcoll1;
+
+
+/* Package instantiations */
+CAPACITOR Cout;
+RESISTOR R5;
+RESISTOR R4;
+RESISTOR RE2;
+NPN_TRANSISTOR Q2;
+directive A3;
+RESISTOR R3;
+include A2;
+RESISTOR RE1;
+NPN_TRANSISTOR Q1;
+model A1;
+RESISTOR R2;
+vsin Vinput;
+RESISTOR R1;
+CAPACITOR C2;
+CAPACITOR CE2;
+CAPACITOR C1;
+CAPACITOR CE1;
+RESISTOR R8;
+VOLTAGE_SOURCE VCC;
+RESISTOR RC2;
+RESISTOR RC1;
+RESISTOR RL;
+
+SC_CTOR(not found):
+    Cout("Cout"),
+    R5("R5"),
+    R4("R4"),
+    RE2("RE2"),
+    Q2("Q2"),
+    A3("A3"),
+    R3("R3"),
+    A2("A2"),
+    RE1("RE1"),
+    Q1("Q1"),
+    A1("A1"),
+    R2("R2"),
+    Vinput("Vinput"),
+    R1("R1"),
+    C2("C2"),
+    CE2("CE2"),
+    C1("C1"),
+    CE1("CE1"),
+    R8("R8"),
+    VCC("VCC"),
+    RC2("RC2"),
+    RC1("RC1"),
+    RL("RL")
+  {
+    Cout.1(VColl2);
+    Cout.2(Vout);
+
+    R5.2(unnamed_net1);
+    R5.1(Vin);
+
+    R4.2(Vbase2);
+    R4.1(GND);
+
+    RE2.2(Vem2);
+    RE2.1(GND);
+
+    Q2.3(VColl2);
+    Q2.1(Vem2);
+    Q2.2(Vbase2);
+
+    R3.2(Vcc);
+    R3.1(Vbase2);
+
+    RE1.2(Vem1);
+    RE1.1(GND);
+
+    Q1.3(Vcoll1);
+    Q1.1(Vem1);
+    Q1.2(Vbase1);
+
+    R2.2(Vbase1);
+    R2.1(GND);
+
+    Vinput.1(Vin);
+    Vinput.2(GND);
+
+    R1.2(Vcc);
+    R1.1(Vbase1);
+
+    C2.1(unnamed_net2);
+    C2.2(Vbase2);
+
+    CE2.1(GND);
+    CE2.2(Vem2);
+
+    C1.1(unnamed_net1);
+    C1.2(Vbase1);
+
+    CE1.1(GND);
+    CE1.2(Vem1);
+
+    R8.2(unnamed_net2);
+    R8.1(Vcoll1);
+
+    VCC.1(Vcc);
+    VCC.2(GND);
+
+    RC2.2(Vcc);
+    RC2.1(VColl2);
+
+    RC1.2(Vcc);
+    RC1.1(Vcoll1);
+
+    RL.2(Vout);
+    RL.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp.retcode b/gnetlist/tests/common/outputs/systemc/TwoStageAmp.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/TwoStageAmp.retcode
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include-output.net b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include-output.net
new file mode 100644
index 0000000..bc07ad1
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include-output.net
@@ -0,0 +1,168 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "directive.h"
+#include "RESISTOR.h"
+#include "include.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "vsin.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> unnamed_net2;
+sc_signal<0> Vbase2;
+sc_signal<0> Vem2;
+sc_signal<0> Vout;
+sc_signal<0> VColl2;
+sc_signal<0> GND;
+sc_signal<0> Vcc;
+sc_signal<0> Vin;
+sc_signal<0> unnamed_net1;
+sc_signal<0> Vbase1;
+sc_signal<0> Vem1;
+sc_signal<0> Vcoll1;
+
+
+/* Package instantiations */
+CAPACITOR Cout;
+RESISTOR R5;
+RESISTOR R4;
+RESISTOR RE2;
+NPN_TRANSISTOR Q2;
+directive A3;
+RESISTOR R3;
+include A2;
+RESISTOR RE1;
+NPN_TRANSISTOR Q1;
+model A1;
+RESISTOR R2;
+vsin Vinput;
+RESISTOR R1;
+CAPACITOR C2;
+CAPACITOR CE2;
+CAPACITOR C1;
+CAPACITOR CE1;
+RESISTOR R8;
+VOLTAGE_SOURCE VCC;
+RESISTOR RC2;
+RESISTOR RC1;
+RESISTOR RL;
+
+SC_CTOR(not found):
+    Cout("Cout"),
+    R5("R5"),
+    R4("R4"),
+    RE2("RE2"),
+    Q2("Q2"),
+    A3("A3"),
+    R3("R3"),
+    A2("A2"),
+    RE1("RE1"),
+    Q1("Q1"),
+    A1("A1"),
+    R2("R2"),
+    Vinput("Vinput"),
+    R1("R1"),
+    C2("C2"),
+    CE2("CE2"),
+    C1("C1"),
+    CE1("CE1"),
+    R8("R8"),
+    VCC("VCC"),
+    RC2("RC2"),
+    RC1("RC1"),
+    RL("RL")
+  {
+    Cout.1(VColl2);
+    Cout.2(Vout);
+
+    R5.2(unnamed_net1);
+    R5.1(Vin);
+
+    R4.2(Vbase2);
+    R4.1(GND);
+
+    RE2.2(Vem2);
+    RE2.1(GND);
+
+    Q2.3(VColl2);
+    Q2.1(Vem2);
+    Q2.2(Vbase2);
+
+    R3.2(Vcc);
+    R3.1(Vbase2);
+
+    RE1.2(Vem1);
+    RE1.1(GND);
+
+    Q1.3(Vcoll1);
+    Q1.1(Vem1);
+    Q1.2(Vbase1);
+
+    R2.2(Vbase1);
+    R2.1(GND);
+
+    Vinput.1(Vin);
+    Vinput.2(GND);
+
+    R1.2(Vcc);
+    R1.1(Vbase1);
+
+    C2.1(unnamed_net2);
+    C2.2(Vbase2);
+
+    CE2.1(GND);
+    CE2.2(Vem2);
+
+    C1.1(unnamed_net1);
+    C1.2(Vbase1);
+
+    CE1.1(GND);
+    CE1.2(Vem1);
+
+    R8.2(unnamed_net2);
+    R8.1(Vcoll1);
+
+    VCC.1(Vcc);
+    VCC.2(GND);
+
+    RC2.2(Vcc);
+    RC2.1(VColl2);
+
+    RC1.2(Vcc);
+    RC1.1(Vcoll1);
+
+    RL.2(Vout);
+    RL.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include.retcode b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include.retcode
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Include.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort-output.net b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort-output.net
new file mode 100644
index 0000000..bc07ad1
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort-output.net
@@ -0,0 +1,168 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "directive.h"
+#include "RESISTOR.h"
+#include "include.h"
+#include "RESISTOR.h"
+#include "NPN_TRANSISTOR.h"
+#include "model.h"
+#include "RESISTOR.h"
+#include "vsin.h"
+#include "RESISTOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "CAPACITOR.h"
+#include "RESISTOR.h"
+#include "VOLTAGE_SOURCE.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> unnamed_net2;
+sc_signal<0> Vbase2;
+sc_signal<0> Vem2;
+sc_signal<0> Vout;
+sc_signal<0> VColl2;
+sc_signal<0> GND;
+sc_signal<0> Vcc;
+sc_signal<0> Vin;
+sc_signal<0> unnamed_net1;
+sc_signal<0> Vbase1;
+sc_signal<0> Vem1;
+sc_signal<0> Vcoll1;
+
+
+/* Package instantiations */
+CAPACITOR Cout;
+RESISTOR R5;
+RESISTOR R4;
+RESISTOR RE2;
+NPN_TRANSISTOR Q2;
+directive A3;
+RESISTOR R3;
+include A2;
+RESISTOR RE1;
+NPN_TRANSISTOR Q1;
+model A1;
+RESISTOR R2;
+vsin Vinput;
+RESISTOR R1;
+CAPACITOR C2;
+CAPACITOR CE2;
+CAPACITOR C1;
+CAPACITOR CE1;
+RESISTOR R8;
+VOLTAGE_SOURCE VCC;
+RESISTOR RC2;
+RESISTOR RC1;
+RESISTOR RL;
+
+SC_CTOR(not found):
+    Cout("Cout"),
+    R5("R5"),
+    R4("R4"),
+    RE2("RE2"),
+    Q2("Q2"),
+    A3("A3"),
+    R3("R3"),
+    A2("A2"),
+    RE1("RE1"),
+    Q1("Q1"),
+    A1("A1"),
+    R2("R2"),
+    Vinput("Vinput"),
+    R1("R1"),
+    C2("C2"),
+    CE2("CE2"),
+    C1("C1"),
+    CE1("CE1"),
+    R8("R8"),
+    VCC("VCC"),
+    RC2("RC2"),
+    RC1("RC1"),
+    RL("RL")
+  {
+    Cout.1(VColl2);
+    Cout.2(Vout);
+
+    R5.2(unnamed_net1);
+    R5.1(Vin);
+
+    R4.2(Vbase2);
+    R4.1(GND);
+
+    RE2.2(Vem2);
+    RE2.1(GND);
+
+    Q2.3(VColl2);
+    Q2.1(Vem2);
+    Q2.2(Vbase2);
+
+    R3.2(Vcc);
+    R3.1(Vbase2);
+
+    RE1.2(Vem1);
+    RE1.1(GND);
+
+    Q1.3(Vcoll1);
+    Q1.1(Vem1);
+    Q1.2(Vbase1);
+
+    R2.2(Vbase1);
+    R2.1(GND);
+
+    Vinput.1(Vin);
+    Vinput.2(GND);
+
+    R1.2(Vcc);
+    R1.1(Vbase1);
+
+    C2.1(unnamed_net2);
+    C2.2(Vbase2);
+
+    CE2.1(GND);
+    CE2.2(Vem2);
+
+    C1.1(unnamed_net1);
+    C1.2(Vbase1);
+
+    CE1.1(GND);
+    CE1.2(Vem1);
+
+    R8.2(unnamed_net2);
+    R8.1(Vcoll1);
+
+    VCC.1(Vcc);
+    VCC.2(GND);
+
+    RC2.2(Vcc);
+    RC2.1(VColl2);
+
+    RC1.2(Vcc);
+    RC1.1(Vcoll1);
+
+    RL.2(Vout);
+    RL.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort.retcode b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort.retcode
+++ b/gnetlist/tests/common/outputs/systemc/TwoStageAmp_Sort.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/cascade-output.net b/gnetlist/tests/common/outputs/systemc/cascade-output.net
new file mode 100644
index 0000000..14254df
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/cascade-output.net
@@ -0,0 +1,77 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "cascade-amp.h"
+#include "cascade-amp.h"
+#include "cascade-source.h"
+#include "cascade-defaults-top.h"
+#include "cascade-mixer.h"
+#include "cascade-defaults.h"
+#include "cascade-transformer.h"
+#include "cascade-filter.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> unnamed_net6;
+sc_signal<0> unnamed_net5;
+sc_signal<0> unnamed_net4;
+sc_signal<0> unnamed_net3;
+sc_signal<0> unnamed_net2;
+sc_signal<0> unnamed_net1;
+sc_signal<0> GND;
+
+
+/* Package instantiations */
+cascade-amp AMP2;
+cascade-amp AMP1;
+cascade-source SOURCE;
+cascade-defaults-top DEFAULTS;
+cascade-mixer MX1;
+cascade-defaults DEF1;
+cascade-transformer T1;
+cascade-filter FL1;
+
+SC_CTOR(not found):
+    AMP2("AMP2"),
+    AMP1("AMP1"),
+    SOURCE("SOURCE"),
+    DEFAULTS("DEFAULTS"),
+    MX1("MX1"),
+    DEF1("DEF1"),
+    T1("T1"),
+    FL1("FL1")
+  {
+    AMP2.1(unnamed_net6);
+
+    AMP1.1(unnamed_net1);
+    AMP1.2(unnamed_net2);
+
+    SOURCE.1(unnamed_net1);
+
+    DEFAULTS.1(GND);
+
+    MX1.1(unnamed_net4);
+    MX1.2(unnamed_net5);
+
+    DEF1.1(unnamed_net2);
+    DEF1.2(unnamed_net3);
+
+    T1.1(unnamed_net5);
+    T1.2(unnamed_net6);
+
+    FL1.1(unnamed_net3);
+    FL1.2(unnamed_net4);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/cascade.retcode b/gnetlist/tests/common/outputs/systemc/cascade.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/cascade.retcode
+++ b/gnetlist/tests/common/outputs/systemc/cascade.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/multiequal-output.net b/gnetlist/tests/common/outputs/systemc/multiequal-output.net
new file mode 100644
index 0000000..c65bb1a
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/multiequal-output.net
@@ -0,0 +1,42 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "VOLTAGE_SOURCE.h"
+#include "options.h"
+#include "RESISTOR.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> GND;
+sc_signal<0> unnamed_net1;
+
+
+/* Package instantiations */
+VOLTAGE_SOURCE V1;
+options A1;
+RESISTOR R1;
+
+SC_CTOR(not found):
+    V1("V1"),
+    A1("A1"),
+    R1("R1")
+  {
+    V1.1(unnamed_net1);
+    V1.2(GND);
+
+    R1.2(unnamed_net1);
+    R1.1(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/multiequal.retcode b/gnetlist/tests/common/outputs/systemc/multiequal.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/multiequal.retcode
+++ b/gnetlist/tests/common/outputs/systemc/multiequal.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/netattrib-output.net b/gnetlist/tests/common/outputs/systemc/netattrib-output.net
new file mode 100644
index 0000000..295e05c
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/netattrib-output.net
@@ -0,0 +1,59 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "FUSE.h"
+#include "7400.h"
+#include "7404.h"
+#include "7404.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> unnamed_net1;
+sc_signal<0> netattrib;
+sc_signal<0> GND;
+sc_signal<0> Vcc;
+sc_signal<0> one;
+
+
+/* Package instantiations */
+FUSE F1;
+7400 U100;
+7404 U300;
+7404 U200;
+
+SC_CTOR(not found):
+    F1("F1"),
+    U100("U100"),
+    U300("U300"),
+    U200("U200")
+  {
+    F1.1(one);
+
+    U100.3(one);
+    U100.14(Vcc);
+    U100.7(GND);
+    U100.5(netattrib);
+
+    U300.1(one);
+    U300.2(unnamed_net1);
+    U300.7(GND);
+    U300.14(Vcc);
+
+    U200.1(one);
+    U200.2(netattrib);
+    U200.7(GND);
+    U200.14(Vcc);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/netattrib.retcode b/gnetlist/tests/common/outputs/systemc/netattrib.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/netattrib.retcode
+++ b/gnetlist/tests/common/outputs/systemc/netattrib.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/powersupply-output.net b/gnetlist/tests/common/outputs/systemc/powersupply-output.net
new file mode 100644
index 0000000..a12b8de
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/powersupply-output.net
@@ -0,0 +1,115 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "FUSE.h"
+#include "RESISTOR.h"
+#include "MAINS_CONNECTOR.h"
+#include "POLARIZED_CAPACITOR.h"
+#include "VARIABLE_RESISTOR.h"
+#include "POLARIZED_CAPACITOR.h"
+#include "POLARIZED_CAPACITOR.h"
+#include "SPST.h"
+#include "POLARIZED_CAPACITOR.h"
+#include "transformer.h"
+#include "LM317.h"
+#include "DIODE-BRIDGE.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> ten;
+sc_signal<0> eleven;
+sc_signal<0> GND;
+sc_signal<0> one;
+sc_signal<0> five;
+sc_signal<0> three;
+sc_signal<0> two;
+sc_signal<0> six;
+sc_signal<0> seven;
+sc_signal<0> nine;
+sc_signal<0> eight;
+
+
+/* Package instantiations */
+FUSE F1;
+RESISTOR R2;
+MAINS_CONNECTOR CONN1;
+POLARIZED_CAPACITOR C4;
+VARIABLE_RESISTOR R1;
+POLARIZED_CAPACITOR C3;
+POLARIZED_CAPACITOR C2;
+SPST S1;
+POLARIZED_CAPACITOR C1;
+transformer T1;
+LM317 U2;
+DIODE-BRIDGE U1;
+
+SC_CTOR(not found):
+    F1("F1"),
+    R2("R2"),
+    CONN1("CONN1"),
+    C4("C4"),
+    R1("R1"),
+    C3("C3"),
+    C2("C2"),
+    S1("S1"),
+    C1("C1"),
+    T1("T1"),
+    U2("U2"),
+    U1("U1")
+  {
+    F1.1(two);
+    F1.2(three);
+
+    R2.2(eleven);
+    R2.1(ten);
+
+    CONN1.1(one);
+    CONN1.2(five);
+    CONN1.3(GND);
+
+    C4.1(eleven);
+    C4.2(nine);
+
+    R1.3(nine);
+    R1.2(ten);
+    R1.1(nine);
+
+    C3.1(ten);
+    C3.2(nine);
+
+    C2.1(eight);
+    C2.2(nine);
+
+    S1.2(two);
+    S1.1(one);
+
+    C1.1(eight);
+    C1.2(nine);
+
+    T1.2(five);
+    T1.1(three);
+    T1.4(seven);
+    T1.3(six);
+
+    U2.2(eleven);
+    U2.3(eight);
+    U2.1(ten);
+
+    U1.1(eight);
+    U1.2(nine);
+    U1.3(seven);
+    U1.4(six);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/powersupply.retcode b/gnetlist/tests/common/outputs/systemc/powersupply.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/powersupply.retcode
+++ b/gnetlist/tests/common/outputs/systemc/powersupply.retcode
@@ -1 +1 @@
-1
+0
diff --git a/gnetlist/tests/common/outputs/systemc/singlenet-output.net b/gnetlist/tests/common/outputs/systemc/singlenet-output.net
new file mode 100644
index 0000000..b65850e
--- /dev/null
+++ b/gnetlist/tests/common/outputs/systemc/singlenet-output.net
@@ -0,0 +1,47 @@
+/* structural SystemC generated by gnetlist */
+/* WARNING: This is a generated file, edits */
+/*        made here will be lost next time  */
+/*        you run gnetlist!                 */
+/* Id ........gnet-systemc.scm (04/09/2003) */
+/* Source...../home/geda/gnet-systemc.scm   */
+/* Revision...0.3 (23/09/2003)              */
+/* Author.....Jaume Masip                   */
+
+#include "systemc.h"
+#include "7400.h"
+
+SC_MODULE (not found)
+{
+
+/* Port directions begin here */
+
+/* Wires from the design */
+sc_signal<0> SING_N_2;
+sc_signal<0> GND;
+sc_signal<0> Vcc;
+sc_signal<0> SING_N;
+
+
+/* Package instantiations */
+7400 U100;
+
+SC_CTOR(not found):
+    U100("U100")
+  {
+    U100.6(SING_N);
+    U100.5(SING_N);
+    U100.4(SING_N);
+    U100.14(Vcc);
+    U100.7(GND);
+    U100.3(SING_N_2);
+    U100.1(SING_N_2);
+    U100.14(Vcc);
+    U100.7(GND);
+    U100.8(SING_N);
+    U100.10(SING_N);
+    U100.9(SING_N);
+    U100.14(Vcc);
+    U100.7(GND);
+  }
+};
+
diff --git a/gnetlist/tests/common/outputs/systemc/singlenet.retcode b/gnetlist/tests/common/outputs/systemc/singlenet.retcode
index d00491f..573541a 100644
--- a/gnetlist/tests/common/outputs/systemc/singlenet.retcode
+++ b/gnetlist/tests/common/outputs/systemc/singlenet.retcode
@@ -1 +1 @@
-1
+0

commit bfd49ad477a49235c3e5ee1eda54e5009f6e347a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 18 20:44:59 2008 +0000

    gnetlist: Fixup systemc backend
    
    Don't escape < and > characters in strings, as guile doesn't like this.
    
    Apply similar fixes as those made to the VHDL and verilog backends after
    some changes in gnetlist to accomodate slotting in spice-sdb. Since the
    netlist backend is loaded before gnetlist has traversed the schematic, it
    must not execute any code which queries gnetlist on load. All such work
    is to be done only when gnetlist invokes the "systemc" method.
    
    Move (define c_p #f) to outside (systemc:components ...)'s (lambda ...)
    function, since guile doesn't appreciate us mixing declarations and
    expressions. This variable is tested and (set! c_p #t) later on, which
    doesn't feel very scheme like. The fix works for now though.
    
    Check to see if the regexp matched netname, checking for "name<type>" has
    hit a match before trying to get a piece of that match. If the regexp
    returns #f, instead just treat the identifier as a "name" and use that.
    This allows net names which don't conform to the regexp to at least give
    some vaguely sensible output, without crashing the backend.
    
    Comment some debugging prints to stdout, giving a cleaner looking run.

diff --git a/gnetlist/scheme/gnet-systemc.scm b/gnetlist/scheme/gnet-systemc.scm
index a9f4a44..7a6f9ba 100644
--- a/gnetlist/scheme/gnet-systemc.scm
+++ b/gnetlist/scheme/gnet-systemc.scm
@@ -46,9 +46,9 @@
 ;; match on a systemc identifier like:  netname<type>
 (define systemc-reg (make-regexp
                         (string-append "^(" id-regexp ")[[:space:]]*"
-                                       "\<"
+                                       "<"
                                        "[[:space:]]*(" id-regexp ")[[:space:]]*"
-                                       "\>" )))
+                                       ">" )))
 
 ;; match on a systemc identifier like:  netname
 (define simple-id-reg (make-regexp 
@@ -217,11 +217,11 @@
 	 (simple-id (regexp-exec simple-id-reg netname))
 	 (systemc   (regexp-exec systemc-reg netname)))
 
-      (newline)
-      (display "    systemc:net-parse ")
-      (if systemc (begin (display systemc) (display "->") (display (match:substring systemc 2) )))
-      (if simple-id (display simple-id))
-      (newline)
+;;      (newline)
+;;      (display "    systemc:net-parse ")
+;;      (if systemc (begin (display systemc) (display "->") (display (match:substring systemc 2) )))
+;;      (if simple-id (display simple-id))
+;;      (newline)
 
       ;; check over each expression type, and build the appropriate
       ;; result
@@ -248,7 +248,7 @@
        ;; just a systemc signal?
        (systemc
          (begin 
-            (display "done systemc")(newline)
+;;            (display "done systemc")(newline)
            (list (match:substring systemc 1)
              (list (string->number (match:substring systemc 2))
                (match:substring systemc 2)
@@ -365,109 +365,115 @@
 ;;  return a list of net description objects
 ;;
 
-(define the-nets '())
-
-(define systemc:get-nets 
-  (begin 
-    (for-each 
-     (lambda (netname)
-       ; parse the netname, and see if it is already on the list
-       (let* ((parsed (systemc:net-parse netname))
-	      (listed (assoc (car parsed) the-nets)))
-
-(display  "systemc:get-nets(parsed)-> ")
-(display parsed)(display " (listed)-> ")
-(display listed)
-(newline)
-
-	 (if listed
-	     (begin ; it is, do some checks, and update the record
-	       ;; extract fields from list
-	       (let* ((list-name       (car listed))
-		      (list-n1         (car (cadr listed)))
-		      (list-n2         (cadr (cadr listed)))
-		      (list-increasing (caddr (cadr listed)))
-		      (list-sure       (cadddr (cadr listed)))
-		      (list-real       (cadddr (cdr (cadr listed))))
-		      
-		      (name            (car parsed))
-		      (n1              (car (cadr parsed)))
-		      (n2              (cadr (cadr parsed)))
-		      (increasing      (caddr (cadr parsed)))
-		      (sure            (cadddr (cadr parsed)))
-		      (real            (cadddr (cdr (cadr parsed))))
-
-		      (consistant      (or (and list-increasing increasing)
-					   (and (not list-increasing) 
-						(not increasing))))
-		      
-		     )
-
-		 (cond
-		  ((and list-sure consistant)
-		   (begin
-		     (set-cdr! listed
-			       (systemc:update-record n1 n2
-						      list-n1 list-n2
-						      increasing
-						      #t
-						      real)
-			       )))
-		   ((and list-sure (not sure) (zero? n1) (zero? n2))
-		    '() ;; this is a net without any expression, leave it
-		    )
-		  ((and list-sure (not consistant))
-		   (begin      ;; order is inconsistent
-		     (display 
-		      (string-append "Warning: Net `" real "' has a " 
-				     "bit order that conflicts with "
-				     "the original definition of `"
-				     list-real "', ignoring `"
-				     real "'"
-				     ))
-		     (newline))) 
-		   ((and (not list-sure) sure consistant)
-		    (begin
-		      (set-cdr! listed
-				(systemc:update-record n1 n2
-						       list-n1 list-n2
-						       increasing
-						       #t
-						       real))))
-		    
-		   ((and (not list-sure) sure (not consistant))
-		    (begin
-		      (set-cdr! listed
-				(systemc:update-record n1 n2
-						       list-n2 list-n1
-						       increasing
-						       #t
-						       real))))
-		   ((and (not list-sure) (not sure))
-		    (begin
-		      (set-cdr! listed
-				(systemc:update-record n1 n2
-						       list-n1 list-n2
-						       increasing
-						       #f
-						       real))))
-		   (else
-		    (begin
-		      (display "This should never happen!")
-		      (newline)))
-		   )
-	     )
-	 )
-       (begin ; it is not, just add it to the end
-	 (set! the-nets 
-	       (append the-nets 
-		       (list parsed))))
-       ))
-(display  "systemc:get-nets(parsed)-> ")
-     )
-     
-    all-unique-nets)
-    the-nets))
+(define systemc:get-nets '())
+
+(define systemc:get-nets-once!
+  (lambda nil
+    (define the-nets '())
+    (set! systemc:get-nets
+      (begin
+        (for-each
+          (lambda (netname)
+            ; parse the netname, and see if it is already on the list
+            (let* ((parsed (systemc:net-parse netname))
+                   (listed (assoc (car parsed) the-nets)))
+
+;;             (display  "systemc:get-nets(parsed)-> ")
+;;             (display parsed)(display " (listed)-> ")
+;;             (display listed)
+;;             (newline)
+
+             (if listed
+                 (begin ; it is, do some checks, and update the record
+                   ;; extract fields from list
+                   (let* ((list-name       (car listed))
+                          (list-n1         (car (cadr listed)))
+                          (list-n2         (cadr (cadr listed)))
+                          (list-increasing (caddr (cadr listed)))
+                          (list-sure       (cadddr (cadr listed)))
+                          (list-real       (cadddr (cdr (cadr listed))))
+
+                          (name            (car parsed))
+                          (n1              (car (cadr parsed)))
+                          (n2              (cadr (cadr parsed)))
+                          (increasing      (caddr (cadr parsed)))
+                          (sure            (cadddr (cadr parsed)))
+                          (real            (cadddr (cdr (cadr parsed))))
+
+                          (consistant      (or (and list-increasing increasing)
+                                               (and (not list-increasing)
+                                                    (not increasing))))
+
+                         )
+
+                     (cond
+                      ((and list-sure consistant)
+                       (begin
+                         (set-cdr! listed
+                                   (systemc:update-record n1 n2
+                                                          list-n1 list-n2
+                                                          increasing
+                                                          #t
+                                                          real)
+                                   )))
+                       ((and list-sure (not sure) (zero? n1) (zero? n2))
+                        '() ;; this is a net without any expression, leave it
+                        )
+                      ((and list-sure (not consistant))
+                       (begin      ;; order is inconsistent
+                         (display
+                          (string-append "Warning: Net `" real "' has a "
+                                         "bit order that conflicts with "
+                                         "the original definition of `"
+                                         list-real "', ignoring `"
+                                         real "'"
+                                         ))
+                         (newline)))
+                       ((and (not list-sure) sure consistant)
+                        (begin
+                          (set-cdr! listed
+                                    (systemc:update-record n1 n2
+                                                           list-n1 list-n2
+                                                           increasing
+                                                           #t
+                                                           real))))
+
+                       ((and (not list-sure) sure (not consistant))
+                        (begin
+                          (set-cdr! listed
+                                    (systemc:update-record n1 n2
+                                                           list-n2 list-n1
+                                                           increasing
+                                                           #t
+                                                           real))))
+                       ((and (not list-sure) (not sure))
+                        (begin
+                          (set-cdr! listed
+                                    (systemc:update-record n1 n2
+                                                           list-n1 list-n2
+                                                           increasing
+                                                           #f
+                                                           real))))
+                       (else
+                        (begin
+                          (display "This should never happen!")
+                          (newline)))
+                       )
+                 )
+             )
+           (begin ; it is not, just add it to the end
+             (set! the-nets
+                   (append the-nets
+                           (list parsed))))
+           ))
+;;         (display  "systemc:get-nets(parsed)-> ")
+         )
+
+        all-unique-nets)
+      the-nets)
+    )
+    systemc:get-nets
+))
 
 ;;
 ;;  Display wires from the design
@@ -503,8 +509,8 @@
     (newline p)
     (for-each (lambda (wire)          ; print a wire statement for each
     ;;            (let ((name (car wire)) (n1 (car (cadr wire))) (n2 (cadr (cadr wire))) (increasing (caddr (cadr wire)))))
-    (display "/* Wires from the design */")(newline)
-                (display "systemc:write-wires -> ")(display wire)(newline)
+;;    (display "/* Wires from the design */")(newline)
+;;                (display "systemc:write-wires -> ")(display wire)(newline)
 		(display "sc_signal<" p)
                 (display (cadr (cadr wire)) p)        
 		(display "> " p)
@@ -556,11 +562,14 @@
 ;;        ...
 ;;    );
 ;;
+
+;;(define c_p #f)
+
 (define systemc:components
   (lambda (packages port)
     (begin
-
       (define c_p #f)
+      (set! c_p #f)
       (display "/* Package instantiations */" port) (newline port)
 
       (for-each (lambda (package)         ; loop on packages
@@ -654,21 +663,24 @@
 ;;
 (define systemc:display-pin
     (lambda (pin positional port)
-      (begin
-	(if positional
-	    (begin    ; output a positional port instanace
-	      (display "  /* " port)
-	      (display (car pin) port)  ; add in name for debugging
-	      (display " */ " port )
-	      (display (cdr pin) port))
-	    (begin    ; else output a named port instance 
-	      (display "." port)
-	      ; Display the escaped version of the identifier
-	      (systemc:display-escaped-identifier (car pin) port)
-	      (display "(" port)
-              (display (match:substring (regexp-exec systemc-reg (cdr pin)) 1) port)
-;;	      (systemc:display-escaped-identifier (cdr pin) port)
-	      (display ")" port))))))
+      (let
+          ((systemc (regexp-exec systemc-reg (cdr pin))))
+          (begin
+            (if positional
+                (begin    ; output a positional port instanace
+                  (display "  /* " port)
+                  (display (car pin) port)  ; add in name for debugging
+                  (display " */ " port )
+                  (display (cdr pin) port))
+                (begin    ; else output a named port instance
+                  (display "." port)
+                  ; Display the escaped version of the identifier
+                  (systemc:display-escaped-identifier (car pin) port)
+                  (display "(" port)
+                  (if systemc
+                    (display (match:substring systemc 1) port)
+                    (systemc:display-escaped-identifier (cdr pin) port))
+                  (display ")" port)))))))
     
 	 
 
@@ -679,10 +691,11 @@
   (lambda (output-filename)
     (let ((port (open-output-file output-filename)))
       (begin
+        (systemc:get-nets-once!)
 	(systemc:write-top-header port)
-        (display "***** start write-wires ********")(newline)
+;;        (display "***** start write-wires ********")(newline)
 	(systemc:write-wires port)
-        (display "***** end write-wires ********")(newline)
+;;        (display "***** end write-wires ********")(newline)
 	(systemc:write-continuous-assigns port)
 	(systemc:components packages port)
 	(systemc:write-bottom-footer port)




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs