From f9c33733b9fdeb459053c9a97da4ce8077837dd3 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 3 Feb 2019 01:49:48 +0100 Subject: [PATCH] l2n format writer and reader: more compact output --- src/db/db/dbLayoutToNetlistFormatDefs.h | 16 +- src/db/db/dbLayoutToNetlistReader.cc | 51 +++--- src/db/db/dbLayoutToNetlistReader.h | 9 +- src/db/db/dbLayoutToNetlistWriter.cc | 56 +++++-- testdata/algo/l2n_writer_au.txt | 162 +++++++++---------- testdata/algo/l2n_writer_au_2.txt | 204 ++++++++++++------------ testdata/algo/l2n_writer_au_2s.txt | 204 ++++++++++++------------ testdata/algo/l2n_writer_au_s.txt | 162 +++++++++---------- 8 files changed, 451 insertions(+), 413 deletions(-) diff --git a/src/db/db/dbLayoutToNetlistFormatDefs.h b/src/db/db/dbLayoutToNetlistFormatDefs.h index d28de3503..663ca16c5 100644 --- a/src/db/db/dbLayoutToNetlistFormatDefs.h +++ b/src/db/db/dbLayoutToNetlistFormatDefs.h @@ -54,17 +54,20 @@ namespace db * top() - specifies the name of the top circuit [short key: W] * layer() - define a layer [short key: L] * connect( ...) - connects layer1 with the following layers [short key: C] - * global( ...) - connects a layer with the given global nets [short key: G] + * global( ...) + * - connects the shapes of the layer with the given global + * nets [short key: G] * circuit( [circuit-def]) - circuit (cell) [short key: X] * device( [device-abstract-def]) * - device abstract [short key: D] * * [circuit-def]: * - * net( [geometry-def]) - net geometry [short key: N] + * net( [geometry-def]) + * - net geometry [short key: N] * A net declaration shall be there also if no geometry - * is present - * pin( ) - outgoing pin connection [short key: P] + * is present. The ID is a numerical shortcut for the net. + * pin( ) - outgoing pin connection [short key: P] * device( [device-def]) * - device with connections [short key: D] * circuit( [circuit-def]) - subcircuit with connections [short key: X] @@ -72,6 +75,7 @@ namespace db * [geometry-def]: * * polygon( ...) - defines a polygon [short key: Q] + * "*" for or means take previous * rect( ) * - defines a rectangle [short key: R] * @@ -85,7 +89,7 @@ namespace db * location( ) - location of the device [short key Y] * must be before terminal * param( ) - defines a parameter [short key E] - * terminal( ) + * terminal( ) * - specifies connection of the terminal with * a net (short key: T) * @@ -95,7 +99,7 @@ namespace db * rotation() - rotation angle (in degree, default is 0) [short key O] * mirror - if specified, the instance is mirrored before rotation [short key M] * scale() - magnification (default is 1) [short key S] - * pin( ) - specifies connection of the pin with a net [short key: P] + * pin( ) - specifies connection of the pin with a net [short key: P] */ namespace l2n_std_format diff --git a/src/db/db/dbLayoutToNetlistReader.cc b/src/db/db/dbLayoutToNetlistReader.cc index dd9af4889..687c33a12 100644 --- a/src/db/db/dbLayoutToNetlistReader.cc +++ b/src/db/db/dbLayoutToNetlistReader.cc @@ -248,20 +248,21 @@ void LayoutToNetlistStandardReader::do_read (db::LayoutToNetlist *l2n) circuit->set_cell_index (ci); std::map > connections; + std::map id2net; while (br) { if (test (skeys::net_key) || test (lkeys::net_key)) { - read_net (l2n, circuit); + read_net (l2n, circuit, id2net); } else if (test (skeys::pin_key) || test (lkeys::pin_key)) { - read_pin (l2n, circuit); + read_pin (l2n, circuit, id2net); } else if (test (skeys::device_key) || test (lkeys::device_key)) { std::list conn; - db::CellInstArray ia = read_device (l2n, circuit, conn); + db::CellInstArray ia = read_device (l2n, circuit, conn, id2net); connections[ia] = conn; } else if (test (skeys::circuit_key) || test (lkeys::circuit_key)) { std::list conn; - db::CellInstArray ia = read_subcircuit (l2n, circuit, conn); + db::CellInstArray ia = read_subcircuit (l2n, circuit, conn, id2net); connections[ia] = conn; } else { throw tl::Exception (tl::to_string (tr ("Invalid keyword inside circuit definition (net, pin, device or circuit expected)"))); @@ -366,9 +367,14 @@ LayoutToNetlistStandardReader::read_geometry (db::LayoutToNetlist *l2n) std::vector pt; + db::Coord x = 0, y = 0; while (br) { - db::Coord x = read_coord (); - db::Coord y = read_coord (); + if (! test ("*")) { + x = read_coord (); + } + if (! test ("*")) { + y = read_coord (); + } pt.push_back (db::Point (x, y)); } @@ -384,17 +390,21 @@ LayoutToNetlistStandardReader::read_geometry (db::LayoutToNetlist *l2n) } void -LayoutToNetlistStandardReader::read_net (db::LayoutToNetlist *l2n, db::Circuit *circuit) +LayoutToNetlistStandardReader::read_net (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map &id2net) { Brace br (this); std::string name; read_word_or_quoted (name); + unsigned int id = (unsigned int) read_int (); + db::Net *net = new db::Net (); net->set_name (name); circuit->add_net (net); + id2net.insert (std::make_pair (id, net)); + db::connected_clusters &cc = l2n->net_clusters ().clusters_per_cell (circuit->cell_index ()); db::local_cluster &lc = *cc.insert (); net->set_cluster_id (lc.id ()); @@ -411,27 +421,26 @@ LayoutToNetlistStandardReader::read_net (db::LayoutToNetlist *l2n, db::Circuit * } void -LayoutToNetlistStandardReader::read_pin (db::LayoutToNetlist * /*l2n*/, db::Circuit *circuit) +LayoutToNetlistStandardReader::read_pin (db::LayoutToNetlist * /*l2n*/, db::Circuit *circuit, std::map &id2net) { Brace br (this); std::string name; read_word_or_quoted (name); - std::string netname; - read_word_or_quoted (netname); + unsigned int netid = (unsigned int) read_int (); br.done (); const db::Pin &pin = circuit->add_pin (name); - db::Net *net = circuit->net_by_name (netname); + db::Net *net = id2net [netid]; if (!net) { - throw tl::Exception (tl::to_string (tr ("Not a valid net name: ")) + netname); + throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid)); } circuit->connect_pin (pin.id (), net); } db::CellInstArray -LayoutToNetlistStandardReader::read_device (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs) +LayoutToNetlistStandardReader::read_device (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs, std::map &id2net) { Brace br (this); @@ -474,8 +483,7 @@ LayoutToNetlistStandardReader::read_device (db::LayoutToNetlist *l2n, db::Circui Brace br2 (this); std::string tname; read_word_or_quoted (tname); - std::string netname; - read_word_or_quoted (netname); + unsigned int netid = (unsigned int) read_int (); br2.done (); size_t tid = std::numeric_limits::max (); @@ -491,9 +499,9 @@ LayoutToNetlistStandardReader::read_device (db::LayoutToNetlist *l2n, db::Circui throw tl::Exception (tl::to_string (tr ("Not a valid terminal name: ")) + tname + tl::to_string (tr (" for device class: ")) + dm->device_class ()->name ()); } - db::Net *net = circuit->net_by_name (netname); + db::Net *net = id2net [netid]; if (!net) { - throw tl::Exception (tl::to_string (tr ("Not a valid net name: ")) + netname); + throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid)); } device->connect_terminal (tid, net); @@ -545,7 +553,7 @@ LayoutToNetlistStandardReader::read_device (db::LayoutToNetlist *l2n, db::Circui } db::CellInstArray -LayoutToNetlistStandardReader::read_subcircuit (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs) +LayoutToNetlistStandardReader::read_subcircuit (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs, std::map &id2net) { Brace br (this); @@ -617,8 +625,7 @@ LayoutToNetlistStandardReader::read_subcircuit (db::LayoutToNetlist *l2n, db::Ci Brace br2 (this); std::string pname; read_word_or_quoted (pname); - std::string netname; - read_word_or_quoted (netname); + unsigned int netid = (unsigned int) read_int (); br2.done (); const db::Pin *sc_pin = circuit_ref->pin_by_name (pname); @@ -626,9 +633,9 @@ LayoutToNetlistStandardReader::read_subcircuit (db::LayoutToNetlist *l2n, db::Ci throw tl::Exception (tl::to_string (tr ("Not a valid pin name: ")) + pname + tl::to_string (tr (" for circuit: ")) + circuit_ref->name ()); } - db::Net *net = circuit->net_by_name (netname); + db::Net *net = id2net [netid]; if (!net) { - throw tl::Exception (tl::to_string (tr ("Not a valid net name: ")) + netname); + throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid)); } subcircuit->connect_pin (sc_pin->id (), net); diff --git a/src/db/db/dbLayoutToNetlistReader.h b/src/db/db/dbLayoutToNetlistReader.h index f54fc76ee..04d2f8e74 100644 --- a/src/db/db/dbLayoutToNetlistReader.h +++ b/src/db/db/dbLayoutToNetlistReader.h @@ -40,6 +40,7 @@ class Circuit; class Cell; class DeviceAbstract; class DeviceClass; +class Net; class Region; /** @@ -95,10 +96,10 @@ private: bool at_end (); void skip (); - void read_net (db::LayoutToNetlist *l2n, db::Circuit *circuit); - void read_pin (db::LayoutToNetlist *l2n, db::Circuit *circuit); - db::CellInstArray read_device (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs); - db::CellInstArray read_subcircuit (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs); + void read_net (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map &id2net); + void read_pin (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map &id2net); + db::CellInstArray read_device (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs, std::map &id2net); + db::CellInstArray read_subcircuit (db::LayoutToNetlist *l2n, db::Circuit *circuit, std::list &refs, std::map &id2net); void read_abstract_terminal (db::LayoutToNetlist *l2n, db::DeviceAbstract *dm, db::DeviceClass *dc); std::pair read_geometry (db::LayoutToNetlist *l2n); }; diff --git a/src/db/db/dbLayoutToNetlistWriter.cc b/src/db/db/dbLayoutToNetlistWriter.cc index 1a2092bb2..2be9f008b 100644 --- a/src/db/db/dbLayoutToNetlistWriter.cc +++ b/src/db/db/dbLayoutToNetlistWriter.cc @@ -45,9 +45,9 @@ private: tl::OutputStream *mp_stream; void write (const db::LayoutToNetlist *l2n, const db::Circuit &circuit); - void write (const db::LayoutToNetlist *l2n, const db::Net &net); - void write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit); - void write (const db::LayoutToNetlist *l2n, const db::Device &device); + void write (const db::LayoutToNetlist *l2n, const db::Net &net, unsigned int id); + void write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit, std::map &net2id); + void write (const db::LayoutToNetlist *l2n, const db::Device &device, std::map &net2id); void write (const db::LayoutToNetlist *l2n, const db::DeviceAbstract &device_abstract); void write (const db::PolygonRef *s, const db::ICplxTrans &tr, const std::string &lname); }; @@ -171,12 +171,16 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n) template void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Circuit &circuit) { + std::map net2id; + unsigned int id = 0; + if (circuit.begin_nets () != circuit.end_nets ()) { if (! Keys::is_short ()) { *mp_stream << endl << indent1 << "# Nets with their geometries" << endl; } for (db::Circuit::const_net_iterator n = circuit.begin_nets (); n != circuit.end_nets (); ++n) { - write (l2n, *n); + net2id.insert (std::make_pair (n.operator-> (), ++id)); + write (l2n, *n, id); } } @@ -187,7 +191,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Cir for (db::Circuit::const_pin_iterator p = circuit.begin_pins (); p != circuit.end_pins (); ++p) { const db::Net *net = circuit.net_for_pin (p->id ()); if (net) { - *mp_stream << indent1 << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << " " << tl::to_word_or_quoted_string (net->expanded_name ()) << ")" << endl; + *mp_stream << indent1 << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << " " << net2id [net] << ")" << endl; } } } @@ -197,7 +201,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Cir *mp_stream << endl << indent1 << "# Devices and their connections" << endl; } for (db::Circuit::const_device_iterator d = circuit.begin_devices (); d != circuit.end_devices (); ++d) { - write (l2n, *d); + write (l2n, *d, net2id); } } @@ -206,7 +210,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Cir *mp_stream << endl << indent1 << "# Subcircuits and their connections" << endl; } for (db::Circuit::const_subcircuit_iterator x = circuit.begin_subcircuits (); x != circuit.end_subcircuits (); ++x) { - write (l2n, *x); + write (l2n, *x, net2id); } } @@ -218,9 +222,31 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Cir template void write_points (tl::OutputStream &stream, const T &poly, const Tr &tr) { + db::Coord x = 0, y = 0; + bool first = true; for (typename T::polygon_contour_iterator c = poly.begin_hull (); c != poly.end_hull (); ++c) { + typename T::point_type pt = tr * *c; - stream << " " << pt.x () << " " << pt.y (); + + stream << " "; + + if (first || pt.x () != x) { + stream << pt.x (); + } else { + stream << "*"; + } + + stream << " "; + + if (first || pt.y () != y) { + stream << pt.y (); + } else { + stream << "*"; + } + + first = false; + x = pt.x (); y = pt.y (); + } } @@ -253,7 +279,7 @@ void std_writer_impl::write (const db::PolygonRef *s, const db::ICplxTrans } template -void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Net &net) +void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Net &net, unsigned int id) { if (! l2n->netlist ()) { throw tl::Exception (tl::to_string (tr ("Can't write annotated netlist before extraction has been done"))); @@ -283,7 +309,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Net } else { if (! any) { - *mp_stream << indent1 << Keys::net_key << "(" << tl::to_word_or_quoted_string (net.expanded_name ()) << endl; + *mp_stream << indent1 << Keys::net_key << "(" << tl::to_word_or_quoted_string (net.expanded_name ()) << " " << id << endl; any = true; } @@ -304,12 +330,12 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Net if (any) { *mp_stream << indent1 << ")" << endl; } else { - *mp_stream << indent1 << Keys::net_key << "(" << tl::to_word_or_quoted_string (net.expanded_name ()) << ")" << endl; + *mp_stream << indent1 << Keys::net_key << "(" << tl::to_word_or_quoted_string (net.expanded_name ()) << " " << id << ")" << endl; } } template -void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit) +void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit, std::map &net2id) { const db::Layout *ly = l2n->internal_layout (); double dbu = ly->dbu (); @@ -344,7 +370,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Sub } else { *mp_stream << " "; } - *mp_stream << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << " " << tl::to_word_or_quoted_string (net->expanded_name ()) << ")"; + *mp_stream << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << " " << net2id [net] << ")"; if (separate_lines) { *mp_stream << endl; } @@ -389,7 +415,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Dev } template -void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Device &device) +void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Device &device, std::map &net2id) { const db::Layout *ly = l2n->internal_layout (); double dbu = ly->dbu (); @@ -410,7 +436,7 @@ void std_writer_impl::write (const db::LayoutToNetlist *l2n, const db::Dev for (std::vector::const_iterator i = td.begin (); i != td.end (); ++i) { const db::Net *net = device.net_for_terminal (i->id ()); if (net) { - *mp_stream << indent2 << Keys::terminal_key << "(" << tl::to_word_or_quoted_string (i->name ()) << " " << tl::to_word_or_quoted_string (net->expanded_name ()) << ")" << endl; + *mp_stream << indent2 << Keys::terminal_key << "(" << tl::to_word_or_quoted_string (i->name ()) << " " << net2id [net] << ")" << endl; } } diff --git a/testdata/algo/l2n_writer_au.txt b/testdata/algo/l2n_writer_au.txt index 03320e97f..9254f0d88 100644 --- a/testdata/algo/l2n_writer_au.txt +++ b/testdata/algo/l2n_writer_au.txt @@ -86,7 +86,7 @@ device(D$NMOS$1 NMOS circuit(INV2 # Nets with their geometries - net(IN + net(IN 1 rect(poly -525 -250 -275 2250) rect(poly -1700 1620 -400 1980) rect(poly -525 -800 -275 800) @@ -94,7 +94,7 @@ circuit(INV2 rect(poly_lbl -801 1799 -799 1801) rect(poly_cont -1630 1690 -1410 1910) ) - net($2 + net($2 2 rect(poly 275 -250 525 2250) rect(poly 220 820 580 1180) rect(poly 275 2000 525 3600) @@ -111,19 +111,19 @@ circuit(INV2 rect(psd -1050 2325 -525 3275) rect(nsd -1050 -475 -525 475) ) - net(OUT + net(OUT 3 rect(diff_cont 690 2890 910 3110) rect(diff_cont 690 2490 910 2710) rect(diff_cont 690 90 910 310) rect(diff_cont 690 -310 910 -90) - polygon(metal1 800 20 800 380 940 380 940 1620 620 1620 620 2420 980 2420 980 1980 1300 1980 1300 20) + polygon(metal1 800 20 * 380 940 * * 1620 620 * * 2420 980 * * 1980 1300 * * 20) rect(metal1 620 2420 980 3180) rect(metal1 620 -380 980 380) rect(metal1_lbl 799 1799 801 1801) rect(psd 525 2325 1050 3275) rect(nsd 525 -475 1050 475) ) - net($4 + net($4 4 rect(diff_cont -110 -310 110 -90) rect(diff_cont -110 90 110 310) rect(diff_cont -110 90 110 310) @@ -135,7 +135,7 @@ circuit(INV2 rect(metal2 -1400 -450 1400 450) rect(nsd -275 -475 275 475) ) - net($5 + net($5 5 rect(diff_cont -110 2490 110 2710) rect(diff_cont -110 2890 110 3110) rect(diff_cont -110 2890 110 3110) @@ -149,11 +149,11 @@ circuit(INV2 ) # Outgoing pins and their connections to nets - pin(IN IN) - pin($1 $2) - pin(OUT OUT) - pin($3 $4) - pin($4 $5) + pin(IN 1) + pin($1 2) + pin(OUT 3) + pin($3 4) + pin($4 5) # Devices and their connections device($1 D$PMOS @@ -164,9 +164,9 @@ circuit(INV2 param(AD 0.26125) param(PS 2.95) param(PD 1.5) - terminal(S $2) - terminal(G IN) - terminal(D $5) + terminal(S 2) + terminal(G 1) + terminal(D 5) ) device($2 D$PMOS$1 location(400 2800) @@ -176,9 +176,9 @@ circuit(INV2 param(AD 0.49875) param(PS 1.5) param(PD 2.95) - terminal(S $5) - terminal(G $2) - terminal(D OUT) + terminal(S 5) + terminal(G 2) + terminal(D 3) ) device($3 D$NMOS location(-400 0) @@ -188,9 +188,9 @@ circuit(INV2 param(AD 0.26125) param(PS 2.95) param(PD 1.5) - terminal(S $2) - terminal(G IN) - terminal(D $4) + terminal(S 2) + terminal(G 1) + terminal(D 4) ) device($4 D$NMOS$1 location(400 0) @@ -200,16 +200,16 @@ circuit(INV2 param(AD 0.49875) param(PS 1.5) param(PD 2.95) - terminal(S $4) - terminal(G $2) - terminal(D OUT) + terminal(S 4) + terminal(G 2) + terminal(D 3) ) ) circuit(RINGO # Nets with their geometries - net(FB + net(FB 1 rect(diff_cont 22850 2490 23070 2710) rect(diff_cont 22850 2890 23070 3110) rect(diff_cont 22850 -310 23070 -90) @@ -220,7 +220,7 @@ circuit(RINGO rect(metal2 -1720 1600 23160 2000) rect(metal2_lbl -1 1799 1 1801) ) - net(OSC + net(OSC 2 rect(diff_cont 24450 2890 24670 3110) rect(diff_cont 24450 2490 24670 2710) rect(diff_cont 24450 90 24670 310) @@ -229,7 +229,7 @@ circuit(RINGO rect(metal2 24360 1600 24760 2000) rect(metal2_lbl 24559 1799 24561 1801) ) - net(VSS + net(VSS 3 rect(diff_cont 2530 -310 2750 -90) rect(diff_cont 2530 90 2750 310) rect(diff_cont 2530 90 2750 310) @@ -292,7 +292,7 @@ circuit(RINGO rect(metal1 23580 -380 23940 380) rect(metal2_lbl -1 -1 1 1) ) - net(VDD + net(VDD 4 rect(diff_cont 2530 2490 2750 2710) rect(diff_cont 2530 2890 2750 3110) rect(diff_cont 2530 2890 2750 3110) @@ -355,55 +355,55 @@ circuit(RINGO rect(metal1 23580 2420 23940 3180) rect(metal2_lbl -1 2799 1 2801) ) - net($I19 + net($I19 5 rect(diff_cont 690 2890 910 3110) rect(diff_cont 690 2490 910 2710) rect(diff_cont 690 90 910 310) rect(diff_cont 690 -310 910 -90) ) - net($I8 + net($I8 6 rect(diff_cont 21810 2890 22030 3110) rect(diff_cont 21810 2490 22030 2710) rect(diff_cont 21810 90 22030 310) rect(diff_cont 21810 -310 22030 -90) ) - net($I7 + net($I7 7 rect(diff_cont 19170 2890 19390 3110) rect(diff_cont 19170 2490 19390 2710) rect(diff_cont 19170 90 19390 310) rect(diff_cont 19170 -310 19390 -90) ) - net($I6 + net($I6 8 rect(diff_cont 16530 2890 16750 3110) rect(diff_cont 16530 2490 16750 2710) rect(diff_cont 16530 90 16750 310) rect(diff_cont 16530 -310 16750 -90) ) - net($I5 + net($I5 9 rect(diff_cont 13890 2890 14110 3110) rect(diff_cont 13890 2490 14110 2710) rect(diff_cont 13890 90 14110 310) rect(diff_cont 13890 -310 14110 -90) ) - net($I4 + net($I4 10 rect(diff_cont 11250 2890 11470 3110) rect(diff_cont 11250 2490 11470 2710) rect(diff_cont 11250 90 11470 310) rect(diff_cont 11250 -310 11470 -90) ) - net($I3 + net($I3 11 rect(diff_cont 8610 2890 8830 3110) rect(diff_cont 8610 2490 8830 2710) rect(diff_cont 8610 90 8830 310) rect(diff_cont 8610 -310 8830 -90) ) - net($I2 + net($I2 12 rect(diff_cont 5970 2890 6190 3110) rect(diff_cont 5970 2490 6190 2710) rect(diff_cont 5970 90 6190 310) rect(diff_cont 5970 -310 6190 -90) ) - net($I1 + net($I1 13 rect(diff_cont 3330 2890 3550 3110) rect(diff_cont 3330 2490 3550 2710) rect(diff_cont 3330 90 3550 310) @@ -411,72 +411,72 @@ circuit(RINGO ) # Outgoing pins and their connections to nets - pin(FB FB) - pin(OSC OSC) - pin(VSS VSS) - pin(VDD VDD) + pin(FB 1) + pin(OSC 2) + pin(VSS 3) + pin(VDD 4) # Subcircuits and their connections circuit($1 INV2 location(23760 0) - pin(IN $I8) - pin($1 FB) - pin(OUT OSC) - pin($3 VSS) - pin($4 VDD) + pin(IN 6) + pin($1 1) + pin(OUT 2) + pin($3 3) + pin($4 4) ) circuit($2 INV2 location(0 0) - pin(IN FB) - pin(OUT $I19) - pin($3 VSS) - pin($4 VDD) + pin(IN 1) + pin(OUT 5) + pin($3 3) + pin($4 4) ) circuit($3 INV2 location(2640 0) - pin(IN $I19) - pin(OUT $I1) - pin($3 VSS) - pin($4 VDD) + pin(IN 5) + pin(OUT 13) + pin($3 3) + pin($4 4) ) circuit($4 INV2 location(5280 0) - pin(IN $I1) - pin(OUT $I2) - pin($3 VSS) - pin($4 VDD) + pin(IN 13) + pin(OUT 12) + pin($3 3) + pin($4 4) ) circuit($5 INV2 location(7920 0) - pin(IN $I2) - pin(OUT $I3) - pin($3 VSS) - pin($4 VDD) + pin(IN 12) + pin(OUT 11) + pin($3 3) + pin($4 4) ) circuit($6 INV2 location(10560 0) - pin(IN $I3) - pin(OUT $I4) - pin($3 VSS) - pin($4 VDD) + pin(IN 11) + pin(OUT 10) + pin($3 3) + pin($4 4) ) circuit($7 INV2 location(13200 0) - pin(IN $I4) - pin(OUT $I5) - pin($3 VSS) - pin($4 VDD) + pin(IN 10) + pin(OUT 9) + pin($3 3) + pin($4 4) ) circuit($8 INV2 location(15840 0) - pin(IN $I5) - pin(OUT $I6) - pin($3 VSS) - pin($4 VDD) + pin(IN 9) + pin(OUT 8) + pin($3 3) + pin($4 4) ) circuit($9 INV2 location(18480 0) - pin(IN $I6) - pin(OUT $I7) - pin($3 VSS) - pin($4 VDD) + pin(IN 8) + pin(OUT 7) + pin($3 3) + pin($4 4) ) circuit($10 INV2 location(21120 0) - pin(IN $I7) - pin(OUT $I8) - pin($3 VSS) - pin($4 VDD) + pin(IN 7) + pin(OUT 6) + pin($3 3) + pin($4 4) ) ) diff --git a/testdata/algo/l2n_writer_au_2.txt b/testdata/algo/l2n_writer_au_2.txt index 847a910a8..1dcc6a6a7 100644 --- a/testdata/algo/l2n_writer_au_2.txt +++ b/testdata/algo/l2n_writer_au_2.txt @@ -109,12 +109,12 @@ device(D$NMOS$1 NMOS circuit(INV2 # Nets with their geometries - net($1 + net($1 1 rect(nwell -1400 1800 1400 4580) rect(diff_cont -110 3930 110 4150) rect(ntie -400 3700 400 4380) ) - net(IN + net(IN 2 rect(poly -525 -250 -275 2250) rect(poly -1700 1620 -400 1980) rect(poly -525 -800 -275 800) @@ -122,7 +122,7 @@ circuit(INV2 rect(poly_lbl -801 1799 -799 1801) rect(poly_cont -1630 1690 -1410 1910) ) - net($3 + net($3 3 rect(poly 275 -250 525 2250) rect(poly 220 820 580 1180) rect(poly 275 2000 525 3600) @@ -139,19 +139,19 @@ circuit(INV2 rect(psd -1050 2325 -525 3275) rect(nsd -1050 -475 -525 475) ) - net(OUT + net(OUT 4 rect(diff_cont 690 2890 910 3110) rect(diff_cont 690 2490 910 2710) rect(diff_cont 690 90 910 310) rect(diff_cont 690 -310 910 -90) - polygon(metal1 800 20 800 380 940 380 940 1620 620 1620 620 2420 980 2420 980 1980 1300 1980 1300 20) + polygon(metal1 800 20 * 380 940 * * 1620 620 * * 2420 980 * * 1980 1300 * * 20) rect(metal1 620 2420 980 3180) rect(metal1 620 -380 980 380) rect(metal1_lbl 799 1799 801 1801) rect(psd 525 2325 1050 3275) rect(nsd 525 -475 1050 475) ) - net(VSS + net(VSS 5 rect(diff_cont -110 -310 110 -90) rect(diff_cont -110 90 110 310) rect(diff_cont -110 90 110 310) @@ -164,7 +164,7 @@ circuit(INV2 rect(metal2_lbl 1239 -91 1241 -89) rect(nsd -275 -475 275 475) ) - net(VDD + net(VDD 6 rect(diff_cont -110 2490 110 2710) rect(diff_cont -110 2890 110 3110) rect(diff_cont -110 2890 110 3110) @@ -177,19 +177,19 @@ circuit(INV2 rect(metal2_lbl 1249 2799 1251 2801) rect(psd -275 2325 275 3275) ) - net(BULK + net(BULK 7 rect(diff_cont -110 -1360 110 -1140) rect(ptie -400 -1590 400 -910) ) # Outgoing pins and their connections to nets - pin($0 $1) - pin(IN IN) - pin($2 $3) - pin(OUT OUT) - pin(VSS VSS) - pin(VDD VDD) - pin(BULK BULK) + pin($0 1) + pin(IN 2) + pin($2 3) + pin(OUT 4) + pin(VSS 5) + pin(VDD 6) + pin(BULK 7) # Devices and their connections device($1 D$PMOS @@ -200,10 +200,10 @@ circuit(INV2 param(AD 0.26125) param(PS 2.95) param(PD 1.5) - terminal(S $3) - terminal(G IN) - terminal(D VDD) - terminal(B $1) + terminal(S 3) + terminal(G 2) + terminal(D 6) + terminal(B 1) ) device($2 D$PMOS$1 location(400 2800) @@ -213,10 +213,10 @@ circuit(INV2 param(AD 0.49875) param(PS 1.5) param(PD 2.95) - terminal(S VDD) - terminal(G $3) - terminal(D OUT) - terminal(B $1) + terminal(S 6) + terminal(G 3) + terminal(D 4) + terminal(B 1) ) device($3 D$NMOS location(-400 0) @@ -226,10 +226,10 @@ circuit(INV2 param(AD 0.26125) param(PS 2.95) param(PD 1.5) - terminal(S $3) - terminal(G IN) - terminal(D VSS) - terminal(B BULK) + terminal(S 3) + terminal(G 2) + terminal(D 5) + terminal(B 7) ) device($4 D$NMOS$1 location(400 0) @@ -239,24 +239,24 @@ circuit(INV2 param(AD 0.49875) param(PS 1.5) param(PD 2.95) - terminal(S VSS) - terminal(G $3) - terminal(D OUT) - terminal(B BULK) + terminal(S 5) + terminal(G 3) + terminal(D 4) + terminal(B 7) ) ) circuit(INV2PAIR # Nets with their geometries - net(BULK) - net($I8 + net(BULK 1) + net($I8 2 rect(diff_cont 3430 3290 3650 3510) rect(diff_cont 3430 3690 3650 3910) rect(diff_cont 3430 490 3650 710) rect(diff_cont 3430 890 3650 1110) ) - net($I6 + net($I6 3 rect(diff_cont 4230 3290 4450 3510) rect(diff_cont 4230 3690 4450 3910) rect(diff_cont 4230 3690 4450 3910) @@ -270,7 +270,7 @@ circuit(INV2PAIR rect(metal1 1520 3220 1880 3980) rect(metal1 1520 3220 1880 3980) ) - net($I5 + net($I5 4 rect(diff_cont 4230 490 4450 710) rect(diff_cont 4230 890 4450 1110) rect(diff_cont 4230 890 4450 1110) @@ -284,54 +284,54 @@ circuit(INV2PAIR rect(metal1 1520 420 1880 1180) rect(metal1 1520 420 1880 1180) ) - net($I4 + net($I4 5 rect(diff_cont 2390 3690 2610 3910) rect(diff_cont 2390 3290 2610 3510) rect(diff_cont 2390 890 2610 1110) rect(diff_cont 2390 490 2610 710) ) - net($I3) - net($I2 + net($I3 6) + net($I2 7 rect(diff_cont 5030 3690 5250 3910) rect(diff_cont 5030 3290 5250 3510) rect(diff_cont 5030 890 5250 1110) rect(diff_cont 5030 490 5250 710) ) - net($I1) + net($I1 8) # Outgoing pins and their connections to nets - pin(BULK BULK) - pin($1 $I8) - pin($2 $I6) - pin($3 $I5) - pin($4 $I3) - pin($5 $I2) - pin($6 $I1) + pin(BULK 1) + pin($1 2) + pin($2 3) + pin($3 4) + pin($4 6) + pin($5 7) + pin($6 8) # Subcircuits and their connections circuit($1 INV2 location(1700 800) - pin($0 $I1) - pin(IN $I3) - pin(OUT $I4) - pin(VSS $I5) - pin(VDD $I6) - pin(BULK BULK) + pin($0 8) + pin(IN 6) + pin(OUT 5) + pin(VSS 4) + pin(VDD 3) + pin(BULK 1) ) circuit($2 INV2 location(4340 800) - pin($0 $I1) - pin(IN $I4) - pin($2 $I8) - pin(OUT $I2) - pin(VSS $I5) - pin(VDD $I6) - pin(BULK BULK) + pin($0 8) + pin(IN 5) + pin($2 2) + pin(OUT 7) + pin(VSS 4) + pin(VDD 3) + pin(BULK 1) ) ) circuit(RINGO # Nets with their geometries - net(FB + net(FB 1 rect(diff_cont 22850 2490 23070 2710) rect(diff_cont 22850 2890 23070 3110) rect(diff_cont 22850 -310 23070 -90) @@ -342,7 +342,7 @@ circuit(RINGO rect(metal2 -1720 1600 23160 2000) rect(metal2_lbl -1 1799 1 1801) ) - net(OSC + net(OSC 2 rect(diff_cont 24450 2890 24670 3110) rect(diff_cont 24450 2490 24670 2710) rect(diff_cont 24450 90 24670 310) @@ -351,7 +351,7 @@ circuit(RINGO rect(metal2 24360 1600 24760 2000) rect(metal2_lbl 24559 1799 24561 1801) ) - net(VDD + net(VDD 3 rect(diff_cont 7810 2490 8030 2710) rect(diff_cont 7810 2890 8030 3110) rect(diff_cont 7810 2890 8030 3110) @@ -424,7 +424,7 @@ circuit(RINGO rect(metal1 20940 2420 21300 3180) rect(metal2_lbl -1 2799 1 2801) ) - net('BULK,VSS' + net('BULK,VSS' 4 rect(diff_cont 7810 -310 8030 -90) rect(diff_cont 7810 90 8030 310) rect(diff_cont 7810 90 8030 310) @@ -497,25 +497,25 @@ circuit(RINGO rect(metal1 20940 -380 21300 380) rect(metal2_lbl -1 -1 1 1) ) - net($I13 + net($I13 5 rect(diff_cont 3330 2890 3550 3110) rect(diff_cont 3330 2490 3550 2710) rect(diff_cont 3330 90 3550 310) rect(diff_cont 3330 -310 3550 -90) ) - net($I7 + net($I7 6 rect(diff_cont 19170 2890 19390 3110) rect(diff_cont 19170 2490 19390 2710) rect(diff_cont 19170 90 19390 310) rect(diff_cont 19170 -310 19390 -90) ) - net($I6 + net($I6 7 rect(diff_cont 13890 2890 14110 3110) rect(diff_cont 13890 2490 14110 2710) rect(diff_cont 13890 90 14110 310) rect(diff_cont 13890 -310 14110 -90) ) - net($I5 + net($I5 8 rect(diff_cont 8610 2890 8830 3110) rect(diff_cont 8610 2490 8830 2710) rect(diff_cont 8610 90 8830 310) @@ -523,52 +523,52 @@ circuit(RINGO ) # Outgoing pins and their connections to nets - pin(FB FB) - pin(OSC OSC) - pin(VDD VDD) - pin('BULK,VSS' 'BULK,VSS') + pin(FB 1) + pin(OSC 2) + pin(VDD 3) + pin('BULK,VSS' 4) # Subcircuits and their connections circuit($1 INV2PAIR location(19420 -800) - pin(BULK 'BULK,VSS') - pin($1 FB) - pin($2 VDD) - pin($3 'BULK,VSS') - pin($4 $I7) - pin($5 OSC) - pin($6 VDD) + pin(BULK 4) + pin($1 1) + pin($2 3) + pin($3 4) + pin($4 6) + pin($5 2) + pin($6 3) ) circuit($2 INV2PAIR location(-1700 -800) - pin(BULK 'BULK,VSS') - pin($2 VDD) - pin($3 'BULK,VSS') - pin($4 FB) - pin($5 $I13) - pin($6 VDD) + pin(BULK 4) + pin($2 3) + pin($3 4) + pin($4 1) + pin($5 5) + pin($6 3) ) circuit($3 INV2PAIR location(3580 -800) - pin(BULK 'BULK,VSS') - pin($2 VDD) - pin($3 'BULK,VSS') - pin($4 $I13) - pin($5 $I5) - pin($6 VDD) + pin(BULK 4) + pin($2 3) + pin($3 4) + pin($4 5) + pin($5 8) + pin($6 3) ) circuit($4 INV2PAIR location(8860 -800) - pin(BULK 'BULK,VSS') - pin($2 VDD) - pin($3 'BULK,VSS') - pin($4 $I5) - pin($5 $I6) - pin($6 VDD) + pin(BULK 4) + pin($2 3) + pin($3 4) + pin($4 8) + pin($5 7) + pin($6 3) ) circuit($5 INV2PAIR location(14140 -800) - pin(BULK 'BULK,VSS') - pin($2 VDD) - pin($3 'BULK,VSS') - pin($4 $I6) - pin($5 $I7) - pin($6 VDD) + pin(BULK 4) + pin($2 3) + pin($3 4) + pin($4 7) + pin($5 6) + pin($6 3) ) ) diff --git a/testdata/algo/l2n_writer_au_2s.txt b/testdata/algo/l2n_writer_au_2s.txt index 034f62c26..5d7f46129 100644 --- a/testdata/algo/l2n_writer_au_2s.txt +++ b/testdata/algo/l2n_writer_au_2s.txt @@ -89,12 +89,12 @@ D(D$NMOS$1 NMOS ) ) X(INV2 - N($1 + N($1 1 R(nwell -1400 1800 1400 4580) R(diff_cont -110 3930 110 4150) R(ntie -400 3700 400 4380) ) - N(IN + N(IN 2 R(poly -525 -250 -275 2250) R(poly -1700 1620 -400 1980) R(poly -525 -800 -275 800) @@ -102,7 +102,7 @@ X(INV2 R(poly_lbl -801 1799 -799 1801) R(poly_cont -1630 1690 -1410 1910) ) - N($3 + N($3 3 R(poly 275 -250 525 2250) R(poly 220 820 580 1180) R(poly 275 2000 525 3600) @@ -119,19 +119,19 @@ X(INV2 R(psd -1050 2325 -525 3275) R(nsd -1050 -475 -525 475) ) - N(OUT + N(OUT 4 R(diff_cont 690 2890 910 3110) R(diff_cont 690 2490 910 2710) R(diff_cont 690 90 910 310) R(diff_cont 690 -310 910 -90) - Q(metal1 800 20 800 380 940 380 940 1620 620 1620 620 2420 980 2420 980 1980 1300 1980 1300 20) + Q(metal1 800 20 * 380 940 * * 1620 620 * * 2420 980 * * 1980 1300 * * 20) R(metal1 620 2420 980 3180) R(metal1 620 -380 980 380) R(metal1_lbl 799 1799 801 1801) R(psd 525 2325 1050 3275) R(nsd 525 -475 1050 475) ) - N(VSS + N(VSS 5 R(diff_cont -110 -310 110 -90) R(diff_cont -110 90 110 310) R(diff_cont -110 90 110 310) @@ -144,7 +144,7 @@ X(INV2 R(metal2_lbl 1239 -91 1241 -89) R(nsd -275 -475 275 475) ) - N(VDD + N(VDD 6 R(diff_cont -110 2490 110 2710) R(diff_cont -110 2890 110 3110) R(diff_cont -110 2890 110 3110) @@ -157,17 +157,17 @@ X(INV2 R(metal2_lbl 1249 2799 1251 2801) R(psd -275 2325 275 3275) ) - N(BULK + N(BULK 7 R(diff_cont -110 -1360 110 -1140) R(ptie -400 -1590 400 -910) ) - P($0 $1) - P(IN IN) - P($2 $3) - P(OUT OUT) - P(VSS VSS) - P(VDD VDD) - P(BULK BULK) + P($0 1) + P(IN 2) + P($2 3) + P(OUT 4) + P(VSS 5) + P(VDD 6) + P(BULK 7) D($1 D$PMOS Y(-400 2800) E(L 0.25) @@ -176,10 +176,10 @@ X(INV2 E(AD 0.26125) E(PS 2.95) E(PD 1.5) - T(S $3) - T(G IN) - T(D VDD) - T(B $1) + T(S 3) + T(G 2) + T(D 6) + T(B 1) ) D($2 D$PMOS$1 Y(400 2800) @@ -189,10 +189,10 @@ X(INV2 E(AD 0.49875) E(PS 1.5) E(PD 2.95) - T(S VDD) - T(G $3) - T(D OUT) - T(B $1) + T(S 6) + T(G 3) + T(D 4) + T(B 1) ) D($3 D$NMOS Y(-400 0) @@ -202,10 +202,10 @@ X(INV2 E(AD 0.26125) E(PS 2.95) E(PD 1.5) - T(S $3) - T(G IN) - T(D VSS) - T(B BULK) + T(S 3) + T(G 2) + T(D 5) + T(B 7) ) D($4 D$NMOS$1 Y(400 0) @@ -215,21 +215,21 @@ X(INV2 E(AD 0.49875) E(PS 1.5) E(PD 2.95) - T(S VSS) - T(G $3) - T(D OUT) - T(B BULK) + T(S 5) + T(G 3) + T(D 4) + T(B 7) ) ) X(INV2PAIR - N(BULK) - N($I8 + N(BULK 1) + N($I8 2 R(diff_cont 3430 3290 3650 3510) R(diff_cont 3430 3690 3650 3910) R(diff_cont 3430 490 3650 710) R(diff_cont 3430 890 3650 1110) ) - N($I6 + N($I6 3 R(diff_cont 4230 3290 4450 3510) R(diff_cont 4230 3690 4450 3910) R(diff_cont 4230 3690 4450 3910) @@ -243,7 +243,7 @@ X(INV2PAIR R(metal1 1520 3220 1880 3980) R(metal1 1520 3220 1880 3980) ) - N($I5 + N($I5 4 R(diff_cont 4230 490 4450 710) R(diff_cont 4230 890 4450 1110) R(diff_cont 4230 890 4450 1110) @@ -257,47 +257,47 @@ X(INV2PAIR R(metal1 1520 420 1880 1180) R(metal1 1520 420 1880 1180) ) - N($I4 + N($I4 5 R(diff_cont 2390 3690 2610 3910) R(diff_cont 2390 3290 2610 3510) R(diff_cont 2390 890 2610 1110) R(diff_cont 2390 490 2610 710) ) - N($I3) - N($I2 + N($I3 6) + N($I2 7 R(diff_cont 5030 3690 5250 3910) R(diff_cont 5030 3290 5250 3510) R(diff_cont 5030 890 5250 1110) R(diff_cont 5030 490 5250 710) ) - N($I1) - P(BULK BULK) - P($1 $I8) - P($2 $I6) - P($3 $I5) - P($4 $I3) - P($5 $I2) - P($6 $I1) + N($I1 8) + P(BULK 1) + P($1 2) + P($2 3) + P($3 4) + P($4 6) + P($5 7) + P($6 8) X($1 INV2 Y(1700 800) - P($0 $I1) - P(IN $I3) - P(OUT $I4) - P(VSS $I5) - P(VDD $I6) - P(BULK BULK) + P($0 8) + P(IN 6) + P(OUT 5) + P(VSS 4) + P(VDD 3) + P(BULK 1) ) X($2 INV2 Y(4340 800) - P($0 $I1) - P(IN $I4) - P($2 $I8) - P(OUT $I2) - P(VSS $I5) - P(VDD $I6) - P(BULK BULK) + P($0 8) + P(IN 5) + P($2 2) + P(OUT 7) + P(VSS 4) + P(VDD 3) + P(BULK 1) ) ) X(RINGO - N(FB + N(FB 1 R(diff_cont 22850 2490 23070 2710) R(diff_cont 22850 2890 23070 3110) R(diff_cont 22850 -310 23070 -90) @@ -308,7 +308,7 @@ X(RINGO R(metal2 -1720 1600 23160 2000) R(metal2_lbl -1 1799 1 1801) ) - N(OSC + N(OSC 2 R(diff_cont 24450 2890 24670 3110) R(diff_cont 24450 2490 24670 2710) R(diff_cont 24450 90 24670 310) @@ -317,7 +317,7 @@ X(RINGO R(metal2 24360 1600 24760 2000) R(metal2_lbl 24559 1799 24561 1801) ) - N(VDD + N(VDD 3 R(diff_cont 7810 2490 8030 2710) R(diff_cont 7810 2890 8030 3110) R(diff_cont 7810 2890 8030 3110) @@ -390,7 +390,7 @@ X(RINGO R(metal1 20940 2420 21300 3180) R(metal2_lbl -1 2799 1 2801) ) - N('BULK,VSS' + N('BULK,VSS' 4 R(diff_cont 7810 -310 8030 -90) R(diff_cont 7810 90 8030 310) R(diff_cont 7810 90 8030 310) @@ -463,73 +463,73 @@ X(RINGO R(metal1 20940 -380 21300 380) R(metal2_lbl -1 -1 1 1) ) - N($I13 + N($I13 5 R(diff_cont 3330 2890 3550 3110) R(diff_cont 3330 2490 3550 2710) R(diff_cont 3330 90 3550 310) R(diff_cont 3330 -310 3550 -90) ) - N($I7 + N($I7 6 R(diff_cont 19170 2890 19390 3110) R(diff_cont 19170 2490 19390 2710) R(diff_cont 19170 90 19390 310) R(diff_cont 19170 -310 19390 -90) ) - N($I6 + N($I6 7 R(diff_cont 13890 2890 14110 3110) R(diff_cont 13890 2490 14110 2710) R(diff_cont 13890 90 14110 310) R(diff_cont 13890 -310 14110 -90) ) - N($I5 + N($I5 8 R(diff_cont 8610 2890 8830 3110) R(diff_cont 8610 2490 8830 2710) R(diff_cont 8610 90 8830 310) R(diff_cont 8610 -310 8830 -90) ) - P(FB FB) - P(OSC OSC) - P(VDD VDD) - P('BULK,VSS' 'BULK,VSS') + P(FB 1) + P(OSC 2) + P(VDD 3) + P('BULK,VSS' 4) X($1 INV2PAIR Y(19420 -800) - P(BULK 'BULK,VSS') - P($1 FB) - P($2 VDD) - P($3 'BULK,VSS') - P($4 $I7) - P($5 OSC) - P($6 VDD) + P(BULK 4) + P($1 1) + P($2 3) + P($3 4) + P($4 6) + P($5 2) + P($6 3) ) X($2 INV2PAIR Y(-1700 -800) - P(BULK 'BULK,VSS') - P($2 VDD) - P($3 'BULK,VSS') - P($4 FB) - P($5 $I13) - P($6 VDD) + P(BULK 4) + P($2 3) + P($3 4) + P($4 1) + P($5 5) + P($6 3) ) X($3 INV2PAIR Y(3580 -800) - P(BULK 'BULK,VSS') - P($2 VDD) - P($3 'BULK,VSS') - P($4 $I13) - P($5 $I5) - P($6 VDD) + P(BULK 4) + P($2 3) + P($3 4) + P($4 5) + P($5 8) + P($6 3) ) X($4 INV2PAIR Y(8860 -800) - P(BULK 'BULK,VSS') - P($2 VDD) - P($3 'BULK,VSS') - P($4 $I5) - P($5 $I6) - P($6 VDD) + P(BULK 4) + P($2 3) + P($3 4) + P($4 8) + P($5 7) + P($6 3) ) X($5 INV2PAIR Y(14140 -800) - P(BULK 'BULK,VSS') - P($2 VDD) - P($3 'BULK,VSS') - P($4 $I6) - P($5 $I7) - P($6 VDD) + P(BULK 4) + P($2 3) + P($3 4) + P($4 7) + P($5 6) + P($6 3) ) ) diff --git a/testdata/algo/l2n_writer_au_s.txt b/testdata/algo/l2n_writer_au_s.txt index 726395991..6be18f125 100644 --- a/testdata/algo/l2n_writer_au_s.txt +++ b/testdata/algo/l2n_writer_au_s.txt @@ -68,7 +68,7 @@ D(D$NMOS$1 NMOS ) ) X(INV2 - N(IN + N(IN 1 R(poly -525 -250 -275 2250) R(poly -1700 1620 -400 1980) R(poly -525 -800 -275 800) @@ -76,7 +76,7 @@ X(INV2 R(poly_lbl -801 1799 -799 1801) R(poly_cont -1630 1690 -1410 1910) ) - N($2 + N($2 2 R(poly 275 -250 525 2250) R(poly 220 820 580 1180) R(poly 275 2000 525 3600) @@ -93,19 +93,19 @@ X(INV2 R(psd -1050 2325 -525 3275) R(nsd -1050 -475 -525 475) ) - N(OUT + N(OUT 3 R(diff_cont 690 2890 910 3110) R(diff_cont 690 2490 910 2710) R(diff_cont 690 90 910 310) R(diff_cont 690 -310 910 -90) - Q(metal1 800 20 800 380 940 380 940 1620 620 1620 620 2420 980 2420 980 1980 1300 1980 1300 20) + Q(metal1 800 20 * 380 940 * * 1620 620 * * 2420 980 * * 1980 1300 * * 20) R(metal1 620 2420 980 3180) R(metal1 620 -380 980 380) R(metal1_lbl 799 1799 801 1801) R(psd 525 2325 1050 3275) R(nsd 525 -475 1050 475) ) - N($4 + N($4 4 R(diff_cont -110 -310 110 -90) R(diff_cont -110 90 110 310) R(diff_cont -110 90 110 310) @@ -117,7 +117,7 @@ X(INV2 R(metal2 -1400 -450 1400 450) R(nsd -275 -475 275 475) ) - N($5 + N($5 5 R(diff_cont -110 2490 110 2710) R(diff_cont -110 2890 110 3110) R(diff_cont -110 2890 110 3110) @@ -129,11 +129,11 @@ X(INV2 R(metal2 -1400 2350 1400 3250) R(psd -275 2325 275 3275) ) - P(IN IN) - P($1 $2) - P(OUT OUT) - P($3 $4) - P($4 $5) + P(IN 1) + P($1 2) + P(OUT 3) + P($3 4) + P($4 5) D($1 D$PMOS Y(-400 2800) E(L 0.25) @@ -142,9 +142,9 @@ X(INV2 E(AD 0.26125) E(PS 2.95) E(PD 1.5) - T(S $2) - T(G IN) - T(D $5) + T(S 2) + T(G 1) + T(D 5) ) D($2 D$PMOS$1 Y(400 2800) @@ -154,9 +154,9 @@ X(INV2 E(AD 0.49875) E(PS 1.5) E(PD 2.95) - T(S $5) - T(G $2) - T(D OUT) + T(S 5) + T(G 2) + T(D 3) ) D($3 D$NMOS Y(-400 0) @@ -166,9 +166,9 @@ X(INV2 E(AD 0.26125) E(PS 2.95) E(PD 1.5) - T(S $2) - T(G IN) - T(D $4) + T(S 2) + T(G 1) + T(D 4) ) D($4 D$NMOS$1 Y(400 0) @@ -178,13 +178,13 @@ X(INV2 E(AD 0.49875) E(PS 1.5) E(PD 2.95) - T(S $4) - T(G $2) - T(D OUT) + T(S 4) + T(G 2) + T(D 3) ) ) X(RINGO - N(FB + N(FB 1 R(diff_cont 22850 2490 23070 2710) R(diff_cont 22850 2890 23070 3110) R(diff_cont 22850 -310 23070 -90) @@ -195,7 +195,7 @@ X(RINGO R(metal2 -1720 1600 23160 2000) R(metal2_lbl -1 1799 1 1801) ) - N(OSC + N(OSC 2 R(diff_cont 24450 2890 24670 3110) R(diff_cont 24450 2490 24670 2710) R(diff_cont 24450 90 24670 310) @@ -204,7 +204,7 @@ X(RINGO R(metal2 24360 1600 24760 2000) R(metal2_lbl 24559 1799 24561 1801) ) - N(VSS + N(VSS 3 R(diff_cont 2530 -310 2750 -90) R(diff_cont 2530 90 2750 310) R(diff_cont 2530 90 2750 310) @@ -267,7 +267,7 @@ X(RINGO R(metal1 23580 -380 23940 380) R(metal2_lbl -1 -1 1 1) ) - N(VDD + N(VDD 4 R(diff_cont 2530 2490 2750 2710) R(diff_cont 2530 2890 2750 3110) R(diff_cont 2530 2890 2750 3110) @@ -330,123 +330,123 @@ X(RINGO R(metal1 23580 2420 23940 3180) R(metal2_lbl -1 2799 1 2801) ) - N($I19 + N($I19 5 R(diff_cont 690 2890 910 3110) R(diff_cont 690 2490 910 2710) R(diff_cont 690 90 910 310) R(diff_cont 690 -310 910 -90) ) - N($I8 + N($I8 6 R(diff_cont 21810 2890 22030 3110) R(diff_cont 21810 2490 22030 2710) R(diff_cont 21810 90 22030 310) R(diff_cont 21810 -310 22030 -90) ) - N($I7 + N($I7 7 R(diff_cont 19170 2890 19390 3110) R(diff_cont 19170 2490 19390 2710) R(diff_cont 19170 90 19390 310) R(diff_cont 19170 -310 19390 -90) ) - N($I6 + N($I6 8 R(diff_cont 16530 2890 16750 3110) R(diff_cont 16530 2490 16750 2710) R(diff_cont 16530 90 16750 310) R(diff_cont 16530 -310 16750 -90) ) - N($I5 + N($I5 9 R(diff_cont 13890 2890 14110 3110) R(diff_cont 13890 2490 14110 2710) R(diff_cont 13890 90 14110 310) R(diff_cont 13890 -310 14110 -90) ) - N($I4 + N($I4 10 R(diff_cont 11250 2890 11470 3110) R(diff_cont 11250 2490 11470 2710) R(diff_cont 11250 90 11470 310) R(diff_cont 11250 -310 11470 -90) ) - N($I3 + N($I3 11 R(diff_cont 8610 2890 8830 3110) R(diff_cont 8610 2490 8830 2710) R(diff_cont 8610 90 8830 310) R(diff_cont 8610 -310 8830 -90) ) - N($I2 + N($I2 12 R(diff_cont 5970 2890 6190 3110) R(diff_cont 5970 2490 6190 2710) R(diff_cont 5970 90 6190 310) R(diff_cont 5970 -310 6190 -90) ) - N($I1 + N($I1 13 R(diff_cont 3330 2890 3550 3110) R(diff_cont 3330 2490 3550 2710) R(diff_cont 3330 90 3550 310) R(diff_cont 3330 -310 3550 -90) ) - P(FB FB) - P(OSC OSC) - P(VSS VSS) - P(VDD VDD) + P(FB 1) + P(OSC 2) + P(VSS 3) + P(VDD 4) X($1 INV2 Y(23760 0) - P(IN $I8) - P($1 FB) - P(OUT OSC) - P($3 VSS) - P($4 VDD) + P(IN 6) + P($1 1) + P(OUT 2) + P($3 3) + P($4 4) ) X($2 INV2 Y(0 0) - P(IN FB) - P(OUT $I19) - P($3 VSS) - P($4 VDD) + P(IN 1) + P(OUT 5) + P($3 3) + P($4 4) ) X($3 INV2 Y(2640 0) - P(IN $I19) - P(OUT $I1) - P($3 VSS) - P($4 VDD) + P(IN 5) + P(OUT 13) + P($3 3) + P($4 4) ) X($4 INV2 Y(5280 0) - P(IN $I1) - P(OUT $I2) - P($3 VSS) - P($4 VDD) + P(IN 13) + P(OUT 12) + P($3 3) + P($4 4) ) X($5 INV2 Y(7920 0) - P(IN $I2) - P(OUT $I3) - P($3 VSS) - P($4 VDD) + P(IN 12) + P(OUT 11) + P($3 3) + P($4 4) ) X($6 INV2 Y(10560 0) - P(IN $I3) - P(OUT $I4) - P($3 VSS) - P($4 VDD) + P(IN 11) + P(OUT 10) + P($3 3) + P($4 4) ) X($7 INV2 Y(13200 0) - P(IN $I4) - P(OUT $I5) - P($3 VSS) - P($4 VDD) + P(IN 10) + P(OUT 9) + P($3 3) + P($4 4) ) X($8 INV2 Y(15840 0) - P(IN $I5) - P(OUT $I6) - P($3 VSS) - P($4 VDD) + P(IN 9) + P(OUT 8) + P($3 3) + P($4 4) ) X($9 INV2 Y(18480 0) - P(IN $I6) - P(OUT $I7) - P($3 VSS) - P($4 VDD) + P(IN 8) + P(OUT 7) + P($3 3) + P($4 4) ) X($10 INV2 Y(21120 0) - P(IN $I7) - P(OUT $I8) - P($3 VSS) - P($4 VDD) + P(IN 7) + P(OUT 6) + P($3 3) + P($4 4) ) )