From 4c14c596c56176c8fb57e1a5894609e33a1ab42e Mon Sep 17 00:00:00 2001
From: Thomas Kramer <code@tkramer.ch>
Date: Mon, 29 Apr 2024 22:12:01 +0200
Subject: [PATCH] README: add section on debugging

---
 README.md                  | 8 ++++++++
 src/lclayout/standalone.py | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0994fbf..49cc927 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,14 @@ lclayout --output-dir mylibrary --tech examples/dummy_tech.py --netlist examples
 ## Adapting design rules
 Design rulesi and technology related data need to be encoded in a Python script file as shown in `examples/dummy_tech.py`.
 
+## Debugging
+Getting the configuration right can be tricky. There's some debugging options which can 
+help inspecting the cell generation:
+* `--verbose`: Print more debug information. 
+* `--debug-routing-graph`: Plot the full routing grid into the layout file. This helps understanding if the pitch and tracks are well aligned with the rest of the cell.
+* `--debug-routing-iterations`: Plot the intermediate results of the router to files. This helps debugging the routing algorithm.
+* `--debug-output-dir`: Directory where debug information will be written.
+
 ### Known issues
 
 #### Reproducibility
diff --git a/src/lclayout/standalone.py b/src/lclayout/standalone.py
index aade14b..41ea2c5 100644
--- a/src/lclayout/standalone.py
+++ b/src/lclayout/standalone.py
@@ -957,7 +957,7 @@ def main():
                            orientation_change_penalty=tech.orientation_change_penalty
                            )
 
-    if args.debug_visual:
+    if args.debug_routing_iterations:
         router = InspectRouter(router, output_dir = args.debug_output_dir)
 
     layouter = LcLayout(tech=tech,
-- 
GitLab