Reworked l2n and lvsdb format such that reading/writing gets more reproducible: maintain unnamed state of devices, subcircuits and pins

This commit is contained in:
Matthias Koefferlein 2019-05-20 22:33:23 +02:00
parent 834dcc7474
commit 625b173379
19 changed files with 1352 additions and 1261 deletions

View File

@ -194,7 +194,7 @@ void Device::add_others_terminals (unsigned int this_terminal, db::Device *other
std::map<unsigned int, std::vector<DeviceReconnectedTerminal> >::const_iterator ot = other->m_reconnected_terminals.find (other_terminal);
if (ot == other->m_reconnected_terminals.end ()) {
terminals.push_back (DeviceReconnectedTerminal (other_abstracts ().size (), other_terminal));
terminals.push_back (DeviceReconnectedTerminal (other_abstracts ().size () + 1, other_terminal));
} else {
@ -202,7 +202,7 @@ void Device::add_others_terminals (unsigned int this_terminal, db::Device *other
terminals.insert (terminals.end (), ot->second.begin (), ot->second.end ());
while (n < terminals.size ()) {
terminals [n].device_index += other_abstracts ().size ();
terminals [n].device_index += other_abstracts ().size () + 1;
++n;
}

View File

@ -64,14 +64,15 @@ namespace db
*
* [circuit-def]:
*
* net(<id> [net-name]? [geometry-def]*)
* net(<id> [name]? [geometry-def]*)
* - net geometry [short key: N]
* A net declaration shall be there also if no geometry
* is present. The ID is a numerical shortcut for the net.
* pin(<name> <net-id>) - outgoing pin connection [short key: P]
* device(<name> <abstract-or-class> [combined-device]* [terminal-route]* [device-def])
* pin(<net-id> [name]?) - outgoing pin connection [short key: P]
* Statement order specifies pin order.
* device(<id> <abstract-or-class> [name]? [combined-device]* [terminal-route]* [device-def])
* - device with connections [short key: D]
* circuit(<name> [subcircuit-def])
* circuit(<id> [name]? [subcircuit-def])
* - subcircuit with connections [short key: X]
*
* [combined-device]:
@ -88,9 +89,9 @@ namespace db
* 0 is the basic device, 1 the first combined
* device etc.
*
* [net-name]:
* [name]:
*
* name(<net-name>) - specify net name [short key: I]
* name(<name>) - specify net name [short key: I]
*
* [geometry-def]:
*
@ -125,7 +126,7 @@ namespace db
* rotation(<angle>) - rotation angle (in degree, default is 0) [short key O]
* mirror - if specified, the instance is mirrored before rotation [short key M]
* scale(<mag>) - magnification (default is 1) [short key S]
* pin(<pin-name> <net-id>) - specifies connection of the pin with a net [short key: P]
* pin(<pin-id> <net-id>) - specifies connection of the pin with a net [short key: P]
*/
namespace l2n_std_format

View File

@ -145,7 +145,7 @@ static db::Region &layer_by_name (db::LayoutToNetlist *l2n, const std::string &n
return *l;
}
void LayoutToNetlistStandardReader::read_netlist (db::Netlist *netlist, db::LayoutToNetlist *l2n, bool nested, std::map<const db::Circuit *, std::map<unsigned int, Net *> > *id2net_per_circuit)
void LayoutToNetlistStandardReader::read_netlist (db::Netlist *netlist, db::LayoutToNetlist *l2n, bool nested, std::map<const db::Circuit *, ObjectMap> *map_per_circuit)
{
m_dbu = 0.001;
int version = 0;
@ -287,22 +287,22 @@ void LayoutToNetlistStandardReader::read_netlist (db::Netlist *netlist, db::Layo
}
std::map<db::CellInstArray, std::list<Connections> > connections;
std::map<unsigned int, Net *> id2net_local;
std::map<unsigned int, Net *> *id2net = &id2net_local;
if (id2net_per_circuit) {
id2net = &(*id2net_per_circuit)[circuit];
ObjectMap map_local;
ObjectMap *map = &map_local;
if (map_per_circuit) {
map = &(*map_per_circuit)[circuit];
}
while (br) {
if (test (skeys::net_key) || test (lkeys::net_key)) {
read_net (netlist, l2n, circuit, *id2net);
read_net (netlist, l2n, circuit, *map);
} else if (test (skeys::pin_key) || test (lkeys::pin_key)) {
read_pin (netlist, l2n, circuit, *id2net);
read_pin (netlist, l2n, circuit, *map);
} else if (test (skeys::device_key) || test (lkeys::device_key)) {
read_device (netlist, l2n, circuit, *id2net, connections);
read_device (netlist, l2n, circuit, *map, connections);
} else if (test (skeys::circuit_key) || test (lkeys::circuit_key)) {
read_subcircuit (netlist, l2n, circuit, *id2net, connections);
read_subcircuit (netlist, l2n, circuit, *map, connections);
} else {
throw tl::Exception (tl::to_string (tr ("Invalid keyword inside circuit definition (net, pin, device or circuit expected)")));
}
@ -458,7 +458,7 @@ LayoutToNetlistStandardReader::read_geometries (Brace &br, db::LayoutToNetlist *
}
void
LayoutToNetlistStandardReader::read_net (db::Netlist * /*netlist*/, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, Net *> &id2net)
LayoutToNetlistStandardReader::read_net (db::Netlist * /*netlist*/, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map)
{
Brace br (this);
@ -475,7 +475,7 @@ LayoutToNetlistStandardReader::read_net (db::Netlist * /*netlist*/, db::LayoutTo
net->set_name (name);
circuit->add_net (net);
id2net.insert (std::make_pair (id, net));
map.id2net.insert (std::make_pair (id, net));
if (l2n) {
@ -492,28 +492,47 @@ LayoutToNetlistStandardReader::read_net (db::Netlist * /*netlist*/, db::LayoutTo
}
void
LayoutToNetlistStandardReader::read_pin (db::Netlist * /*netlist*/, db::LayoutToNetlist * /*l2n*/, db::Circuit *circuit, std::map<unsigned int, Net *> &id2net)
LayoutToNetlistStandardReader::read_pin (db::Netlist * /*netlist*/, db::LayoutToNetlist * /*l2n*/, db::Circuit *circuit, ObjectMap &map)
{
Brace br (this);
std::string name;
read_word_or_quoted (name);
const db::Pin &pin = circuit->add_pin (name);
db::Net *net = 0;
if (br) {
while (br) {
if (test (skeys::name_key) || test (lkeys::name_key)) {
if (!name.empty ()) {
throw tl::Exception (tl::to_string (tr ("Duplicate pin name")));
}
Brace br_name (this);
read_word_or_quoted (name);
br_name.done ();
} else {
if (net) {
throw tl::Exception (tl::to_string (tr ("Duplicate net ID")));
}
unsigned int netid = (unsigned int) read_int ();
net = map.id2net [netid];
if (!net) {
throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid));
}
unsigned int netid = (unsigned int) read_int ();
db::Net *net = id2net [netid];
if (!net) {
throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid));
}
circuit->connect_pin (pin.id (), net);
}
br.done ();
const db::Pin &pin = circuit->add_pin (name);
if (net) {
circuit->connect_pin (pin.id (), net);
}
br.done ();
}
size_t
@ -547,23 +566,22 @@ LayoutToNetlistStandardReader::device_model_by_name (db::Netlist *netlist, const
}
void
LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, Net *> &id2net, std::map<db::CellInstArray, std::list<Connections> > &connections)
LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map, std::map<db::CellInstArray, std::list<Connections> > &connections)
{
Brace br (this);
size_t id = size_t (read_int ());
std::string name;
read_word_or_quoted (name);
std::string dmname;
read_word_or_quoted (dmname);
std::pair<db::DeviceAbstract *, const db::DeviceClass *> dm = device_model_by_name (netlist, dmname);
db::Device *device = new db::Device ();
std::auto_ptr<db::Device> device (new db::Device ());
device->set_device_class (const_cast<db::DeviceClass *> (dm.second));
device->set_device_abstract (dm.first);
device->set_name (name);
circuit->add_device (device);
db::Coord x = 0, y = 0;
db::VCplxTrans dbu_inv (1.0 / m_dbu);
@ -572,7 +590,13 @@ LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNe
while (br) {
if (test (skeys::location_key) || test (lkeys::location_key)) {
if (test (skeys::name_key) || test (lkeys::name_key)) {
Brace br_name (this);
read_word_or_quoted (name);
br_name.done ();
} else if (test (skeys::location_key) || test (lkeys::location_key)) {
Brace br2 (this);
x = read_coord ();
@ -629,7 +653,7 @@ LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNe
if (br2) {
unsigned int netid = (unsigned int) read_int ();
db::Net *net = id2net [netid];
db::Net *net = map.id2net [netid];
if (!net) {
throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid));
}
@ -672,10 +696,15 @@ LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNe
}
device->set_position (db::DPoint (m_dbu * x, m_dbu * y));
br.done ();
if (id > 0) {
map.id2device.insert (std::make_pair (id, device.get ()));
}
device->set_position (db::DPoint (m_dbu * x, m_dbu * y));
device->set_name (name);
if (l2n && dm.first) {
db::Cell &ccell = l2n->internal_layout ()->cell (circuit->cell_index ());
@ -731,17 +760,20 @@ LayoutToNetlistStandardReader::read_device (db::Netlist *netlist, db::LayoutToNe
}
}
circuit->add_device (device.release ());
}
void
LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, Net *> &id2net, std::map<db::CellInstArray, std::list<Connections> > &connections)
LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map, std::map<db::CellInstArray, std::list<Connections> > &connections)
{
Brace br (this);
std::list<Connections> refs;
size_t id = size_t (read_int ());
std::string name;
read_word_or_quoted (name);
std::string xname;
read_word_or_quoted (xname);
@ -751,21 +783,24 @@ LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::Layout
throw tl::Exception (tl::to_string (tr ("Not a valid device circuit name: ")) + xname);
}
db::SubCircuit *subcircuit = new db::SubCircuit (circuit_ref);
subcircuit->set_name (name);
circuit->add_subcircuit (subcircuit);
std::auto_ptr<db::SubCircuit> subcircuit (new db::SubCircuit (circuit_ref));
db::Coord x = 0, y = 0;
bool mirror = false;
double angle = 0;
double mag = 1.0;
db::InstElement ie;
bool inst_made = false;
while (br) {
if (test (skeys::location_key) || test (lkeys::location_key)) {
if (test (skeys::name_key) || test (lkeys::name_key)) {
Brace br_name (this);
read_word_or_quoted (name);
br_name.done ();
} else if (test (skeys::location_key) || test (lkeys::location_key)) {
Brace br2 (this);
x = read_coord ();
@ -806,17 +841,18 @@ LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::Layout
} else if (test (skeys::pin_key) || test (lkeys::pin_key)) {
Brace br2 (this);
std::string pname;
read_word_or_quoted (pname);
size_t pin_id = size_t (read_int ());
unsigned int netid = (unsigned int) read_int ();
br2.done ();
const db::Pin *sc_pin = circuit_ref->pin_by_name (pname);
const db::Pin *sc_pin = circuit_ref->pin_by_id (pin_id);
if (! sc_pin) {
throw tl::Exception (tl::to_string (tr ("Not a valid pin name: ")) + pname + tl::to_string (tr (" for circuit: ")) + circuit_ref->name ());
throw tl::Exception (tl::to_string (tr ("Not a valid pin ID: ")) + tl::to_string (pin_id) + tl::to_string (tr (" for circuit: ")) + circuit_ref->name ());
}
db::Net *net = id2net [netid];
db::Net *net = map.id2net [netid];
if (!net) {
throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (netid));
}
@ -835,6 +871,12 @@ LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::Layout
br.done ();
if (id > 0) {
map.id2subcircuit.insert (std::make_pair (id, subcircuit.get ()));
}
subcircuit->set_name (name);
if (l2n) {
subcircuit->set_trans (db::DCplxTrans (mag, angle, mirror, db::DVector (m_dbu * x, m_dbu * y)));
@ -846,6 +888,8 @@ LayoutToNetlistStandardReader::read_subcircuit (db::Netlist *netlist, db::Layout
connections [inst] = refs;
}
circuit->add_subcircuit (subcircuit.release ());
}
void

View File

@ -84,6 +84,14 @@ class DB_PUBLIC LayoutToNetlistStandardReader
: public LayoutToNetlistReaderBase
{
public:
struct ObjectMap
{
std::map<unsigned int, db::Net *> id2net;
std::map<unsigned int, db::Device *> id2device;
std::map<unsigned int, db::SubCircuit *> id2subcircuit;
};
LayoutToNetlistStandardReader (tl::InputStream &stream);
void do_read (db::LayoutToNetlist *l2n);
@ -92,7 +100,7 @@ protected:
friend class l2n_std_reader::Brace;
typedef l2n_std_reader::Brace Brace;
void read_netlist (Netlist *netlist, db::LayoutToNetlist *l2n, bool nested = false, std::map<const db::Circuit *, std::map<unsigned int, Net *> > *id2net_per_circuit = 0);
void read_netlist (Netlist *netlist, db::LayoutToNetlist *l2n, bool nested = false, std::map<const db::Circuit *, ObjectMap> *map_per_circuit = 0);
static size_t terminal_id (const db::DeviceClass *device_class, const std::string &tname);
static std::pair<db::DeviceAbstract *, const db::DeviceClass *> device_model_by_name (db::Netlist *netlist, const std::string &dmname);
@ -124,10 +132,10 @@ protected:
bool at_end ();
void skip ();
void read_net (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, db::Net *> &id2net);
void read_pin (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, db::Net *> &id2net);
void read_device (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, db::Net *> &id2net, std::map<db::CellInstArray, std::list<Connections> > &connections);
void read_subcircuit (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, std::map<unsigned int, db::Net *> &id2net, std::map<db::CellInstArray, std::list<Connections> > &connections);
void read_net (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map);
void read_pin (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map);
void read_device (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map, std::map<db::CellInstArray, std::list<Connections> > &connections);
void read_subcircuit (Netlist *netlist, db::LayoutToNetlist *l2n, db::Circuit *circuit, ObjectMap &map, std::map<db::CellInstArray, std::list<Connections> > &connections);
void read_abstract_terminal (db::LayoutToNetlist *l2n, db::DeviceAbstract *dm, db::DeviceClass *dc);
std::pair<unsigned int, db::PolygonRef> read_geometry (db::LayoutToNetlist *l2n);
void read_geometries (Brace &br, db::LayoutToNetlist *l2n, db::local_cluster<db::PolygonRef> &lc, db::Cell &cell);

View File

@ -223,12 +223,18 @@ void std_writer_impl<Keys>::write (const db::Netlist *netlist, const db::LayoutT
*mp_stream << endl << indent << indent1 << "# Outgoing pins and their connections to nets" << endl;
}
for (db::Circuit::const_pin_iterator p = circuit.begin_pins (); p != circuit.end_pins (); ++p) {
*mp_stream << indent << indent1 << Keys::pin_key << "(";
const db::Net *net = circuit.net_for_pin (p->id ());
if (net) {
*mp_stream << indent << indent1 << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << " " << (*net2id) [net] << ")" << endl;
} else {
*mp_stream << indent << indent1 << Keys::pin_key << "(" << tl::to_word_or_quoted_string (p->expanded_name ()) << ")" << endl;
*mp_stream << (*net2id) [net];
}
if (! p->name ().empty ()) {
if (net) {
*mp_stream << " ";
}
*mp_stream << Keys::name_key << "(" << tl::to_word_or_quoted_string (p->name ()) << ")";
}
*mp_stream << ")" << endl;
}
}
@ -402,11 +408,15 @@ void std_writer_impl<Keys>::write (const db::Netlist *netlist, const db::LayoutT
}
template <class Keys>
void std_writer_impl<Keys>::write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit, std::map<const Net *, unsigned int> &net2id, const std::string &indent)
void std_writer_impl<Keys>::write (const db::LayoutToNetlist *l2n, const db::SubCircuit &subcircuit, std::map<const db::Net *, unsigned int> &net2id, const std::string &indent)
{
*mp_stream << indent << indent1 << Keys::circuit_key << "(" << tl::to_word_or_quoted_string (subcircuit.expanded_name ());
*mp_stream << indent << indent1 << Keys::circuit_key << "(" << tl::to_string (subcircuit.id ());
*mp_stream << " " << tl::to_word_or_quoted_string (subcircuit.circuit_ref ()->name ());
if (! subcircuit.name ().empty ()) {
*mp_stream << " " << Keys::name_key << "(" << tl::to_word_or_quoted_string (subcircuit.name ()) << ")";
}
if (l2n) {
const db::DCplxTrans &tr = subcircuit.trans ();
@ -438,7 +448,7 @@ void std_writer_impl<Keys>::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 ()) << " " << net2id [net] << ")";
*mp_stream << Keys::pin_key << "(" << tl::to_string (p->id ()) << " " << net2id [net] << ")";
if (separate_lines) {
*mp_stream << endl;
}
@ -493,7 +503,7 @@ void std_writer_impl<Keys>::write (const db::LayoutToNetlist * /*l2n*/, const db
const std::vector<DeviceTerminalDefinition> &td = device.device_class ()->terminal_definitions ();
const std::vector<DeviceParameterDefinition> &pd = device.device_class ()->parameter_definitions ();
*mp_stream << indent << indent1 << Keys::device_key << "(" << tl::to_word_or_quoted_string (device.expanded_name ());
*mp_stream << indent << indent1 << Keys::device_key << "(" << tl::to_string (device.id ());
if (device.device_abstract ()) {
@ -524,6 +534,10 @@ void std_writer_impl<Keys>::write (const db::LayoutToNetlist * /*l2n*/, const db
*mp_stream << " " << tl::to_word_or_quoted_string (device.device_class ()->name ()) << endl;
}
if (! device.name ().empty ()) {
*mp_stream << " " << Keys::name_key << "(" << tl::to_word_or_quoted_string (device.name ()) << ")";
}
for (std::vector<DeviceParameterDefinition>::const_iterator i = pd.begin (); i != pd.end (); ++i) {
*mp_stream << indent << indent2 << Keys::param_key << "(" << tl::to_word_or_quoted_string (i->name ()) << " " << device.parameter_value (i->id ()) << ")" << endl;
}

View File

@ -96,15 +96,19 @@ namespace db
*
* [pair]
*
* pin([non] [non] [status]?) - a pin pair [short key: P]
* device([non] [non] [status]?) - a device pair [short key: D]
* circuit([non] [non] [status]?) - a subcircuit pair [short key: X]
* net([non] [non] [status]?) - a net pair [short key: N]
* pin([ion] [ion] [status]?) - a pin pair [short key: P]
* device([ion] [ion] [status]?) - a device pair [short key: D]
* circuit([ion] [ion] [status]?) - a subcircuit pair [short key: X]
* net([ion] [ion] [status]?) - a net pair [short key: N]
*
* [non]
*
* <name> | ()
*
* [ion]
*
* <id> | ()
*
* [status]
*
* mismatch | - [short key: 0]

View File

@ -51,8 +51,8 @@ void LayoutVsSchematicStandardReader::read_netlist (db::LayoutVsSchematic *lvs)
{
int version = 0;
std::string description;
m_id2net_per_circuit_a.clear ();
m_id2net_per_circuit_b.clear ();
m_map_per_circuit_a.clear ();
m_map_per_circuit_b.clear ();
tl_assert (lvs->internal_layout ());
lvs->internal_layout ()->dbu (1.0); // mainly for testing
@ -81,14 +81,14 @@ void LayoutVsSchematicStandardReader::read_netlist (db::LayoutVsSchematic *lvs)
} else if (test (skeys::layout_key) || test (lkeys::layout_key)) {
Brace br (this);
LayoutToNetlistStandardReader::read_netlist (0, lvs, true /*nested*/, &m_id2net_per_circuit_a);
LayoutToNetlistStandardReader::read_netlist (0, lvs, true /*nested*/, &m_map_per_circuit_a);
br.done ();
} else if (test (skeys::reference_key) || test (lkeys::reference_key)) {
Brace br (this);
std::auto_ptr<db::Netlist> netlist (new db::Netlist ());
LayoutToNetlistStandardReader::read_netlist (netlist.get (), 0, true /*nested*/, &m_id2net_per_circuit_b);
LayoutToNetlistStandardReader::read_netlist (netlist.get (), 0, true /*nested*/, &m_map_per_circuit_b);
lvs->set_reference_netlist (netlist.release ());
br.done ();
@ -163,8 +163,8 @@ void LayoutVsSchematicStandardReader::read_xref (db::NetlistCrossReference *xref
Brace br (this);
std::pair<std::string, bool> non_a, non_b;
non_a = read_non_string ();
non_b = read_non_string ();
non_a = read_non ();
non_b = read_non ();
const db::Circuit *circuit_a = 0;
if (non_a.second) {
@ -208,7 +208,7 @@ void LayoutVsSchematicStandardReader::read_xref (db::NetlistCrossReference *xref
br.done ();
}
std::pair<std::string, bool> LayoutVsSchematicStandardReader::read_non_string ()
std::pair<std::string, bool> LayoutVsSchematicStandardReader::read_non ()
{
if (test ("(")) {
expect (")");
@ -220,7 +220,7 @@ std::pair<std::string, bool> LayoutVsSchematicStandardReader::read_non_string ()
}
}
std::pair<unsigned int, bool> LayoutVsSchematicStandardReader::read_non_numerical ()
std::pair<unsigned int, bool> LayoutVsSchematicStandardReader::read_ion ()
{
if (test ("(")) {
expect (")");
@ -231,128 +231,147 @@ std::pair<unsigned int, bool> LayoutVsSchematicStandardReader::read_non_numerica
}
static const db::Net *net_by_numerical_id (const db::Circuit *circuit, const std::pair<unsigned int, bool> &non, std::map<const db::Circuit *, std::map<unsigned int, Net *> > &id2net_per_circuit)
static const db::Net *net_by_numerical_id (const db::Circuit *circuit, const std::pair<unsigned int, bool> &ion, std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap> &map_per_circuit)
{
if (non.second && circuit) {
if (ion.second && circuit) {
std::map<const db::Circuit *, std::map<unsigned int, Net *> >::const_iterator i = id2net_per_circuit.find (circuit);
if (i != id2net_per_circuit.end ()) {
std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap>::const_iterator i = map_per_circuit.find (circuit);
if (i != map_per_circuit.end ()) {
std::map<unsigned int, Net *>::const_iterator j = i->second.find (non.first);
if (j != i->second.end ()) {
std::map<unsigned int, Net *>::const_iterator j = i->second.id2net.find (ion.first);
if (j != i->second.id2net.end ()) {
return j->second;
}
}
throw tl::Exception (tl::to_string (tr ("Not a valid net id: ")) + tl::to_string (non.first));
throw tl::Exception (tl::to_string (tr ("Not a valid net ID: ")) + tl::to_string (ion.first));
}
return 0;
}
static const db::Device *device_by_numerical_id (const db::Circuit *circuit, const std::pair<unsigned int, bool> &ion, std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap> &map_per_circuit)
{
if (ion.second && circuit) {
std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap>::const_iterator i = map_per_circuit.find (circuit);
if (i != map_per_circuit.end ()) {
std::map<unsigned int, Device *>::const_iterator j = i->second.id2device.find (ion.first);
if (j != i->second.id2device.end ()) {
return j->second;
}
}
throw tl::Exception (tl::to_string (tr ("Not a valid device ID: ")) + tl::to_string (ion.first));
}
return 0;
}
static const db::SubCircuit *subcircuit_by_numerical_id (const db::Circuit *circuit, const std::pair<unsigned int, bool> &ion, std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap> &map_per_circuit)
{
if (ion.second && circuit) {
std::map<const db::Circuit *, db::LayoutToNetlistStandardReader::ObjectMap>::const_iterator i = map_per_circuit.find (circuit);
if (i != map_per_circuit.end ()) {
std::map<unsigned int, SubCircuit *>::const_iterator j = i->second.id2subcircuit.find (ion.first);
if (j != i->second.id2subcircuit.end ()) {
return j->second;
}
}
throw tl::Exception (tl::to_string (tr ("Not a subcircuit device ID: ")) + tl::to_string (ion.first));
}
return 0;
}
static const db::Pin *pin_by_numerical_id (const db::Circuit *circuit, const std::pair<unsigned int, bool> &ion)
{
if (ion.second && circuit) {
const db::Pin *pin = circuit->pin_by_id (ion.first);
if (! pin) {
throw tl::Exception (tl::to_string (tr ("Not a valid pin ID: ")) + tl::to_string (ion.first));
}
return pin;
} else {
return 0;
}
}
void LayoutVsSchematicStandardReader::read_net_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b)
{
Brace br (this);
std::pair<unsigned int, bool> non_a, non_b;
non_a = read_non_numerical ();
non_b = read_non_numerical ();
std::pair<unsigned int, bool> ion_a, ion_b;
ion_a = read_ion ();
ion_b = read_ion ();
db::NetlistCrossReference::Status status = db::NetlistCrossReference::None;
read_status (status);
br.done ();
xref->gen_nets (net_by_numerical_id (circuit_a, non_a, m_id2net_per_circuit_a), net_by_numerical_id (circuit_b, non_b, m_id2net_per_circuit_b), status);
}
static const db::Pin *pin_by_name (const db::Circuit *circuit, const std::pair<std::string, bool> &non)
{
if (non.second && circuit) {
const db::Pin *pin = circuit->pin_by_name (non.first);
if (! pin) {
throw tl::Exception (tl::to_string (tr ("Not a valid pin name: ")) + non.first);
}
return pin;
} else {
return 0;
}
xref->gen_nets (net_by_numerical_id (circuit_a, ion_a, m_map_per_circuit_a), net_by_numerical_id (circuit_b, ion_b, m_map_per_circuit_b), status);
}
void LayoutVsSchematicStandardReader::read_pin_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b)
{
Brace br (this);
std::pair<std::string, bool> non_a, non_b;
non_a = read_non_string ();
non_b = read_non_string ();
std::pair<unsigned int, bool> ion_a, ion_b;
ion_a = read_ion ();
ion_b = read_ion ();
db::NetlistCrossReference::Status status = db::NetlistCrossReference::None;
read_status (status);
br.done ();
xref->gen_pins (pin_by_name (circuit_a, non_a), pin_by_name (circuit_b, non_b), status);
}
static const db::Device *device_by_name (const db::Circuit *circuit, const std::pair<std::string, bool> &non)
{
if (non.second && circuit) {
const db::Device *device = circuit->device_by_name (non.first);
if (! device) {
throw tl::Exception (tl::to_string (tr ("Not a valid device name: ")) + non.first);
}
return device;
} else {
return 0;
}
xref->gen_pins (pin_by_numerical_id (circuit_a, ion_a), pin_by_numerical_id (circuit_b, ion_b), status);
}
void LayoutVsSchematicStandardReader::read_device_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b)
{
Brace br (this);
std::pair<std::string, bool> non_a, non_b;
non_a = read_non_string ();
non_b = read_non_string ();
std::pair<unsigned int, bool> ion_a, ion_b;
ion_a = read_ion ();
ion_b = read_ion ();
db::NetlistCrossReference::Status status = db::NetlistCrossReference::None;
read_status (status);
br.done ();
xref->gen_devices (device_by_name (circuit_a, non_a), device_by_name (circuit_b, non_b), status);
}
static const db::SubCircuit *subcircuit_by_name (const db::Circuit *circuit, const std::pair<std::string, bool> &non)
{
if (non.second && circuit) {
const db::SubCircuit *subcircuit = circuit->subcircuit_by_name (non.first);
if (! subcircuit) {
throw tl::Exception (tl::to_string (tr ("Not a valid subcircuit name: ")) + non.first);
}
return subcircuit;
} else {
return 0;
}
xref->gen_devices (device_by_numerical_id (circuit_a, ion_a, m_map_per_circuit_a), device_by_numerical_id (circuit_b, ion_b, m_map_per_circuit_b), status);
}
void LayoutVsSchematicStandardReader::read_subcircuit_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b)
{
Brace br (this);
std::pair<std::string, bool> non_a, non_b;
non_a = read_non_string ();
non_b = read_non_string ();
std::pair<unsigned int, bool> ion_a, ion_b;
ion_a = read_ion ();
ion_b = read_ion ();
db::NetlistCrossReference::Status status = db::NetlistCrossReference::None;
read_status (status);
br.done ();
xref->gen_subcircuits (subcircuit_by_name (circuit_a, non_a), subcircuit_by_name (circuit_b, non_b), status);
xref->gen_subcircuits (subcircuit_by_numerical_id (circuit_a, ion_a, m_map_per_circuit_a), subcircuit_by_numerical_id (circuit_b, ion_b, m_map_per_circuit_b), status);
}
}

View File

@ -62,7 +62,7 @@ protected:
* @brief The standard writer
*/
class DB_PUBLIC LayoutVsSchematicStandardReader
: public LayoutVsSchematicReaderBase, private LayoutToNetlistStandardReader
: public LayoutVsSchematicReaderBase, protected LayoutToNetlistStandardReader
{
public:
LayoutVsSchematicStandardReader (tl::InputStream &stream);
@ -84,10 +84,10 @@ private:
void read_pin_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b);
void read_device_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b);
void read_subcircuit_pair (db::NetlistCrossReference *xref, const db::Circuit *circuit_a, const db::Circuit *circuit_b);
std::pair<std::string, bool> read_non_string ();
std::pair<unsigned int, bool> read_non_numerical ();
std::pair<std::string, bool> read_non ();
std::pair<unsigned int, bool> read_ion ();
std::map<const db::Circuit *, std::map<unsigned int, Net *> > m_id2net_per_circuit_a, m_id2net_per_circuit_b;
std::map<const db::Circuit *, LayoutToNetlistStandardReader::ObjectMap> m_map_per_circuit_a, m_map_per_circuit_b;
};
}

View File

@ -136,10 +136,10 @@ std::string name_to_s (const Obj *obj)
}
template <class Obj>
std::string expanded_name_to_s (const Obj *obj)
std::string ion_to_s (const Obj *obj)
{
if (obj) {
return tl::to_word_or_quoted_string (obj->expanded_name ());
return tl::to_string (obj->id ());
} else {
return "()";
}
@ -190,15 +190,15 @@ void std_writer_impl<Keys>::write (const db::NetlistCrossReference *xref)
}
for (db::NetlistCrossReference::PerCircuitData::pin_pairs_const_iterator n = pcd->pins.begin (); n != pcd->pins.end (); ++n) {
stream () << indent1 << indent2 << Keys::pin_key << "(" << expanded_name_to_s (n->pair.first) << " " << expanded_name_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
stream () << indent1 << indent2 << Keys::pin_key << "(" << ion_to_s (n->pair.first) << " " << ion_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
}
for (db::NetlistCrossReference::PerCircuitData::device_pairs_const_iterator n = pcd->devices.begin (); n != pcd->devices.end (); ++n) {
stream () << indent1 << indent2 << Keys::device_key << "(" << expanded_name_to_s (n->pair.first) << " " << expanded_name_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
stream () << indent1 << indent2 << Keys::device_key << "(" << ion_to_s (n->pair.first) << " " << ion_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
}
for (db::NetlistCrossReference::PerCircuitData::subcircuit_pairs_const_iterator n = pcd->subcircuits.begin (); n != pcd->subcircuits.end (); ++n) {
stream () << indent1 << indent2 << Keys::circuit_key << "(" << expanded_name_to_s (n->pair.first) << " " << expanded_name_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
stream () << indent1 << indent2 << Keys::circuit_key << "(" << ion_to_s (n->pair.first) << " " << ion_to_s (n->pair.second) << status_to_s (n->status) << ")" << endl;
}
stream () << indent2 << ")" << endl;

View File

@ -254,7 +254,9 @@ TEST(1_BasicFlow)
lvs2.load (path);
lvs2.save (path2, false);
compare_lvsdbs (_this, path2, au_path);
std::string au_path2 = tl::combine_path (tl::combine_path (tl::combine_path (tl::testsrc (), "testdata"), "algo"), "lvs_test1b_au.lvsdb");
compare_lvsdbs (_this, path2, au_path2);
}
@ -450,6 +452,8 @@ TEST(2_FlowWithErrors)
lvs2.load (path);
lvs2.save (path2, false);
compare_lvsdbs (_this, path2, au_path);
std::string au_path2 = tl::combine_path (tl::combine_path (tl::combine_path (tl::testsrc (), "testdata"), "algo"), "lvs_test2b_au.lvsdb");
compare_lvsdbs (_this, path2, au_path2);
}

View File

@ -1,7 +1,4 @@
#%l2n-klayout
# General section
top(RINGO)
unit(0.001)
@ -131,115 +128,110 @@ device(D$NMOS$3 NMOS
# Circuit section
# Circuits are the hierarchical building blocks of the netlist.
circuit(INV2ALT
circuit(INV2X
# Nets with their geometries
net(1
rect($3 (675 600) (250 2300))
rect($3 (-250 0) (1050 200))
rect($3 (-1725 -1900) (800 500))
rect($3 (700 1400) (225 1300))
rect($3 (-1850 -3700) (250 1500))
rect($3 (-250 -3000) (250 1600))
rect($3 (775 -225) (1600 250))
rect($3 (-2400 3350) (1600 250))
rect($3 (-1825 -2325) (250 1600))
rect($3 (-125 700) (250 1500))
rect($3 (-125 -1000) (800 500))
rect($3 (-125 -1000) (250 1500))
rect($3 (-250 -100) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (550 -4500) (250 1600))
rect($3 (-1050 -1600) (250 1600))
)
net(2
rect($4 (290 -310) (220 220))
rect($4 (1090 2590) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 2280) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (880 -2220) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-1020 2580) (220 220))
rect($4 (-620 -220) (220 220))
rect($6 (-590 -3710) (360 3800))
rect($6 (-180 -3200) (920 380))
rect($6 (-1100 -1660) (360 760))
rect($6 (-360 2140) (360 760))
rect($6 (740 -2360) (760 360))
rect($6 (-1560 2440) (760 360))
rect($1 (-855 -430) (950 525))
rect($1 (-1250 -1750) (525 950))
rect($2 (575 -2550) (950 525))
rect($2 (-2050 -1825) (525 950))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($1 (-975 -1075) (525 950))
rect($1 (-2100 -950) (525 950))
)
net(3
rect($4 (990 4590) (220 220))
rect($4 (-620 -220) (220 220))
rect($4 (-1320 -2220) (220 220))
rect($4 (1090 -310) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (810 1310) (760 360))
rect($6 (-1860 -2360) (360 760))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (880 1780) (220 220))
rect($7 (180 -220) (220 220))
polygon($8 (-5510 -2510) (0 1200) (3100 0) (0 1800) (3800 0) (0 -1800) (2100 0) (0 -1200) (-2900 0) (0 2200) (-2000 0) (0 -2200))
rect($1 (625 2125) (950 525))
rect($1 (-2025 -2525) (525 950))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($2 (-975 -1075) (525 950))
rect($2 (-2100 -950) (525 950))
)
net(4
rect($4 (1390 190) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-2520 -720) (220 220))
rect($4 (290 2590) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1610 -190) (760 360))
rect($6 (-2660 -860) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1680 280) (220 220))
rect($7 (180 -220) (220 220))
rect($8 (-6310 -1010) (9000 1200))
rect($2 (-3475 -550) (950 525))
rect($2 (-2825 -1050) (525 950))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -3520) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (-290 -10) (360 2300))
rect($6 (-360 -80) (360 760))
rect($6 (-360 -760) (360 760))
rect($6 (-360 -3660) (360 760))
rect($6 (-360 -760) (360 760))
rect($1 (-455 2045) (550 950))
rect($2 (-550 -3850) (550 950))
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Devices and their connections
device($1 D$PMOS$2
device(D$PMOS$3 -900 -1400)
device(1 D$PMOS
device(D$PMOS$1 800 0)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(900 4300)
location(0 2900)
param(L 0.25)
param(W 1.9)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 2)
terminal(G 1)
terminal(D 3)
terminal(D 4)
)
device($3 D$NMOS$2
device(D$NMOS$3 -1700 -700)
device(3 D$NMOS
device(D$NMOS$1 800 0)
connect(0 S S)
connect(1 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D D)
location(1700 700)
connect(1 D S)
location(0 0)
param(L 0.25)
param(W 1.9)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 4)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 3)
terminal(G 1)
terminal(D 2)
terminal(D 4)
)
)
@ -307,14 +299,14 @@ circuit(NAND1X
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
location(0 2900)
param(L 0.25)
param(W 0.95)
@ -326,7 +318,7 @@ circuit(NAND1X
terminal(G 4)
terminal(D 1)
)
device($2 D$PMOS$1
device(2 D$PMOS$1
location(800 2900)
param(L 0.25)
param(W 0.95)
@ -338,7 +330,7 @@ circuit(NAND1X
terminal(G 5)
terminal(D 2)
)
device($3 D$NMOS
device(3 D$NMOS
location(0 0)
param(L 0.25)
param(W 0.95)
@ -350,7 +342,7 @@ circuit(NAND1X
terminal(G 4)
terminal(D 6)
)
device($4 D$NMOS$1
device(4 D$NMOS$1
location(800 0)
param(L 0.25)
param(W 0.95)
@ -364,110 +356,115 @@ circuit(NAND1X
)
)
circuit(INV2X
circuit(INV2ALT
# Nets with their geometries
net(1
rect($3 (-125 700) (250 1500))
rect($3 (-125 -1000) (800 500))
rect($3 (-125 -1000) (250 1500))
rect($3 (-250 -100) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (550 -4500) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (675 600) (250 2300))
rect($3 (-250 0) (1050 200))
rect($3 (-1725 -1900) (800 500))
rect($3 (700 1400) (225 1300))
rect($3 (-1850 -3700) (250 1500))
rect($3 (-250 -3000) (250 1600))
rect($3 (775 -225) (1600 250))
rect($3 (-2400 3350) (1600 250))
rect($3 (-1825 -2325) (250 1600))
)
net(2
rect($4 (1090 2590) (220 220))
rect($4 (290 -310) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 2280) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($1 (-975 -1075) (525 950))
rect($1 (-2100 -950) (525 950))
rect($4 (880 -2220) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-1020 2580) (220 220))
rect($4 (-620 -220) (220 220))
rect($6 (-590 -3710) (360 3800))
rect($6 (-180 -3200) (920 380))
rect($6 (-1100 -1660) (360 760))
rect($6 (-360 2140) (360 760))
rect($6 (740 -2360) (760 360))
rect($6 (-1560 2440) (760 360))
rect($1 (-855 -430) (950 525))
rect($1 (-1250 -1750) (525 950))
rect($2 (575 -2550) (950 525))
rect($2 (-2050 -1825) (525 950))
)
net(3
rect($4 (1090 -310) (220 220))
rect($4 (990 4590) (220 220))
rect($4 (-620 -220) (220 220))
rect($4 (-1320 -2220) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($6 (810 1310) (760 360))
rect($6 (-1860 -2360) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($2 (-975 -1075) (525 950))
rect($2 (-2100 -950) (525 950))
rect($7 (880 1780) (220 220))
rect($7 (180 -220) (220 220))
polygon($8 (-5510 -2510) (0 1200) (3100 0) (0 1800) (3800 0) (0 -1800) (2100 0) (0 -1200) (-2900 0) (0 2200) (-2000 0) (0 -2200))
rect($1 (625 2125) (950 525))
rect($1 (-2025 -2525) (525 950))
)
net(4
rect($4 (290 2590) (220 220))
rect($4 (1390 190) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-2520 -720) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -3520) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (-290 -10) (360 2300))
rect($6 (-360 -80) (360 760))
rect($6 (-360 -760) (360 760))
rect($6 (-360 -3660) (360 760))
rect($6 (-360 -760) (360 760))
rect($1 (-455 2045) (550 950))
rect($2 (-550 -3850) (550 950))
rect($6 (1610 -190) (760 360))
rect($6 (-2660 -860) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1680 280) (220 220))
rect($7 (180 -220) (220 220))
rect($8 (-6310 -1010) (9000 1200))
rect($2 (-3475 -550) (950 525))
rect($2 (-2825 -1050) (525 950))
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Devices and their connections
device($1 D$PMOS
device(D$PMOS$1 800 0)
device(1 D$PMOS$2
device(D$PMOS$3 -900 -1400)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(0 2900)
location(900 4300)
param(L 0.25)
param(W 1.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 2)
terminal(G 1)
terminal(D 4)
terminal(D 3)
)
device($3 D$NMOS
device(D$NMOS$1 800 0)
device(3 D$NMOS$2
device(D$NMOS$3 -1700 -700)
connect(0 S S)
connect(1 S D)
connect(1 S S)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(0 0)
connect(1 D D)
location(1700 700)
param(L 0.25)
param(W 1.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 3)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 4)
terminal(G 1)
terminal(D 4)
terminal(D 2)
)
)
@ -762,79 +759,79 @@ circuit(RINGO
)
# Outgoing pins and their connections to nets
pin(FB 8)
pin(EN 10)
pin(OUT 12)
pin(VDD 13)
pin(VSS 14)
pin(8 name(FB))
pin(10 name(EN))
pin(12 name(OUT))
pin(13 name(VDD))
pin(14 name(VSS))
# Subcircuits and their connections
circuit($1 INV2X location(0 0)
pin($0 9)
pin($1 13)
pin($2 14)
pin($3 1)
circuit(1 INV2X location(0 0)
pin(0 9)
pin(1 13)
pin(2 14)
pin(3 1)
)
circuit($2 INV2X location(3000 0)
pin($0 1)
pin($1 13)
pin($2 14)
pin($3 2)
circuit(2 INV2X location(3000 0)
pin(0 1)
pin(1 13)
pin(2 14)
pin(3 2)
)
circuit($3 INV2X location(6000 0)
pin($0 2)
pin($1 13)
pin($2 14)
pin($3 11)
circuit(3 INV2X location(6000 0)
pin(0 2)
pin(1 13)
pin(2 14)
pin(3 11)
)
circuit($4 INV2ALT location(11100 0)
pin($0 11)
pin($1 3)
pin($2 13)
pin($3 14)
circuit(4 INV2ALT location(11100 0)
pin(0 11)
pin(1 3)
pin(2 13)
pin(3 14)
)
circuit($5 INV2X location(16300 0)
pin($0 3)
pin($1 13)
pin($2 14)
pin($3 4)
circuit(5 INV2X location(16300 0)
pin(0 3)
pin(1 13)
pin(2 14)
pin(3 4)
)
circuit($6 INV2X location(19300 0)
pin($0 4)
pin($1 13)
pin($2 14)
pin($3 5)
circuit(6 INV2X location(19300 0)
pin(0 4)
pin(1 13)
pin(2 14)
pin(3 5)
)
circuit($7 INV2X location(22300 0)
pin($0 5)
pin($1 13)
pin($2 14)
pin($3 6)
circuit(7 INV2X location(22300 0)
pin(0 5)
pin(1 13)
pin(2 14)
pin(3 6)
)
circuit($8 INV2X location(25300 0)
pin($0 6)
pin($1 13)
pin($2 14)
pin($3 7)
circuit(8 INV2X location(25300 0)
pin(0 6)
pin(1 13)
pin(2 14)
pin(3 7)
)
circuit($9 INV2X location(28300 0)
pin($0 7)
pin($1 13)
pin($2 14)
pin($3 8)
circuit(9 INV2X location(28300 0)
pin(0 7)
pin(1 13)
pin(2 14)
pin(3 8)
)
circuit($10 NAND1X location(-3000 0)
pin($0 9)
pin($1 13)
pin($2 14)
pin($3 10)
pin($4 8)
circuit(10 NAND1X location(-3000 0)
pin(0 9)
pin(1 13)
pin(2 14)
pin(3 10)
pin(4 8)
)
circuit($11 INV2X location(31300 0)
pin($0 8)
pin($1 13)
pin($2 14)
pin($3 12)
circuit(11 INV2X location(31300 0)
pin(0 8)
pin(1 13)
pin(2 14)
pin(3 12)
)
)

View File

@ -128,115 +128,110 @@ device(D$NMOS$3 NMOS
# Circuit section
# Circuits are the hierarchical building blocks of the netlist.
circuit(INV2ALT
circuit(INV2X
# Nets with their geometries
net(1
rect($3 (675 600) (250 2300))
rect($3 (-250 0) (1050 200))
rect($3 (-1725 -1900) (800 500))
rect($3 (700 1400) (225 1300))
rect($3 (-1850 -3700) (250 1500))
rect($3 (-250 -3000) (250 1600))
rect($3 (775 -225) (1600 250))
rect($3 (-2400 3350) (1600 250))
rect($3 (-1825 -2325) (250 1600))
rect($3 (-125 700) (250 1500))
rect($3 (-125 -1000) (800 500))
rect($3 (-125 -1000) (250 1500))
rect($3 (-250 -100) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (550 -4500) (250 1600))
rect($3 (-1050 -1600) (250 1600))
)
net(2
rect($4 (290 -310) (220 220))
rect($4 (1090 2590) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 2280) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (880 -2220) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-1020 2580) (220 220))
rect($4 (-620 -220) (220 220))
rect($6 (-590 -3710) (360 3800))
rect($6 (-180 -3200) (920 380))
rect($6 (-1100 -1660) (360 760))
rect($6 (-360 2140) (360 760))
rect($6 (740 -2360) (760 360))
rect($6 (-1560 2440) (760 360))
rect($1 (-855 -430) (950 525))
rect($1 (-1250 -1750) (525 950))
rect($2 (575 -2550) (950 525))
rect($2 (-2050 -1825) (525 950))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($1 (-975 -1075) (525 950))
rect($1 (-2100 -950) (525 950))
)
net(3
rect($4 (990 4590) (220 220))
rect($4 (-620 -220) (220 220))
rect($4 (-1320 -2220) (220 220))
rect($4 (1090 -310) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (810 1310) (760 360))
rect($6 (-1860 -2360) (360 760))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (880 1780) (220 220))
rect($7 (180 -220) (220 220))
polygon($8 (-5510 -2510) (0 1200) (3100 0) (0 1800) (3800 0) (0 -1800) (2100 0) (0 -1200) (-2900 0) (0 2200) (-2000 0) (0 -2200))
rect($1 (625 2125) (950 525))
rect($1 (-2025 -2525) (525 950))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($2 (-975 -1075) (525 950))
rect($2 (-2100 -950) (525 950))
)
net(4
rect($4 (1390 190) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-2520 -720) (220 220))
rect($4 (290 2590) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1610 -190) (760 360))
rect($6 (-2660 -860) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1680 280) (220 220))
rect($7 (180 -220) (220 220))
rect($8 (-6310 -1010) (9000 1200))
rect($2 (-3475 -550) (950 525))
rect($2 (-2825 -1050) (525 950))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -3520) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (-290 -10) (360 2300))
rect($6 (-360 -80) (360 760))
rect($6 (-360 -760) (360 760))
rect($6 (-360 -3660) (360 760))
rect($6 (-360 -760) (360 760))
rect($1 (-455 2045) (550 950))
rect($2 (-550 -3850) (550 950))
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Devices and their connections
device($1 D$PMOS$2
device(D$PMOS$3 -900 -1400)
device(1 D$PMOS
device(D$PMOS$1 800 0)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(900 4300)
location(0 2900)
param(L 0.25)
param(W 1.9)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 2)
terminal(G 1)
terminal(D 3)
terminal(D 4)
)
device($3 D$NMOS$2
device(D$NMOS$3 -1700 -700)
device(2 D$NMOS
device(D$NMOS$1 800 0)
connect(0 S S)
connect(1 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D D)
location(1700 700)
connect(1 D S)
location(0 0)
param(L 0.25)
param(W 1.9)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 4)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 3)
terminal(G 1)
terminal(D 2)
terminal(D 4)
)
)
@ -304,14 +299,14 @@ circuit(NAND1X
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
location(0 2900)
param(L 0.25)
param(W 0.95)
@ -323,7 +318,7 @@ circuit(NAND1X
terminal(G 4)
terminal(D 1)
)
device($2 D$PMOS$1
device(2 D$PMOS$1
location(800 2900)
param(L 0.25)
param(W 0.95)
@ -335,7 +330,7 @@ circuit(NAND1X
terminal(G 5)
terminal(D 2)
)
device($3 D$NMOS
device(3 D$NMOS
location(0 0)
param(L 0.25)
param(W 0.95)
@ -347,7 +342,7 @@ circuit(NAND1X
terminal(G 4)
terminal(D 6)
)
device($4 D$NMOS$1
device(4 D$NMOS$1
location(800 0)
param(L 0.25)
param(W 0.95)
@ -361,110 +356,115 @@ circuit(NAND1X
)
)
circuit(INV2X
circuit(INV2ALT
# Nets with their geometries
net(1
rect($3 (-125 700) (250 1500))
rect($3 (-125 -1000) (800 500))
rect($3 (-125 -1000) (250 1500))
rect($3 (-250 -100) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (550 -4500) (250 1600))
rect($3 (-1050 -1600) (250 1600))
rect($3 (675 600) (250 2300))
rect($3 (-250 0) (1050 200))
rect($3 (-1725 -1900) (800 500))
rect($3 (700 1400) (225 1300))
rect($3 (-1850 -3700) (250 1500))
rect($3 (-250 -3000) (250 1600))
rect($3 (775 -225) (1600 250))
rect($3 (-2400 3350) (1600 250))
rect($3 (-1825 -2325) (250 1600))
)
net(2
rect($4 (1090 2590) (220 220))
rect($4 (290 -310) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 2280) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($1 (-975 -1075) (525 950))
rect($1 (-2100 -950) (525 950))
rect($4 (880 -2220) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-1020 2580) (220 220))
rect($4 (-620 -220) (220 220))
rect($6 (-590 -3710) (360 3800))
rect($6 (-180 -3200) (920 380))
rect($6 (-1100 -1660) (360 760))
rect($6 (-360 2140) (360 760))
rect($6 (740 -2360) (760 360))
rect($6 (-1560 2440) (760 360))
rect($1 (-855 -430) (950 525))
rect($1 (-1250 -1750) (525 950))
rect($2 (575 -2550) (950 525))
rect($2 (-2050 -1825) (525 950))
)
net(3
rect($4 (1090 -310) (220 220))
rect($4 (990 4590) (220 220))
rect($4 (-620 -220) (220 220))
rect($4 (-1320 -2220) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-1820 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (1310 -690) (360 760))
rect($6 (-1960 -760) (360 760))
rect($6 (810 1310) (760 360))
rect($6 (-1860 -2360) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1380 180) (220 220))
rect($7 (-220 -620) (220 220))
rect($8 (-2410 -510) (3000 1200))
rect($2 (-975 -1075) (525 950))
rect($2 (-2100 -950) (525 950))
rect($7 (880 1780) (220 220))
rect($7 (180 -220) (220 220))
polygon($8 (-5510 -2510) (0 1200) (3100 0) (0 1800) (3800 0) (0 -1800) (2100 0) (0 -1200) (-2900 0) (0 2200) (-2000 0) (0 -2200))
rect($1 (625 2125) (950 525))
rect($1 (-2025 -2525) (525 950))
)
net(4
rect($4 (290 2590) (220 220))
rect($4 (1390 190) (220 220))
rect($4 (180 -220) (220 220))
rect($4 (-2520 -720) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -3520) (220 220))
rect($4 (-220 180) (220 220))
rect($4 (-220 -620) (220 220))
rect($4 (-220 180) (220 220))
rect($6 (-290 -10) (360 2300))
rect($6 (-360 -80) (360 760))
rect($6 (-360 -760) (360 760))
rect($6 (-360 -3660) (360 760))
rect($6 (-360 -760) (360 760))
rect($1 (-455 2045) (550 950))
rect($2 (-550 -3850) (550 950))
rect($6 (1610 -190) (760 360))
rect($6 (-2660 -860) (360 760))
rect($7 (-290 -290) (220 220))
rect($7 (-220 -620) (220 220))
rect($7 (1680 280) (220 220))
rect($7 (180 -220) (220 220))
rect($8 (-6310 -1010) (9000 1200))
rect($2 (-3475 -550) (950 525))
rect($2 (-2825 -1050) (525 950))
)
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Devices and their connections
device($1 D$PMOS
device(D$PMOS$1 800 0)
device(1 D$PMOS$2
device(D$PMOS$3 -900 -1400)
connect(0 S S)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(0 2900)
location(900 4300)
param(L 0.25)
param(W 1.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 2)
terminal(G 1)
terminal(D 4)
terminal(D 3)
)
device($3 D$NMOS
device(D$NMOS$1 800 0)
device(2 D$NMOS$2
device(D$NMOS$3 -1700 -700)
connect(0 S S)
connect(1 S D)
connect(1 S S)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(1 D S)
location(0 0)
connect(1 D D)
location(1700 700)
param(L 0.25)
param(W 1.9)
param(AS 0.76)
param(AD 0.76)
param(PS 4.45)
param(PD 4.45)
terminal(S 3)
param(AS 0.9975)
param(AD 0.9975)
param(PS 5.9)
param(PD 5.9)
terminal(S 4)
terminal(G 1)
terminal(D 4)
terminal(D 2)
)
)
@ -759,79 +759,79 @@ circuit(RINGO
)
# Outgoing pins and their connections to nets
pin(FB 8)
pin(EN 10)
pin(OUT 12)
pin(VDD 13)
pin(VSS 14)
pin(8 name(FB))
pin(10 name(EN))
pin(12 name(OUT))
pin(13 name(VDD))
pin(14 name(VSS))
# Subcircuits and their connections
circuit($1 INV2X location(0 0)
pin($0 9)
pin($1 13)
pin($2 14)
pin($3 1)
circuit(1 INV2X location(0 0)
pin(0 9)
pin(1 13)
pin(2 14)
pin(3 1)
)
circuit($2 INV2X location(3000 0)
pin($0 1)
pin($1 13)
pin($2 14)
pin($3 2)
circuit(2 INV2X location(3000 0)
pin(0 1)
pin(1 13)
pin(2 14)
pin(3 2)
)
circuit($3 INV2X location(6000 0)
pin($0 2)
pin($1 13)
pin($2 14)
pin($3 11)
circuit(3 INV2X location(6000 0)
pin(0 2)
pin(1 13)
pin(2 14)
pin(3 11)
)
circuit($4 INV2ALT location(11100 0)
pin($0 11)
pin($1 3)
pin($2 13)
pin($3 14)
circuit(4 INV2ALT location(11100 0)
pin(0 11)
pin(1 3)
pin(2 13)
pin(3 14)
)
circuit($5 INV2X location(16300 0)
pin($0 3)
pin($1 13)
pin($2 14)
pin($3 4)
circuit(5 INV2X location(16300 0)
pin(0 3)
pin(1 13)
pin(2 14)
pin(3 4)
)
circuit($6 INV2X location(19300 0)
pin($0 4)
pin($1 13)
pin($2 14)
pin($3 5)
circuit(6 INV2X location(19300 0)
pin(0 4)
pin(1 13)
pin(2 14)
pin(3 5)
)
circuit($7 INV2X location(22300 0)
pin($0 5)
pin($1 13)
pin($2 14)
pin($3 6)
circuit(7 INV2X location(22300 0)
pin(0 5)
pin(1 13)
pin(2 14)
pin(3 6)
)
circuit($8 INV2X location(25300 0)
pin($0 6)
pin($1 13)
pin($2 14)
pin($3 7)
circuit(8 INV2X location(25300 0)
pin(0 6)
pin(1 13)
pin(2 14)
pin(3 7)
)
circuit($9 INV2X location(28300 0)
pin($0 7)
pin($1 13)
pin($2 14)
pin($3 8)
circuit(9 INV2X location(28300 0)
pin(0 7)
pin(1 13)
pin(2 14)
pin(3 8)
)
circuit($10 NAND1X location(-3000 0)
pin($0 9)
pin($1 13)
pin($2 14)
pin($3 10)
pin($4 8)
circuit(10 NAND1X location(-3000 0)
pin(0 9)
pin(1 13)
pin(2 14)
pin(3 10)
pin(4 8)
)
circuit($11 INV2X location(31300 0)
pin($0 8)
pin($1 13)
pin($2 14)
pin($3 12)
circuit(11 INV2X location(31300 0)
pin(0 8)
pin(1 13)
pin(2 14)
pin(3 12)
)
)

View File

@ -150,14 +150,14 @@ circuit(INV2
)
# Outgoing pins and their connections to nets
pin(IN 1)
pin($1 2)
pin(OUT 3)
pin($3 4)
pin($4 5)
pin(1 name(IN))
pin(2)
pin(3 name(OUT))
pin(4)
pin(5)
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
location(-400 2800)
param(L 0.25)
param(W 0.95)
@ -169,7 +169,7 @@ circuit(INV2
terminal(G 1)
terminal(D 5)
)
device($2 D$PMOS$1
device(2 D$PMOS$1
location(400 2800)
param(L 0.25)
param(W 0.95)
@ -181,7 +181,7 @@ circuit(INV2
terminal(G 2)
terminal(D 3)
)
device($3 D$NMOS
device(3 D$NMOS
location(-400 0)
param(L 0.25)
param(W 0.95)
@ -193,7 +193,7 @@ circuit(INV2
terminal(G 1)
terminal(D 4)
)
device($4 D$NMOS$1
device(4 D$NMOS$1
location(400 0)
param(L 0.25)
param(W 0.95)
@ -412,72 +412,72 @@ circuit(RINGO
)
# Outgoing pins and their connections to nets
pin(FB 1)
pin(OSC 2)
pin(VSS 3)
pin(VDD 4)
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VSS))
pin(4 name(VDD))
# Subcircuits and their connections
circuit($1 INV2 location(23760 0)
pin(IN 6)
pin($1 1)
pin(OUT 2)
pin($3 3)
pin($4 4)
circuit(1 INV2 location(23760 0)
pin(0 6)
pin(1 1)
pin(2 2)
pin(3 3)
pin(4 4)
)
circuit($2 INV2 location(0 0)
pin(IN 1)
pin(OUT 5)
pin($3 3)
pin($4 4)
circuit(2 INV2 location(0 0)
pin(0 1)
pin(2 5)
pin(3 3)
pin(4 4)
)
circuit($3 INV2 location(2640 0)
pin(IN 5)
pin(OUT 13)
pin($3 3)
pin($4 4)
circuit(3 INV2 location(2640 0)
pin(0 5)
pin(2 13)
pin(3 3)
pin(4 4)
)
circuit($4 INV2 location(5280 0)
pin(IN 13)
pin(OUT 12)
pin($3 3)
pin($4 4)
circuit(4 INV2 location(5280 0)
pin(0 13)
pin(2 12)
pin(3 3)
pin(4 4)
)
circuit($5 INV2 location(7920 0)
pin(IN 12)
pin(OUT 11)
pin($3 3)
pin($4 4)
circuit(5 INV2 location(7920 0)
pin(0 12)
pin(2 11)
pin(3 3)
pin(4 4)
)
circuit($6 INV2 location(10560 0)
pin(IN 11)
pin(OUT 10)
pin($3 3)
pin($4 4)
circuit(6 INV2 location(10560 0)
pin(0 11)
pin(2 10)
pin(3 3)
pin(4 4)
)
circuit($7 INV2 location(13200 0)
pin(IN 10)
pin(OUT 9)
pin($3 3)
pin($4 4)
circuit(7 INV2 location(13200 0)
pin(0 10)
pin(2 9)
pin(3 3)
pin(4 4)
)
circuit($8 INV2 location(15840 0)
pin(IN 9)
pin(OUT 8)
pin($3 3)
pin($4 4)
circuit(8 INV2 location(15840 0)
pin(0 9)
pin(2 8)
pin(3 3)
pin(4 4)
)
circuit($9 INV2 location(18480 0)
pin(IN 8)
pin(OUT 7)
pin($3 3)
pin($4 4)
circuit(9 INV2 location(18480 0)
pin(0 8)
pin(2 7)
pin(3 3)
pin(4 4)
)
circuit($10 INV2 location(21120 0)
pin(IN 7)
pin(OUT 6)
pin($3 3)
pin($4 4)
circuit(10 INV2 location(21120 0)
pin(0 7)
pin(2 6)
pin(3 3)
pin(4 4)
)
)

View File

@ -184,16 +184,16 @@ circuit(INV2
)
# Outgoing pins and their connections to nets
pin($0 1)
pin(IN 2)
pin($2 3)
pin(OUT 4)
pin(VSS 5)
pin(VDD 6)
pin(BULK 7)
pin(1)
pin(2 name(IN))
pin(3)
pin(4 name(OUT))
pin(5 name(VSS))
pin(6 name(VDD))
pin(7 name(BULK))
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
location(-400 2800)
param(L 0.25)
param(W 0.95)
@ -206,7 +206,7 @@ circuit(INV2
terminal(D 6)
terminal(B 1)
)
device($2 D$PMOS$1
device(2 D$PMOS$1
location(400 2800)
param(L 0.25)
param(W 0.95)
@ -219,7 +219,7 @@ circuit(INV2
terminal(D 4)
terminal(B 1)
)
device($3 D$NMOS
device(3 D$NMOS
location(-400 0)
param(L 0.25)
param(W 0.95)
@ -232,7 +232,7 @@ circuit(INV2
terminal(D 5)
terminal(B 7)
)
device($4 D$NMOS$1
device(4 D$NMOS$1
location(400 0)
param(L 0.25)
param(W 0.95)
@ -301,31 +301,31 @@ circuit(INV2PAIR
net(8)
# Outgoing pins and their connections to nets
pin(BULK 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 6)
pin($5 7)
pin($6 8)
pin(1 name(BULK))
pin(2)
pin(3)
pin(4)
pin(6)
pin(7)
pin(8)
# Subcircuits and their connections
circuit($1 INV2 location(1700 800)
pin($0 8)
pin(IN 6)
pin(OUT 5)
pin(VSS 4)
pin(VDD 3)
pin(BULK 1)
circuit(1 INV2 location(1700 800)
pin(0 8)
pin(1 6)
pin(3 5)
pin(4 4)
pin(5 3)
pin(6 1)
)
circuit($2 INV2 location(4340 800)
pin($0 8)
pin(IN 5)
pin($2 2)
pin(OUT 7)
pin(VSS 4)
pin(VDD 3)
pin(BULK 1)
circuit(2 INV2 location(4340 800)
pin(0 8)
pin(1 5)
pin(2 2)
pin(3 7)
pin(4 4)
pin(5 3)
pin(6 1)
)
)
@ -524,52 +524,52 @@ circuit(RINGO
)
# Outgoing pins and their connections to nets
pin(FB 1)
pin(OSC 2)
pin(VDD 3)
pin('BULK,VSS' 4)
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VDD))
pin(4 name('BULK,VSS'))
# Subcircuits and their connections
circuit($1 INV2PAIR location(19420 -800)
pin(BULK 4)
pin($1 1)
pin($2 3)
pin($3 4)
pin($4 6)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR location(19420 -800)
pin(0 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 4)
pin($2 3)
pin($3 4)
pin($4 1)
pin($5 5)
pin($6 3)
circuit(2 INV2PAIR location(-1700 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 1)
pin(5 5)
pin(6 3)
)
circuit($3 INV2PAIR location(3580 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 8)
pin($6 3)
circuit(3 INV2PAIR location(3580 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 5)
pin(5 8)
pin(6 3)
)
circuit($4 INV2PAIR location(8860 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 8)
pin($5 7)
pin($6 3)
circuit(4 INV2PAIR location(8860 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 8)
pin(5 7)
pin(6 3)
)
circuit($5 INV2PAIR location(14140 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 7)
pin($5 6)
pin($6 3)
circuit(5 INV2PAIR location(14140 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 7)
pin(5 6)
pin(6 3)
)
)

View File

@ -187,16 +187,16 @@ circuit(INV2
)
# Outgoing pins and their connections to nets
pin($0 1)
pin(IN 2)
pin($2 3)
pin(OUT 4)
pin(VSS 5)
pin(VDD 6)
pin(BULK 7)
pin(1)
pin(2 name(IN))
pin(3)
pin(4 name(OUT))
pin(5 name(VSS))
pin(6 name(VDD))
pin(7 name(BULK))
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
location(-400 2800)
param(L 0.25)
param(W 0.95)
@ -209,7 +209,7 @@ circuit(INV2
terminal(D 6)
terminal(B 1)
)
device($2 D$PMOS$1
device(2 D$PMOS$1
location(400 2800)
param(L 0.25)
param(W 0.95)
@ -222,7 +222,7 @@ circuit(INV2
terminal(D 4)
terminal(B 1)
)
device($3 D$NMOS
device(3 D$NMOS
location(-400 0)
param(L 0.25)
param(W 0.95)
@ -235,7 +235,7 @@ circuit(INV2
terminal(D 5)
terminal(B 7)
)
device($4 D$NMOS$1
device(4 D$NMOS$1
location(400 0)
param(L 0.25)
param(W 0.95)
@ -304,31 +304,31 @@ circuit(INV2PAIR
net(8)
# Outgoing pins and their connections to nets
pin(BULK 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 6)
pin($5 7)
pin($6 8)
pin(1 name(BULK))
pin(2)
pin(3)
pin(4)
pin(6)
pin(7)
pin(8)
# Subcircuits and their connections
circuit($1 INV2 location(1700 800)
pin($0 8)
pin(IN 6)
pin(OUT 5)
pin(VSS 4)
pin(VDD 3)
pin(BULK 1)
circuit(1 INV2 location(1700 800)
pin(0 8)
pin(1 6)
pin(3 5)
pin(4 4)
pin(5 3)
pin(6 1)
)
circuit($2 INV2 location(4340 800)
pin($0 8)
pin(IN 5)
pin($2 2)
pin(OUT 7)
pin(VSS 4)
pin(VDD 3)
pin(BULK 1)
circuit(2 INV2 location(4340 800)
pin(0 8)
pin(1 5)
pin(2 2)
pin(3 7)
pin(4 4)
pin(5 3)
pin(6 1)
)
)
@ -527,52 +527,52 @@ circuit(RINGO
)
# Outgoing pins and their connections to nets
pin(FB 1)
pin(OSC 2)
pin(VDD 3)
pin('BULK,VSS' 4)
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VDD))
pin(4 name('BULK,VSS'))
# Subcircuits and their connections
circuit($1 INV2PAIR location(19420 -800)
pin(BULK 4)
pin($1 1)
pin($2 3)
pin($3 4)
pin($4 6)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR location(19420 -800)
pin(0 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 4)
pin($2 3)
pin($3 4)
pin($4 1)
pin($5 5)
pin($6 3)
circuit(2 INV2PAIR location(-1700 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 1)
pin(5 5)
pin(6 3)
)
circuit($3 INV2PAIR location(3580 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 8)
pin($6 3)
circuit(3 INV2PAIR location(3580 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 5)
pin(5 8)
pin(6 3)
)
circuit($4 INV2PAIR location(8860 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 8)
pin($5 7)
pin($6 3)
circuit(4 INV2PAIR location(8860 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 8)
pin(5 7)
pin(6 3)
)
circuit($5 INV2PAIR location(14140 -800)
pin(BULK 4)
pin($2 3)
pin($3 4)
pin($4 7)
pin($5 6)
pin($6 3)
circuit(5 INV2PAIR location(14140 -800)
pin(0 4)
pin(2 3)
pin(3 4)
pin(4 7)
pin(5 6)
pin(6 3)
)
)

View File

@ -161,14 +161,14 @@ X(INV2
R(diff_cont (-110 -1360) (220 220))
R(ptie (-510 -450) (800 680))
)
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
P(1)
P(2 I(IN))
P(3)
P(4 I(OUT))
P(5 I(VSS))
P(6 I(VDD))
P(7 I(BULK))
D(1 D$PMOS
Y(-400 2800)
E(L 0.25)
E(W 0.95)
@ -181,7 +181,7 @@ X(INV2
T(D 6)
T(B 1)
)
D($2 D$PMOS$1
D(2 D$PMOS$1
Y(400 2800)
E(L 0.25)
E(W 0.95)
@ -194,7 +194,7 @@ X(INV2
T(D 4)
T(B 1)
)
D($3 D$NMOS
D(3 D$NMOS
Y(-400 0)
E(L 0.25)
E(W 0.95)
@ -207,7 +207,7 @@ X(INV2
T(D 5)
T(B 7)
)
D($4 D$NMOS$1
D(4 D$NMOS$1
Y(400 0)
E(L 0.25)
E(W 0.95)
@ -271,29 +271,29 @@ X(INV2PAIR
R(diff_cont (-220 -620) (220 220))
)
N(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 8)
P(IN 6)
P(OUT 5)
P(VSS 4)
P(VDD 3)
P(BULK 1)
P(1 I(BULK))
P(2)
P(3)
P(4)
P(6)
P(7)
P(8)
X(1 INV2 Y(1700 800)
P(0 8)
P(1 6)
P(3 5)
P(4 4)
P(5 3)
P(6 1)
)
X($2 INV2 Y(4340 800)
P($0 8)
P(IN 5)
P($2 2)
P(OUT 7)
P(VSS 4)
P(VDD 3)
P(BULK 1)
X(2 INV2 Y(4340 800)
P(0 8)
P(1 5)
P(2 2)
P(3 7)
P(4 4)
P(5 3)
P(6 1)
)
)
X(RINGO
@ -487,49 +487,49 @@ X(RINGO
R(diff_cont (-220 -2620) (220 220))
R(diff_cont (-220 -620) (220 220))
)
P(FB 1)
P(OSC 2)
P(VDD 3)
P('BULK,VSS' 4)
X($1 INV2PAIR Y(19420 -800)
P(BULK 4)
P($1 1)
P($2 3)
P($3 4)
P($4 6)
P($5 2)
P($6 3)
P(1 I(FB))
P(2 I(OSC))
P(3 I(VDD))
P(4 I('BULK,VSS'))
X(1 INV2PAIR Y(19420 -800)
P(0 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 4)
P($2 3)
P($3 4)
P($4 1)
P($5 5)
P($6 3)
X(2 INV2PAIR Y(-1700 -800)
P(0 4)
P(2 3)
P(3 4)
P(4 1)
P(5 5)
P(6 3)
)
X($3 INV2PAIR Y(3580 -800)
P(BULK 4)
P($2 3)
P($3 4)
P($4 5)
P($5 8)
P($6 3)
X(3 INV2PAIR Y(3580 -800)
P(0 4)
P(2 3)
P(3 4)
P(4 5)
P(5 8)
P(6 3)
)
X($4 INV2PAIR Y(8860 -800)
P(BULK 4)
P($2 3)
P($3 4)
P($4 8)
P($5 7)
P($6 3)
X(4 INV2PAIR Y(8860 -800)
P(0 4)
P(2 3)
P(3 4)
P(4 8)
P(5 7)
P(6 3)
)
X($5 INV2PAIR Y(14140 -800)
P(BULK 4)
P($2 3)
P($3 4)
P($4 7)
P($5 6)
P($6 3)
X(5 INV2PAIR Y(14140 -800)
P(0 4)
P(2 3)
P(3 4)
P(4 7)
P(5 6)
P(6 3)
)
)

View File

@ -129,12 +129,12 @@ X(INV2
R(metal2 (-1525 -775) (2800 900))
R(psd (-1675 -925) (550 950))
)
P(IN 1)
P($1 2)
P(OUT 3)
P($3 4)
P($4 5)
D($1 D$PMOS
P(1 I(IN))
P(2)
P(3 I(OUT))
P(4)
P(5)
D(1 D$PMOS
Y(-400 2800)
E(L 0.25)
E(W 0.95)
@ -146,7 +146,7 @@ X(INV2
T(G 1)
T(D 5)
)
D($2 D$PMOS$1
D(2 D$PMOS$1
Y(400 2800)
E(L 0.25)
E(W 0.95)
@ -158,7 +158,7 @@ X(INV2
T(G 2)
T(D 3)
)
D($3 D$NMOS
D(3 D$NMOS
Y(-400 0)
E(L 0.25)
E(W 0.95)
@ -170,7 +170,7 @@ X(INV2
T(G 1)
T(D 4)
)
D($4 D$NMOS$1
D(4 D$NMOS$1
Y(400 0)
E(L 0.25)
E(W 0.95)
@ -384,69 +384,69 @@ X(RINGO
R(diff_cont (-220 -2620) (220 220))
R(diff_cont (-220 -620) (220 220))
)
P(FB 1)
P(OSC 2)
P(VSS 3)
P(VDD 4)
X($1 INV2 Y(23760 0)
P(IN 6)
P($1 1)
P(OUT 2)
P($3 3)
P($4 4)
P(1 I(FB))
P(2 I(OSC))
P(3 I(VSS))
P(4 I(VDD))
X(1 INV2 Y(23760 0)
P(0 6)
P(1 1)
P(2 2)
P(3 3)
P(4 4)
)
X($2 INV2 Y(0 0)
P(IN 1)
P(OUT 5)
P($3 3)
P($4 4)
X(2 INV2 Y(0 0)
P(0 1)
P(2 5)
P(3 3)
P(4 4)
)
X($3 INV2 Y(2640 0)
P(IN 5)
P(OUT 13)
P($3 3)
P($4 4)
X(3 INV2 Y(2640 0)
P(0 5)
P(2 13)
P(3 3)
P(4 4)
)
X($4 INV2 Y(5280 0)
P(IN 13)
P(OUT 12)
P($3 3)
P($4 4)
X(4 INV2 Y(5280 0)
P(0 13)
P(2 12)
P(3 3)
P(4 4)
)
X($5 INV2 Y(7920 0)
P(IN 12)
P(OUT 11)
P($3 3)
P($4 4)
X(5 INV2 Y(7920 0)
P(0 12)
P(2 11)
P(3 3)
P(4 4)
)
X($6 INV2 Y(10560 0)
P(IN 11)
P(OUT 10)
P($3 3)
P($4 4)
X(6 INV2 Y(10560 0)
P(0 11)
P(2 10)
P(3 3)
P(4 4)
)
X($7 INV2 Y(13200 0)
P(IN 10)
P(OUT 9)
P($3 3)
P($4 4)
X(7 INV2 Y(13200 0)
P(0 10)
P(2 9)
P(3 3)
P(4 4)
)
X($8 INV2 Y(15840 0)
P(IN 9)
P(OUT 8)
P($3 3)
P($4 4)
X(8 INV2 Y(15840 0)
P(0 9)
P(2 8)
P(3 3)
P(4 4)
)
X($9 INV2 Y(18480 0)
P(IN 8)
P(OUT 7)
P($3 3)
P($4 4)
X(9 INV2 Y(18480 0)
P(0 8)
P(2 7)
P(3 3)
P(4 4)
)
X($10 INV2 Y(21120 0)
P(IN 7)
P(OUT 6)
P($3 3)
P($4 4)
X(10 INV2 Y(21120 0)
P(0 7)
P(2 6)
P(3 3)
P(4 4)
)
)

View File

@ -203,24 +203,24 @@ layout(
)
# Outgoing pins and their connections to nets
pin($0 1)
pin(IN 2)
pin(OUT 3)
pin(VSS 4)
pin(VDD 5)
pin(BULK 6)
pin(1)
pin(2 name(IN))
pin(3 name(OUT))
pin(4 name(VSS))
pin(5 name(VDD))
pin(6 name(BULK))
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
device(D$PMOS$1 800 0)
connect(0 S S)
connect(0 S D)
connect(0 G G)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(0 D S)
connect(0 B B)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 3200)
param(L 0.25)
param(W 3.5)
@ -233,16 +233,16 @@ layout(
terminal(D 5)
terminal(B 1)
)
device($3 D$NMOS
device(3 D$NMOS
device(D$NMOS$1 800 0)
connect(0 S S)
connect(0 S D)
connect(0 G G)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(0 D S)
connect(0 B B)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 -400)
param(L 0.25)
param(W 3.5)
@ -345,30 +345,30 @@ layout(
net(7)
# Outgoing pins and their connections to nets
pin(BULK 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 6)
pin($6 7)
pin(1 name(BULK))
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
pin(7)
# Subcircuits and their connections
circuit($1 INV2 location(1700 800)
pin($0 7)
pin(IN 5)
pin(OUT 4)
pin(VSS 3)
pin(VDD 2)
pin(BULK 1)
circuit(1 INV2 location(1700 800)
pin(0 7)
pin(1 5)
pin(2 4)
pin(3 3)
pin(4 2)
pin(5 1)
)
circuit($2 INV2 location(4340 800)
pin($0 7)
pin(IN 4)
pin(OUT 6)
pin(VSS 3)
pin(VDD 2)
pin(BULK 1)
circuit(2 INV2 location(4340 800)
pin(0 7)
pin(1 4)
pin(2 6)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
@ -719,52 +719,52 @@ layout(
)
# Outgoing pins and their connections to nets
pin(FB 1)
pin(OSC 2)
pin(VDD 3)
pin('BULK,VSS' 4)
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VDD))
pin(4 name('BULK,VSS'))
# Subcircuits and their connections
circuit($1 INV2PAIR location(19420 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($3 1)
pin($4 6)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR location(19420 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 6)
pin(5 2)
pin(6 3)
)
circuit($2 INV2PAIR location(-1700 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 1)
pin($5 5)
pin($6 3)
circuit(2 INV2PAIR location(-1700 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 1)
pin(5 5)
pin(6 3)
)
circuit($3 INV2PAIR location(3580 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 5)
pin($5 8)
pin($6 3)
circuit(3 INV2PAIR location(3580 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 5)
pin(5 8)
pin(6 3)
)
circuit($4 INV2PAIR location(8860 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 8)
pin($5 7)
pin($6 3)
circuit(4 INV2PAIR location(8860 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 7)
pin(6 3)
)
circuit($5 INV2PAIR location(14140 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 7)
pin($5 6)
pin($6 3)
circuit(5 INV2PAIR location(14140 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 6)
pin(6 3)
)
)
@ -790,16 +790,16 @@ reference(
net(6 name('6'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 6)
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
# Devices and their connections
device($1 PMOS
param(L 0.25)
device(1 PMOS
name($1) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
@ -810,8 +810,8 @@ reference(
terminal(D 5)
terminal(B 1)
)
device($3 NMOS
param(L 0.25)
device(2 NMOS
name($3) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
@ -836,30 +836,30 @@ reference(
net(7 name('7'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 6)
pin($6 7)
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
pin(7)
# Subcircuits and their connections
circuit($1 INV2
pin($0 7)
pin($1 5)
pin($2 4)
pin($3 3)
pin($4 2)
pin($5 1)
circuit(1 INV2 name($1)
pin(0 7)
pin(1 5)
pin(2 4)
pin(3 3)
pin(4 2)
pin(5 1)
)
circuit($2 INV2
pin($0 7)
pin($1 4)
pin($2 6)
pin($3 3)
pin($4 2)
pin($5 1)
circuit(2 INV2 name($2)
pin(0 7)
pin(1 4)
pin(2 6)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
@ -876,52 +876,52 @@ reference(
net(8 name('7'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Subcircuits and their connections
circuit($1 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($3 1)
pin($4 5)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR name($1)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 5)
pin(5 2)
pin(6 3)
)
circuit($2 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 1)
pin($5 6)
pin($6 3)
circuit(2 INV2PAIR name($2)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 1)
pin(5 6)
pin(6 3)
)
circuit($3 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 6)
pin($5 7)
pin($6 3)
circuit(3 INV2PAIR name($3)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 6)
pin(5 7)
pin(6 3)
)
circuit($4 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 7)
pin($5 8)
pin($6 3)
circuit(4 INV2PAIR name($4)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 8)
pin(6 3)
)
circuit($5 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 8)
pin($5 5)
pin($6 3)
circuit(5 INV2PAIR name($5)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 5)
pin(6 3)
)
)
@ -937,14 +937,14 @@ xref(
net(3 3 match)
net(5 5 match)
net(4 4 match)
pin($0 $0 match)
pin(BULK $5 match)
pin(IN $1 match)
pin(OUT $2 match)
pin(VDD $4 match)
pin(VSS $3 match)
device($1 $1 match)
device($3 $3 match)
pin(0 0 match)
pin(5 5 match)
pin(1 1 match)
pin(2 2 match)
pin(4 4 match)
pin(3 3 match)
device(1 1 match)
device(3 2 match)
)
)
circuit(INV2PAIR INV2PAIR match
@ -956,15 +956,15 @@ xref(
net(6 6 match)
net(7 7 match)
net(1 1 match)
pin($1 $1 match)
pin($2 $2 match)
pin($3 $3 match)
pin($4 $4 match)
pin($5 $5 match)
pin($6 $6 match)
pin(BULK $0 match)
circuit($1 $1 match)
circuit($2 $2 match)
pin(1 1 match)
pin(2 2 match)
pin(3 3 match)
pin(4 4 match)
pin(5 5 match)
pin(6 6 match)
pin(0 0 match)
circuit(1 1 match)
circuit(2 2 match)
)
)
circuit(RINGO RINGO match
@ -977,15 +977,15 @@ xref(
net(1 1 match)
net(2 2 match)
net(3 3 match)
pin('BULK,VSS' $3 match)
pin(FB $0 match)
pin(OSC $1 match)
pin(VDD $2 match)
circuit($1 $1 match)
circuit($2 $2 match)
circuit($3 $3 match)
circuit($4 $4 match)
circuit($5 $5 match)
pin(3 3 match)
pin(0 0 match)
pin(1 1 match)
pin(2 2 match)
circuit(1 1 match)
circuit(2 2 match)
circuit(3 3 match)
circuit(4 4 match)
circuit(5 5 match)
)
)
)

View File

@ -203,24 +203,24 @@ layout(
)
# Outgoing pins and their connections to nets
pin($0 1)
pin(IN 2)
pin(OUT 3)
pin(VSS 4)
pin(VDD 5)
pin(BULK 6)
pin(1)
pin(2 name(IN))
pin(3 name(OUT))
pin(4 name(VSS))
pin(5 name(VDD))
pin(6 name(BULK))
# Devices and their connections
device($1 D$PMOS
device(1 D$PMOS
device(D$PMOS$1 800 0)
connect(0 S S)
connect(0 S D)
connect(0 G G)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(0 D S)
connect(0 B B)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 3200)
param(L 0.25)
param(W 3.5)
@ -233,16 +233,16 @@ layout(
terminal(D 5)
terminal(B 1)
)
device($3 D$NMOS
device(3 D$NMOS
device(D$NMOS$1 800 0)
connect(0 S S)
connect(0 S D)
connect(0 G G)
connect(1 S D)
connect(0 G G)
connect(1 G G)
connect(0 D D)
connect(0 D S)
connect(0 B B)
connect(1 D S)
connect(0 B B)
connect(1 B B)
location(-400 -400)
param(L 0.25)
param(W 3.5)
@ -345,30 +345,30 @@ layout(
net(7)
# Outgoing pins and their connections to nets
pin(BULK 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 6)
pin($6 7)
pin(1 name(BULK))
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
pin(7)
# Subcircuits and their connections
circuit($1 INV2 location(1700 800)
pin($0 7)
pin(IN 5)
pin(OUT 4)
pin(VSS 3)
pin(VDD 2)
pin(BULK 1)
circuit(1 INV2 location(1700 800)
pin(0 7)
pin(1 5)
pin(2 4)
pin(3 3)
pin(4 2)
pin(5 1)
)
circuit($2 INV2 location(4340 800)
pin($0 7)
pin(IN 4)
pin(OUT 6)
pin(VSS 3)
pin(VDD 2)
pin(BULK 1)
circuit(2 INV2 location(4340 800)
pin(0 7)
pin(1 4)
pin(2 6)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
@ -719,52 +719,52 @@ layout(
)
# Outgoing pins and their connections to nets
pin(FB 1)
pin(OSC 2)
pin(VDD 3)
pin('BULK,VSS' 4)
pin(1 name(FB))
pin(2 name(OSC))
pin(3 name(VDD))
pin(4 name('BULK,VSS'))
# Subcircuits and their connections
circuit($1 INV2PAIR location(19420 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($3 1)
pin($4 6)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR location(19420 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 6)
pin(5 2)
pin(6 3)
)
circuit($2 INV2PAIR location(-1700 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 1)
pin($5 5)
pin($6 3)
circuit(2 INV2PAIR location(-1700 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 1)
pin(5 5)
pin(6 3)
)
circuit($3 INV2PAIR location(3580 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 5)
pin($5 8)
pin($6 3)
circuit(3 INV2PAIR location(3580 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 5)
pin(5 8)
pin(6 3)
)
circuit($4 INV2PAIR location(8860 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 8)
pin($5 7)
pin($6 3)
circuit(4 INV2PAIR location(8860 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 7)
pin(6 3)
)
circuit($5 INV2PAIR location(14140 -800)
pin(BULK 4)
pin($1 3)
pin($2 4)
pin($4 7)
pin($5 6)
pin($6 3)
circuit(5 INV2PAIR location(14140 -800)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 6)
pin(6 3)
)
)
@ -790,16 +790,16 @@ reference(
net(6 name('6'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4 5)
pin($5 6)
pin(1)
pin(2)
pin(3)
pin(4)
pin(5)
pin(6)
# Devices and their connections
device($1 PMOS
param(L 0.25)
device(1 PMOS
name($1) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
@ -810,8 +810,8 @@ reference(
terminal(D 5)
terminal(B 1)
)
device($3 NMOS
param(L 0.25)
device(2 NMOS
name($3) param(L 0.25)
param(W 3.5)
param(AS 1.4)
param(AD 1.4)
@ -835,22 +835,22 @@ reference(
net(6 name('7'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4)
pin($5 5)
pin($6 6)
pin(1)
pin(2)
pin(3)
pin(4)
pin()
pin(5)
pin(6)
# Subcircuits and their connections
circuit($2 INV2
pin($0 6)
pin($1 4)
pin($2 5)
pin($3 3)
pin($4 2)
pin($5 1)
circuit(1 INV2 name($2)
pin(0 6)
pin(1 4)
pin(2 5)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
@ -867,53 +867,53 @@ reference(
net(8 name('7'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin(1)
pin(2)
pin(3)
pin(4)
# Subcircuits and their connections
circuit($1 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($3 1)
pin($4 5)
pin($5 2)
pin($6 3)
circuit(1 INV2PAIR name($1)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 5)
pin(5 2)
pin(6 3)
)
circuit($2 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($3 1)
pin($4 1)
pin($5 6)
pin($6 3)
circuit(2 INV2PAIR name($2)
pin(0 4)
pin(1 3)
pin(2 4)
pin(3 1)
pin(4 1)
pin(5 6)
pin(6 3)
)
circuit($3 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 6)
pin($5 7)
pin($6 3)
circuit(3 INV2PAIR name($3)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 6)
pin(5 7)
pin(6 3)
)
circuit($4 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 7)
pin($5 8)
pin($6 3)
circuit(4 INV2PAIR name($4)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 7)
pin(5 8)
pin(6 3)
)
circuit($5 INV2PAIR
pin($0 4)
pin($1 3)
pin($2 4)
pin($4 8)
pin($5 5)
pin($6 3)
circuit(5 INV2PAIR name($5)
pin(0 4)
pin(1 3)
pin(2 4)
pin(4 8)
pin(5 5)
pin(6 3)
)
)
@ -928,22 +928,22 @@ reference(
net(6 name('7'))
# Outgoing pins and their connections to nets
pin($0 1)
pin($1 2)
pin($2 3)
pin($3 4)
pin($4)
pin($5 5)
pin($6 6)
pin(1)
pin(2)
pin(3)
pin(4)
pin()
pin(5)
pin(6)
# Subcircuits and their connections
circuit($2 INV2
pin($0 6)
pin($1 4)
pin($2 5)
pin($3 3)
pin($4 2)
pin($5 1)
circuit(1 INV2 name($2)
pin(0 6)
pin(1 4)
pin(2 5)
pin(3 3)
pin(4 2)
pin(5 1)
)
)
@ -963,14 +963,14 @@ xref(
net(3 3 match)
net(5 5 match)
net(4 4 match)
pin($0 $0 match)
pin(BULK $5 match)
pin(IN $1 match)
pin(OUT $2 match)
pin(VDD $4 match)
pin(VSS $3 match)
device($1 $1 match)
device($3 $3 match)
pin(0 0 match)
pin(5 5 match)
pin(1 1 match)
pin(2 2 match)
pin(4 4 match)
pin(3 3 match)
device(1 1 match)
device(3 2 match)
)
)
circuit(INV2PAIR INV2PAIR nomatch
@ -982,16 +982,16 @@ xref(
net(6 5 match)
net(7 6 mismatch)
net(1 1 mismatch)
pin($3 () mismatch)
pin($1 $1 match)
pin($2 $2 match)
pin($4 $3 match)
pin($5 $5 match)
pin($6 $6 match)
pin(BULK $0 match)
circuit(() $2 mismatch)
circuit($1 () mismatch)
circuit($2 () mismatch)
pin(3 () mismatch)
pin(1 1 match)
pin(2 2 match)
pin(4 3 match)
pin(5 5 match)
pin(6 6 match)
pin(0 0 match)
circuit(() 1 mismatch)
circuit(1 () mismatch)
circuit(2 () mismatch)
)
)
circuit(RINGO RINGO skipped