From 7c1fd487d669f6e1f3f64d9c70bbdfcd71579e3a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 17 Sep 2023 19:58:04 +0200 Subject: [PATCH] [consider merging] Bugfix for LayoutToNetlistReader --- src/db/db/dbLayoutToNetlistReader.cc | 1 + testdata/algo/l2n_reader_6.l2n | 6 ++++++ testdata/algo/l2n_reader_au_6.l2n | 18 ++++++++++++++++++ testdata/algo/l2n_writer_au_3.txt | 18 ++++++++++++++++++ testdata/algo/l2n_writer_au_3s.txt | 6 ++++++ 5 files changed, 49 insertions(+) create mode 100644 testdata/algo/l2n_reader_6.l2n create mode 100644 testdata/algo/l2n_reader_au_6.l2n create mode 100644 testdata/algo/l2n_writer_au_3.txt create mode 100644 testdata/algo/l2n_writer_au_3s.txt diff --git a/src/db/db/dbLayoutToNetlistReader.cc b/src/db/db/dbLayoutToNetlistReader.cc index 0b980ebbb..5d44b714c 100644 --- a/src/db/db/dbLayoutToNetlistReader.cc +++ b/src/db/db/dbLayoutToNetlistReader.cc @@ -132,6 +132,7 @@ LayoutToNetlistStandardReader::skip () { while (m_ex.at_end () || *m_ex.skip () == '#') { if (m_stream.at_end ()) { + m_ex = tl::Extractor (); return; } m_progress.set (m_stream.line_number ()); diff --git a/testdata/algo/l2n_reader_6.l2n b/testdata/algo/l2n_reader_6.l2n new file mode 100644 index 000000000..4a4b7939c --- /dev/null +++ b/testdata/algo/l2n_reader_6.l2n @@ -0,0 +1,6 @@ +#%l2n-klayout +W(TOP) +U(0.001) +H(I B(info)) +H(W B(warning)) +H(E B(error)) diff --git a/testdata/algo/l2n_reader_au_6.l2n b/testdata/algo/l2n_reader_au_6.l2n new file mode 100644 index 000000000..2b0c7fd7c --- /dev/null +++ b/testdata/algo/l2n_reader_au_6.l2n @@ -0,0 +1,18 @@ +#%l2n-klayout +top(TOP) +unit(0.001) + +# Layer section +# This section lists the mask layers (drawing or derived) and their connections. + +# Mask layers + +# Mask layer connectivity + +# Log entries +message(info description(info)) +message(warning description(warning)) +message(error description(error)) + +# Circuit section +# Circuits are the hierarchical building blocks of the netlist. diff --git a/testdata/algo/l2n_writer_au_3.txt b/testdata/algo/l2n_writer_au_3.txt new file mode 100644 index 000000000..2b0c7fd7c --- /dev/null +++ b/testdata/algo/l2n_writer_au_3.txt @@ -0,0 +1,18 @@ +#%l2n-klayout +top(TOP) +unit(0.001) + +# Layer section +# This section lists the mask layers (drawing or derived) and their connections. + +# Mask layers + +# Mask layer connectivity + +# Log entries +message(info description(info)) +message(warning description(warning)) +message(error description(error)) + +# Circuit section +# Circuits are the hierarchical building blocks of the netlist. diff --git a/testdata/algo/l2n_writer_au_3s.txt b/testdata/algo/l2n_writer_au_3s.txt new file mode 100644 index 000000000..4a4b7939c --- /dev/null +++ b/testdata/algo/l2n_writer_au_3s.txt @@ -0,0 +1,6 @@ +#%l2n-klayout +W(TOP) +U(0.001) +H(I B(info)) +H(W B(warning)) +H(E B(error))