From 008302122071d0314664659019875f0a205f219f Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 6 Aug 2022 23:44:06 +0200 Subject: [PATCH] [Consider merging] Some refactoring of L2N and LVSDB readers for more future compatibility --- src/db/db/dbLayoutToNetlistFormatDefs.h | 105 +-- src/db/db/dbLayoutToNetlistReader.cc | 209 ++++-- src/db/db/dbLayoutToNetlistReader.h | 12 +- src/db/db/dbLayoutVsSchematicFormatDefs.cc | 14 + src/db/db/dbLayoutVsSchematicFormatDefs.h | 117 +-- src/db/db/dbLayoutVsSchematicReader.cc | 32 +- .../dbLayoutToNetlistReaderTests.cc | 24 + src/db/unit_tests/dbLayoutVsSchematicTests.cc | 16 + testdata/algo/l2n_reader_5.l2n | 452 ++++++++++++ testdata/algo/l2n_reader_au_5.l2n | 487 +++++++++++++ testdata/algo/lvs_test3.lvsdb | 687 ++++++++++++++++++ testdata/algo/lvs_test3_au.lvsdb | 673 +++++++++++++++++ 12 files changed, 2651 insertions(+), 177 deletions(-) create mode 100644 testdata/algo/l2n_reader_5.l2n create mode 100644 testdata/algo/l2n_reader_au_5.l2n create mode 100644 testdata/algo/lvs_test3.lvsdb create mode 100644 testdata/algo/lvs_test3_au.lvsdb diff --git a/src/db/db/dbLayoutToNetlistFormatDefs.h b/src/db/db/dbLayoutToNetlistFormatDefs.h index d77386a2d..428eaaeaa 100644 --- a/src/db/db/dbLayoutToNetlistFormatDefs.h +++ b/src/db/db/dbLayoutToNetlistFormatDefs.h @@ -46,55 +46,76 @@ namespace db * The file follows the declaration-before-use principle * (circuits before subcircuits, nets before use ...) * - * Global statements: + * Main body: + * [version|description|unit|top|layer|connect|global|circuit|class|device|any]* * + * [version]: * version() - file format version [short key: V] + * + * [description]: * description() - an arbitrary description text [short key: B] + * + * [unit]: * unit() - specifies the database unit [short key: U] + * + * [top]: * top() - specifies the name of the top circuit [short key: W] + * + * [layer]: * layer( ?) - define a layer [short key: L] + * + * [connect]: * connect( ...) - connects layer1 with the following layers [short key: C] + * + * [global]: * global( ...) * - connects the shapes of the layer with the given global * nets [short key: G] + * + * [circuit]: * circuit( [circuit-def]) - circuit (cell) [short key: X] + * + * [class]: * class(