From 48ee39b27de0301863062ca2625dfbf029d2f3a9 Mon Sep 17 00:00:00 2001 From: Jack Luar <39641663+luarss@users.noreply.github.com> Date: Sun, 12 Nov 2023 03:40:40 +0000 Subject: [PATCH 01/88] manpage poc Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com> Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/aa.md | 8 ++++++++ docs/manpages/README.md | 8 ++++++++ docs/manpages/aaaa.md | 25 +++++++++++++++++++++++++ docs/manpages/man1/aaaa.1 | 28 ++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 docs/aa.md create mode 100644 docs/manpages/README.md create mode 100644 docs/manpages/aaaa.md create mode 100644 docs/manpages/man1/aaaa.1 diff --git a/docs/aa.md b/docs/aa.md new file mode 100644 index 00000000000..10be6fbf34a --- /dev/null +++ b/docs/aa.md @@ -0,0 +1,8 @@ +# Man pages implementation + + + +## TODO +- Look into `pandoc`, seems more well-maintained than `ronn` +- Need to add `ronn` to dependencies, for autocompiling of markdown to roff format +- Need to add to `MANPATH`: https://unix.stackexchange.com/questions/344603/how-to-append-to-manpath diff --git a/docs/manpages/README.md b/docs/manpages/README.md new file mode 100644 index 00000000000..10be6fbf34a --- /dev/null +++ b/docs/manpages/README.md @@ -0,0 +1,8 @@ +# Man pages implementation + + + +## TODO +- Look into `pandoc`, seems more well-maintained than `ronn` +- Need to add `ronn` to dependencies, for autocompiling of markdown to roff format +- Need to add to `MANPATH`: https://unix.stackexchange.com/questions/344603/how-to-append-to-manpath diff --git a/docs/manpages/aaaa.md b/docs/manpages/aaaa.md new file mode 100644 index 00000000000..3c8c7e9d038 --- /dev/null +++ b/docs/manpages/aaaa.md @@ -0,0 +1,25 @@ +--- +title: Using NiX to develop pandoc +author: John MacFarlane +--- + +The source directory contains `shell.nix` and `flake.nix`, +so if you have NiX installed, you can use either `nix shell` +or `nix develop` can be used to obtain a shell with pandoc +dependencies installed. + +To set up `direnv` so that the NiX shell is automatically +activated whenever the directory is entered, add the following +`.envrc` in the pandoc source directory: + +``` +if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +fi +use flake +``` + +This uses [nix-direnv] for caching. See its web page for +further help. + +[nix-direnv]: https://github.com/nix-community/nix-direnv diff --git a/docs/manpages/man1/aaaa.1 b/docs/manpages/man1/aaaa.1 new file mode 100644 index 00000000000..9dbe64f5684 --- /dev/null +++ b/docs/manpages/man1/aaaa.1 @@ -0,0 +1,28 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "Using NiX to develop pandoc" "" "" "" "" +.hy +.PP +The source directory contains \f[C]shell.nix\f[R] and +\f[C]flake.nix\f[R], so if you have NiX installed, you can use either +\f[C]nix shell\f[R] or \f[C]nix develop\f[R] can be used to obtain a +shell with pandoc dependencies installed. +.PP +To set up \f[C]direnv\f[R] so that the NiX shell is automatically +activated whenever the directory is entered, add the following +\f[C].envrc\f[R] in the pandoc source directory: +.IP +.nf +\f[C] +if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then + source_url \[dq]https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc\[dq] \[dq]sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=\[dq] +fi +use flake +\f[R] +.fi +.PP +This uses nix-direnv (https://github.com/nix-community/nix-direnv) for +caching. +See its web page for further help. +.SH AUTHORS +John MacFarlane. From c52462260ff96eeb55e1e00f8af24a097abc9cb6 Mon Sep 17 00:00:00 2001 From: Jack Luar <39641663+luarss@users.noreply.github.com> Date: Mon, 13 Nov 2023 04:48:26 +0000 Subject: [PATCH 02/88] prototype for pandoc + makefile easier Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com> Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/README.md | 24 +++++- docs/manpages/man1/template.1 | 128 ++++++++++++++++++++++++++++++++ docs/manpages/{ => src}/aaaa.md | 0 docs/manpages/src/template.md | 122 ++++++++++++++++++++++++++++++ 4 files changed, 272 insertions(+), 2 deletions(-) create mode 100644 docs/manpages/man1/template.1 rename docs/manpages/{ => src}/aaaa.md (100%) create mode 100644 docs/manpages/src/template.md diff --git a/docs/manpages/README.md b/docs/manpages/README.md index 10be6fbf34a..7493a4dc64f 100644 --- a/docs/manpages/README.md +++ b/docs/manpages/README.md @@ -1,8 +1,28 @@ # Man pages implementation +## Prototype 1 (pandoc) +- To install pandoc, refer to this [link](https://github.com/jgm/pandoc/blob/main/INSTALL.md). `apt-get` *should* just work for Ubuntu. +- Use pandoc to convert markdown to roff format. +- Ensure that all the source files are in `src` folder before runnig. +``` +make clean && make all +``` + +- Setup environment variables as follows. This is to avoid overwriting the system default for `MANPATH`. +``` +echo "MANDATORY_MANPATH $(pwd) >> ~/.manpath" +``` + +- Afterwards, you can read your manpages using: +``` +man template +``` + +## Prototype 2 (git-pages) + +- TOdo. ## TODO -- Look into `pandoc`, seems more well-maintained than `ronn` -- Need to add `ronn` to dependencies, for autocompiling of markdown to roff format +- pandoc not the most perfect, as pandoc does not seem to do the indentation perfectly as in other manpages. for the options section - Need to add to `MANPATH`: https://unix.stackexchange.com/questions/344603/how-to-append-to-manpath diff --git a/docs/manpages/man1/template.1 b/docs/manpages/man1/template.1 new file mode 100644 index 00000000000..dd8dda1a4c4 --- /dev/null +++ b/docs/manpages/man1/template.1 @@ -0,0 +1,128 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "openroad" "0" "2023/11/13" "" "" +.hy +.SH NAME +.PP +openroad - OpenROAD command-line-interface. +.SH SYNOPSIS +.PP +openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads +count|max] [-log file_name] [-metrics file_name] cmd_file +.PP +openroad [-python] cmd_file +.SH DESCRIPTION +.PP +The \f[B]openroad\f[R] command is the command-line interface for +OpenROAD, an open-source initiative for chip design and optimization. +It provides a range of options to con\[hy] trol its behavior and execute +commands specified in the cmd_file. +.SH OPTIONS +.PP +\f[C]-help\f[R]: Display help information. +.PP +\f[C]-version\f[R]: Display version information. +.PP +\f[C]-no_init\f[R]: Skip initialization steps. +.PP +\f[C]-exit\f[R]: Exit after executing commands in cmd_file. +.PP +\f[C]-gui\f[R]: Launch the graphical user interface (GUI). +.PP +\f[C]-threads count|max\f[R]: Specify the number of threads to use (or +use max available). +.PP +\f[C]-log file_name\f[R]: Log output to the specified file. +.PP +\f[C]-metrics file_name\f[R]: Save performance metrics to the specified +file. +.PP +\f[C]-python\f[R]: Execute the cmd_file as a Python script. +.SH ARGUMENTS +.PP +\f[C]cmd_file\f[R]: The command file containing OpenROAD commands to be +executed. +.SH EXAMPLES +.PP +\f[B]openroad -help\f[R]: Prints the help information +.PP +\f[B]openroad -version -exit\f[R]: Prints the version information, and +exits the program thereafter. +.PP +\f[B]openroad -threads max -log test.log -metrics test.metrics\f[R]: +Prints the log and metric respectively to \f[C]test.log\f[R] and +\f[C]test.metrics\f[R]. +Also runs the script with maximum available number of threads. +.PP +\f[B]openroad -gui\f[R]: Launches OpenROAD GUI, which further +interactive Tcl commands can be run. +.SH TCL COMMANDS +.PP +These Tcl-based commands are callable from within the OpenROAD binary. +.IP \[bu] 2 +read_lef [-tech] [-library] filename +.RS 2 +.IP \[bu] 2 +Read Library Exchange Format (.lef) files. +.IP \[bu] 2 +tech: Technology-specific information +.IP \[bu] 2 +library: .lib files +.RE +.IP \[bu] 2 +read_def filename +.RS 2 +.IP \[bu] 2 +Read Design Exchange Format (.def) files. +.RE +.IP \[bu] 2 +write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename +.RS 2 +.IP \[bu] 2 +Write Design Exchange Format (.def) files. +.IP \[bu] 2 +version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. +.RE +.IP \[bu] 2 +read_verilog filename +.RS 2 +.IP \[bu] 2 +Read Verilog (.v) input file. +.RE +.IP \[bu] 2 +write_verilog filename +.RS 2 +.IP \[bu] 2 +Write Verilog (.v) file based on current database. +.RE +.IP \[bu] 2 +read_db filename +.RS 2 +.IP \[bu] 2 +Read OpenDB (.odb) database files. +.RE +.IP \[bu] 2 +write_db filename +.RS 2 +.IP \[bu] 2 +Write OpenDB (.odb) database files. +.RE +.IP \[bu] 2 +write_abstract_lef filename +.RS 2 +.IP \[bu] 2 +Write abstract Library Exchange Format (.lef) files based on current +database. +.RE +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2023, The Regents of the University of California. +.PP +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/aaaa.md b/docs/manpages/src/aaaa.md similarity index 100% rename from docs/manpages/aaaa.md rename to docs/manpages/src/aaaa.md diff --git a/docs/manpages/src/template.md b/docs/manpages/src/template.md new file mode 100644 index 00000000000..cbfe75d959b --- /dev/null +++ b/docs/manpages/src/template.md @@ -0,0 +1,122 @@ +--- +title: openroad(0) +author: Jack Luar (TODO@TODO.com) +date: 2023/11/13 +--- + +# NAME + +openroad - OpenROAD command-line-interface. + +# SYNOPSIS + +openroad [-help] [-version] [-no_init] [-exit] [-gui] + [-threads count|max] [-log file_name] [-metrics + file_name] cmd_file + +openroad [-python] cmd_file + +# DESCRIPTION + +The **openroad** command is the command-line interface for +OpenROAD, an open-source initiative for chip design and +optimization. It provides a range of options to con‐ +trol its behavior and execute commands specified in the +cmd_file. + +# OPTIONS + +`-help`: Display help information. + +`-version`: Display version information. + +`-no_init`: Skip initialization steps. + +`-exit`: Exit after executing commands in cmd_file. + +`-gui`: Launch the graphical user interface (GUI). + +`-threads count|max`: Specify the number of threads to +use (or use max available). + +`-log file_name`: Log output to the specified file. + +`-metrics file_name`: Save performance metrics to the +specified file. + +`-python`: Execute the cmd_file as a Python script. + +# ARGUMENTS + +`cmd_file`: The command file containing OpenROAD commands to be executed. + +# EXAMPLES + +**openroad -help**: Prints the help information + +**openroad -version -exit**: Prints the version information, and exits the program thereafter. + +**openroad -threads max -log test.log -metrics test.metrics**: Prints the log and metric +respectively to `test.log` and `test.metrics`. Also runs the script with maximum + available number of threads. + +**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl commands can be run. + +# TCL COMMANDS + +These Tcl-based commands are callable from within the +OpenROAD binary. + +- read_lef [-tech] [-library] filename + + - Read Library Exchange Format (.lef) files. + + - tech: Technology-specific information + + - library: .lib files + +- read_def filename + + - Read Design Exchange Format (.def) files. + +- write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename + - Write Design Exchange Format (.def) files. + + - version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF + version to use. + +- read_verilog filename + + - Read Verilog (.v) input file. + +- write_verilog filename + + - Write Verilog (.v) file based on current database. +- read_db filename + + - Read OpenDB (.odb) database files. + +- write_db filename + + - Write OpenDB (.odb) database files. + +- write_abstract_lef filename + + - Write abstract Library Exchange Format (.lef) files + based on current database. + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2023, The Regents of the University of California. + +All rights reserved. \ No newline at end of file From f26247789c009729dfc792ed7709ce62cf54cb4f Mon Sep 17 00:00:00 2001 From: Jack Luar <39641663+luarss@users.noreply.github.com> Date: Thu, 16 Nov 2023 16:45:56 +0000 Subject: [PATCH 03/88] add Makefile to be included in commit (not considered by gitignore) Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com> Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .gitignore | 1 + docs/aa.md | 8 -------- docs/manpages/Makefile | 30 ++++++++++++++++++++++++++++++ docs/manpages/bkMake | 30 ++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 8 deletions(-) delete mode 100644 docs/aa.md create mode 100644 docs/manpages/Makefile create mode 100644 docs/manpages/bkMake diff --git a/.gitignore b/.gitignore index 02c2c7a4128..8c66dd331b7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ docs/main messages.txt Messages.md MessagesFinal.md +!docs/manpages .idea/ cmake-build-debug/ diff --git a/docs/aa.md b/docs/aa.md deleted file mode 100644 index 10be6fbf34a..00000000000 --- a/docs/aa.md +++ /dev/null @@ -1,8 +0,0 @@ -# Man pages implementation - - - -## TODO -- Look into `pandoc`, seems more well-maintained than `ronn` -- Need to add `ronn` to dependencies, for autocompiling of markdown to roff format -- Need to add to `MANPATH`: https://unix.stackexchange.com/questions/344603/how-to-append-to-manpath diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile new file mode 100644 index 00000000000..69e633f4c44 --- /dev/null +++ b/docs/manpages/Makefile @@ -0,0 +1,30 @@ +# Makefile for generating man pages using pandoc + +# Define variables +PANDOC = pandoc +SRC_DIR = src +MAN_DIR = man1 +SRC_FILES = $(wildcard $(SRC_DIR)/*.md) +MAN_PAGES = $(patsubst $(SRC_DIR)/%.md,$(MAN_DIR)/%.1,$(SRC_FILES)) + +# Default target +all: doc + +# Target to generate all man pages +doc: $(MAN_PAGES) + +# Rule to create the man directory +$(MAN_DIR): + mkdir -p $(MAN_DIR) + +# Rule to generate a man page from a corresponding Markdown file +$(MAN_DIR)/%.1: $(SRC_DIR)/%.md | $(MAN_DIR) + $(PANDOC) -s -t man $< -o $@ + +# Clean target to remove all generated man pages +clean: + rm -rf $(MAN_DIR) + +# Phony targets +.PHONY: all doc clean + diff --git a/docs/manpages/bkMake b/docs/manpages/bkMake new file mode 100644 index 00000000000..69e633f4c44 --- /dev/null +++ b/docs/manpages/bkMake @@ -0,0 +1,30 @@ +# Makefile for generating man pages using pandoc + +# Define variables +PANDOC = pandoc +SRC_DIR = src +MAN_DIR = man1 +SRC_FILES = $(wildcard $(SRC_DIR)/*.md) +MAN_PAGES = $(patsubst $(SRC_DIR)/%.md,$(MAN_DIR)/%.1,$(SRC_FILES)) + +# Default target +all: doc + +# Target to generate all man pages +doc: $(MAN_PAGES) + +# Rule to create the man directory +$(MAN_DIR): + mkdir -p $(MAN_DIR) + +# Rule to generate a man page from a corresponding Markdown file +$(MAN_DIR)/%.1: $(SRC_DIR)/%.md | $(MAN_DIR) + $(PANDOC) -s -t man $< -o $@ + +# Clean target to remove all generated man pages +clean: + rm -rf $(MAN_DIR) + +# Phony targets +.PHONY: all doc clean + From 8630df754f08974d3594e565f123427e98d42850 Mon Sep 17 00:00:00 2001 From: Jack Luar <39641663+luarss@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:43:49 +0000 Subject: [PATCH 04/88] add src code poc for adding this to cpp binary Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/bkMake | 30 ------------------------------ docs/manpages/codeSrc/main.cpp | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 30 deletions(-) delete mode 100644 docs/manpages/bkMake create mode 100644 docs/manpages/codeSrc/main.cpp diff --git a/docs/manpages/bkMake b/docs/manpages/bkMake deleted file mode 100644 index 69e633f4c44..00000000000 --- a/docs/manpages/bkMake +++ /dev/null @@ -1,30 +0,0 @@ -# Makefile for generating man pages using pandoc - -# Define variables -PANDOC = pandoc -SRC_DIR = src -MAN_DIR = man1 -SRC_FILES = $(wildcard $(SRC_DIR)/*.md) -MAN_PAGES = $(patsubst $(SRC_DIR)/%.md,$(MAN_DIR)/%.1,$(SRC_FILES)) - -# Default target -all: doc - -# Target to generate all man pages -doc: $(MAN_PAGES) - -# Rule to create the man directory -$(MAN_DIR): - mkdir -p $(MAN_DIR) - -# Rule to generate a man page from a corresponding Markdown file -$(MAN_DIR)/%.1: $(SRC_DIR)/%.md | $(MAN_DIR) - $(PANDOC) -s -t man $< -o $@ - -# Clean target to remove all generated man pages -clean: - rm -rf $(MAN_DIR) - -# Phony targets -.PHONY: all doc clean - diff --git a/docs/manpages/codeSrc/main.cpp b/docs/manpages/codeSrc/main.cpp new file mode 100644 index 00000000000..aca3a5e0628 --- /dev/null +++ b/docs/manpages/codeSrc/main.cpp @@ -0,0 +1,22 @@ +#include +#include + +int main() { + // Replace "a.1" with the actual name of your compiled man page + const char* manPageName = "../man1/template.1"; + + // Construct the command to call 'man' on the compiled man page + std::string command = "man " + std::string(manPageName); + + // Use the system function to execute the 'man' command + int result = std::system(command.c_str()); + + // Check the result of the 'man' command + if (result == 0) { + // Success + return 0; + } else { + // Error + return 1; + } +} From f4c8e93adf728c8e97bc8822da28991bfa3938fc Mon Sep 17 00:00:00 2001 From: Jack Luar <39641663+luarss@users.noreply.github.com> Date: Thu, 30 Nov 2023 17:47:42 +0000 Subject: [PATCH 05/88] added tclshell interpreter Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com> Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/tclInterp/CMakeLists.txt | 53 ++++++++++++++ docs/manpages/tclInterp/cmake/FindTCL.cmake | 80 +++++++++++++++++++++ docs/manpages/tclInterp/main.cpp | 18 +++++ 3 files changed, 151 insertions(+) create mode 100644 docs/manpages/tclInterp/CMakeLists.txt create mode 100644 docs/manpages/tclInterp/cmake/FindTCL.cmake create mode 100644 docs/manpages/tclInterp/main.cpp diff --git a/docs/manpages/tclInterp/CMakeLists.txt b/docs/manpages/tclInterp/CMakeLists.txt new file mode 100644 index 00000000000..4fc23191999 --- /dev/null +++ b/docs/manpages/tclInterp/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.16) +project(AAAA) + +################################################################ + +# OSX tcl is deprecated and prints a warning, so look for a user installed +# version before using the system version. +# I tried to override the library search order instead but failed. +# CMAKE_FIND_FRAMEWORK LAST bypasses the version in the framework directory +# but not the one in /usr/lib. +# This calls cmake/FindTCL.cmake +# Do not use REQUIRED because it also requires TK. +find_package(TCL) + +add_executable(main.o main.cpp) + +# check for tclReadline +set(TCL_READLINE_POSSIBLE_NAMES tclreadline-2.1.0 + tclreadline-2.3.2 tclreadline-2.3.6 tclreadline-2.3.7 tclreadline-2.3.8 + ) +find_library(TCL_READLINE_LIBRARY + NAMES tclreadline ${TCL_READLINE_POSSIBLE_NAMES} + PATHS ${TCL_LIB_PATHS} + ) +if (TCL_READLINE_LIBRARY) + message(STATUS "TCL readline library: ${TCL_READLINE_LIBRARY}") +endif() + +find_path(TCL_READLINE_H tclreadline.h) +if (TCL_READLINE_H) + message(STATUS "TCL readline header: ${TCL_READLINE_H}") +endif() + +option(BUILD_TCLX "Build with tclX included" ON) +set(TCLX_LIBRARY /usr/lib/libtclx8.4.so.0) +set(TCLX_H /usr/include/tclx8.4/tclExtend.h) +if (BUILD_TCLX AND TCLX_LIBRARY) + message(STATUS "TclX library: ${TCLX_LIBRARY}") +endif() +if (BUILD_TCLX AND TCLX_H) + message(STATUS "TclX header: ${TCLX_H}") +endif() + +target_link_libraries(main.o + ${TCL_LIBRARY} + ${TCL_READLINE_LIBRARY}) + +include_directories(/usr/include/tclx8.4) + +if (BUILD_TCLX AND TCLX_LIBRARY AND TCLX_H) + target_link_libraries(main.o ${TCLX_LIBRARY}) + #target_include_directories(main.o ${TCLX_H}) +endif() \ No newline at end of file diff --git a/docs/manpages/tclInterp/cmake/FindTCL.cmake b/docs/manpages/tclInterp/cmake/FindTCL.cmake new file mode 100644 index 00000000000..43ecc0b5f9f --- /dev/null +++ b/docs/manpages/tclInterp/cmake/FindTCL.cmake @@ -0,0 +1,80 @@ +# Copied from OpenSTA/cmake/FindTCL.cmake +# Copyright (c) 2021, Parallax Software, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +################################################################ +# +# Locate TCL library. +# +# Note that the cmake findTcl module is hopeless for OSX +# because there doesn't appear to be a way to override +# searching OSX system directories before unix directories. + +set(TCL_POSSIBLE_NAMES tcl87 tcl8.7 + tcl86 tcl8.6 + tcl85 tcl8.5 + tcl84 tcl8.4 + tcl83 tcl8.3 + tcl82 tcl8.2 + ) + +# tcl lib path guesses. +if (NOT TCL_LIB_PATHS) + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(TCL_LIB_PATHS /usr/local/lib + /opt/homebrew/opt/tcl-tk/lib + /usr/local/opt/tcl-tk/lib + ) + set(TCL_NO_DEFAULT_PATH TRUE) + elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(TCL_LIB_PATHS /usr/lib /usr/local/lib) + set(TCL_NO_DEFAULT_PATH FALSE) + endif() +endif() + +if (NOT TCL_LIBRARY) + # bagbiter cmake doesn't have a way to pass NO_DEFAULT_PATH as a parameter. + if (TCL_NO_DEFAULT_PATH) + find_library(TCL_LIBRARY + NAMES tcl ${TCL_POSSIBLE_NAMES} + PATHS ${TCL_LIB_PATHS} + NO_DEFAULT_PATH + ) + else() + find_library(TCL_LIBRARY + NAMES tcl ${TCL_POSSIBLE_NAMES} + PATHS ${TCL_LIB_PATHS} + ) + endif() +endif() +message(STATUS "TCL library: ${TCL_LIBRARY}") + +get_filename_component(TCL_LIB_DIR "${TCL_LIBRARY}" PATH) +get_filename_component(TCL_LIB_PARENT1 "${TCL_LIB_DIR}" PATH) +get_filename_component(TCL_LIB_PARENT2 "${TCL_LIB_PARENT1}" PATH) + +# Locate tcl.h +if (NOT TCL_HEADER) + find_file(TCL_HEADER tcl.h + PATHS ${TCL_LIB_PARENT1} ${TCL_LIB_PARENT2} + PATH_SUFFIXES include include/tcl + NO_DEFAULT_PATH + ) +endif() +message(STATUS "TCL header: ${TCL_HEADER}") + +if (TCL_HEADER) + get_filename_component(TCL_INCLUDE_PATH "${TCL_HEADER}" PATH) +endif() \ No newline at end of file diff --git a/docs/manpages/tclInterp/main.cpp b/docs/manpages/tclInterp/main.cpp new file mode 100644 index 00000000000..aa0185c7f6c --- /dev/null +++ b/docs/manpages/tclInterp/main.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +#include + +// Minimal example of Tcl shell +// Note that man is enabled only on Tclx. So we need to enable it +int tclAppInit(Tcl_Interp* interp) +{ + return 0; +} + +int main(int argc, char* argv[]){ + // Setup the app with tcl + auto* interp = Tcl_CreateInterp(); + Tclx_Init(interp); + Tcl_Main(1, argv, tclAppInit); +} From a4e34e2114fbe3869d9164bc43cee953c053458a Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 2 Dec 2023 13:06:12 +0000 Subject: [PATCH 06/88] man wrapper for tcl Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/tclInterp/CMakeLists.txt | 7 +++---- docs/manpages/tclInterp/main.cpp | 2 +- docs/manpages/tclInterp/main.tcl | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 docs/manpages/tclInterp/main.tcl diff --git a/docs/manpages/tclInterp/CMakeLists.txt b/docs/manpages/tclInterp/CMakeLists.txt index 4fc23191999..5c37ffe0f06 100644 --- a/docs/manpages/tclInterp/CMakeLists.txt +++ b/docs/manpages/tclInterp/CMakeLists.txt @@ -44,10 +44,9 @@ endif() target_link_libraries(main.o ${TCL_LIBRARY} ${TCL_READLINE_LIBRARY}) - -include_directories(/usr/include/tclx8.4) +#include_directories(/usr/include/tclx8.4) if (BUILD_TCLX AND TCLX_LIBRARY AND TCLX_H) target_link_libraries(main.o ${TCLX_LIBRARY}) - #target_include_directories(main.o ${TCLX_H}) -endif() \ No newline at end of file + target_include_directories(main.o PRIVATE /usr/include/tclx8.4) +endif() diff --git a/docs/manpages/tclInterp/main.cpp b/docs/manpages/tclInterp/main.cpp index aa0185c7f6c..3177146da37 100644 --- a/docs/manpages/tclInterp/main.cpp +++ b/docs/manpages/tclInterp/main.cpp @@ -13,6 +13,6 @@ int tclAppInit(Tcl_Interp* interp) int main(int argc, char* argv[]){ // Setup the app with tcl auto* interp = Tcl_CreateInterp(); - Tclx_Init(interp); + Tcl_Init(interp); Tcl_Main(1, argv, tclAppInit); } diff --git a/docs/manpages/tclInterp/main.tcl b/docs/manpages/tclInterp/main.tcl new file mode 100644 index 00000000000..21f15054bf9 --- /dev/null +++ b/docs/manpages/tclInterp/main.tcl @@ -0,0 +1,4 @@ +# man wrapper function +proc man args { + exec {*}[auto_execok man] {*}$args <@stdin >@stdout 2>@stderr +} \ No newline at end of file From 07134fb153de2c0418a5270333e550c7a3120953 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 7 Dec 2023 18:03:41 +0000 Subject: [PATCH 07/88] added tests for man Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/README.md | 2 +- docs/manpages/tclInterp/main.cpp | 3 +-- docs/manpages/tclInterp/main.tcl | 4 ++++ docs/manpages/tclInterp/test/main.tcl | 1 + docs/manpages/tclInterp/test/regression_tests.tcl | 4 ++++ docs/manpages/tclInterp/test/test_man_flags.tcl | 0 docs/manpages/tclInterp/test/test_man_noflags.ok | 1 + docs/manpages/tclInterp/test/test_man_noflags.tcl | 11 +++++++++++ 8 files changed, 23 insertions(+), 3 deletions(-) create mode 120000 docs/manpages/tclInterp/test/main.tcl create mode 100644 docs/manpages/tclInterp/test/regression_tests.tcl create mode 100644 docs/manpages/tclInterp/test/test_man_flags.tcl create mode 100644 docs/manpages/tclInterp/test/test_man_noflags.ok create mode 100644 docs/manpages/tclInterp/test/test_man_noflags.tcl diff --git a/docs/manpages/README.md b/docs/manpages/README.md index 7493a4dc64f..4bd689910ae 100644 --- a/docs/manpages/README.md +++ b/docs/manpages/README.md @@ -11,7 +11,7 @@ make clean && make all - Setup environment variables as follows. This is to avoid overwriting the system default for `MANPATH`. ``` -echo "MANDATORY_MANPATH $(pwd) >> ~/.manpath" +echo "MANDATORY_MANPATH $(pwd)" >> ~/.manpath ``` - Afterwards, you can read your manpages using: diff --git a/docs/manpages/tclInterp/main.cpp b/docs/manpages/tclInterp/main.cpp index 3177146da37..befe50010ea 100644 --- a/docs/manpages/tclInterp/main.cpp +++ b/docs/manpages/tclInterp/main.cpp @@ -4,7 +4,6 @@ #include // Minimal example of Tcl shell -// Note that man is enabled only on Tclx. So we need to enable it int tclAppInit(Tcl_Interp* interp) { return 0; @@ -13,6 +12,6 @@ int tclAppInit(Tcl_Interp* interp) int main(int argc, char* argv[]){ // Setup the app with tcl auto* interp = Tcl_CreateInterp(); - Tcl_Init(interp); + Tclx_Init(interp); Tcl_Main(1, argv, tclAppInit); } diff --git a/docs/manpages/tclInterp/main.tcl b/docs/manpages/tclInterp/main.tcl index 21f15054bf9..865c4a75da5 100644 --- a/docs/manpages/tclInterp/main.tcl +++ b/docs/manpages/tclInterp/main.tcl @@ -1,4 +1,8 @@ # man wrapper function proc man args { exec {*}[auto_execok man] {*}$args <@stdin >@stdout 2>@stderr +} + +proc clear {} { + exec clear } \ No newline at end of file diff --git a/docs/manpages/tclInterp/test/main.tcl b/docs/manpages/tclInterp/test/main.tcl new file mode 120000 index 00000000000..856eace39bf --- /dev/null +++ b/docs/manpages/tclInterp/test/main.tcl @@ -0,0 +1 @@ +../main.tcl \ No newline at end of file diff --git a/docs/manpages/tclInterp/test/regression_tests.tcl b/docs/manpages/tclInterp/test/regression_tests.tcl new file mode 100644 index 00000000000..d17af6d3f83 --- /dev/null +++ b/docs/manpages/tclInterp/test/regression_tests.tcl @@ -0,0 +1,4 @@ +record_tests { + test_man_noflags + test_man_flags +} diff --git a/docs/manpages/tclInterp/test/test_man_flags.tcl b/docs/manpages/tclInterp/test/test_man_flags.tcl new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/manpages/tclInterp/test/test_man_noflags.ok b/docs/manpages/tclInterp/test/test_man_noflags.ok new file mode 100644 index 00000000000..514ec6c455e --- /dev/null +++ b/docs/manpages/tclInterp/test/test_man_noflags.ok @@ -0,0 +1 @@ +Successly run man without arguments. diff --git a/docs/manpages/tclInterp/test/test_man_noflags.tcl b/docs/manpages/tclInterp/test/test_man_noflags.tcl new file mode 100644 index 00000000000..7582525d07e --- /dev/null +++ b/docs/manpages/tclInterp/test/test_man_noflags.tcl @@ -0,0 +1,11 @@ +# Objective is to test man command with no arguments + +source main.tcl + +if {[catch {man man} result]} { + # An error occurred + puts "Error: $result" +} else { + # No error occurred + puts "Successly run man without arguments." +} \ No newline at end of file From b11769e4afef9b872eed05105204b5cdb0918eb0 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 12 Dec 2023 06:39:50 +0000 Subject: [PATCH 08/88] initial translator for roff format Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/codeSrc/main.cpp | 22 -- docs/manpages/man1/{template.1 => openroad.1} | 0 docs/manpages/man1/tess.1 | 140 ++++++++ docs/manpages/{tclInterp => scripts}/main.tcl | 0 docs/manpages/scripts/md_roff_compat.py | 112 ++++++ .../manpages/src/{template.md => openroad.md} | 0 docs/manpages/src/ppl.md | 321 ++++++++++++++++++ docs/manpages/tclInterp/CMakeLists.txt | 52 --- docs/manpages/tclInterp/cmake/FindTCL.cmake | 80 ----- docs/manpages/tclInterp/main.cpp | 17 - docs/manpages/{tclInterp => }/test/main.tcl | 0 .../{tclInterp => }/test/regression_tests.tcl | 0 .../{tclInterp => }/test/test_man_flags.tcl | 0 .../{tclInterp => }/test/test_man_noflags.ok | 0 .../{tclInterp => }/test/test_man_noflags.tcl | 0 15 files changed, 573 insertions(+), 171 deletions(-) delete mode 100644 docs/manpages/codeSrc/main.cpp rename docs/manpages/man1/{template.1 => openroad.1} (100%) create mode 100644 docs/manpages/man1/tess.1 rename docs/manpages/{tclInterp => scripts}/main.tcl (100%) create mode 100644 docs/manpages/scripts/md_roff_compat.py rename docs/manpages/src/{template.md => openroad.md} (100%) create mode 100644 docs/manpages/src/ppl.md delete mode 100644 docs/manpages/tclInterp/CMakeLists.txt delete mode 100644 docs/manpages/tclInterp/cmake/FindTCL.cmake delete mode 100644 docs/manpages/tclInterp/main.cpp rename docs/manpages/{tclInterp => }/test/main.tcl (100%) rename docs/manpages/{tclInterp => }/test/regression_tests.tcl (100%) rename docs/manpages/{tclInterp => }/test/test_man_flags.tcl (100%) rename docs/manpages/{tclInterp => }/test/test_man_noflags.ok (100%) rename docs/manpages/{tclInterp => }/test/test_man_noflags.tcl (100%) diff --git a/docs/manpages/codeSrc/main.cpp b/docs/manpages/codeSrc/main.cpp deleted file mode 100644 index aca3a5e0628..00000000000 --- a/docs/manpages/codeSrc/main.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include - -int main() { - // Replace "a.1" with the actual name of your compiled man page - const char* manPageName = "../man1/template.1"; - - // Construct the command to call 'man' on the compiled man page - std::string command = "man " + std::string(manPageName); - - // Use the system function to execute the 'man' command - int result = std::system(command.c_str()); - - // Check the result of the 'man' command - if (result == 0) { - // Success - return 0; - } else { - // Error - return 1; - } -} diff --git a/docs/manpages/man1/template.1 b/docs/manpages/man1/openroad.1 similarity index 100% rename from docs/manpages/man1/template.1 rename to docs/manpages/man1/openroad.1 diff --git a/docs/manpages/man1/tess.1 b/docs/manpages/man1/tess.1 new file mode 100644 index 00000000000..2aacfd18088 --- /dev/null +++ b/docs/manpages/man1/tess.1 @@ -0,0 +1,140 @@ +git-check-ref-format(1) +======================= + +NAME +---- +git-check-ref-format - Ensures that a reference name is well formed + +SYNOPSIS +-------- +[verse] +'git check-ref-format' [--normalize] + [--[no-]allow-onelevel] [--refspec-pattern] + +'git check-ref-format' --branch + +DESCRIPTION +----------- +Checks if a given 'refname' is acceptable, and exits with a non-zero +status if it is not. + +A reference is used in Git to specify branches and tags. A +branch head is stored in the `refs/heads` hierarchy, while +a tag is stored in the `refs/tags` hierarchy of the ref namespace +(typically in `$GIT_DIR/refs/heads` and `$GIT_DIR/refs/tags` +directories or, as entries in file `$GIT_DIR/packed-refs` +if refs are packed by `git gc`). + +Git imposes the following rules on how references are named: + +. They can include slash `/` for hierarchical (directory) + grouping, but no slash-separated component can begin with a + dot `.` or end with the sequence `.lock`. + +. They must contain at least one `/`. This enforces the presence of a + category like `heads/`, `tags/` etc. but the actual names are not + restricted. If the `--allow-onelevel` option is used, this rule + is waived. + +. They cannot have two consecutive dots `..` anywhere. + +. They cannot have ASCII control characters (i.e. bytes whose + values are lower than \040, or \177 `DEL`), space, tilde `~`, + caret `^`, or colon `:` anywhere. + +. They cannot have question-mark `?`, asterisk `*`, or open + bracket `[` anywhere. See the `--refspec-pattern` option below for + an exception to this rule. + +. They cannot begin or end with a slash `/` or contain multiple + consecutive slashes (see the `--normalize` option below for an + exception to this rule). + +. They cannot end with a dot `.`. + +. They cannot contain a sequence `@{`. + +. They cannot be the single character `@`. + +. They cannot contain a `\`. + +These rules make it easy for shell script based tools to parse +reference names, pathname expansion by the shell when a reference name is used +unquoted (by mistake), and also avoid ambiguities in certain +reference name expressions (see linkgit:gitrevisions[7]): + +. A double-dot `..` is often used as in `ref1..ref2`, and in some + contexts this notation means `^ref1 ref2` (i.e. not in + `ref1` and in `ref2`). + +. A tilde `~` and caret `^` are used to introduce the postfix + 'nth parent' and 'peel onion' operation. + +. A colon `:` is used as in `srcref:dstref` to mean "use srcref\'s + value and store it in dstref" in fetch and push operations. + It may also be used to select a specific object such as with + 'git cat-file': "git cat-file blob v1.3.3:refs.c". + +. at-open-brace `@{` is used as a notation to access a reflog entry. + +With the `--branch` option, the command takes a name and checks if +it can be used as a valid branch name (e.g. when creating a new +branch). But be cautious when using the +previous checkout syntax that may refer to a detached HEAD state. +The rule `git check-ref-format --branch $name` implements +may be stricter than what `git check-ref-format refs/heads/$name` +says (e.g. a dash may appear at the beginning of a ref component, +but it is explicitly forbidden at the beginning of a branch name). +When run with the `--branch` option in a repository, the input is first +expanded for the ``previous checkout syntax'' +`@{-n}`. For example, `@{-1}` is a way to refer the last thing that +was checked out using "git switch" or "git checkout" operation. +This option should be +used by porcelains to accept this syntax anywhere a branch name is +expected, so they can act as if you typed the branch name. As an +exception note that, the ``previous checkout operation'' might result +in a commit object name when the N-th last thing checked out was not +a branch. + +OPTIONS +------- +--[no-]allow-onelevel:: + Controls whether one-level refnames are accepted (i.e., + refnames that do not contain multiple `/`-separated + components). The default is `--no-allow-onelevel`. + +--refspec-pattern:: + Interpret as a reference name pattern for a refspec + (as used with remote repositories). If this option is + enabled, is allowed to contain a single `*` + in the refspec (e.g., `foo/bar*/baz` or `foo/bar*baz/` + but not `foo/bar*/baz*`). + +--normalize:: + Normalize 'refname' by removing any leading slash (`/`) + characters and collapsing runs of adjacent slashes between + name components into a single slash. If the normalized + refname is valid then print it to standard output and exit + with a status of 0, otherwise exit with a non-zero status. + (`--print` is a deprecated way to spell `--normalize`.) + + +EXAMPLES +-------- + +* Print the name of the previous thing checked out: ++ +------------ +$ git check-ref-format --branch @{-1} +------------ + +* Determine the reference name to use for a new branch: ++ +------------ +$ ref=$(git check-ref-format --normalize "refs/heads/$newbranch")|| +{ echo "we do not like '$newbranch' as a branch name." >&2 ; exit 1 ; } +------------ + +GIT +--- +Part of the linkgit:git[1] suite diff --git a/docs/manpages/tclInterp/main.tcl b/docs/manpages/scripts/main.tcl similarity index 100% rename from docs/manpages/tclInterp/main.tcl rename to docs/manpages/scripts/main.tcl diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py new file mode 100644 index 00000000000..a7db92ee390 --- /dev/null +++ b/docs/manpages/scripts/md_roff_compat.py @@ -0,0 +1,112 @@ +# Usage: +# cd /docs/manpages +# python md_roff_compat.py +import re + +# prototype with ppl docs. + +# original docs +#docs = ["../../src/ppl/README.md"] + +# edited docs +docs = ["./src/ppl.md"] + +# identify key section and stored in ManPage class. TODO. +class ManPage(): + def __init__(self): + self.function_name = "" + + pass + +def extract_headers(text, level = 1): + assert isinstance(level, int) and level >= 1 + pattern = r'^#{%d}\s+(.*)$' % level + headers = re.findall(pattern, text, flags=re.MULTILINE) + # TODO: Handle developer commands + headers.remove("Useful Developer Commands") + return headers + +def extract_description(text): + # this is so that it always tries to match the longer headers first, to disambiguate + sorted_headers = sorted(extract_headers(text,3), key=len, reverse=True) + headers = "|".join(re.escape(x) for x in sorted_headers) + pattern = rf'### ({headers})(.*?)```tcl' + custom_strings = re.findall(pattern, text, flags=re.DOTALL) + return [custom_string[1] for custom_string in custom_strings] + +def extract_tcl_code(text): + pattern = r'```tcl\s+(.*?)```' + tcl_code_matches = re.findall(pattern, text, flags=re.DOTALL) + # remove the last tcl match + tcl_code_matches = [x for x in tcl_code_matches if "./test/gcd.tcl" not in x] + return tcl_code_matches + +def extract_tables(text): + # Find all lines that start with "|" + table_pattern = r'^\s*\|.*$' + table_matches = re.findall(table_pattern, text, flags=re.MULTILINE) + + return table_matches + + + +# sections to populate +# 1) Header (starts and ends with ---) title, author, date +# 2) NAME +# 3) SYNOPSIS +# 4) DESCRIPTION +# 5) OPTIONS +# 6) ARGUMENTS +# 7) EXAMPLES +# 8) ENVIRONMENT +# 9) FILES +# 10) SEE ALSO +# 11) HISTORY +# 12) BUGS +# 13) COPYRIGHT + +for doc in docs: + text = open(doc).read() + + # function names + func_names = extract_headers(text, 3) + func_names = ["_".join(s.lower().split()) for s in func_names] + + # function description + func_descs = extract_description(text) + + # synopsis content + func_synopsis = extract_tcl_code(text) + + # switch names + switch_names = extract_tables(text) + idx = 0 + func_switches, tmp = [], [] + for s in switch_names: + # TODO: Handle developer commands + if "Command Name" in s: + break + if "Switch Name" in s: + if tmp: func_switches.append(tmp) + tmp = [] + tmp.append(s) + if tmp: func_switches.append(tmp) + +# grouping the parsed outputs together +results = [] +offset_switch_idx = 0 + +for func_id in range(len(func_synopsis)): + temp = {} + + temp["name"] = func_names[func_id] + temp["desc"] = func_descs[func_id] + + # logic if synopsis is one liner, it means that it has no switches + temp["synopsis"] = func_synopsis[func_id] + if len(temp["synopsis"]) == 3: offset_switch_idx += 1 + + temp["switches"] = func_switches[offset_switch_idx + func_id] + + results.append(temp) +print(len(results)) \ No newline at end of file diff --git a/docs/manpages/src/template.md b/docs/manpages/src/openroad.md similarity index 100% rename from docs/manpages/src/template.md rename to docs/manpages/src/openroad.md diff --git a/docs/manpages/src/ppl.md b/docs/manpages/src/ppl.md new file mode 100644 index 00000000000..c0310246e1f --- /dev/null +++ b/docs/manpages/src/ppl.md @@ -0,0 +1,321 @@ +# Pin Placer + +Place pins on the boundary of the die on the track grid to minimize net +wirelengths. Pin placement also creates a metal shape for each pin using +min-area rules. + +For designs with unplaced cells, the net wirelength is computed considering +the center of the die area as the unplaced cells' position. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Define Pin Shape Pattern + +The `define_pin_shape_pattern` command defines a pin placement grid on the +specified layer. This grid has positions inside the die area, not only at +the edges of the die boundary. + +```tcl +define_pin_shape_pattern + -layer layer + -x_step x_step + -y_step y_step + -region {llx lly urx ury} + -size {width height} + [-pin_keepout dist] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-layer` | The single top-most routing layer of the placement grid. | +| `-x_step`, `-y_step` | The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. | +| `-region` | The `{llx, lly, urx, ury}` region of the placement grid (in microns). | +| `-size` | The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. | +| `-pin_keepout` | The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. | + +#### Face-to-Face direct-bonding IOs + +The `define_pin_shape_pattern` command can be used to place pins in any metal +layer with the minimum allowed spacing to facilitate 3DIC integration of +chips using face-to-face packaging technologies. These technologies include +[micro bumps](https://semiengineering.com/bumps-vs-hybrid-bonding-for-advanced-packaging/) +and +[hybrid bonding](https://www.3dincites.com/2018/04/hybrid-bonding-from-concept-to-commercialization/) +for high density face-to-face interconnect. + +### Set IO Pin Constraint + +The `set_io_pin_constraint` command sets region constraints for pins according +to the pin direction or the pin name. This command can be called multiple +times with different constraints. + +You can use the `set_io_pin_constraint` command to restrict pins to the +pin placement grid created with the `define_pin_shape_pattern` command. + +It is possible to use the `-region`, `-group` and `-order` arguments together +per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be +called alone. + +```tcl +set_io_pin_constraint + [-direction direction] + [-pin_names names] + [-region edge:interval] + [-mirrored_pins names] + [-group] + [-order] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-direction` | Pin direction (`input`, `output`, `inout`, or `feedthrough`). | +| `-pin_names` | List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. | +| `-region` | Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. | +| `-mirrored_pins` | List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. | +| `-group` | Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. | +| `-order` | Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. | + +The `edge` values are (up, top, bottom, left, right), where `up` is +the grid created by `define_pin_shape_pattern`. To restrict pins to the +pin placement grid defined with `define_pin_shape_pattern` use: + +- `-region up:{llx lly urx ury}` to restrict the pins into a specific + region in the grid. The region is defined in microns. +- `-region up:*` to restrict the pins into the entire region of the grid. + +The `up` option is only available when the pin placement grid is created with +the `define_pin_shape_pattern` command. + +### Clear IO Pin Constraints + +The `clear_io_pin_constraints` command clears all the previously-defined +constraints and pin shape patterns created with `set_io_pin_constraint` or +`define_pin_shape_pattern`. + +```tcl +clear_io_pin_constraints +``` + +### Set Pin Length + +The `set_pin_length` command defines the length of all vertical and horizontal +pins. + +```tcl +set_pin_length + [-hor_length h_length] + [-ver_length v_length] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-hor_length` | The length (in microns) of the horizontal pins. | +| `-ver_length` | The length (in microns) of the vertical pins. | + +### Set Pin Length Extension + +The `set_pin_length_extension` command defines the an extension of the length +of all vertical and horizontal pins. Note that this command may generate pins +partially outside the die area. + +```tcl +set_pin_length_extension + [-hor_extension h_extension] + [-ver_extension v_extension] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-hor_extension` | The length (in microns) for the horizontal pins. | +| `-ver_extension` | The length (in microns) for the vertical pins. | + +### Set Pin Thick Multiplier + +The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all +vertical and horizontal pins. + +```tcl +set_pin_thick_multiplier + [-hor_multiplier h_mult] + [-ver_multiplier v_mult] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-hor_multiplier` | The thickness multiplier for the horizontal pins. | +| `-ver_multiplier` | The thickness multiplier for the vertical pins. | + +### Set Simulated Annealing Parameters + +The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. + +```tcl +set_simulated_annealing + [-temperature temperature] + [-max_iterations iter] + [-perturb_per_iter perturbs] + [-alpha alpha] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-temperature` | Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. | +| `-max_iterations` | The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. | +| `-perturb_per_iter` | The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | +| `-alpha` | The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. | + +### Place Pin + +The `place_pin` command places a specific pin in the specified location with the specified size. +It is recommended that individual pins be placed before the `place_pins` command, +as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. + +To place an individual pin: + +```tcl +place_pin + -pin_name pin_name + -layer layer + -location {x y} + [-pin_size {width height}] + [-force_to_die_boundary] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-pin_name` | The name of a pin of the design. | +| `-layer` | The routing layer where the pin is placed. | +| `-location` | The center of the pin (in microns). | +| `-pin_size` | Tthe width and height of the pin (in microns). | +| `-force_to_die_boundary` | When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. | + +### Place Pins + +The `place_pins` command places all pins together. Use the following command to perform pin placement: + +```tcl +place_pins + -hor_layers h_layers + -ver_layers v_layers + [-random_seed seed] + [-random] + [-corner_avoidance length] + [-min_distance distance] + [-min_distance_in_tracks] + [-exclude region] + [-group_pins pin_list] + [-annealing] + [-write_pin_placement file_name] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-hor_layers` | The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. | +| `-ver_layers` | The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. | +| `-corner_avoidance` | The distance (in microns) from each corner within which pin placement should be avoided. | +| `-min_distance` | The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. | +| `-min_distance_in_tracks` | Flag that allows setting the min distance in number of tracks instead of microns. | +| `-exclude` | A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. | +| `-group_pins` | A list of pins to be placed together on the die boundary. | +| `-annealing` | Flag to enable simulated annealing pin placement. | +| `-write_pin_placement` | A file with the pin placement generated in the format of multiple calls for the `place_pin` command. | + +The `exclude` option syntax is `-exclude edge:interval`. The `edge` values are +(top|bottom|left|right). The `interval` can be the whole edge, with the `*` +value, or a range of values. For example, in `place_pins -hor_layers metal2 +-ver_layers metal3 -exclude top:* -exclude right:15-60.5 -exclude left:*-50` +three intervals are excluded: the whole top edge, the right edge from 15 +microns to 60.5 microns, and the left edge from its beginning to 50 microns. + +#### Developer Arguments + +| Switch Name | Description | +| ----- | ----- | +| `-random_seed` | Specify the seed for random operations. | +| `-random` | When this flag is enabled, the pin placement is random. | + +### Write Pin Placement + +The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: + +```tcl +write_pin_placement + file_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `file_name` | The name of the file with the pin placement. | + +### Useful Developer Commands + +If you are a developer, you might find these useful. More details can be found in the [source file](./src/IOPlacer.cpp) or the [swig file](./src/IOPlacer.i). + +| Command Name | Description | +| ----- | ----- | +| `parse_edge` | Parse edge (top/bottom/left/right). | +| `parse_direction` | Parse direction. | +| `parse_excludes_arg` | Parse excluded arguments. | +| `parse_group_pins_arg` | Parse group pins arguments. | +| `parse_layer_name` | Parse layer name. | +| `parse_pin_names` | Parse pin names. | +| `get_edge_extreme` | Get extremes of edge. | +| `exclude_intervals` | Set exclude interval. | +| `add_pins_to_constraint` | Add pins to constrained region. | +| `add_pins_to_top_layer` | Add pins to top layer. | + +## Example scripts + +Example scripts of `ppl` running on a sample design of `gcd` as follows: + +```tcl +./test/gcd.tcl +``` + +## Regression tests + +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations + +## References + +- This code depends on [Munkres](src/munkres/README.txt). + +## FAQs + +Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+ioplacer+in%3Atitle) +about this tool. + +## License + +BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/tclInterp/CMakeLists.txt b/docs/manpages/tclInterp/CMakeLists.txt deleted file mode 100644 index 5c37ffe0f06..00000000000 --- a/docs/manpages/tclInterp/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -cmake_minimum_required(VERSION 3.16) -project(AAAA) - -################################################################ - -# OSX tcl is deprecated and prints a warning, so look for a user installed -# version before using the system version. -# I tried to override the library search order instead but failed. -# CMAKE_FIND_FRAMEWORK LAST bypasses the version in the framework directory -# but not the one in /usr/lib. -# This calls cmake/FindTCL.cmake -# Do not use REQUIRED because it also requires TK. -find_package(TCL) - -add_executable(main.o main.cpp) - -# check for tclReadline -set(TCL_READLINE_POSSIBLE_NAMES tclreadline-2.1.0 - tclreadline-2.3.2 tclreadline-2.3.6 tclreadline-2.3.7 tclreadline-2.3.8 - ) -find_library(TCL_READLINE_LIBRARY - NAMES tclreadline ${TCL_READLINE_POSSIBLE_NAMES} - PATHS ${TCL_LIB_PATHS} - ) -if (TCL_READLINE_LIBRARY) - message(STATUS "TCL readline library: ${TCL_READLINE_LIBRARY}") -endif() - -find_path(TCL_READLINE_H tclreadline.h) -if (TCL_READLINE_H) - message(STATUS "TCL readline header: ${TCL_READLINE_H}") -endif() - -option(BUILD_TCLX "Build with tclX included" ON) -set(TCLX_LIBRARY /usr/lib/libtclx8.4.so.0) -set(TCLX_H /usr/include/tclx8.4/tclExtend.h) -if (BUILD_TCLX AND TCLX_LIBRARY) - message(STATUS "TclX library: ${TCLX_LIBRARY}") -endif() -if (BUILD_TCLX AND TCLX_H) - message(STATUS "TclX header: ${TCLX_H}") -endif() - -target_link_libraries(main.o - ${TCL_LIBRARY} - ${TCL_READLINE_LIBRARY}) -#include_directories(/usr/include/tclx8.4) - -if (BUILD_TCLX AND TCLX_LIBRARY AND TCLX_H) - target_link_libraries(main.o ${TCLX_LIBRARY}) - target_include_directories(main.o PRIVATE /usr/include/tclx8.4) -endif() diff --git a/docs/manpages/tclInterp/cmake/FindTCL.cmake b/docs/manpages/tclInterp/cmake/FindTCL.cmake deleted file mode 100644 index 43ecc0b5f9f..00000000000 --- a/docs/manpages/tclInterp/cmake/FindTCL.cmake +++ /dev/null @@ -1,80 +0,0 @@ -# Copied from OpenSTA/cmake/FindTCL.cmake -# Copyright (c) 2021, Parallax Software, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -################################################################ -# -# Locate TCL library. -# -# Note that the cmake findTcl module is hopeless for OSX -# because there doesn't appear to be a way to override -# searching OSX system directories before unix directories. - -set(TCL_POSSIBLE_NAMES tcl87 tcl8.7 - tcl86 tcl8.6 - tcl85 tcl8.5 - tcl84 tcl8.4 - tcl83 tcl8.3 - tcl82 tcl8.2 - ) - -# tcl lib path guesses. -if (NOT TCL_LIB_PATHS) - if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(TCL_LIB_PATHS /usr/local/lib - /opt/homebrew/opt/tcl-tk/lib - /usr/local/opt/tcl-tk/lib - ) - set(TCL_NO_DEFAULT_PATH TRUE) - elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(TCL_LIB_PATHS /usr/lib /usr/local/lib) - set(TCL_NO_DEFAULT_PATH FALSE) - endif() -endif() - -if (NOT TCL_LIBRARY) - # bagbiter cmake doesn't have a way to pass NO_DEFAULT_PATH as a parameter. - if (TCL_NO_DEFAULT_PATH) - find_library(TCL_LIBRARY - NAMES tcl ${TCL_POSSIBLE_NAMES} - PATHS ${TCL_LIB_PATHS} - NO_DEFAULT_PATH - ) - else() - find_library(TCL_LIBRARY - NAMES tcl ${TCL_POSSIBLE_NAMES} - PATHS ${TCL_LIB_PATHS} - ) - endif() -endif() -message(STATUS "TCL library: ${TCL_LIBRARY}") - -get_filename_component(TCL_LIB_DIR "${TCL_LIBRARY}" PATH) -get_filename_component(TCL_LIB_PARENT1 "${TCL_LIB_DIR}" PATH) -get_filename_component(TCL_LIB_PARENT2 "${TCL_LIB_PARENT1}" PATH) - -# Locate tcl.h -if (NOT TCL_HEADER) - find_file(TCL_HEADER tcl.h - PATHS ${TCL_LIB_PARENT1} ${TCL_LIB_PARENT2} - PATH_SUFFIXES include include/tcl - NO_DEFAULT_PATH - ) -endif() -message(STATUS "TCL header: ${TCL_HEADER}") - -if (TCL_HEADER) - get_filename_component(TCL_INCLUDE_PATH "${TCL_HEADER}" PATH) -endif() \ No newline at end of file diff --git a/docs/manpages/tclInterp/main.cpp b/docs/manpages/tclInterp/main.cpp deleted file mode 100644 index befe50010ea..00000000000 --- a/docs/manpages/tclInterp/main.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include -#include - -// Minimal example of Tcl shell -int tclAppInit(Tcl_Interp* interp) -{ - return 0; -} - -int main(int argc, char* argv[]){ - // Setup the app with tcl - auto* interp = Tcl_CreateInterp(); - Tclx_Init(interp); - Tcl_Main(1, argv, tclAppInit); -} diff --git a/docs/manpages/tclInterp/test/main.tcl b/docs/manpages/test/main.tcl similarity index 100% rename from docs/manpages/tclInterp/test/main.tcl rename to docs/manpages/test/main.tcl diff --git a/docs/manpages/tclInterp/test/regression_tests.tcl b/docs/manpages/test/regression_tests.tcl similarity index 100% rename from docs/manpages/tclInterp/test/regression_tests.tcl rename to docs/manpages/test/regression_tests.tcl diff --git a/docs/manpages/tclInterp/test/test_man_flags.tcl b/docs/manpages/test/test_man_flags.tcl similarity index 100% rename from docs/manpages/tclInterp/test/test_man_flags.tcl rename to docs/manpages/test/test_man_flags.tcl diff --git a/docs/manpages/tclInterp/test/test_man_noflags.ok b/docs/manpages/test/test_man_noflags.ok similarity index 100% rename from docs/manpages/tclInterp/test/test_man_noflags.ok rename to docs/manpages/test/test_man_noflags.ok diff --git a/docs/manpages/tclInterp/test/test_man_noflags.tcl b/docs/manpages/test/test_man_noflags.tcl similarity index 100% rename from docs/manpages/tclInterp/test/test_man_noflags.tcl rename to docs/manpages/test/test_man_noflags.tcl From 2279cf79b2c902c9f664b6720d26d57406a1a98f Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:34:52 +0000 Subject: [PATCH 09/88] enable makefile for man1,2,3 compilation and first docs-to-roff translator Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/Makefile | 36 +++-- docs/manpages/man1/openroad.1 | 2 +- docs/manpages/man1/tess.1 | 140 ------------------ docs/manpages/man2/define_pin_shape_pattern.2 | 38 +++++ docs/manpages/{man1/aaaa.1 => man3/aaaa.3} | 0 docs/manpages/scripts/md_roff_compat.py | 113 +++++++++++--- docs/manpages/src/{ => man1}/openroad.md | 6 +- .../src/man2/define_pin_shape_pattern.md | 38 +++++ docs/manpages/src/{ppl.md => man2/ppl.txt} | 0 docs/manpages/src/{ => man3}/aaaa.md | 0 10 files changed, 195 insertions(+), 178 deletions(-) delete mode 100644 docs/manpages/man1/tess.1 create mode 100644 docs/manpages/man2/define_pin_shape_pattern.2 rename docs/manpages/{man1/aaaa.1 => man3/aaaa.3} (100%) rename docs/manpages/src/{ => man1}/openroad.md (91%) create mode 100644 docs/manpages/src/man2/define_pin_shape_pattern.md rename docs/manpages/src/{ppl.md => man2/ppl.txt} (100%) rename docs/manpages/src/{ => man3}/aaaa.md (100%) diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile index 69e633f4c44..e254590ce2f 100644 --- a/docs/manpages/Makefile +++ b/docs/manpages/Makefile @@ -3,28 +3,44 @@ # Define variables PANDOC = pandoc SRC_DIR = src -MAN_DIR = man1 -SRC_FILES = $(wildcard $(SRC_DIR)/*.md) -MAN_PAGES = $(patsubst $(SRC_DIR)/%.md,$(MAN_DIR)/%.1,$(SRC_FILES)) + +MAN1_DIR = man1 +MAN1_FILES = $(wildcard $(SRC_DIR)/$(MAN1_DIR)/*.md) +MAN1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) + +MAN2_DIR = man2 +MAN2_FILES = $(wildcard $(SRC_DIR)/$(MAN2_DIR)/*.md) +MAN2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) + +MAN3_DIR = man3 +MAN3_FILES = $(wildcard $(SRC_DIR)/$(MAN3_DIR)/*.md) +MAN3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) # Default target all: doc # Target to generate all man pages -doc: $(MAN_PAGES) +doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) # Rule to create the man directory -$(MAN_DIR): - mkdir -p $(MAN_DIR) +$(MAN1_DIR): + mkdir -p $(MAN1_DIR) +$(MAN2_DIR): + mkdir -p $(MAN2_DIR) +$(MAN3_DIR): + mkdir -p $(MAN3_DIR) # Rule to generate a man page from a corresponding Markdown file -$(MAN_DIR)/%.1: $(SRC_DIR)/%.md | $(MAN_DIR) +$(MAN1_DIR)/%.1: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(MAN1_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN2_DIR)/%.2: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN3_DIR)/%.3: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) $(PANDOC) -s -t man $< -o $@ # Clean target to remove all generated man pages clean: - rm -rf $(MAN_DIR) + rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) # Phony targets -.PHONY: all doc clean - +.PHONY: all doc clean \ No newline at end of file diff --git a/docs/manpages/man1/openroad.1 b/docs/manpages/man1/openroad.1 index dd8dda1a4c4..772eff1c987 100644 --- a/docs/manpages/man1/openroad.1 +++ b/docs/manpages/man1/openroad.1 @@ -15,7 +15,7 @@ openroad [-python] cmd_file .PP The \f[B]openroad\f[R] command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. -It provides a range of options to con\[hy] trol its behavior and execute +It provides a range of options to control its behavior and execute commands specified in the cmd_file. .SH OPTIONS .PP diff --git a/docs/manpages/man1/tess.1 b/docs/manpages/man1/tess.1 deleted file mode 100644 index 2aacfd18088..00000000000 --- a/docs/manpages/man1/tess.1 +++ /dev/null @@ -1,140 +0,0 @@ -git-check-ref-format(1) -======================= - -NAME ----- -git-check-ref-format - Ensures that a reference name is well formed - -SYNOPSIS --------- -[verse] -'git check-ref-format' [--normalize] - [--[no-]allow-onelevel] [--refspec-pattern] - -'git check-ref-format' --branch - -DESCRIPTION ------------ -Checks if a given 'refname' is acceptable, and exits with a non-zero -status if it is not. - -A reference is used in Git to specify branches and tags. A -branch head is stored in the `refs/heads` hierarchy, while -a tag is stored in the `refs/tags` hierarchy of the ref namespace -(typically in `$GIT_DIR/refs/heads` and `$GIT_DIR/refs/tags` -directories or, as entries in file `$GIT_DIR/packed-refs` -if refs are packed by `git gc`). - -Git imposes the following rules on how references are named: - -. They can include slash `/` for hierarchical (directory) - grouping, but no slash-separated component can begin with a - dot `.` or end with the sequence `.lock`. - -. They must contain at least one `/`. This enforces the presence of a - category like `heads/`, `tags/` etc. but the actual names are not - restricted. If the `--allow-onelevel` option is used, this rule - is waived. - -. They cannot have two consecutive dots `..` anywhere. - -. They cannot have ASCII control characters (i.e. bytes whose - values are lower than \040, or \177 `DEL`), space, tilde `~`, - caret `^`, or colon `:` anywhere. - -. They cannot have question-mark `?`, asterisk `*`, or open - bracket `[` anywhere. See the `--refspec-pattern` option below for - an exception to this rule. - -. They cannot begin or end with a slash `/` or contain multiple - consecutive slashes (see the `--normalize` option below for an - exception to this rule). - -. They cannot end with a dot `.`. - -. They cannot contain a sequence `@{`. - -. They cannot be the single character `@`. - -. They cannot contain a `\`. - -These rules make it easy for shell script based tools to parse -reference names, pathname expansion by the shell when a reference name is used -unquoted (by mistake), and also avoid ambiguities in certain -reference name expressions (see linkgit:gitrevisions[7]): - -. A double-dot `..` is often used as in `ref1..ref2`, and in some - contexts this notation means `^ref1 ref2` (i.e. not in - `ref1` and in `ref2`). - -. A tilde `~` and caret `^` are used to introduce the postfix - 'nth parent' and 'peel onion' operation. - -. A colon `:` is used as in `srcref:dstref` to mean "use srcref\'s - value and store it in dstref" in fetch and push operations. - It may also be used to select a specific object such as with - 'git cat-file': "git cat-file blob v1.3.3:refs.c". - -. at-open-brace `@{` is used as a notation to access a reflog entry. - -With the `--branch` option, the command takes a name and checks if -it can be used as a valid branch name (e.g. when creating a new -branch). But be cautious when using the -previous checkout syntax that may refer to a detached HEAD state. -The rule `git check-ref-format --branch $name` implements -may be stricter than what `git check-ref-format refs/heads/$name` -says (e.g. a dash may appear at the beginning of a ref component, -but it is explicitly forbidden at the beginning of a branch name). -When run with the `--branch` option in a repository, the input is first -expanded for the ``previous checkout syntax'' -`@{-n}`. For example, `@{-1}` is a way to refer the last thing that -was checked out using "git switch" or "git checkout" operation. -This option should be -used by porcelains to accept this syntax anywhere a branch name is -expected, so they can act as if you typed the branch name. As an -exception note that, the ``previous checkout operation'' might result -in a commit object name when the N-th last thing checked out was not -a branch. - -OPTIONS -------- ---[no-]allow-onelevel:: - Controls whether one-level refnames are accepted (i.e., - refnames that do not contain multiple `/`-separated - components). The default is `--no-allow-onelevel`. - ---refspec-pattern:: - Interpret as a reference name pattern for a refspec - (as used with remote repositories). If this option is - enabled, is allowed to contain a single `*` - in the refspec (e.g., `foo/bar*/baz` or `foo/bar*baz/` - but not `foo/bar*/baz*`). - ---normalize:: - Normalize 'refname' by removing any leading slash (`/`) - characters and collapsing runs of adjacent slashes between - name components into a single slash. If the normalized - refname is valid then print it to standard output and exit - with a status of 0, otherwise exit with a non-zero status. - (`--print` is a deprecated way to spell `--normalize`.) - - -EXAMPLES --------- - -* Print the name of the previous thing checked out: -+ ------------- -$ git check-ref-format --branch @{-1} ------------- - -* Determine the reference name to use for a new branch: -+ ------------- -$ ref=$(git check-ref-format --normalize "refs/heads/$newbranch")|| -{ echo "we do not like '$newbranch' as a branch name." >&2 ; exit 1 ; } ------------- - -GIT ---- -Part of the linkgit:git[1] suite diff --git a/docs/manpages/man2/define_pin_shape_pattern.2 b/docs/manpages/man2/define_pin_shape_pattern.2 new file mode 100644 index 00000000000..78a3bbac876 --- /dev/null +++ b/docs/manpages/man2/define_pin_shape_pattern.2 @@ -0,0 +1,38 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "define_pin_shape_pattern" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +define_pin_shape_pattern - define pin shape pattern +.SH SYNOPSIS +.PP +define_pin_shape_pattern -layer layer -x_step x_step -y_step y_step +-region {llx lly urx ury} -size {width height} [-pin_keepout dist] +.SH DESCRIPTION +.PP +The \f[C]define_pin_shape_pattern\f[R] command defines a pin placement +grid on the specified layer. +This grid has positions inside the die area, not only at the edges of +the die boundary. +.SH OPTIONS +.PP +\f[C]-layer\f[R]: The single top-most routing layer of the placement +grid. +.PP +\f[C]-x_step, -y_step\f[R]: The distance (in microns) between each valid +position on the grid in the x- and y-directions, respectively. +.PP +\f[C]-region\f[R]: The \f[C]{llx, lly, urx, ury}\f[R] region of the +placement grid (in microns). +.PP +\f[C]-size\f[R]: The width and height (in microns) of the pins assigned +to this grid. +The centers of the pins are placed on the grid positions. +Pins may have half of their shapes outside the defined region. +.PP +\f[C]-pin_keepout\f[R]: The boundary (in microns) around existing +routing obstructions that the pins should avoid; this defaults to the +\f[C]layer\f[R] minimum spacing. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man1/aaaa.1 b/docs/manpages/man3/aaaa.3 similarity index 100% rename from docs/manpages/man1/aaaa.1 rename to docs/manpages/man3/aaaa.3 diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index a7db92ee390..b1a54ed92c7 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -1,23 +1,81 @@ -# Usage: -# cd /docs/manpages -# python md_roff_compat.py -import re +""" +Usage: +cd /docs/manpages +python md_roff_compat.py +""" -# prototype with ppl docs. +import re +import io +import datetime # original docs #docs = ["../../src/ppl/README.md"] # edited docs -docs = ["./src/ppl.md"] +docs = ["./src/man2/ppl.txt"] # identify key section and stored in ManPage class. TODO. class ManPage(): def __init__(self): - self.function_name = "" - - pass - + self.name = "" + self.desc = "" + self.synopsis = "" + self.switches = {} + self.datetime = datetime.datetime.now().strftime("%y/%m/%d") + + def write_roff_file(self): + assert self.name, print("func name not set") + assert self.desc, print("func desc not set") + assert self.synopsis, print("func synopsis not set") + assert self.switches, print("func switches not set") + filepath = f"./src/{self.name}.md" + with open(filepath, "w") as f: + self.write_header(f) + self.write_name(f) + self.write_synopsis(f) + self.write_description(f) + self.write_options(f) + + def write_header(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"---\n") + f.write(f"title: {self.name}(2)\n") + f.write(f"author: Jack Luar (TODO@TODO.com)\n") + f.write(f"date: {self.datetime}\n") + f.write(f"---\n") + + def write_name(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# NAME\n\n") + f.write(f"{self.name} - {' '.join(self.name.split('_'))}\n") + + def write_synopsis(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# SYNOPSIS\n\n") + f.write(f"{self.synopsis}\n") + + + def write_description(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# DESCRIPTION\n\n") + f.write(f"{self.desc.strip()}\n") + + def write_options(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# OPTIONS\n") + for key, val in self.switches.items(): + f.write(f"\n`{key}`: {val}\n") + def extract_headers(text, level = 1): assert isinstance(level, int) and level >= 1 pattern = r'^#{%d}\s+(.*)$' % level @@ -89,24 +147,35 @@ def extract_tables(text): if "Switch Name" in s: if tmp: func_switches.append(tmp) tmp = [] - tmp.append(s) + tmp.append(s.strip()) if tmp: func_switches.append(tmp) # grouping the parsed outputs together -results = [] offset_switch_idx = 0 for func_id in range(len(func_synopsis)): - temp = {} + temp = ManPage() - temp["name"] = func_names[func_id] - temp["desc"] = func_descs[func_id] + temp.name = func_names[func_id] + temp.desc = func_descs[func_id] # logic if synopsis is one liner, it means that it has no switches - temp["synopsis"] = func_synopsis[func_id] - if len(temp["synopsis"]) == 3: offset_switch_idx += 1 - - temp["switches"] = func_switches[offset_switch_idx + func_id] - - results.append(temp) -print(len(results)) \ No newline at end of file + temp.synopsis = func_synopsis[func_id] + if len(temp.synopsis) == 3: offset_switch_idx += 1 + + switches = func_switches[offset_switch_idx + func_id] + switches_dict = {} + for idx, x in enumerate(switches): + if idx == 0 or idx == 1: continue + switch_name = x.split("|")[1] + # Find the index of the 2nd and last occurrence of "|". Since some content might contain "|" + second_pipe_index = x.find("|", x.find("|") + 1) + last_pipe_index = x.rfind("|") + switch_description = x[second_pipe_index+1: last_pipe_index-1] + switch_name = switch_name.replace("`", "").strip() + switches_dict[switch_name] = switch_description + temp.switches = switches_dict + temp.write_roff_file() + break + +print('Ok') \ No newline at end of file diff --git a/docs/manpages/src/openroad.md b/docs/manpages/src/man1/openroad.md similarity index 91% rename from docs/manpages/src/openroad.md rename to docs/manpages/src/man1/openroad.md index cbfe75d959b..174b7010260 100644 --- a/docs/manpages/src/openroad.md +++ b/docs/manpages/src/man1/openroad.md @@ -18,11 +18,7 @@ openroad [-python] cmd_file # DESCRIPTION -The **openroad** command is the command-line interface for -OpenROAD, an open-source initiative for chip design and -optimization. It provides a range of options to con‐ -trol its behavior and execute commands specified in the -cmd_file. +The **openroad** command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file. # OPTIONS diff --git a/docs/manpages/src/man2/define_pin_shape_pattern.md b/docs/manpages/src/man2/define_pin_shape_pattern.md new file mode 100644 index 00000000000..13c20cfbd2a --- /dev/null +++ b/docs/manpages/src/man2/define_pin_shape_pattern.md @@ -0,0 +1,38 @@ +--- +title: define_pin_shape_pattern(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +define_pin_shape_pattern - define pin shape pattern + +# SYNOPSIS + +define_pin_shape_pattern + -layer layer + -x_step x_step + -y_step y_step + -region {llx lly urx ury} + -size {width height} + [-pin_keepout dist] + + +# DESCRIPTION + +The `define_pin_shape_pattern` command defines a pin placement grid on the +specified layer. This grid has positions inside the die area, not only at +the edges of the die boundary. + +# OPTIONS + +`-layer`: The single top-most routing layer of the placement grid. + +`-x_step, -y_step`: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. + +`-region`: The `{llx, lly, urx, ury}` region of the placement grid (in microns). + +`-size`: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. + +`-pin_keepout`: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. diff --git a/docs/manpages/src/ppl.md b/docs/manpages/src/man2/ppl.txt similarity index 100% rename from docs/manpages/src/ppl.md rename to docs/manpages/src/man2/ppl.txt diff --git a/docs/manpages/src/aaaa.md b/docs/manpages/src/man3/aaaa.md similarity index 100% rename from docs/manpages/src/aaaa.md rename to docs/manpages/src/man3/aaaa.md From bda4e170d6f972f451cc22db7b352daec95bc091 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:55:03 +0000 Subject: [PATCH 10/88] cleanup, add in all functions from ppl Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/man1/openroad.1 | 3 +- docs/manpages/man2/clear_io_pin_constraints.2 | 33 +++++++++ docs/manpages/man2/define_pin_shape_pattern.2 | 11 +++ docs/manpages/man2/place_pin.2 | 66 ++++++++++++++++++ docs/manpages/man2/place_pins.2 | 36 ++++++++++ docs/manpages/man2/set_io_pin_constraint.2 | 67 +++++++++++++++++++ docs/manpages/man2/set_pin_length.2 | 33 +++++++++ docs/manpages/man2/set_pin_length_extension.2 | 36 ++++++++++ docs/manpages/man2/set_pin_thick_multiplier.2 | 45 +++++++++++++ .../man2/set_simulated_annealing_parameters.2 | 40 +++++++++++ docs/manpages/man2/write_pin_placement.2 | 31 +++++++++ docs/manpages/scripts/md_roff_compat.py | 49 +++++++------- docs/manpages/src/man1/openroad.md | 4 +- .../src/man2/clear_io_pin_constraints.md | 44 ++++++++++++ .../src/man2/define_pin_shape_pattern.md | 18 +++++ docs/manpages/src/man2/place_pin.md | 65 ++++++++++++++++++ docs/manpages/src/man2/place_pins.md | 53 +++++++++++++++ .../src/man2/set_io_pin_constraint.md | 65 ++++++++++++++++++ docs/manpages/src/man2/set_pin_length.md | 45 +++++++++++++ .../src/man2/set_pin_length_extension.md | 46 +++++++++++++ .../src/man2/set_pin_thick_multiplier.md | 49 ++++++++++++++ .../set_simulated_annealing_parameters.md | 52 ++++++++++++++ docs/manpages/src/man2/write_pin_placement.md | 41 ++++++++++++ 23 files changed, 903 insertions(+), 29 deletions(-) create mode 100644 docs/manpages/man2/clear_io_pin_constraints.2 create mode 100644 docs/manpages/man2/place_pin.2 create mode 100644 docs/manpages/man2/place_pins.2 create mode 100644 docs/manpages/man2/set_io_pin_constraint.2 create mode 100644 docs/manpages/man2/set_pin_length.2 create mode 100644 docs/manpages/man2/set_pin_length_extension.2 create mode 100644 docs/manpages/man2/set_pin_thick_multiplier.2 create mode 100644 docs/manpages/man2/set_simulated_annealing_parameters.2 create mode 100644 docs/manpages/man2/write_pin_placement.2 create mode 100644 docs/manpages/src/man2/clear_io_pin_constraints.md create mode 100644 docs/manpages/src/man2/place_pin.md create mode 100644 docs/manpages/src/man2/place_pins.md create mode 100644 docs/manpages/src/man2/set_io_pin_constraint.md create mode 100644 docs/manpages/src/man2/set_pin_length.md create mode 100644 docs/manpages/src/man2/set_pin_length_extension.md create mode 100644 docs/manpages/src/man2/set_pin_thick_multiplier.md create mode 100644 docs/manpages/src/man2/set_simulated_annealing_parameters.md create mode 100644 docs/manpages/src/man2/write_pin_placement.md diff --git a/docs/manpages/man1/openroad.1 b/docs/manpages/man1/openroad.1 index 772eff1c987..4daa0c4716b 100644 --- a/docs/manpages/man1/openroad.1 +++ b/docs/manpages/man1/openroad.1 @@ -121,8 +121,7 @@ database. .SH BUGS .SH COPYRIGHT .PP -Copyright (c) 2023, The Regents of the University of California. -.PP +Copyright (c) 2024, The Regents of the University of California. All rights reserved. .SH AUTHORS Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/clear_io_pin_constraints.2 b/docs/manpages/man2/clear_io_pin_constraints.2 new file mode 100644 index 00000000000..768fa0532b6 --- /dev/null +++ b/docs/manpages/man2/clear_io_pin_constraints.2 @@ -0,0 +1,33 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "clear_io_pin_constraints" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +clear_io_pin_constraints - clear io pin constraints +.SH SYNOPSIS +.PP +clear_io_pin_constraints +.SH DESCRIPTION +.PP +The \f[C]clear_io_pin_constraints\f[R] command clears all the +previously-defined constraints and pin shape patterns created with +\f[C]set_io_pin_constraint\f[R] or \f[C]define_pin_shape_pattern\f[R]. +.SH OPTIONS +.PP +\f[C]-hor_length\f[R]: The length (in microns) of the horizontal pins. +.PP +\f[C]-ver_length\f[R]: The length (in microns) of the vertical pins. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/define_pin_shape_pattern.2 b/docs/manpages/man2/define_pin_shape_pattern.2 index 78a3bbac876..613cc03b256 100644 --- a/docs/manpages/man2/define_pin_shape_pattern.2 +++ b/docs/manpages/man2/define_pin_shape_pattern.2 @@ -34,5 +34,16 @@ Pins may have half of their shapes outside the defined region. \f[C]-pin_keepout\f[R]: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the \f[C]layer\f[R] minimum spacing. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. .SH AUTHORS Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/place_pin.2 b/docs/manpages/man2/place_pin.2 new file mode 100644 index 00000000000..efe0118be6d --- /dev/null +++ b/docs/manpages/man2/place_pin.2 @@ -0,0 +1,66 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "place_pin" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +place_pin - place pin +.SH SYNOPSIS +.PP +place_pin -pin_name pin_name -layer layer -location {x y} [-pin_size +{width height}] [-force_to_die_boundary] +.SH DESCRIPTION +.PP +The \f[C]place_pin\f[R] command places a specific pin in the specified +location with the specified size. +It is recommended that individual pins be placed before the +\f[C]place_pins\f[R] command, as the routing tracks occupied by these +individual pins will be blocked, preventing overlaps. +.PP +To place an individual pin: +.SH OPTIONS +.PP +\f[C]-hor_layers\f[R]: The layers to create the metal shapes of pins +placed in horizontal tracks. +It can be a single layer or a list of layer names. +.PP +\f[C]-ver_layers\f[R]: The layers to create the metal shapes of pins +placed in vertical tracks. +It can be a single layer or a list of layer names. +.PP +\f[C]-corner_avoidance\f[R]: The distance (in microns) from each corner +within which pin placement should be avoided. +.PP +\f[C]-min_distance\f[R]: The minimum distance between pins on the die +boundary. +This distance can be in microns (default) or in number of tracks between +each pin. +.PP +\f[C]-min_distance_in_tracks\f[R]: Flag that allows setting the min +distance in number of tracks instead of microns. +.PP +\f[C]-exclude\f[R]: A region where pins cannot be placed. +Either \f[C]top|bottom|left|right:edge_interval\f[R], which is the edge +interval from the selected edge; \f[C]begin:end\f[R] for begin-end of +all edges. +.PP +\f[C]-group_pins\f[R]: A list of pins to be placed together on the die +boundary. +.PP +\f[C]-annealing\f[R]: Flag to enable simulated annealing pin placement. +.PP +\f[C]-write_pin_placement\f[R]: A file with the pin placement generated +in the format of multiple calls for the \f[C]place_pin\f[R] command. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/place_pins.2 b/docs/manpages/man2/place_pins.2 new file mode 100644 index 00000000000..27db42cd2d9 --- /dev/null +++ b/docs/manpages/man2/place_pins.2 @@ -0,0 +1,36 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "place_pins" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +place_pins - place pins +.SH SYNOPSIS +.PP +place_pins -hor_layers h_layers -ver_layers v_layers [-random_seed seed] +[-random] [-corner_avoidance length] [-min_distance distance] +[-min_distance_in_tracks] [-exclude region] [-group_pins pin_list] +[-annealing] [-write_pin_placement file_name] +.SH DESCRIPTION +.PP +The \f[C]place_pins\f[R] command places all pins together. +Use the following command to perform pin placement: +.SH OPTIONS +.PP +\f[C]-random_seed\f[R]: Specify the seed for random operations. +.PP +\f[C]-random\f[R]: When this flag is enabled, the pin placement is +random. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/set_io_pin_constraint.2 b/docs/manpages/man2/set_io_pin_constraint.2 new file mode 100644 index 00000000000..7baa1156d09 --- /dev/null +++ b/docs/manpages/man2/set_io_pin_constraint.2 @@ -0,0 +1,67 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "set_io_pin_constraint" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +set_io_pin_constraint - set io pin constraint +.SH SYNOPSIS +.PP +set_io_pin_constraint [-direction direction] [-pin_names names] [-region +edge:interval] [-mirrored_pins names] [-group] [-order] +.SH DESCRIPTION +.PP +The \f[C]set_io_pin_constraint\f[R] command sets region constraints for +pins according to the pin direction or the pin name. +This command can be called multiple times with different constraints. +.PP +You can use the \f[C]set_io_pin_constraint\f[R] command to restrict pins +to the pin placement grid created with the +\f[C]define_pin_shape_pattern\f[R] command. +.PP +It is possible to use the \f[C]-region\f[R], \f[C]-group\f[R] and +\f[C]-order\f[R] arguments together per \f[C]set_io_pin_constraint\f[R] +call, but the \f[C]-mirrored_pins\f[R] argument should be called alone. +.SH OPTIONS +.PP +\f[C]-direction\f[R]: Pin direction (\f[C]input\f[R], \f[C]output\f[R], +\f[C]inout\f[R], or \f[C]feedthrough\f[R]). +.PP +\f[C]-pin_names\f[R]: List of names. +Only one of (\f[C]-direction\f[R], \f[C]-pin_names\f[R]) should be used +in a single call for the \f[C]set_io_pin_constraint\f[R] command. +.PP +\f[C]-region\f[R]: Syntax is \f[C]-region edge:interval\f[R]. +The \f[C]edge\f[R] values are (\f[C]top|bottom|left|right\f[R]). +The \f[C]interval\f[R] can be the whole edge with the wildcard +\f[C]*\f[R] value or a range of values. +.PP +\f[C]-mirrored_pins\f[R]: List of pins that sets pairs of pins that will +be symmetrically placed in the vertical or the horizontal edges. +The number of pins in this list \f[B]must be even\f[R]. +For example, in +\f[C]set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}\f[R], +the pins \f[C]pin1\f[R] and \f[C]pin2\f[R] will be placed symmetrically +to each other. +Same for \f[C]pin3\f[R] and \f[C]pin4\f[R], and for \f[C]pin5\f[R] and +\f[C]pin6\f[R]. +.PP +\f[C]-group\f[R]: Flag places together on the die boundary the pin list +defined in \f[C]-pin_names,\f[R] similar to the \f[C]-group_pins\f[R] +option on the \f[C]place_pins\f[R] command. +.PP +\f[C]-order\f[R]: Flag places the pins ordered in ascending x/y position +and must be used only when \f[C]-group\f[R] is also used. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/set_pin_length.2 b/docs/manpages/man2/set_pin_length.2 new file mode 100644 index 00000000000..52225588d97 --- /dev/null +++ b/docs/manpages/man2/set_pin_length.2 @@ -0,0 +1,33 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "set_pin_length" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +set_pin_length - set pin length +.SH SYNOPSIS +.PP +set_pin_length [-hor_length h_length] [-ver_length v_length] +.SH DESCRIPTION +.PP +The \f[C]set_pin_length\f[R] command defines the length of all vertical +and horizontal pins. +.SH OPTIONS +.PP +\f[C]-hor_extension\f[R]: The length (in microns) for the horizontal +pins. +.PP +\f[C]-ver_extension\f[R]: The length (in microns) for the vertical pins. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/set_pin_length_extension.2 b/docs/manpages/man2/set_pin_length_extension.2 new file mode 100644 index 00000000000..544e5e568e3 --- /dev/null +++ b/docs/manpages/man2/set_pin_length_extension.2 @@ -0,0 +1,36 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "set_pin_length_extension" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +set_pin_length_extension - set pin length extension +.SH SYNOPSIS +.PP +set_pin_length_extension [-hor_extension h_extension] [-ver_extension +v_extension] +.SH DESCRIPTION +.PP +The \f[C]set_pin_length_extension\f[R] command defines the an extension +of the length of all vertical and horizontal pins. +Note that this command may generate pins partially outside the die area. +.SH OPTIONS +.PP +\f[C]-hor_multiplier\f[R]: The thickness multiplier for the horizontal +pins. +.PP +\f[C]-ver_multiplier\f[R]: The thickness multiplier for the vertical +pins. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/set_pin_thick_multiplier.2 b/docs/manpages/man2/set_pin_thick_multiplier.2 new file mode 100644 index 00000000000..1bef149bae9 --- /dev/null +++ b/docs/manpages/man2/set_pin_thick_multiplier.2 @@ -0,0 +1,45 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "set_pin_thick_multiplier" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +set_pin_thick_multiplier - set pin thick multiplier +.SH SYNOPSIS +.PP +set_pin_thick_multiplier [-hor_multiplier h_mult] [-ver_multiplier +v_mult] +.SH DESCRIPTION +.PP +The \f[C]set_pin_thick_multiplier\f[R] command defines a multiplier for +the thickness of all vertical and horizontal pins. +.SH OPTIONS +.PP +\f[C]-temperature\f[R]: Temperature parameter. +The default value is \f[C]1.0\f[R], and the allowed values are floats +\f[C][0, MAX_FLOAT]\f[R]. +.PP +\f[C]-max_iterations\f[R]: The maximum number of iterations. +The default value is \f[C]2000\f[R], and the allowed values are integers +\f[C][0, MAX_INT]\f[R]. +.PP +\f[C]-perturb_per_iter\f[R]: The number of perturbations per iteration. +The default value is \f[C]0\f[R], and the allowed values are integers +\f[C][0, MAX_INT]\f[R]. +.PP +\f[C]-alpha\f[R]: The temperature decay factor. +The default value is \f[C]0.985\f[R], and the allowed values are floats +\f[C](0, 1]\f[R]. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/set_simulated_annealing_parameters.2 b/docs/manpages/man2/set_simulated_annealing_parameters.2 new file mode 100644 index 00000000000..049dcad85c6 --- /dev/null +++ b/docs/manpages/man2/set_simulated_annealing_parameters.2 @@ -0,0 +1,40 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "set_simulated_annealing_parameters" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +set_simulated_annealing_parameters - set simulated annealing parameters +.SH SYNOPSIS +.PP +set_simulated_annealing [-temperature temperature] [-max_iterations +iter] [-perturb_per_iter perturbs] [-alpha alpha] +.SH DESCRIPTION +.PP +The \f[C]set_simulated_annealing\f[R] command defines the parameters for +simulated annealing pin placement. +.SH OPTIONS +.PP +\f[C]-pin_name\f[R]: The name of a pin of the design. +.PP +\f[C]-layer\f[R]: The routing layer where the pin is placed. +.PP +\f[C]-location\f[R]: The center of the pin (in microns). +.PP +\f[C]-pin_size\f[R]: Tthe width and height of the pin (in microns). +.PP +\f[C]-force_to_die_boundary\f[R]: When this flag is enabled, the pin +will be snapped to the nearest routing track, next to the die boundary. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man2/write_pin_placement.2 b/docs/manpages/man2/write_pin_placement.2 new file mode 100644 index 00000000000..80858e53c52 --- /dev/null +++ b/docs/manpages/man2/write_pin_placement.2 @@ -0,0 +1,31 @@ +.\" Automatically generated by Pandoc 2.9.2.1 +.\" +.TH "write_pin_placement" "2" "23/12/13" "" "" +.hy +.SH NAME +.PP +write_pin_placement - write pin placement +.SH SYNOPSIS +.PP +write_pin_placement file_name +.SH DESCRIPTION +.PP +The \f[C]write_pin_placement\f[R] command writes a file with the pin +placement in the format of multiple calls for the \f[C]place_pin\f[R] +command: +.SH OPTIONS +.PP +\f[C]file_name\f[R]: The name of the file with the pin placement. +.SH ARGUMENTS +.SH EXAMPLES +.SH ENVIRONMENT +.SH FILES +.SH SEE ALSO +.SH HISTORY +.SH BUGS +.SH COPYRIGHT +.PP +Copyright (c) 2024, The Regents of the University of California. +All rights reserved. +.SH AUTHORS +Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index b1a54ed92c7..a90d951368f 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -14,7 +14,7 @@ # edited docs docs = ["./src/man2/ppl.txt"] -# identify key section and stored in ManPage class. TODO. +# identify key section and stored in ManPage class. class ManPage(): def __init__(self): self.name = "" @@ -28,13 +28,15 @@ def write_roff_file(self): assert self.desc, print("func desc not set") assert self.synopsis, print("func synopsis not set") assert self.switches, print("func switches not set") - filepath = f"./src/{self.name}.md" + filepath = f"./src/man2/{self.name}.md" with open(filepath, "w") as f: self.write_header(f) self.write_name(f) self.write_synopsis(f) self.write_description(f) self.write_options(f) + self.write_placeholder(f) #TODO. + self.write_copyright(f) def write_header(self, f): assert isinstance(f, io.TextIOBase) and\ @@ -66,7 +68,7 @@ def write_description(self, f): f.writable(), "File pointer is not open for writing." f.write(f"\n# DESCRIPTION\n\n") - f.write(f"{self.desc.strip()}\n") + f.write(f"{self.desc}\n") def write_options(self, f): assert isinstance(f, io.TextIOBase) and\ @@ -75,7 +77,24 @@ def write_options(self, f): f.write(f"\n# OPTIONS\n") for key, val in self.switches.items(): f.write(f"\n`{key}`: {val}\n") - + + def write_placeholder(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + # TODO: these are all not populated currently, not parseable from docs. + # TODO: Arguments can actually be parsed, but you need to preprocess the synopsis further. + sections = ["ARGUMENTS", "EXAMPLES", "ENVIRONMENT", "FILES", "SEE ALSO", "HISTORY", "BUGS"] + for s in sections: + f.write(f"\n# {s}\n") + + def write_copyright(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# COPYRIGHT\n\n") + f.write(f"Copyright (c) 2024, The Regents of the University of California. All rights reserved.\n") + def extract_headers(text, level = 1): assert isinstance(level, int) and level >= 1 pattern = r'^#{%d}\s+(.*)$' % level @@ -90,7 +109,7 @@ def extract_description(text): headers = "|".join(re.escape(x) for x in sorted_headers) pattern = rf'### ({headers})(.*?)```tcl' custom_strings = re.findall(pattern, text, flags=re.DOTALL) - return [custom_string[1] for custom_string in custom_strings] + return [custom_string[1].strip() for custom_string in custom_strings] def extract_tcl_code(text): pattern = r'```tcl\s+(.*?)```' @@ -106,23 +125,6 @@ def extract_tables(text): return table_matches - - -# sections to populate -# 1) Header (starts and ends with ---) title, author, date -# 2) NAME -# 3) SYNOPSIS -# 4) DESCRIPTION -# 5) OPTIONS -# 6) ARGUMENTS -# 7) EXAMPLES -# 8) ENVIRONMENT -# 9) FILES -# 10) SEE ALSO -# 11) HISTORY -# 12) BUGS -# 13) COPYRIGHT - for doc in docs: text = open(doc).read() @@ -136,7 +138,7 @@ def extract_tables(text): # synopsis content func_synopsis = extract_tcl_code(text) - # switch names + # switch names (TODO: needs refactoring...) switch_names = extract_tables(text) idx = 0 func_switches, tmp = [], [] @@ -176,6 +178,5 @@ def extract_tables(text): switches_dict[switch_name] = switch_description temp.switches = switches_dict temp.write_roff_file() - break print('Ok') \ No newline at end of file diff --git a/docs/manpages/src/man1/openroad.md b/docs/manpages/src/man1/openroad.md index 174b7010260..c55d5ecfc7e 100644 --- a/docs/manpages/src/man1/openroad.md +++ b/docs/manpages/src/man1/openroad.md @@ -113,6 +113,4 @@ OpenROAD binary. # COPYRIGHT -Copyright (c) 2023, The Regents of the University of California. - -All rights reserved. \ No newline at end of file +Copyright (c) 2024, The Regents of the University of California. All rights reserved. \ No newline at end of file diff --git a/docs/manpages/src/man2/clear_io_pin_constraints.md b/docs/manpages/src/man2/clear_io_pin_constraints.md new file mode 100644 index 00000000000..3a2bf160bfe --- /dev/null +++ b/docs/manpages/src/man2/clear_io_pin_constraints.md @@ -0,0 +1,44 @@ +--- +title: clear_io_pin_constraints(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +clear_io_pin_constraints - clear io pin constraints + +# SYNOPSIS + +clear_io_pin_constraints + + +# DESCRIPTION + +The `clear_io_pin_constraints` command clears all the previously-defined +constraints and pin shape patterns created with `set_io_pin_constraint` or +`define_pin_shape_pattern`. + +# OPTIONS + +`-hor_length`: The length (in microns) of the horizontal pins. + +`-ver_length`: The length (in microns) of the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/define_pin_shape_pattern.md b/docs/manpages/src/man2/define_pin_shape_pattern.md index 13c20cfbd2a..0acdbdb792c 100644 --- a/docs/manpages/src/man2/define_pin_shape_pattern.md +++ b/docs/manpages/src/man2/define_pin_shape_pattern.md @@ -36,3 +36,21 @@ the edges of the die boundary. `-size`: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. `-pin_keepout`: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/place_pin.md b/docs/manpages/src/man2/place_pin.md new file mode 100644 index 00000000000..ddcfd99038c --- /dev/null +++ b/docs/manpages/src/man2/place_pin.md @@ -0,0 +1,65 @@ +--- +title: place_pin(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +place_pin - place pin + +# SYNOPSIS + +place_pin + -pin_name pin_name + -layer layer + -location {x y} + [-pin_size {width height}] + [-force_to_die_boundary] + + +# DESCRIPTION + +The `place_pin` command places a specific pin in the specified location with the specified size. +It is recommended that individual pins be placed before the `place_pins` command, +as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. + +To place an individual pin: + +# OPTIONS + +`-hor_layers`: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. + +`-ver_layers`: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. + +`-corner_avoidance`: The distance (in microns) from each corner within which pin placement should be avoided. + +`-min_distance`: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. + +`-min_distance_in_tracks`: Flag that allows setting the min distance in number of tracks instead of microns. + +`-exclude`: A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. + +`-group_pins`: A list of pins to be placed together on the die boundary. + +`-annealing`: Flag to enable simulated annealing pin placement. + +`-write_pin_placement`: A file with the pin placement generated in the format of multiple calls for the `place_pin` command. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/place_pins.md b/docs/manpages/src/man2/place_pins.md new file mode 100644 index 00000000000..249ef80b200 --- /dev/null +++ b/docs/manpages/src/man2/place_pins.md @@ -0,0 +1,53 @@ +--- +title: place_pins(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +place_pins - place pins + +# SYNOPSIS + +place_pins + -hor_layers h_layers + -ver_layers v_layers + [-random_seed seed] + [-random] + [-corner_avoidance length] + [-min_distance distance] + [-min_distance_in_tracks] + [-exclude region] + [-group_pins pin_list] + [-annealing] + [-write_pin_placement file_name] + + +# DESCRIPTION + +The `place_pins` command places all pins together. Use the following command to perform pin placement: + +# OPTIONS + +`-random_seed`: Specify the seed for random operations. + +`-random`: When this flag is enabled, the pin placement is random. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/set_io_pin_constraint.md b/docs/manpages/src/man2/set_io_pin_constraint.md new file mode 100644 index 00000000000..013c94977ad --- /dev/null +++ b/docs/manpages/src/man2/set_io_pin_constraint.md @@ -0,0 +1,65 @@ +--- +title: set_io_pin_constraint(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +set_io_pin_constraint - set io pin constraint + +# SYNOPSIS + +set_io_pin_constraint + [-direction direction] + [-pin_names names] + [-region edge:interval] + [-mirrored_pins names] + [-group] + [-order] + + +# DESCRIPTION + +The `set_io_pin_constraint` command sets region constraints for pins according +to the pin direction or the pin name. This command can be called multiple +times with different constraints. + +You can use the `set_io_pin_constraint` command to restrict pins to the +pin placement grid created with the `define_pin_shape_pattern` command. + +It is possible to use the `-region`, `-group` and `-order` arguments together +per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be +called alone. + +# OPTIONS + +`-direction`: Pin direction (`input`, `output`, `inout`, or `feedthrough`). + +`-pin_names`: List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. + +`-region`: Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. + +`-mirrored_pins`: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. + +`-group`: Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. + +`-order`: Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/set_pin_length.md b/docs/manpages/src/man2/set_pin_length.md new file mode 100644 index 00000000000..93551370197 --- /dev/null +++ b/docs/manpages/src/man2/set_pin_length.md @@ -0,0 +1,45 @@ +--- +title: set_pin_length(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +set_pin_length - set pin length + +# SYNOPSIS + +set_pin_length + [-hor_length h_length] + [-ver_length v_length] + + +# DESCRIPTION + +The `set_pin_length` command defines the length of all vertical and horizontal +pins. + +# OPTIONS + +`-hor_extension`: The length (in microns) for the horizontal pins. + +`-ver_extension`: The length (in microns) for the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/set_pin_length_extension.md b/docs/manpages/src/man2/set_pin_length_extension.md new file mode 100644 index 00000000000..d944db5e504 --- /dev/null +++ b/docs/manpages/src/man2/set_pin_length_extension.md @@ -0,0 +1,46 @@ +--- +title: set_pin_length_extension(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +set_pin_length_extension - set pin length extension + +# SYNOPSIS + +set_pin_length_extension + [-hor_extension h_extension] + [-ver_extension v_extension] + + +# DESCRIPTION + +The `set_pin_length_extension` command defines the an extension of the length +of all vertical and horizontal pins. Note that this command may generate pins +partially outside the die area. + +# OPTIONS + +`-hor_multiplier`: The thickness multiplier for the horizontal pins. + +`-ver_multiplier`: The thickness multiplier for the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/set_pin_thick_multiplier.md b/docs/manpages/src/man2/set_pin_thick_multiplier.md new file mode 100644 index 00000000000..5450622e4f9 --- /dev/null +++ b/docs/manpages/src/man2/set_pin_thick_multiplier.md @@ -0,0 +1,49 @@ +--- +title: set_pin_thick_multiplier(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +set_pin_thick_multiplier - set pin thick multiplier + +# SYNOPSIS + +set_pin_thick_multiplier + [-hor_multiplier h_mult] + [-ver_multiplier v_mult] + + +# DESCRIPTION + +The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all +vertical and horizontal pins. + +# OPTIONS + +`-temperature`: Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. + +`-max_iterations`: The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. + +`-perturb_per_iter`: The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. + +`-alpha`: The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/set_simulated_annealing_parameters.md b/docs/manpages/src/man2/set_simulated_annealing_parameters.md new file mode 100644 index 00000000000..366bc3a8ae2 --- /dev/null +++ b/docs/manpages/src/man2/set_simulated_annealing_parameters.md @@ -0,0 +1,52 @@ +--- +title: set_simulated_annealing_parameters(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +set_simulated_annealing_parameters - set simulated annealing parameters + +# SYNOPSIS + +set_simulated_annealing + [-temperature temperature] + [-max_iterations iter] + [-perturb_per_iter perturbs] + [-alpha alpha] + + +# DESCRIPTION + +The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. + +# OPTIONS + +`-pin_name`: The name of a pin of the design. + +`-layer`: The routing layer where the pin is placed. + +`-location`: The center of the pin (in microns). + +`-pin_size`: Tthe width and height of the pin (in microns). + +`-force_to_die_boundary`: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/src/man2/write_pin_placement.md b/docs/manpages/src/man2/write_pin_placement.md new file mode 100644 index 00000000000..97debe8d9a8 --- /dev/null +++ b/docs/manpages/src/man2/write_pin_placement.md @@ -0,0 +1,41 @@ +--- +title: write_pin_placement(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/13 +--- + +# NAME + +write_pin_placement - write pin placement + +# SYNOPSIS + +write_pin_placement + file_name + + +# DESCRIPTION + +The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: + +# OPTIONS + +`file_name`: The name of the file with the pin placement. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. From 5f32378f5ae804e85a587925243ae8f128aaf57a Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 17 Dec 2023 10:42:02 +0000 Subject: [PATCH 11/88] first prototype for func test Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/.gitignore | 1 + docs/manpages/man2/clear_io_pin_constraints.2 | 2 +- docs/manpages/man2/define_pin_shape_pattern.2 | 2 +- docs/manpages/man2/place_pin.2 | 2 +- docs/manpages/man2/place_pins.2 | 2 +- docs/manpages/man2/set_io_pin_constraint.2 | 2 +- docs/manpages/man2/set_pin_length.2 | 2 +- docs/manpages/man2/set_pin_length_extension.2 | 2 +- docs/manpages/man2/set_pin_thick_multiplier.2 | 2 +- .../man2/set_simulated_annealing_parameters.2 | 2 +- docs/manpages/man2/write_pin_placement.2 | 2 +- docs/manpages/scripts/md_roff_compat.py | 113 +++++++++--------- .../src/man2/clear_io_pin_constraints.md | 2 +- .../src/man2/define_pin_shape_pattern.md | 2 +- docs/manpages/src/man2/place_pin.md | 2 +- docs/manpages/src/man2/place_pins.md | 2 +- .../src/man2/set_io_pin_constraint.md | 2 +- docs/manpages/src/man2/set_pin_length.md | 2 +- .../src/man2/set_pin_length_extension.md | 2 +- .../src/man2/set_pin_thick_multiplier.md | 2 +- .../set_simulated_annealing_parameters.md | 2 +- docs/manpages/src/man2/write_pin_placement.md | 2 +- docs/manpages/test/func.ok | 2 + docs/manpages/test/func.py | 28 +++++ docs/manpages/test/helpers.py | 1 + docs/manpages/test/helpers.tcl | 1 + docs/manpages/test/main.tcl | 2 +- docs/manpages/test/ppl.funcok | 10 ++ docs/manpages/test/regression | 1 + docs/manpages/test/regression_tests.tcl | 3 +- 30 files changed, 123 insertions(+), 79 deletions(-) create mode 100644 docs/manpages/.gitignore create mode 100644 docs/manpages/test/func.ok create mode 100644 docs/manpages/test/func.py create mode 120000 docs/manpages/test/helpers.py create mode 120000 docs/manpages/test/helpers.tcl create mode 100644 docs/manpages/test/ppl.funcok create mode 120000 docs/manpages/test/regression diff --git a/docs/manpages/.gitignore b/docs/manpages/.gitignore new file mode 100644 index 00000000000..f820cf945b4 --- /dev/null +++ b/docs/manpages/.gitignore @@ -0,0 +1 @@ +test/results diff --git a/docs/manpages/man2/clear_io_pin_constraints.2 b/docs/manpages/man2/clear_io_pin_constraints.2 index 768fa0532b6..d5ac398bc8b 100644 --- a/docs/manpages/man2/clear_io_pin_constraints.2 +++ b/docs/manpages/man2/clear_io_pin_constraints.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "clear_io_pin_constraints" "2" "23/12/13" "" "" +.TH "clear_io_pin_constraints" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/define_pin_shape_pattern.2 b/docs/manpages/man2/define_pin_shape_pattern.2 index 613cc03b256..5635c56ab30 100644 --- a/docs/manpages/man2/define_pin_shape_pattern.2 +++ b/docs/manpages/man2/define_pin_shape_pattern.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "define_pin_shape_pattern" "2" "23/12/13" "" "" +.TH "define_pin_shape_pattern" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/place_pin.2 b/docs/manpages/man2/place_pin.2 index efe0118be6d..d6bb81f1609 100644 --- a/docs/manpages/man2/place_pin.2 +++ b/docs/manpages/man2/place_pin.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "place_pin" "2" "23/12/13" "" "" +.TH "place_pin" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/place_pins.2 b/docs/manpages/man2/place_pins.2 index 27db42cd2d9..925223dab5a 100644 --- a/docs/manpages/man2/place_pins.2 +++ b/docs/manpages/man2/place_pins.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "place_pins" "2" "23/12/13" "" "" +.TH "place_pins" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/set_io_pin_constraint.2 b/docs/manpages/man2/set_io_pin_constraint.2 index 7baa1156d09..114d78c384b 100644 --- a/docs/manpages/man2/set_io_pin_constraint.2 +++ b/docs/manpages/man2/set_io_pin_constraint.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "set_io_pin_constraint" "2" "23/12/13" "" "" +.TH "set_io_pin_constraint" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/set_pin_length.2 b/docs/manpages/man2/set_pin_length.2 index 52225588d97..e64325cfcc1 100644 --- a/docs/manpages/man2/set_pin_length.2 +++ b/docs/manpages/man2/set_pin_length.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "set_pin_length" "2" "23/12/13" "" "" +.TH "set_pin_length" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/set_pin_length_extension.2 b/docs/manpages/man2/set_pin_length_extension.2 index 544e5e568e3..0517b0b4fc0 100644 --- a/docs/manpages/man2/set_pin_length_extension.2 +++ b/docs/manpages/man2/set_pin_length_extension.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "set_pin_length_extension" "2" "23/12/13" "" "" +.TH "set_pin_length_extension" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/set_pin_thick_multiplier.2 b/docs/manpages/man2/set_pin_thick_multiplier.2 index 1bef149bae9..e059066b0b2 100644 --- a/docs/manpages/man2/set_pin_thick_multiplier.2 +++ b/docs/manpages/man2/set_pin_thick_multiplier.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "set_pin_thick_multiplier" "2" "23/12/13" "" "" +.TH "set_pin_thick_multiplier" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/set_simulated_annealing_parameters.2 b/docs/manpages/man2/set_simulated_annealing_parameters.2 index 049dcad85c6..f23d64610c1 100644 --- a/docs/manpages/man2/set_simulated_annealing_parameters.2 +++ b/docs/manpages/man2/set_simulated_annealing_parameters.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "set_simulated_annealing_parameters" "2" "23/12/13" "" "" +.TH "set_simulated_annealing_parameters" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/man2/write_pin_placement.2 b/docs/manpages/man2/write_pin_placement.2 index 80858e53c52..b4852bcad9d 100644 --- a/docs/manpages/man2/write_pin_placement.2 +++ b/docs/manpages/man2/write_pin_placement.2 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 2.9.2.1 .\" -.TH "write_pin_placement" "2" "23/12/13" "" "" +.TH "write_pin_placement" "2" "23/12/17" "" "" .hy .SH NAME .PP diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index a90d951368f..65b6031f1e8 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -100,7 +100,7 @@ def extract_headers(text, level = 1): pattern = r'^#{%d}\s+(.*)$' % level headers = re.findall(pattern, text, flags=re.MULTILINE) # TODO: Handle developer commands - headers.remove("Useful Developer Commands") + if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") return headers def extract_description(text): @@ -125,58 +125,59 @@ def extract_tables(text): return table_matches -for doc in docs: - text = open(doc).read() - - # function names - func_names = extract_headers(text, 3) - func_names = ["_".join(s.lower().split()) for s in func_names] - - # function description - func_descs = extract_description(text) - - # synopsis content - func_synopsis = extract_tcl_code(text) - - # switch names (TODO: needs refactoring...) - switch_names = extract_tables(text) - idx = 0 - func_switches, tmp = [], [] - for s in switch_names: - # TODO: Handle developer commands - if "Command Name" in s: - break - if "Switch Name" in s: - if tmp: func_switches.append(tmp) - tmp = [] - tmp.append(s.strip()) - if tmp: func_switches.append(tmp) - -# grouping the parsed outputs together -offset_switch_idx = 0 - -for func_id in range(len(func_synopsis)): - temp = ManPage() - - temp.name = func_names[func_id] - temp.desc = func_descs[func_id] - - # logic if synopsis is one liner, it means that it has no switches - temp.synopsis = func_synopsis[func_id] - if len(temp.synopsis) == 3: offset_switch_idx += 1 - - switches = func_switches[offset_switch_idx + func_id] - switches_dict = {} - for idx, x in enumerate(switches): - if idx == 0 or idx == 1: continue - switch_name = x.split("|")[1] - # Find the index of the 2nd and last occurrence of "|". Since some content might contain "|" - second_pipe_index = x.find("|", x.find("|") + 1) - last_pipe_index = x.rfind("|") - switch_description = x[second_pipe_index+1: last_pipe_index-1] - switch_name = switch_name.replace("`", "").strip() - switches_dict[switch_name] = switch_description - temp.switches = switches_dict - temp.write_roff_file() - -print('Ok') \ No newline at end of file +if __name__ == "__main__": + for doc in docs: + text = open(doc).read() + + # function names + func_names = extract_headers(text, 3) + func_names = ["_".join(s.lower().split()) for s in func_names] + + # function description + func_descs = extract_description(text) + + # synopsis content + func_synopsis = extract_tcl_code(text) + + # switch names (TODO: needs refactoring...) + switch_names = extract_tables(text) + idx = 0 + func_switches, tmp = [], [] + for s in switch_names: + # TODO: Handle developer commands + if "Command Name" in s: + break + if "Switch Name" in s: + if tmp: func_switches.append(tmp) + tmp = [] + tmp.append(s.strip()) + if tmp: func_switches.append(tmp) + + # grouping the parsed outputs together + offset_switch_idx = 0 + + for func_id in range(len(func_synopsis)): + temp = ManPage() + + temp.name = func_names[func_id] + temp.desc = func_descs[func_id] + + # logic if synopsis is one liner, it means that it has no switches + temp.synopsis = func_synopsis[func_id] + if len(temp.synopsis) == 3: offset_switch_idx += 1 + + switches = func_switches[offset_switch_idx + func_id] + switches_dict = {} + for idx, x in enumerate(switches): + if idx == 0 or idx == 1: continue + switch_name = x.split("|")[1] + # Find the index of the 2nd and last occurrence of "|". Since some content might contain "|" + second_pipe_index = x.find("|", x.find("|") + 1) + last_pipe_index = x.rfind("|") + switch_description = x[second_pipe_index+1: last_pipe_index-1] + switch_name = switch_name.replace("`", "").strip() + switches_dict[switch_name] = switch_description + temp.switches = switches_dict + temp.write_roff_file() + + print('Ok') \ No newline at end of file diff --git a/docs/manpages/src/man2/clear_io_pin_constraints.md b/docs/manpages/src/man2/clear_io_pin_constraints.md index 3a2bf160bfe..f622e9bb7e5 100644 --- a/docs/manpages/src/man2/clear_io_pin_constraints.md +++ b/docs/manpages/src/man2/clear_io_pin_constraints.md @@ -1,7 +1,7 @@ --- title: clear_io_pin_constraints(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/define_pin_shape_pattern.md b/docs/manpages/src/man2/define_pin_shape_pattern.md index 0acdbdb792c..b4aad0d6444 100644 --- a/docs/manpages/src/man2/define_pin_shape_pattern.md +++ b/docs/manpages/src/man2/define_pin_shape_pattern.md @@ -1,7 +1,7 @@ --- title: define_pin_shape_pattern(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/place_pin.md b/docs/manpages/src/man2/place_pin.md index ddcfd99038c..c79e07fa513 100644 --- a/docs/manpages/src/man2/place_pin.md +++ b/docs/manpages/src/man2/place_pin.md @@ -1,7 +1,7 @@ --- title: place_pin(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/place_pins.md b/docs/manpages/src/man2/place_pins.md index 249ef80b200..dd488313269 100644 --- a/docs/manpages/src/man2/place_pins.md +++ b/docs/manpages/src/man2/place_pins.md @@ -1,7 +1,7 @@ --- title: place_pins(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/set_io_pin_constraint.md b/docs/manpages/src/man2/set_io_pin_constraint.md index 013c94977ad..98799930d1e 100644 --- a/docs/manpages/src/man2/set_io_pin_constraint.md +++ b/docs/manpages/src/man2/set_io_pin_constraint.md @@ -1,7 +1,7 @@ --- title: set_io_pin_constraint(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/set_pin_length.md b/docs/manpages/src/man2/set_pin_length.md index 93551370197..be5431dc971 100644 --- a/docs/manpages/src/man2/set_pin_length.md +++ b/docs/manpages/src/man2/set_pin_length.md @@ -1,7 +1,7 @@ --- title: set_pin_length(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/set_pin_length_extension.md b/docs/manpages/src/man2/set_pin_length_extension.md index d944db5e504..8804fc302b4 100644 --- a/docs/manpages/src/man2/set_pin_length_extension.md +++ b/docs/manpages/src/man2/set_pin_length_extension.md @@ -1,7 +1,7 @@ --- title: set_pin_length_extension(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/set_pin_thick_multiplier.md b/docs/manpages/src/man2/set_pin_thick_multiplier.md index 5450622e4f9..40ec7b61f30 100644 --- a/docs/manpages/src/man2/set_pin_thick_multiplier.md +++ b/docs/manpages/src/man2/set_pin_thick_multiplier.md @@ -1,7 +1,7 @@ --- title: set_pin_thick_multiplier(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/set_simulated_annealing_parameters.md b/docs/manpages/src/man2/set_simulated_annealing_parameters.md index 366bc3a8ae2..ff116816d34 100644 --- a/docs/manpages/src/man2/set_simulated_annealing_parameters.md +++ b/docs/manpages/src/man2/set_simulated_annealing_parameters.md @@ -1,7 +1,7 @@ --- title: set_simulated_annealing_parameters(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/src/man2/write_pin_placement.md b/docs/manpages/src/man2/write_pin_placement.md index 97debe8d9a8..bd4be4f0de5 100644 --- a/docs/manpages/src/man2/write_pin_placement.md +++ b/docs/manpages/src/man2/write_pin_placement.md @@ -1,7 +1,7 @@ --- title: write_pin_placement(2) author: Jack Luar (TODO@TODO.com) -date: 23/12/13 +date: 23/12/17 --- # NAME diff --git a/docs/manpages/test/func.ok b/docs/manpages/test/func.ok new file mode 100644 index 00000000000..1fa99c8bdd4 --- /dev/null +++ b/docs/manpages/test/func.ok @@ -0,0 +1,2 @@ +No differences found. +PPL OK diff --git a/docs/manpages/test/func.py b/docs/manpages/test/func.py new file mode 100644 index 00000000000..809307f74c9 --- /dev/null +++ b/docs/manpages/test/func.py @@ -0,0 +1,28 @@ +import helpers +import os +import sys +import glob +sys.path.append('../scripts/') + +from md_roff_compat import extract_headers + +# to repeat this test for ALL original docs (before preprocessing). +# Function goal: to extract headers of the form (# HEADER 1) and convert +# goal is to return an error if the header cannot be extracted. + +def write_funcs(funcs, fname): + with open(fname, "w") as f: + f.write("\n".join(funcs)) + +all_docs = glob.glob("../src/*/*.txt") + +for d in all_docs: + text = open(d).read() + tool_name, _ = os.path.splitext(os.path.basename(d)) + func_file = helpers.make_result_file(f"{tool_name}.func") + funcs = extract_headers(text, 3) + write_funcs(funcs, func_file) + + # write_funcs(funcs, f"{tool_name}.funcok") + + output = helpers.diff_files(func_file, f"{tool_name}.funcok") \ No newline at end of file diff --git a/docs/manpages/test/helpers.py b/docs/manpages/test/helpers.py new file mode 120000 index 00000000000..e10a2da7588 --- /dev/null +++ b/docs/manpages/test/helpers.py @@ -0,0 +1 @@ +../../../test/helpers.py \ No newline at end of file diff --git a/docs/manpages/test/helpers.tcl b/docs/manpages/test/helpers.tcl new file mode 120000 index 00000000000..509ca07b27e --- /dev/null +++ b/docs/manpages/test/helpers.tcl @@ -0,0 +1 @@ +../../../test/helpers.tcl \ No newline at end of file diff --git a/docs/manpages/test/main.tcl b/docs/manpages/test/main.tcl index 856eace39bf..07d8c0d0ccf 120000 --- a/docs/manpages/test/main.tcl +++ b/docs/manpages/test/main.tcl @@ -1 +1 @@ -../main.tcl \ No newline at end of file +../scripts/main.tcl \ No newline at end of file diff --git a/docs/manpages/test/ppl.funcok b/docs/manpages/test/ppl.funcok new file mode 100644 index 00000000000..9233067e94e --- /dev/null +++ b/docs/manpages/test/ppl.funcok @@ -0,0 +1,10 @@ +Define Pin Shape Pattern +Set IO Pin Constraint +Clear IO Pin Constraints +Set Pin Length +Set Pin Length Extension +Set Pin Thick Multiplier +Set Simulated Annealing Parameters +Place Pin +Place Pins +Write Pin Placement \ No newline at end of file diff --git a/docs/manpages/test/regression b/docs/manpages/test/regression new file mode 120000 index 00000000000..9dd00c591a9 --- /dev/null +++ b/docs/manpages/test/regression @@ -0,0 +1 @@ +../../../test/shared/regression \ No newline at end of file diff --git a/docs/manpages/test/regression_tests.tcl b/docs/manpages/test/regression_tests.tcl index d17af6d3f83..f1aa6573b76 100644 --- a/docs/manpages/test/regression_tests.tcl +++ b/docs/manpages/test/regression_tests.tcl @@ -1,4 +1,3 @@ record_tests { - test_man_noflags - test_man_flags + func } From e3e5f309d92d173d8c0e9f7d4091eae25eccbc5e Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 17 Dec 2023 10:55:58 +0000 Subject: [PATCH 12/88] add doc testreadme Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/test/README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/manpages/test/README.md diff --git a/docs/manpages/test/README.md b/docs/manpages/test/README.md new file mode 100644 index 00000000000..c20096e8554 --- /dev/null +++ b/docs/manpages/test/README.md @@ -0,0 +1,33 @@ +# Doc test framework + +There are `n` tests, documentation TBC. + +## Test Description + +TODO + +## Checklist +Adding a new test called `func`, you must create/update the following: +- `func.py|tcl`: Test script. +- `func.ok`: Log output of the test. +- `.*ok`: Ideal file output of the test (can be `def`, `lef` etc). +- `regression_tests.tcl`: Update the name of the test. In this case, `func`. + +``` +# Please replace with your path to OR. +cd ~/OpenROAD/docs/manpages + +# if you installed OR via prebuilt binaries, you might need to symlink as the following script only works with OR in a particular directory. +# mkdir -p ~/OpenROAD/build/src && cd ~/OpenROAD/build/src +# ln -s /usr/bin/openroad . + +# run the tests +./test/regression +``` + +## TODO +- This documentation +- MD to ROFF translation tests: options, synopsis, description +- Tcl test for `man` command +- Missing manpage test: Help exists but no manpage. +- Check consistency of options between `help` and `man`. The command line options should MATCH. \ No newline at end of file From ce17324f0ee2526a3233e79704e6dd6b388af773 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 19 Dec 2023 00:48:21 +0000 Subject: [PATCH 13/88] add html compilation Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/Makefile | 16 +++- docs/manpages/man1/openroad.html | 95 +++++++++++++++++++ .../man2/clear_io_pin_constraints.html | 43 +++++++++ .../man2/define_pin_shape_pattern.html | 46 +++++++++ docs/manpages/man2/place_pin.html | 51 ++++++++++ docs/manpages/man2/place_pins.html | 43 +++++++++ docs/manpages/man2/set_io_pin_constraint.html | 49 ++++++++++ docs/manpages/man2/set_pin_length.html | 43 +++++++++ .../man2/set_pin_length_extension.html | 43 +++++++++ .../man2/set_pin_thick_multiplier.html | 45 +++++++++ .../set_simulated_annealing_parameters.html | 46 +++++++++ docs/manpages/man2/write_pin_placement.html | 42 ++++++++ docs/manpages/man3/aaaa.html | 31 ++++++ docs/manpages/test/func.ok | 1 - 14 files changed, 592 insertions(+), 2 deletions(-) create mode 100644 docs/manpages/man1/openroad.html create mode 100644 docs/manpages/man2/clear_io_pin_constraints.html create mode 100644 docs/manpages/man2/define_pin_shape_pattern.html create mode 100644 docs/manpages/man2/place_pin.html create mode 100644 docs/manpages/man2/place_pins.html create mode 100644 docs/manpages/man2/set_io_pin_constraint.html create mode 100644 docs/manpages/man2/set_pin_length.html create mode 100644 docs/manpages/man2/set_pin_length_extension.html create mode 100644 docs/manpages/man2/set_pin_thick_multiplier.html create mode 100644 docs/manpages/man2/set_simulated_annealing_parameters.html create mode 100644 docs/manpages/man2/write_pin_placement.html create mode 100644 docs/manpages/man3/aaaa.html diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile index e254590ce2f..d5f57577aa8 100644 --- a/docs/manpages/Makefile +++ b/docs/manpages/Makefile @@ -7,21 +7,27 @@ SRC_DIR = src MAN1_DIR = man1 MAN1_FILES = $(wildcard $(SRC_DIR)/$(MAN1_DIR)/*.md) MAN1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) +MAN1_HTML = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.html,$(MAN1_FILES)) MAN2_DIR = man2 MAN2_FILES = $(wildcard $(SRC_DIR)/$(MAN2_DIR)/*.md) MAN2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) +MAN2_HTML = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.html,$(MAN2_FILES)) MAN3_DIR = man3 MAN3_FILES = $(wildcard $(SRC_DIR)/$(MAN3_DIR)/*.md) MAN3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) +MAN3_HTML = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.html,$(MAN3_FILES)) # Default target -all: doc +all: doc html # Target to generate all man pages doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) +# Target to generate all html pages +html: $(MAN1_HTML) $(MAN2_HTML) $(MAN3_HTML) + # Rule to create the man directory $(MAN1_DIR): mkdir -p $(MAN1_DIR) @@ -38,6 +44,14 @@ $(MAN2_DIR)/%.2: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) $(MAN3_DIR)/%.3: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) $(PANDOC) -s -t man $< -o $@ +# Rule to generate a html from a corresponding Markdown file +$(MAN1_DIR)/%.html: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(MAN1_DIR) + $(PANDOC) -s -o html $< -o $@ +$(MAN2_DIR)/%.html: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) + $(PANDOC) -s -o html $< -o $@ +$(MAN3_DIR)/%.html: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) + $(PANDOC) -s -o html $< -o $@ + # Clean target to remove all generated man pages clean: rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) diff --git a/docs/manpages/man1/openroad.html b/docs/manpages/man1/openroad.html new file mode 100644 index 00000000000..f6ef6664889 --- /dev/null +++ b/docs/manpages/man1/openroad.html @@ -0,0 +1,95 @@ + + + + + + + + openroad(0) + + + +
+

openroad(0)

+

Jack Luar (TODO@TODO.com)

+

2023/11/13

+
+

NAME

+

openroad - OpenROAD command-line-interface.

+

SYNOPSIS

+

openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] [-metrics file_name] cmd_file

+

openroad [-python] cmd_file

+

DESCRIPTION

+

The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file.

+

OPTIONS

+

-help: Display help information.

+

-version: Display version information.

+

-no_init: Skip initialization steps.

+

-exit: Exit after executing commands in cmd_file.

+

-gui: Launch the graphical user interface (GUI).

+

-threads count|max: Specify the number of threads to use (or use max available).

+

-log file_name: Log output to the specified file.

+

-metrics file_name: Save performance metrics to the specified file.

+

-python: Execute the cmd_file as a Python script.

+

ARGUMENTS

+

cmd_file: The command file containing OpenROAD commands to be executed.

+

EXAMPLES

+

openroad -help: Prints the help information

+

openroad -version -exit: Prints the version information, and exits the program thereafter.

+

openroad -threads max -log test.log -metrics test.metrics: Prints the log and metric respectively to test.log and test.metrics. Also runs the script with maximum available number of threads.

+

openroad -gui: Launches OpenROAD GUI, which further interactive Tcl commands can be run.

+

TCL COMMANDS

+

These Tcl-based commands are callable from within the OpenROAD binary.

+
    +
  • read_lef [-tech] [-library] filename

    +
      +
    • Read Library Exchange Format (.lef) files.

    • +
    • tech: Technology-specific information

    • +
    • library: .lib files

    • +
  • +
  • read_def filename

    +
      +
    • Read Design Exchange Format (.def) files.
    • +
  • +
  • write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename

    +
      +
    • Write Design Exchange Format (.def) files.

    • +
    • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use.

    • +
  • +
  • read_verilog filename

    +
      +
    • Read Verilog (.v) input file.
    • +
  • +
  • write_verilog filename

    +
      +
    • Write Verilog (.v) file based on current database.
    • +
  • +
  • read_db filename

    +
      +
    • Read OpenDB (.odb) database files.
    • +
  • +
  • write_db filename

    +
      +
    • Write OpenDB (.odb) database files.
    • +
  • +
  • write_abstract_lef filename

    +
      +
    • Write abstract Library Exchange Format (.lef) files based on current database.
    • +
  • +
+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/clear_io_pin_constraints.html b/docs/manpages/man2/clear_io_pin_constraints.html new file mode 100644 index 00000000000..67e7258f655 --- /dev/null +++ b/docs/manpages/man2/clear_io_pin_constraints.html @@ -0,0 +1,43 @@ + + + + + + + + clear_io_pin_constraints(2) + + + +
+

clear_io_pin_constraints(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

clear_io_pin_constraints - clear io pin constraints

+

SYNOPSIS

+

clear_io_pin_constraints

+

DESCRIPTION

+

The clear_io_pin_constraints command clears all the previously-defined constraints and pin shape patterns created with set_io_pin_constraint or define_pin_shape_pattern.

+

OPTIONS

+

-hor_length: The length (in microns) of the horizontal pins.

+

-ver_length: The length (in microns) of the vertical pins.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/define_pin_shape_pattern.html b/docs/manpages/man2/define_pin_shape_pattern.html new file mode 100644 index 00000000000..53c9a667535 --- /dev/null +++ b/docs/manpages/man2/define_pin_shape_pattern.html @@ -0,0 +1,46 @@ + + + + + + + + define_pin_shape_pattern(2) + + + +
+

define_pin_shape_pattern(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

define_pin_shape_pattern - define pin shape pattern

+

SYNOPSIS

+

define_pin_shape_pattern -layer layer -x_step x_step -y_step y_step -region {llx lly urx ury} -size {width height} [-pin_keepout dist]

+

DESCRIPTION

+

The define_pin_shape_pattern command defines a pin placement grid on the specified layer. This grid has positions inside the die area, not only at the edges of the die boundary.

+

OPTIONS

+

-layer: The single top-most routing layer of the placement grid.

+

-x_step, -y_step: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively.

+

-region: The {llx, lly, urx, ury} region of the placement grid (in microns).

+

-size: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region.

+

-pin_keepout: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the layer minimum spacing.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/place_pin.html b/docs/manpages/man2/place_pin.html new file mode 100644 index 00000000000..51bfa2806e8 --- /dev/null +++ b/docs/manpages/man2/place_pin.html @@ -0,0 +1,51 @@ + + + + + + + + place_pin(2) + + + +
+

place_pin(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

place_pin - place pin

+

SYNOPSIS

+

place_pin -pin_name pin_name -layer layer -location {x y} [-pin_size {width height}] [-force_to_die_boundary]

+

DESCRIPTION

+

The place_pin command places a specific pin in the specified location with the specified size. It is recommended that individual pins be placed before the place_pins command, as the routing tracks occupied by these individual pins will be blocked, preventing overlaps.

+

To place an individual pin:

+

OPTIONS

+

-hor_layers: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names.

+

-ver_layers: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names.

+

-corner_avoidance: The distance (in microns) from each corner within which pin placement should be avoided.

+

-min_distance: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin.

+

-min_distance_in_tracks: Flag that allows setting the min distance in number of tracks instead of microns.

+

-exclude: A region where pins cannot be placed. Either top|bottom|left|right:edge_interval, which is the edge interval from the selected edge; begin:end for begin-end of all edges.

+

-group_pins: A list of pins to be placed together on the die boundary.

+

-annealing: Flag to enable simulated annealing pin placement.

+

-write_pin_placement: A file with the pin placement generated in the format of multiple calls for the place_pin command.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/place_pins.html b/docs/manpages/man2/place_pins.html new file mode 100644 index 00000000000..1cf6fb65df3 --- /dev/null +++ b/docs/manpages/man2/place_pins.html @@ -0,0 +1,43 @@ + + + + + + + + place_pins(2) + + + +
+

place_pins(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

place_pins - place pins

+

SYNOPSIS

+

place_pins -hor_layers h_layers -ver_layers v_layers [-random_seed seed] [-random] [-corner_avoidance length] [-min_distance distance] [-min_distance_in_tracks] [-exclude region] [-group_pins pin_list] [-annealing] [-write_pin_placement file_name]

+

DESCRIPTION

+

The place_pins command places all pins together. Use the following command to perform pin placement:

+

OPTIONS

+

-random_seed: Specify the seed for random operations.

+

-random: When this flag is enabled, the pin placement is random.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/set_io_pin_constraint.html b/docs/manpages/man2/set_io_pin_constraint.html new file mode 100644 index 00000000000..85fe08d3bc2 --- /dev/null +++ b/docs/manpages/man2/set_io_pin_constraint.html @@ -0,0 +1,49 @@ + + + + + + + + set_io_pin_constraint(2) + + + +
+

set_io_pin_constraint(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

set_io_pin_constraint - set io pin constraint

+

SYNOPSIS

+

set_io_pin_constraint [-direction direction] [-pin_names names] [-region edge:interval] [-mirrored_pins names] [-group] [-order]

+

DESCRIPTION

+

The set_io_pin_constraint command sets region constraints for pins according to the pin direction or the pin name. This command can be called multiple times with different constraints.

+

You can use the set_io_pin_constraint command to restrict pins to the pin placement grid created with the define_pin_shape_pattern command.

+

It is possible to use the -region, -group and -order arguments together per set_io_pin_constraint call, but the -mirrored_pins argument should be called alone.

+

OPTIONS

+

-direction: Pin direction (input, output, inout, or feedthrough).

+

-pin_names: List of names. Only one of (-direction, -pin_names) should be used in a single call for the set_io_pin_constraint command.

+

-region: Syntax is -region edge:interval. The edge values are (top|bottom|left|right). The interval can be the whole edge with the wildcard * value or a range of values.

+

-mirrored_pins: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list must be even. For example, in set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}, the pins pin1 and pin2 will be placed symmetrically to each other. Same for pin3 and pin4, and for pin5 and pin6.

+

-group: Flag places together on the die boundary the pin list defined in -pin_names, similar to the -group_pins option on the place_pins command.

+

-order: Flag places the pins ordered in ascending x/y position and must be used only when -group is also used.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/set_pin_length.html b/docs/manpages/man2/set_pin_length.html new file mode 100644 index 00000000000..42d02938bbd --- /dev/null +++ b/docs/manpages/man2/set_pin_length.html @@ -0,0 +1,43 @@ + + + + + + + + set_pin_length(2) + + + +
+

set_pin_length(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

set_pin_length - set pin length

+

SYNOPSIS

+

set_pin_length [-hor_length h_length] [-ver_length v_length]

+

DESCRIPTION

+

The set_pin_length command defines the length of all vertical and horizontal pins.

+

OPTIONS

+

-hor_extension: The length (in microns) for the horizontal pins.

+

-ver_extension: The length (in microns) for the vertical pins.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/set_pin_length_extension.html b/docs/manpages/man2/set_pin_length_extension.html new file mode 100644 index 00000000000..f7267593c3e --- /dev/null +++ b/docs/manpages/man2/set_pin_length_extension.html @@ -0,0 +1,43 @@ + + + + + + + + set_pin_length_extension(2) + + + +
+

set_pin_length_extension(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

set_pin_length_extension - set pin length extension

+

SYNOPSIS

+

set_pin_length_extension [-hor_extension h_extension] [-ver_extension v_extension]

+

DESCRIPTION

+

The set_pin_length_extension command defines the an extension of the length of all vertical and horizontal pins. Note that this command may generate pins partially outside the die area.

+

OPTIONS

+

-hor_multiplier: The thickness multiplier for the horizontal pins.

+

-ver_multiplier: The thickness multiplier for the vertical pins.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/set_pin_thick_multiplier.html b/docs/manpages/man2/set_pin_thick_multiplier.html new file mode 100644 index 00000000000..4ad9a502e5c --- /dev/null +++ b/docs/manpages/man2/set_pin_thick_multiplier.html @@ -0,0 +1,45 @@ + + + + + + + + set_pin_thick_multiplier(2) + + + +
+

set_pin_thick_multiplier(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

set_pin_thick_multiplier - set pin thick multiplier

+

SYNOPSIS

+

set_pin_thick_multiplier [-hor_multiplier h_mult] [-ver_multiplier v_mult]

+

DESCRIPTION

+

The set_pin_thick_multiplier command defines a multiplier for the thickness of all vertical and horizontal pins.

+

OPTIONS

+

-temperature: Temperature parameter. The default value is 1.0, and the allowed values are floats [0, MAX_FLOAT].

+

-max_iterations: The maximum number of iterations. The default value is 2000, and the allowed values are integers [0, MAX_INT].

+

-perturb_per_iter: The number of perturbations per iteration. The default value is 0, and the allowed values are integers [0, MAX_INT].

+

-alpha: The temperature decay factor. The default value is 0.985, and the allowed values are floats (0, 1].

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/set_simulated_annealing_parameters.html b/docs/manpages/man2/set_simulated_annealing_parameters.html new file mode 100644 index 00000000000..04c5e67dea2 --- /dev/null +++ b/docs/manpages/man2/set_simulated_annealing_parameters.html @@ -0,0 +1,46 @@ + + + + + + + + set_simulated_annealing_parameters(2) + + + +
+

set_simulated_annealing_parameters(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

set_simulated_annealing_parameters - set simulated annealing parameters

+

SYNOPSIS

+

set_simulated_annealing [-temperature temperature] [-max_iterations iter] [-perturb_per_iter perturbs] [-alpha alpha]

+

DESCRIPTION

+

The set_simulated_annealing command defines the parameters for simulated annealing pin placement.

+

OPTIONS

+

-pin_name: The name of a pin of the design.

+

-layer: The routing layer where the pin is placed.

+

-location: The center of the pin (in microns).

+

-pin_size: Tthe width and height of the pin (in microns).

+

-force_to_die_boundary: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man2/write_pin_placement.html b/docs/manpages/man2/write_pin_placement.html new file mode 100644 index 00000000000..3df78f25fee --- /dev/null +++ b/docs/manpages/man2/write_pin_placement.html @@ -0,0 +1,42 @@ + + + + + + + + write_pin_placement(2) + + + +
+

write_pin_placement(2)

+

Jack Luar (TODO@TODO.com)

+

23/12/17

+
+

NAME

+

write_pin_placement - write pin placement

+

SYNOPSIS

+

write_pin_placement file_name

+

DESCRIPTION

+

The write_pin_placement command writes a file with the pin placement in the format of multiple calls for the place_pin command:

+

OPTIONS

+

file_name: The name of the file with the pin placement.

+

ARGUMENTS

+

EXAMPLES

+

ENVIRONMENT

+

FILES

+

SEE ALSO

+

HISTORY

+

BUGS

+

COPYRIGHT

+

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

+ + diff --git a/docs/manpages/man3/aaaa.html b/docs/manpages/man3/aaaa.html new file mode 100644 index 00000000000..7c70d7a8e86 --- /dev/null +++ b/docs/manpages/man3/aaaa.html @@ -0,0 +1,31 @@ + + + + + + + + Using NiX to develop pandoc + + + +
+

Using NiX to develop pandoc

+

John MacFarlane

+
+

The source directory contains shell.nix and flake.nix, so if you have NiX installed, you can use either nix shell or nix develop can be used to obtain a shell with pandoc dependencies installed.

+

To set up direnv so that the NiX shell is automatically activated whenever the directory is entered, add the following .envrc in the pandoc source directory:

+
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
+    source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
+fi
+use flake
+

This uses nix-direnv for caching. See its web page for further help.

+ + diff --git a/docs/manpages/test/func.ok b/docs/manpages/test/func.ok index 1fa99c8bdd4..c8af7cb1b49 100644 --- a/docs/manpages/test/func.ok +++ b/docs/manpages/test/func.ok @@ -1,2 +1 @@ No differences found. -PPL OK From d21f2a74f06d7eb826408edbd2dc4f98749f160a Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:10:42 +0000 Subject: [PATCH 14/88] Add man skeleton script in and cache the result properly Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/README.md | 22 ++++++-- docs/manpages/scripts/Utl.tcl | 96 +++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 docs/manpages/scripts/Utl.tcl diff --git a/docs/manpages/README.md b/docs/manpages/README.md index 4bd689910ae..d48e9fdd8eb 100644 --- a/docs/manpages/README.md +++ b/docs/manpages/README.md @@ -19,10 +19,26 @@ echo "MANDATORY_MANPATH $(pwd)" >> ~/.manpath man template ``` +### What about inside OpenROAD? + +- To run `man` commands inside OpenROAD, you can either use the Linux `man` binary: +```tcl +# create a man wrapper +source scripts/main.tcl +man openroad +``` + +- Or the `Tcl` script that outputs raw text. +```tcl +source scripts/Utl.tcl +# you will be prompted to enter the RELATIVE path to cat folders. +man openroad +``` + ## Prototype 2 (git-pages) -- TOdo. +- TODO, they use another word processor that seems more versatile called AsciiDoc. +- Reference: https://github.com/git/git/tree/master/Documentation ## TODO -- pandoc not the most perfect, as pandoc does not seem to do the indentation perfectly as in other manpages. for the options section -- Need to add to `MANPATH`: https://unix.stackexchange.com/questions/344603/how-to-append-to-manpath +- pandoc not the most perfect, as pandoc does not seem to do the indentation perfectly as in other manpages. for the options section \ No newline at end of file diff --git a/docs/manpages/scripts/Utl.tcl b/docs/manpages/scripts/Utl.tcl new file mode 100644 index 00000000000..810f9f4d9e7 --- /dev/null +++ b/docs/manpages/scripts/Utl.tcl @@ -0,0 +1,96 @@ +global MAN_PATH +set MAN_PATH "" + +proc get_input { } { + # Get the relative path from the user + puts "Please enter the relative path to the cat folders:" + flush stdout + gets stdin relative_path + + # Convert the relative path to an absolute path + set absolute_path [file join [pwd] $relative_path] + + # Display the absolute path + puts "Absolute Path: $absolute_path" + if { [check_valid_path $absolute_path] } { + return $absolute_path + } + return "" +} + +proc check_valid_path { path } { + if {[file isdirectory $path]} { + return true + } else { + puts "Invalid path, please retry." + return false + } +} + +proc check_valid_man_path { path } { + if {[file isdirectory "$path/man1"]} { + return true + } else { + puts "Invalid man path, please retry." + return false + } +} + +proc man { name } { + global MAN_PATH + if { [string length $MAN_PATH] == 0 } { + set MAN_PATH [get_input] + if { $MAN_PATH == 0 } { return } + } + + if { [check_valid_man_path $MAN_PATH] == 0 } { + set $MAN_PATH "" + puts "" + } + + set man_path $MAN_PATH + set man_sections {} + foreach man_section {man1 man2 man3} { + lappend man_sections "$man_path/$man_section" + } + set man_found false + foreach man_section $man_sections { + set length [string length $man_section] + # Get suffix for man section + set man_suffix [string range $man_section [expr {$length - 1}] $length] + set name1 $name + append name1 ".$man_suffix" + set man_file [file join $man_section $name1] + if { [file exists $man_file] } { + set man_found true + set file_handle [open $man_file r] + set content [read $file_handle] + close $file_handle + + # Display content + set lines [split $content "\n"] + set num_lines [llength $lines] + set page_size 10 + + for {set i 0} {$i < $num_lines} {incr i $page_size} { + set page [lrange $lines $i [expr {$i + $page_size - 1}]] + puts [join $page "\n"] + + # Ask user to continue or quit + if {[llength $lines] > $page_size} { + puts -nonewline "Press 'q' to quit or any other key to continue: " + flush stdout + set input [gets stdin] + if {$input == "q"} { + break + } + } + } + } + } + + if { $man_found == false } { + utl::error UTL 100 "Man page for $name is not found." + } +} + From 1cb3c437d1a45f3357b2210df5d54b4631c4a5ea Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 25 Dec 2023 03:34:25 +0000 Subject: [PATCH 15/88] add prototype for cat pages Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/Makefile | 42 +++++-- docs/manpages/cat1/openroad.cat | 116 ++++++++++++++++++ .../cat2/clear_io_pin_constraints.cat | 44 +++++++ .../cat2/define_pin_shape_pattern.cat | 56 +++++++++ docs/manpages/cat2/place_pin.cat | 65 ++++++++++ docs/manpages/cat2/place_pins.cat | 53 ++++++++ docs/manpages/cat2/set_io_pin_constraint.cat | 65 ++++++++++ docs/manpages/cat2/set_pin_length.cat | 45 +++++++ .../cat2/set_pin_length_extension.cat | 46 +++++++ .../cat2/set_pin_thick_multiplier.cat | 49 ++++++++ .../set_simulated_annealing_parameters.cat | 52 ++++++++ docs/manpages/cat2/write_pin_placement.cat | 41 +++++++ docs/manpages/cat3/aaaa.cat | 25 ++++ docs/manpages/scripts/Utl.tcl | 23 +++- 14 files changed, 709 insertions(+), 13 deletions(-) create mode 100644 docs/manpages/cat1/openroad.cat create mode 100644 docs/manpages/cat2/clear_io_pin_constraints.cat create mode 100644 docs/manpages/cat2/define_pin_shape_pattern.cat create mode 100644 docs/manpages/cat2/place_pin.cat create mode 100644 docs/manpages/cat2/place_pins.cat create mode 100644 docs/manpages/cat2/set_io_pin_constraint.cat create mode 100644 docs/manpages/cat2/set_pin_length.cat create mode 100644 docs/manpages/cat2/set_pin_length_extension.cat create mode 100644 docs/manpages/cat2/set_pin_thick_multiplier.cat create mode 100644 docs/manpages/cat2/set_simulated_annealing_parameters.cat create mode 100644 docs/manpages/cat2/write_pin_placement.cat create mode 100644 docs/manpages/cat3/aaaa.cat diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile index d5f57577aa8..aa7d9530696 100644 --- a/docs/manpages/Makefile +++ b/docs/manpages/Makefile @@ -8,19 +8,25 @@ MAN1_DIR = man1 MAN1_FILES = $(wildcard $(SRC_DIR)/$(MAN1_DIR)/*.md) MAN1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) MAN1_HTML = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.html,$(MAN1_FILES)) +CAT1_DIR = cat1 +CAT1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(CAT1_DIR)/%.cat,$(MAN1_FILES)) MAN2_DIR = man2 MAN2_FILES = $(wildcard $(SRC_DIR)/$(MAN2_DIR)/*.md) MAN2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) MAN2_HTML = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.html,$(MAN2_FILES)) +CAT2_DIR = cat2 +CAT2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(CAT2_DIR)/%.cat,$(MAN2_FILES)) MAN3_DIR = man3 MAN3_FILES = $(wildcard $(SRC_DIR)/$(MAN3_DIR)/*.md) MAN3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) MAN3_HTML = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.html,$(MAN3_FILES)) +CAT3_DIR = cat3 +CAT3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(CAT3_DIR)/%.cat,$(MAN3_FILES)) # Default target -all: doc html +all: doc html cat # Target to generate all man pages doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) @@ -28,13 +34,23 @@ doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) # Target to generate all html pages html: $(MAN1_HTML) $(MAN2_HTML) $(MAN3_HTML) +# Target to generate all cat pages +cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) + @echo $(CAT1_PAGES) + # Rule to create the man directory -$(MAN1_DIR): - mkdir -p $(MAN1_DIR) -$(MAN2_DIR): - mkdir -p $(MAN2_DIR) -$(MAN3_DIR): - mkdir -p $(MAN3_DIR) +$(MAN1_DIR): + mkdir -p $(MAN1_DIR) +$(MAN2_DIR): + mkdir -p $(MAN2_DIR) +$(MAN3_DIR): + mkdir -p $(MAN3_DIR) +$(CAT1_DIR): + mkdir -p $(CAT1_DIR) +$(CAT2_DIR): + mkdir -p $(CAT2_DIR) +$(CAT3_DIR): + mkdir -p $(CAT3_DIR) # Rule to generate a man page from a corresponding Markdown file $(MAN1_DIR)/%.1: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(MAN1_DIR) @@ -52,9 +68,17 @@ $(MAN2_DIR)/%.html: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) $(MAN3_DIR)/%.html: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) $(PANDOC) -s -o html $< -o $@ +# Rule to generate a cat file +$(CAT1_DIR)/%.cat: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(CAT1_DIR) + cp $< $@ +$(CAT2_DIR)/%.cat: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(CAT2_DIR) + cp $< $@ +$(CAT3_DIR)/%.cat: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(CAT3_DIR) + cp $< $@ + # Clean target to remove all generated man pages clean: - rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) + rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) # Phony targets -.PHONY: all doc clean \ No newline at end of file +.PHONY: all \ No newline at end of file diff --git a/docs/manpages/cat1/openroad.cat b/docs/manpages/cat1/openroad.cat new file mode 100644 index 00000000000..c55d5ecfc7e --- /dev/null +++ b/docs/manpages/cat1/openroad.cat @@ -0,0 +1,116 @@ +--- +title: openroad(0) +author: Jack Luar (TODO@TODO.com) +date: 2023/11/13 +--- + +# NAME + +openroad - OpenROAD command-line-interface. + +# SYNOPSIS + +openroad [-help] [-version] [-no_init] [-exit] [-gui] + [-threads count|max] [-log file_name] [-metrics + file_name] cmd_file + +openroad [-python] cmd_file + +# DESCRIPTION + +The **openroad** command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file. + +# OPTIONS + +`-help`: Display help information. + +`-version`: Display version information. + +`-no_init`: Skip initialization steps. + +`-exit`: Exit after executing commands in cmd_file. + +`-gui`: Launch the graphical user interface (GUI). + +`-threads count|max`: Specify the number of threads to +use (or use max available). + +`-log file_name`: Log output to the specified file. + +`-metrics file_name`: Save performance metrics to the +specified file. + +`-python`: Execute the cmd_file as a Python script. + +# ARGUMENTS + +`cmd_file`: The command file containing OpenROAD commands to be executed. + +# EXAMPLES + +**openroad -help**: Prints the help information + +**openroad -version -exit**: Prints the version information, and exits the program thereafter. + +**openroad -threads max -log test.log -metrics test.metrics**: Prints the log and metric +respectively to `test.log` and `test.metrics`. Also runs the script with maximum + available number of threads. + +**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl commands can be run. + +# TCL COMMANDS + +These Tcl-based commands are callable from within the +OpenROAD binary. + +- read_lef [-tech] [-library] filename + + - Read Library Exchange Format (.lef) files. + + - tech: Technology-specific information + + - library: .lib files + +- read_def filename + + - Read Design Exchange Format (.def) files. + +- write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename + - Write Design Exchange Format (.def) files. + + - version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF + version to use. + +- read_verilog filename + + - Read Verilog (.v) input file. + +- write_verilog filename + + - Write Verilog (.v) file based on current database. +- read_db filename + + - Read OpenDB (.odb) database files. + +- write_db filename + + - Write OpenDB (.odb) database files. + +- write_abstract_lef filename + + - Write abstract Library Exchange Format (.lef) files + based on current database. + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. \ No newline at end of file diff --git a/docs/manpages/cat2/clear_io_pin_constraints.cat b/docs/manpages/cat2/clear_io_pin_constraints.cat new file mode 100644 index 00000000000..f622e9bb7e5 --- /dev/null +++ b/docs/manpages/cat2/clear_io_pin_constraints.cat @@ -0,0 +1,44 @@ +--- +title: clear_io_pin_constraints(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +clear_io_pin_constraints - clear io pin constraints + +# SYNOPSIS + +clear_io_pin_constraints + + +# DESCRIPTION + +The `clear_io_pin_constraints` command clears all the previously-defined +constraints and pin shape patterns created with `set_io_pin_constraint` or +`define_pin_shape_pattern`. + +# OPTIONS + +`-hor_length`: The length (in microns) of the horizontal pins. + +`-ver_length`: The length (in microns) of the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/define_pin_shape_pattern.cat b/docs/manpages/cat2/define_pin_shape_pattern.cat new file mode 100644 index 00000000000..b4aad0d6444 --- /dev/null +++ b/docs/manpages/cat2/define_pin_shape_pattern.cat @@ -0,0 +1,56 @@ +--- +title: define_pin_shape_pattern(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +define_pin_shape_pattern - define pin shape pattern + +# SYNOPSIS + +define_pin_shape_pattern + -layer layer + -x_step x_step + -y_step y_step + -region {llx lly urx ury} + -size {width height} + [-pin_keepout dist] + + +# DESCRIPTION + +The `define_pin_shape_pattern` command defines a pin placement grid on the +specified layer. This grid has positions inside the die area, not only at +the edges of the die boundary. + +# OPTIONS + +`-layer`: The single top-most routing layer of the placement grid. + +`-x_step, -y_step`: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. + +`-region`: The `{llx, lly, urx, ury}` region of the placement grid (in microns). + +`-size`: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. + +`-pin_keepout`: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/place_pin.cat b/docs/manpages/cat2/place_pin.cat new file mode 100644 index 00000000000..c79e07fa513 --- /dev/null +++ b/docs/manpages/cat2/place_pin.cat @@ -0,0 +1,65 @@ +--- +title: place_pin(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +place_pin - place pin + +# SYNOPSIS + +place_pin + -pin_name pin_name + -layer layer + -location {x y} + [-pin_size {width height}] + [-force_to_die_boundary] + + +# DESCRIPTION + +The `place_pin` command places a specific pin in the specified location with the specified size. +It is recommended that individual pins be placed before the `place_pins` command, +as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. + +To place an individual pin: + +# OPTIONS + +`-hor_layers`: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. + +`-ver_layers`: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. + +`-corner_avoidance`: The distance (in microns) from each corner within which pin placement should be avoided. + +`-min_distance`: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. + +`-min_distance_in_tracks`: Flag that allows setting the min distance in number of tracks instead of microns. + +`-exclude`: A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. + +`-group_pins`: A list of pins to be placed together on the die boundary. + +`-annealing`: Flag to enable simulated annealing pin placement. + +`-write_pin_placement`: A file with the pin placement generated in the format of multiple calls for the `place_pin` command. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/place_pins.cat b/docs/manpages/cat2/place_pins.cat new file mode 100644 index 00000000000..dd488313269 --- /dev/null +++ b/docs/manpages/cat2/place_pins.cat @@ -0,0 +1,53 @@ +--- +title: place_pins(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +place_pins - place pins + +# SYNOPSIS + +place_pins + -hor_layers h_layers + -ver_layers v_layers + [-random_seed seed] + [-random] + [-corner_avoidance length] + [-min_distance distance] + [-min_distance_in_tracks] + [-exclude region] + [-group_pins pin_list] + [-annealing] + [-write_pin_placement file_name] + + +# DESCRIPTION + +The `place_pins` command places all pins together. Use the following command to perform pin placement: + +# OPTIONS + +`-random_seed`: Specify the seed for random operations. + +`-random`: When this flag is enabled, the pin placement is random. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_io_pin_constraint.cat b/docs/manpages/cat2/set_io_pin_constraint.cat new file mode 100644 index 00000000000..98799930d1e --- /dev/null +++ b/docs/manpages/cat2/set_io_pin_constraint.cat @@ -0,0 +1,65 @@ +--- +title: set_io_pin_constraint(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +set_io_pin_constraint - set io pin constraint + +# SYNOPSIS + +set_io_pin_constraint + [-direction direction] + [-pin_names names] + [-region edge:interval] + [-mirrored_pins names] + [-group] + [-order] + + +# DESCRIPTION + +The `set_io_pin_constraint` command sets region constraints for pins according +to the pin direction or the pin name. This command can be called multiple +times with different constraints. + +You can use the `set_io_pin_constraint` command to restrict pins to the +pin placement grid created with the `define_pin_shape_pattern` command. + +It is possible to use the `-region`, `-group` and `-order` arguments together +per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be +called alone. + +# OPTIONS + +`-direction`: Pin direction (`input`, `output`, `inout`, or `feedthrough`). + +`-pin_names`: List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. + +`-region`: Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. + +`-mirrored_pins`: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. + +`-group`: Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. + +`-order`: Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_length.cat b/docs/manpages/cat2/set_pin_length.cat new file mode 100644 index 00000000000..be5431dc971 --- /dev/null +++ b/docs/manpages/cat2/set_pin_length.cat @@ -0,0 +1,45 @@ +--- +title: set_pin_length(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +set_pin_length - set pin length + +# SYNOPSIS + +set_pin_length + [-hor_length h_length] + [-ver_length v_length] + + +# DESCRIPTION + +The `set_pin_length` command defines the length of all vertical and horizontal +pins. + +# OPTIONS + +`-hor_extension`: The length (in microns) for the horizontal pins. + +`-ver_extension`: The length (in microns) for the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_length_extension.cat b/docs/manpages/cat2/set_pin_length_extension.cat new file mode 100644 index 00000000000..8804fc302b4 --- /dev/null +++ b/docs/manpages/cat2/set_pin_length_extension.cat @@ -0,0 +1,46 @@ +--- +title: set_pin_length_extension(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +set_pin_length_extension - set pin length extension + +# SYNOPSIS + +set_pin_length_extension + [-hor_extension h_extension] + [-ver_extension v_extension] + + +# DESCRIPTION + +The `set_pin_length_extension` command defines the an extension of the length +of all vertical and horizontal pins. Note that this command may generate pins +partially outside the die area. + +# OPTIONS + +`-hor_multiplier`: The thickness multiplier for the horizontal pins. + +`-ver_multiplier`: The thickness multiplier for the vertical pins. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_thick_multiplier.cat b/docs/manpages/cat2/set_pin_thick_multiplier.cat new file mode 100644 index 00000000000..40ec7b61f30 --- /dev/null +++ b/docs/manpages/cat2/set_pin_thick_multiplier.cat @@ -0,0 +1,49 @@ +--- +title: set_pin_thick_multiplier(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +set_pin_thick_multiplier - set pin thick multiplier + +# SYNOPSIS + +set_pin_thick_multiplier + [-hor_multiplier h_mult] + [-ver_multiplier v_mult] + + +# DESCRIPTION + +The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all +vertical and horizontal pins. + +# OPTIONS + +`-temperature`: Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. + +`-max_iterations`: The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. + +`-perturb_per_iter`: The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. + +`-alpha`: The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_simulated_annealing_parameters.cat b/docs/manpages/cat2/set_simulated_annealing_parameters.cat new file mode 100644 index 00000000000..ff116816d34 --- /dev/null +++ b/docs/manpages/cat2/set_simulated_annealing_parameters.cat @@ -0,0 +1,52 @@ +--- +title: set_simulated_annealing_parameters(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +set_simulated_annealing_parameters - set simulated annealing parameters + +# SYNOPSIS + +set_simulated_annealing + [-temperature temperature] + [-max_iterations iter] + [-perturb_per_iter perturbs] + [-alpha alpha] + + +# DESCRIPTION + +The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. + +# OPTIONS + +`-pin_name`: The name of a pin of the design. + +`-layer`: The routing layer where the pin is placed. + +`-location`: The center of the pin (in microns). + +`-pin_size`: Tthe width and height of the pin (in microns). + +`-force_to_die_boundary`: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/write_pin_placement.cat b/docs/manpages/cat2/write_pin_placement.cat new file mode 100644 index 00000000000..bd4be4f0de5 --- /dev/null +++ b/docs/manpages/cat2/write_pin_placement.cat @@ -0,0 +1,41 @@ +--- +title: write_pin_placement(2) +author: Jack Luar (TODO@TODO.com) +date: 23/12/17 +--- + +# NAME + +write_pin_placement - write pin placement + +# SYNOPSIS + +write_pin_placement + file_name + + +# DESCRIPTION + +The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: + +# OPTIONS + +`file_name`: The name of the file with the pin placement. + +# ARGUMENTS + +# EXAMPLES + +# ENVIRONMENT + +# FILES + +# SEE ALSO + +# HISTORY + +# BUGS + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat3/aaaa.cat b/docs/manpages/cat3/aaaa.cat new file mode 100644 index 00000000000..3c8c7e9d038 --- /dev/null +++ b/docs/manpages/cat3/aaaa.cat @@ -0,0 +1,25 @@ +--- +title: Using NiX to develop pandoc +author: John MacFarlane +--- + +The source directory contains `shell.nix` and `flake.nix`, +so if you have NiX installed, you can use either `nix shell` +or `nix develop` can be used to obtain a shell with pandoc +dependencies installed. + +To set up `direnv` so that the NiX shell is automatically +activated whenever the directory is entered, add the following +`.envrc` in the pandoc source directory: + +``` +if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" +fi +use flake +``` + +This uses [nix-direnv] for caching. See its web page for +further help. + +[nix-direnv]: https://github.com/nix-community/nix-direnv diff --git a/docs/manpages/scripts/Utl.tcl b/docs/manpages/scripts/Utl.tcl index 810f9f4d9e7..32c714fec3b 100644 --- a/docs/manpages/scripts/Utl.tcl +++ b/docs/manpages/scripts/Utl.tcl @@ -50,14 +50,16 @@ proc man { name } { set man_path $MAN_PATH set man_sections {} - foreach man_section {man1 man2 man3} { + foreach man_section {cat1 cat2 cat3} { lappend man_sections "$man_path/$man_section" } set man_found false foreach man_section $man_sections { set length [string length $man_section] # Get suffix for man section - set man_suffix [string range $man_section [expr {$length - 1}] $length] + #set man_suffix [string range $man_section [expr {$length - 1}] $length] + set man_suffix "cat" + set name1 $name append name1 ".$man_suffix" set man_file [file join $man_section $name1] @@ -78,8 +80,8 @@ proc man { name } { # Ask user to continue or quit if {[llength $lines] > $page_size} { - puts -nonewline "Press 'q' to quit or any other key to continue: " - flush stdout + puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" + flush stdout; set input [gets stdin] if {$input == "q"} { break @@ -94,3 +96,16 @@ proc man { name } { } } +proc clear {} { + exec clear +} + +proc test { } { + puts -nonewline "This is a line of text\r" + flush stdout ;# Flush the output to ensure the line is printed immediately + ; + + puts " " ;# Print a space to clear the line + flush stdout ;# Flush the output to ensure the space is printed immediately + +} From 1b2f47af6f6bc1768ac71c8b6165aba8190cdb0e Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:00:40 +0000 Subject: [PATCH 16/88] add prototype for include utl.tcl into openroad Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/OpenRoad.tcl | 3 ++ src/utl/CMakeLists.txt | 19 ++++++++ src/utl/src/Utl.i | 6 +++ src/utl/src/Utl.tcl | 101 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 src/utl/src/Utl.i create mode 100644 src/utl/src/Utl.tcl diff --git a/src/OpenRoad.tcl b/src/OpenRoad.tcl index b9d6ca3818b..8e634864fa7 100644 --- a/src/OpenRoad.tcl +++ b/src/OpenRoad.tcl @@ -33,6 +33,9 @@ ## ############################################################################ +# source Utl.tcl +source ../src/utl/src/Utl.tcl + # -library is the default sta::define_cmd_args "read_lef" {[-tech] [-library] [-tech_name name] filename} diff --git a/src/utl/CMakeLists.txt b/src/utl/CMakeLists.txt index 162e96e3252..18106c7cb5f 100644 --- a/src/utl/CMakeLists.txt +++ b/src/utl/CMakeLists.txt @@ -43,6 +43,12 @@ swig_lib(NAME utl SWIG_INCLUDES ${PROJECT_SOURCE_DIR}/src ) +swig_lib(NAME utl_funcs + NAMESPACE utl + I_FILE src/Utl.i + SCRIPTS src/Utl.tcl +) + if (Python3_FOUND AND BUILD_PYTHON) swig_lib(NAME utl_py NAMESPACE utl @@ -87,6 +93,18 @@ target_link_libraries(utl_lib spdlog::spdlog ) +target_include_directories(utl_funcs + PUBLIC + include + PRIVATE + src +) + +target_link_libraries(utl_funcs + PUBLIC + spdlog::spdlog +) + target_sources(utl PRIVATE src/LoggerCommon.cpp @@ -109,6 +127,7 @@ target_compile_definitions(utl target_link_libraries(utl PUBLIC utl_lib + utl_funcs ) ############################################################ diff --git a/src/utl/src/Utl.i b/src/utl/src/Utl.i new file mode 100644 index 00000000000..eb9b8f47831 --- /dev/null +++ b/src/utl/src/Utl.i @@ -0,0 +1,6 @@ +%module utl + +%{ + #include +%} + diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl new file mode 100644 index 00000000000..3e9695c2b6b --- /dev/null +++ b/src/utl/src/Utl.tcl @@ -0,0 +1,101 @@ +global MAN_PATH +set MAN_PATH "" + +proc get_input { } { + # Get the relative path from the user + puts "Please enter the relative path to the cat folders:" + flush stdout + gets stdin relative_path + + # Convert the relative path to an absolute path + set absolute_path [file join [pwd] $relative_path] + + # Display the absolute path + puts "Absolute Path: $absolute_path" + if { [check_valid_path $absolute_path] } { + return $absolute_path + } + return "" +} + +proc check_valid_path { path } { + if {[file isdirectory $path]} { + return true + } else { + puts "Invalid path, please retry." + return false + } +} + +proc check_valid_man_path { path } { + if {[file isdirectory "$path/man1"]} { + return true + } else { + puts "Invalid man path, please retry." + return false + } +} + +proc man { name } { + global MAN_PATH + if { [string length $MAN_PATH] == 0 } { + set MAN_PATH [get_input] + if { $MAN_PATH == 0 } { return } + } + + if { [check_valid_man_path $MAN_PATH] == 0 } { + set $MAN_PATH "" + puts "" + } + + set man_path $MAN_PATH + set man_sections {} + foreach man_section {cat1 cat2 cat3} { + lappend man_sections "$man_path/$man_section" + } + set man_found false + foreach man_section $man_sections { + set length [string length $man_section] + # Get suffix for man section + #set man_suffix [string range $man_section [expr {$length - 1}] $length] + set man_suffix "cat" + + set name1 $name + append name1 ".$man_suffix" + set man_file [file join $man_section $name1] + if { [file exists $man_file] } { + set man_found true + set file_handle [open $man_file r] + set content [read $file_handle] + close $file_handle + + # Display content + set lines [split $content "\n"] + set num_lines [llength $lines] + set page_size 10 + + for {set i 0} {$i < $num_lines} {incr i $page_size} { + set page [lrange $lines $i [expr {$i + $page_size - 1}]] + puts [join $page "\n"] + + # Ask user to continue or quit + if {[llength $lines] > $page_size} { + puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" + flush stdout; + set input [gets stdin] + if {$input == "q"} { + break + } + } + } + } + } + + if { $man_found == false } { + utl::error UTL 100 "Man page for $name is not found." + } +} + +proc clear {} { + exec clear +} \ No newline at end of file From 5ca011061c4425a9a916856592529c03a0caf870 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 8 Jan 2024 17:13:07 +0000 Subject: [PATCH 17/88] makefile flow change using roff file Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/Makefile | 95 +++++++----- docs/manpages/cat/cat1/openroad.md | 141 ++++++++++++++++++ .../cat/cat2/clear_io_pin_constraints.md | 61 ++++++++ .../cat/cat2/define_pin_shape_pattern.md | 75 ++++++++++ docs/manpages/cat/cat2/place_pin.md | 88 +++++++++++ docs/manpages/cat/cat2/place_pins.md | 64 ++++++++ .../cat/cat2/set_io_pin_constraint.md | 90 +++++++++++ docs/manpages/cat/cat2/set_pin_length.md | 60 ++++++++ .../cat/cat2/set_pin_length_extension.md | 62 ++++++++ .../cat/cat2/set_pin_thick_multiplier.md | 70 +++++++++ .../set_simulated_annealing_parameters.md | 70 +++++++++ docs/manpages/cat/cat2/write_pin_placement.md | 58 +++++++ docs/manpages/cat/cat3/aaaa.md | 24 +++ docs/manpages/cat1/openroad.cat | 116 -------------- .../cat2/clear_io_pin_constraints.cat | 44 ------ .../cat2/define_pin_shape_pattern.cat | 56 ------- docs/manpages/cat2/place_pin.cat | 65 -------- docs/manpages/cat2/place_pins.cat | 53 ------- docs/manpages/cat2/set_io_pin_constraint.cat | 65 -------- docs/manpages/cat2/set_pin_length.cat | 45 ------ .../cat2/set_pin_length_extension.cat | 46 ------ .../cat2/set_pin_thick_multiplier.cat | 49 ------ .../set_simulated_annealing_parameters.cat | 52 ------- docs/manpages/cat2/write_pin_placement.cat | 41 ----- docs/manpages/cat3/aaaa.cat | 25 ---- .../{man1 => html/html1}/openroad.html | 46 +++--- .../html2}/clear_io_pin_constraints.html | 32 ++-- .../html2}/define_pin_shape_pattern.html | 32 ++-- .../{man2 => html/html2}/place_pin.html | 32 ++-- .../{man2 => html/html2}/place_pins.html | 32 ++-- .../html2}/set_io_pin_constraint.html | 32 ++-- .../{man2 => html/html2}/set_pin_length.html | 32 ++-- .../html2}/set_pin_length_extension.html | 32 ++-- .../html2}/set_pin_thick_multiplier.html | 32 ++-- .../set_simulated_annealing_parameters.html | 32 ++-- .../html2}/write_pin_placement.html | 32 ++-- docs/manpages/{man3 => html/html3}/aaaa.html | 6 +- docs/manpages/{ => man}/man1/openroad.1 | 0 .../{ => man}/man2/clear_io_pin_constraints.2 | 0 .../{ => man}/man2/define_pin_shape_pattern.2 | 0 docs/manpages/{ => man}/man2/place_pin.2 | 0 docs/manpages/{ => man}/man2/place_pins.2 | 0 .../{ => man}/man2/set_io_pin_constraint.2 | 0 docs/manpages/{ => man}/man2/set_pin_length.2 | 0 .../{ => man}/man2/set_pin_length_extension.2 | 0 .../{ => man}/man2/set_pin_thick_multiplier.2 | 0 .../man2/set_simulated_annealing_parameters.2 | 0 .../{ => man}/man2/write_pin_placement.2 | 0 docs/manpages/{ => man}/man3/aaaa.3 | 0 docs/manpages/{src => md}/man1/openroad.md | 0 .../man2/clear_io_pin_constraints.md | 0 .../man2/define_pin_shape_pattern.md | 0 docs/manpages/{src => md}/man2/place_pin.md | 0 docs/manpages/{src => md}/man2/place_pins.md | 0 docs/manpages/{src => md}/man2/ppl.txt | 0 .../{src => md}/man2/set_io_pin_constraint.md | 0 .../{src => md}/man2/set_pin_length.md | 0 .../man2/set_pin_length_extension.md | 0 .../man2/set_pin_thick_multiplier.md | 0 .../set_simulated_annealing_parameters.md | 0 .../{src => md}/man2/write_pin_placement.md | 0 docs/manpages/{src => md}/man3/aaaa.md | 0 src/utl/src/Utl.tcl | 2 +- 63 files changed, 1109 insertions(+), 880 deletions(-) create mode 100644 docs/manpages/cat/cat1/openroad.md create mode 100644 docs/manpages/cat/cat2/clear_io_pin_constraints.md create mode 100644 docs/manpages/cat/cat2/define_pin_shape_pattern.md create mode 100644 docs/manpages/cat/cat2/place_pin.md create mode 100644 docs/manpages/cat/cat2/place_pins.md create mode 100644 docs/manpages/cat/cat2/set_io_pin_constraint.md create mode 100644 docs/manpages/cat/cat2/set_pin_length.md create mode 100644 docs/manpages/cat/cat2/set_pin_length_extension.md create mode 100644 docs/manpages/cat/cat2/set_pin_thick_multiplier.md create mode 100644 docs/manpages/cat/cat2/set_simulated_annealing_parameters.md create mode 100644 docs/manpages/cat/cat2/write_pin_placement.md create mode 100644 docs/manpages/cat/cat3/aaaa.md delete mode 100644 docs/manpages/cat1/openroad.cat delete mode 100644 docs/manpages/cat2/clear_io_pin_constraints.cat delete mode 100644 docs/manpages/cat2/define_pin_shape_pattern.cat delete mode 100644 docs/manpages/cat2/place_pin.cat delete mode 100644 docs/manpages/cat2/place_pins.cat delete mode 100644 docs/manpages/cat2/set_io_pin_constraint.cat delete mode 100644 docs/manpages/cat2/set_pin_length.cat delete mode 100644 docs/manpages/cat2/set_pin_length_extension.cat delete mode 100644 docs/manpages/cat2/set_pin_thick_multiplier.cat delete mode 100644 docs/manpages/cat2/set_simulated_annealing_parameters.cat delete mode 100644 docs/manpages/cat2/write_pin_placement.cat delete mode 100644 docs/manpages/cat3/aaaa.cat rename docs/manpages/{man1 => html/html1}/openroad.html (78%) rename docs/manpages/{man2 => html/html2}/clear_io_pin_constraints.html (68%) rename docs/manpages/{man2 => html/html2}/define_pin_shape_pattern.html (76%) rename docs/manpages/{man2 => html/html2}/place_pin.html (82%) rename docs/manpages/{man2 => html/html2}/place_pins.html (70%) rename docs/manpages/{man2 => html/html2}/set_io_pin_constraint.html (83%) rename docs/manpages/{man2 => html/html2}/set_pin_length.html (67%) rename docs/manpages/{man2 => html/html2}/set_pin_length_extension.html (69%) rename docs/manpages/{man2 => html/html2}/set_pin_thick_multiplier.html (74%) rename docs/manpages/{man2 => html/html2}/set_simulated_annealing_parameters.html (71%) rename docs/manpages/{man2 => html/html2}/write_pin_placement.html (65%) rename docs/manpages/{man3 => html/html3}/aaaa.html (86%) rename docs/manpages/{ => man}/man1/openroad.1 (100%) rename docs/manpages/{ => man}/man2/clear_io_pin_constraints.2 (100%) rename docs/manpages/{ => man}/man2/define_pin_shape_pattern.2 (100%) rename docs/manpages/{ => man}/man2/place_pin.2 (100%) rename docs/manpages/{ => man}/man2/place_pins.2 (100%) rename docs/manpages/{ => man}/man2/set_io_pin_constraint.2 (100%) rename docs/manpages/{ => man}/man2/set_pin_length.2 (100%) rename docs/manpages/{ => man}/man2/set_pin_length_extension.2 (100%) rename docs/manpages/{ => man}/man2/set_pin_thick_multiplier.2 (100%) rename docs/manpages/{ => man}/man2/set_simulated_annealing_parameters.2 (100%) rename docs/manpages/{ => man}/man2/write_pin_placement.2 (100%) rename docs/manpages/{ => man}/man3/aaaa.3 (100%) rename docs/manpages/{src => md}/man1/openroad.md (100%) rename docs/manpages/{src => md}/man2/clear_io_pin_constraints.md (100%) rename docs/manpages/{src => md}/man2/define_pin_shape_pattern.md (100%) rename docs/manpages/{src => md}/man2/place_pin.md (100%) rename docs/manpages/{src => md}/man2/place_pins.md (100%) rename docs/manpages/{src => md}/man2/ppl.txt (100%) rename docs/manpages/{src => md}/man2/set_io_pin_constraint.md (100%) rename docs/manpages/{src => md}/man2/set_pin_length.md (100%) rename docs/manpages/{src => md}/man2/set_pin_length_extension.md (100%) rename docs/manpages/{src => md}/man2/set_pin_thick_multiplier.md (100%) rename docs/manpages/{src => md}/man2/set_simulated_annealing_parameters.md (100%) rename docs/manpages/{src => md}/man2/write_pin_placement.md (100%) rename docs/manpages/{src => md}/man3/aaaa.md (100%) diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile index aa7d9530696..162e3791985 100644 --- a/docs/manpages/Makefile +++ b/docs/manpages/Makefile @@ -1,29 +1,44 @@ # Makefile for generating man pages using pandoc +# Workflow: +# 1) raw md -> pandoc-compatible md (TODO) +# 2) pandoc md -> roff -> cat, html # Define variables PANDOC = pandoc -SRC_DIR = src +SRC_DIR = md +MAN_ROOT_DIR = man +HTML_ROOT_DIR = html +CAT_ROOT_DIR = cat +MAN1 = man1 +MAN2 = man2 +MAN3 = man3 -MAN1_DIR = man1 -MAN1_FILES = $(wildcard $(SRC_DIR)/$(MAN1_DIR)/*.md) -MAN1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) -MAN1_HTML = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(MAN1_DIR)/%.html,$(MAN1_FILES)) -CAT1_DIR = cat1 -CAT1_PAGES = $(patsubst $(SRC_DIR)/$(MAN1_DIR)/%.md,$(CAT1_DIR)/%.cat,$(MAN1_FILES)) +MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) +SRC1_DIR = $(SRC_DIR)/$(MAN1) +MAN1_FILES = $(wildcard $(SRC1_DIR)/*.md) +MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) +HTML1_DIR = $(HTML_ROOT_DIR)/html1 +HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) +CAT1_DIR = $(CAT_ROOT_DIR)/cat1 +CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) -MAN2_DIR = man2 -MAN2_FILES = $(wildcard $(SRC_DIR)/$(MAN2_DIR)/*.md) -MAN2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) -MAN2_HTML = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(MAN2_DIR)/%.html,$(MAN2_FILES)) -CAT2_DIR = cat2 -CAT2_PAGES = $(patsubst $(SRC_DIR)/$(MAN2_DIR)/%.md,$(CAT2_DIR)/%.cat,$(MAN2_FILES)) +MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) +SRC2_DIR = $(SRC_DIR)/$(MAN2) +MAN2_FILES = $(wildcard $(SRC2_DIR)/*.md) +MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) +HTML2_DIR = $(HTML_ROOT_DIR)/html2 +HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) +CAT2_DIR = $(CAT_ROOT_DIR)/cat2 +CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) -MAN3_DIR = man3 -MAN3_FILES = $(wildcard $(SRC_DIR)/$(MAN3_DIR)/*.md) -MAN3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) -MAN3_HTML = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(MAN3_DIR)/%.html,$(MAN3_FILES)) -CAT3_DIR = cat3 -CAT3_PAGES = $(patsubst $(SRC_DIR)/$(MAN3_DIR)/%.md,$(CAT3_DIR)/%.cat,$(MAN3_FILES)) +MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) +SRC3_DIR = $(SRC_DIR)/$(MAN3) +MAN3_FILES = $(wildcard $(SRC3_DIR)/*.md) +MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) +HTML3_DIR = $(HTML_ROOT_DIR)/html3 +HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) +CAT3_DIR = $(CAT_ROOT_DIR)/cat3 +CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) # Default target all: doc html cat @@ -32,7 +47,7 @@ all: doc html cat doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) # Target to generate all html pages -html: $(MAN1_HTML) $(MAN2_HTML) $(MAN3_HTML) +html: $(HTML1_PAGES) $(HTML2_PAGES) $(HTML3_PAGES) # Target to generate all cat pages cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) @@ -45,6 +60,12 @@ $(MAN2_DIR): mkdir -p $(MAN2_DIR) $(MAN3_DIR): mkdir -p $(MAN3_DIR) +$(HTML1_DIR): + mkdir -p $(HTML1_DIR) +$(HTML2_DIR): + mkdir -p $(HTML2_DIR) +$(HTML3_DIR): + mkdir -p $(HTML3_DIR) $(CAT1_DIR): mkdir -p $(CAT1_DIR) $(CAT2_DIR): @@ -52,33 +73,35 @@ $(CAT2_DIR): $(CAT3_DIR): mkdir -p $(CAT3_DIR) -# Rule to generate a man page from a corresponding Markdown file -$(MAN1_DIR)/%.1: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(MAN1_DIR) +# Rule to generate a roff file from a corresponding Markdown file +$(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) $(PANDOC) -s -t man $< -o $@ -$(MAN2_DIR)/%.2: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) +$(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) $(PANDOC) -s -t man $< -o $@ -$(MAN3_DIR)/%.3: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) +$(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) $(PANDOC) -s -t man $< -o $@ -# Rule to generate a html from a corresponding Markdown file -$(MAN1_DIR)/%.html: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(MAN1_DIR) +# Rule to generate a html file from a corresponding roff file +$(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) $(PANDOC) -s -o html $< -o $@ -$(MAN2_DIR)/%.html: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(MAN2_DIR) +$(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) $(PANDOC) -s -o html $< -o $@ -$(MAN3_DIR)/%.html: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(MAN3_DIR) +$(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) $(PANDOC) -s -o html $< -o $@ -# Rule to generate a cat file -$(CAT1_DIR)/%.cat: $(SRC_DIR)/$(MAN1_DIR)/%.md | $(CAT1_DIR) - cp $< $@ -$(CAT2_DIR)/%.cat: $(SRC_DIR)/$(MAN2_DIR)/%.md | $(CAT2_DIR) - cp $< $@ -$(CAT3_DIR)/%.cat: $(SRC_DIR)/$(MAN3_DIR)/%.md | $(CAT3_DIR) - cp $< $@ +# Rule to generate a cat file from a corresponding roff file +$(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) + $(PANDOC) -s -o markdown $< -o $@ +$(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) + $(PANDOC) -s -o markdown $< -o $@ +$(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) + $(PANDOC) -s -o markdown $< -o $@ # Clean target to remove all generated man pages clean: - rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) + rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) + rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) + rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) # Phony targets .PHONY: all \ No newline at end of file diff --git a/docs/manpages/cat/cat1/openroad.md b/docs/manpages/cat/cat1/openroad.md new file mode 100644 index 00000000000..94b24bdfacd --- /dev/null +++ b/docs/manpages/cat/cat1/openroad.md @@ -0,0 +1,141 @@ +--- +date: 2023/11/13 +section: 0 +title: openroad +--- + +NAME +==== + +openroad - OpenROAD command-line-interface. + +SYNOPSIS +======== + +openroad \[-help\] \[-version\] \[-no\_init\] \[-exit\] \[-gui\] +\[-threads count\|max\] \[-log file\_name\] \[-metrics file\_name\] +cmd\_file + +openroad \[-python\] cmd\_file + +DESCRIPTION +=========== + +The **openroad** command is the command-line interface for OpenROAD, an +open-source initiative for chip design and optimization. It provides a +range of options to control its behavior and execute commands specified +in the cmd\_file. + +OPTIONS +======= + +`-help`: Display help information. + +`-version`: Display version information. + +`-no_init`: Skip initialization steps. + +`-exit`: Exit after executing commands in cmd\_file. + +`-gui`: Launch the graphical user interface (GUI). + +`-threads count|max`: Specify the number of threads to use (or use max +available). + +`-log file_name`: Log output to the specified file. + +`-metrics file_name`: Save performance metrics to the specified file. + +`-python`: Execute the cmd\_file as a Python script. + +ARGUMENTS +========= + +`cmd_file`: The command file containing OpenROAD commands to be +executed. + +EXAMPLES +======== + +**openroad -help**: Prints the help information + +**openroad -version -exit**: Prints the version information, and exits +the program thereafter. + +**openroad -threads max -log test.log -metrics test.metrics**: Prints +the log and metric respectively to `test.log` and `test.metrics`. Also +runs the script with maximum available number of threads. + +**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl +commands can be run. + +TCL COMMANDS +============ + +These Tcl-based commands are callable from within the OpenROAD binary. + +- read\_lef \[-tech\] \[-library\] filename + + - Read Library Exchange Format (.lef) files. + + - tech: Technology-specific information + + - library: .lib files + +- read\_def filename + + - Read Design Exchange Format (.def) files. + +- write\_def \[-version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3\] filename + + - Write Design Exchange Format (.def) files. + + - version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3: Corresponding DEF version + to use. + +- read\_verilog filename + + - Read Verilog (.v) input file. + +- write\_verilog filename + + - Write Verilog (.v) file based on current database. + +- read\_db filename + + - Read OpenDB (.odb) database files. + +- write\_db filename + + - Write OpenDB (.odb) database files. + +- write\_abstract\_lef filename + + - Write abstract Library Exchange Format (.lef) files based on + current database. + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/clear_io_pin_constraints.md b/docs/manpages/cat/cat2/clear_io_pin_constraints.md new file mode 100644 index 00000000000..e73220cd396 --- /dev/null +++ b/docs/manpages/cat/cat2/clear_io_pin_constraints.md @@ -0,0 +1,61 @@ +--- +date: 23/12/17 +section: 2 +title: clear\_io\_pin\_constraints +--- + +NAME +==== + +clear\_io\_pin\_constraints - clear io pin constraints + +SYNOPSIS +======== + +clear\_io\_pin\_constraints + +DESCRIPTION +=========== + +The `clear_io_pin_constraints` command clears all the previously-defined +constraints and pin shape patterns created with `set_io_pin_constraint` +or `define_pin_shape_pattern`. + +OPTIONS +======= + +`-hor_length`: The length (in microns) of the horizontal pins. + +`-ver_length`: The length (in microns) of the vertical pins. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/define_pin_shape_pattern.md b/docs/manpages/cat/cat2/define_pin_shape_pattern.md new file mode 100644 index 00000000000..9f965c900e6 --- /dev/null +++ b/docs/manpages/cat/cat2/define_pin_shape_pattern.md @@ -0,0 +1,75 @@ +--- +date: 23/12/17 +section: 2 +title: define\_pin\_shape\_pattern +--- + +NAME +==== + +define\_pin\_shape\_pattern - define pin shape pattern + +SYNOPSIS +======== + +define\_pin\_shape\_pattern -layer layer -x\_step x\_step -y\_step +y\_step -region {llx lly urx ury} -size {width height} \[-pin\_keepout +dist\] + +DESCRIPTION +=========== + +The `define_pin_shape_pattern` command defines a pin placement grid on +the specified layer. This grid has positions inside the die area, not +only at the edges of the die boundary. + +OPTIONS +======= + +`-layer`: The single top-most routing layer of the placement grid. + +`-x_step, -y_step`: The distance (in microns) between each valid +position on the grid in the x- and y-directions, respectively. + +`-region`: The `{llx, lly, urx, ury}` region of the placement grid (in +microns). + +`-size`: The width and height (in microns) of the pins assigned to this +grid. The centers of the pins are placed on the grid positions. Pins may +have half of their shapes outside the defined region. + +`-pin_keepout`: The boundary (in microns) around existing routing +obstructions that the pins should avoid; this defaults to the `layer` +minimum spacing. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/place_pin.md b/docs/manpages/cat/cat2/place_pin.md new file mode 100644 index 00000000000..ce38ec26d3e --- /dev/null +++ b/docs/manpages/cat/cat2/place_pin.md @@ -0,0 +1,88 @@ +--- +date: 23/12/17 +section: 2 +title: place\_pin +--- + +NAME +==== + +place\_pin - place pin + +SYNOPSIS +======== + +place\_pin -pin\_name pin\_name -layer layer -location {x y} +\[-pin\_size {width height}\] \[-force\_to\_die\_boundary\] + +DESCRIPTION +=========== + +The `place_pin` command places a specific pin in the specified location +with the specified size. It is recommended that individual pins be +placed before the `place_pins` command, as the routing tracks occupied +by these individual pins will be blocked, preventing overlaps. + +To place an individual pin: + +OPTIONS +======= + +`-hor_layers`: The layers to create the metal shapes of pins placed in +horizontal tracks. It can be a single layer or a list of layer names. + +`-ver_layers`: The layers to create the metal shapes of pins placed in +vertical tracks. It can be a single layer or a list of layer names. + +`-corner_avoidance`: The distance (in microns) from each corner within +which pin placement should be avoided. + +`-min_distance`: The minimum distance between pins on the die boundary. +This distance can be in microns (default) or in number of tracks between +each pin. + +`-min_distance_in_tracks`: Flag that allows setting the min distance in +number of tracks instead of microns. + +`-exclude`: A region where pins cannot be placed. Either +`top|bottom|left|right:edge_interval`, which is the edge interval from +the selected edge; `begin:end` for begin-end of all edges. + +`-group_pins`: A list of pins to be placed together on the die boundary. + +`-annealing`: Flag to enable simulated annealing pin placement. + +`-write_pin_placement`: A file with the pin placement generated in the +format of multiple calls for the `place_pin` command. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/place_pins.md b/docs/manpages/cat/cat2/place_pins.md new file mode 100644 index 00000000000..6324cff32da --- /dev/null +++ b/docs/manpages/cat/cat2/place_pins.md @@ -0,0 +1,64 @@ +--- +date: 23/12/17 +section: 2 +title: place\_pins +--- + +NAME +==== + +place\_pins - place pins + +SYNOPSIS +======== + +place\_pins -hor\_layers h\_layers -ver\_layers v\_layers +\[-random\_seed seed\] \[-random\] \[-corner\_avoidance length\] +\[-min\_distance distance\] \[-min\_distance\_in\_tracks\] \[-exclude +region\] \[-group\_pins pin\_list\] \[-annealing\] +\[-write\_pin\_placement file\_name\] + +DESCRIPTION +=========== + +The `place_pins` command places all pins together. Use the following +command to perform pin placement: + +OPTIONS +======= + +`-random_seed`: Specify the seed for random operations. + +`-random`: When this flag is enabled, the pin placement is random. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/set_io_pin_constraint.md b/docs/manpages/cat/cat2/set_io_pin_constraint.md new file mode 100644 index 00000000000..bd3fbce66cd --- /dev/null +++ b/docs/manpages/cat/cat2/set_io_pin_constraint.md @@ -0,0 +1,90 @@ +--- +date: 23/12/17 +section: 2 +title: set\_io\_pin\_constraint +--- + +NAME +==== + +set\_io\_pin\_constraint - set io pin constraint + +SYNOPSIS +======== + +set\_io\_pin\_constraint \[-direction direction\] \[-pin\_names names\] +\[-region edge:interval\] \[-mirrored\_pins names\] \[-group\] +\[-order\] + +DESCRIPTION +=========== + +The `set_io_pin_constraint` command sets region constraints for pins +according to the pin direction or the pin name. This command can be +called multiple times with different constraints. + +You can use the `set_io_pin_constraint` command to restrict pins to the +pin placement grid created with the `define_pin_shape_pattern` command. + +It is possible to use the `-region`, `-group` and `-order` arguments +together per `set_io_pin_constraint` call, but the `-mirrored_pins` +argument should be called alone. + +OPTIONS +======= + +`-direction`: Pin direction (`input`, `output`, `inout`, or +`feedthrough`). + +`-pin_names`: List of names. Only one of (`-direction`, `-pin_names`) +should be used in a single call for the `set_io_pin_constraint` command. + +`-region`: Syntax is `-region edge:interval`. The `edge` values are +(`top|bottom|left|right`). The `interval` can be the whole edge with the +wildcard `*` value or a range of values. + +`-mirrored_pins`: List of pins that sets pairs of pins that will be +symmetrically placed in the vertical or the horizontal edges. The number +of pins in this list **must be even**. For example, in +`set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, +the pins `pin1` and `pin2` will be placed symmetrically to each other. +Same for `pin3` and `pin4`, and for `pin5` and `pin6`. + +`-group`: Flag places together on the die boundary the pin list defined +in `-pin_names,` similar to the `-group_pins` option on the `place_pins` +command. + +`-order`: Flag places the pins ordered in ascending x/y position and +must be used only when `-group` is also used. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/set_pin_length.md b/docs/manpages/cat/cat2/set_pin_length.md new file mode 100644 index 00000000000..3e31fdd1912 --- /dev/null +++ b/docs/manpages/cat/cat2/set_pin_length.md @@ -0,0 +1,60 @@ +--- +date: 23/12/17 +section: 2 +title: set\_pin\_length +--- + +NAME +==== + +set\_pin\_length - set pin length + +SYNOPSIS +======== + +set\_pin\_length \[-hor\_length h\_length\] \[-ver\_length v\_length\] + +DESCRIPTION +=========== + +The `set_pin_length` command defines the length of all vertical and +horizontal pins. + +OPTIONS +======= + +`-hor_extension`: The length (in microns) for the horizontal pins. + +`-ver_extension`: The length (in microns) for the vertical pins. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/set_pin_length_extension.md b/docs/manpages/cat/cat2/set_pin_length_extension.md new file mode 100644 index 00000000000..2c5b0d51d09 --- /dev/null +++ b/docs/manpages/cat/cat2/set_pin_length_extension.md @@ -0,0 +1,62 @@ +--- +date: 23/12/17 +section: 2 +title: set\_pin\_length\_extension +--- + +NAME +==== + +set\_pin\_length\_extension - set pin length extension + +SYNOPSIS +======== + +set\_pin\_length\_extension \[-hor\_extension h\_extension\] +\[-ver\_extension v\_extension\] + +DESCRIPTION +=========== + +The `set_pin_length_extension` command defines the an extension of the +length of all vertical and horizontal pins. Note that this command may +generate pins partially outside the die area. + +OPTIONS +======= + +`-hor_multiplier`: The thickness multiplier for the horizontal pins. + +`-ver_multiplier`: The thickness multiplier for the vertical pins. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/set_pin_thick_multiplier.md b/docs/manpages/cat/cat2/set_pin_thick_multiplier.md new file mode 100644 index 00000000000..278db0086ca --- /dev/null +++ b/docs/manpages/cat/cat2/set_pin_thick_multiplier.md @@ -0,0 +1,70 @@ +--- +date: 23/12/17 +section: 2 +title: set\_pin\_thick\_multiplier +--- + +NAME +==== + +set\_pin\_thick\_multiplier - set pin thick multiplier + +SYNOPSIS +======== + +set\_pin\_thick\_multiplier \[-hor\_multiplier h\_mult\] +\[-ver\_multiplier v\_mult\] + +DESCRIPTION +=========== + +The `set_pin_thick_multiplier` command defines a multiplier for the +thickness of all vertical and horizontal pins. + +OPTIONS +======= + +`-temperature`: Temperature parameter. The default value is `1.0`, and +the allowed values are floats `[0, MAX_FLOAT]`. + +`-max_iterations`: The maximum number of iterations. The default value +is `2000`, and the allowed values are integers `[0, MAX_INT]`. + +`-perturb_per_iter`: The number of perturbations per iteration. The +default value is `0`, and the allowed values are integers +`[0, MAX_INT]`. + +`-alpha`: The temperature decay factor. The default value is `0.985`, +and the allowed values are floats `(0, 1]`. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/set_simulated_annealing_parameters.md b/docs/manpages/cat/cat2/set_simulated_annealing_parameters.md new file mode 100644 index 00000000000..2869988d5ed --- /dev/null +++ b/docs/manpages/cat/cat2/set_simulated_annealing_parameters.md @@ -0,0 +1,70 @@ +--- +date: 23/12/17 +section: 2 +title: set\_simulated\_annealing\_parameters +--- + +NAME +==== + +set\_simulated\_annealing\_parameters - set simulated annealing +parameters + +SYNOPSIS +======== + +set\_simulated\_annealing \[-temperature temperature\] +\[-max\_iterations iter\] \[-perturb\_per\_iter perturbs\] \[-alpha +alpha\] + +DESCRIPTION +=========== + +The `set_simulated_annealing` command defines the parameters for +simulated annealing pin placement. + +OPTIONS +======= + +`-pin_name`: The name of a pin of the design. + +`-layer`: The routing layer where the pin is placed. + +`-location`: The center of the pin (in microns). + +`-pin_size`: Tthe width and height of the pin (in microns). + +`-force_to_die_boundary`: When this flag is enabled, the pin will be +snapped to the nearest routing track, next to the die boundary. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat2/write_pin_placement.md b/docs/manpages/cat/cat2/write_pin_placement.md new file mode 100644 index 00000000000..7973abf7999 --- /dev/null +++ b/docs/manpages/cat/cat2/write_pin_placement.md @@ -0,0 +1,58 @@ +--- +date: 23/12/17 +section: 2 +title: write\_pin\_placement +--- + +NAME +==== + +write\_pin\_placement - write pin placement + +SYNOPSIS +======== + +write\_pin\_placement file\_name + +DESCRIPTION +=========== + +The `write_pin_placement` command writes a file with the pin placement +in the format of multiple calls for the `place_pin` command: + +OPTIONS +======= + +`file_name`: The name of the file with the pin placement. + +ARGUMENTS +========= + +EXAMPLES +======== + +ENVIRONMENT +=========== + +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). diff --git a/docs/manpages/cat/cat3/aaaa.md b/docs/manpages/cat/cat3/aaaa.md new file mode 100644 index 00000000000..e9c34824aab --- /dev/null +++ b/docs/manpages/cat/cat3/aaaa.md @@ -0,0 +1,24 @@ +--- +title: Using NiX to develop pandoc +--- + +The source directory contains `shell.nix` and `flake.nix`, so if you +have NiX installed, you can use either `nix shell` or `nix develop` can +be used to obtain a shell with pandoc dependencies installed. + +To set up `direnv` so that the NiX shell is automatically activated +whenever the directory is entered, add the following `.envrc` in the +pandoc source directory: + + if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" + fi + use flake + +This uses nix-direnv (https://github.com/nix-community/nix-direnv) for +caching. See its web page for further help. + +AUTHORS +======= + +John MacFarlane. diff --git a/docs/manpages/cat1/openroad.cat b/docs/manpages/cat1/openroad.cat deleted file mode 100644 index c55d5ecfc7e..00000000000 --- a/docs/manpages/cat1/openroad.cat +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: openroad(0) -author: Jack Luar (TODO@TODO.com) -date: 2023/11/13 ---- - -# NAME - -openroad - OpenROAD command-line-interface. - -# SYNOPSIS - -openroad [-help] [-version] [-no_init] [-exit] [-gui] - [-threads count|max] [-log file_name] [-metrics - file_name] cmd_file - -openroad [-python] cmd_file - -# DESCRIPTION - -The **openroad** command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file. - -# OPTIONS - -`-help`: Display help information. - -`-version`: Display version information. - -`-no_init`: Skip initialization steps. - -`-exit`: Exit after executing commands in cmd_file. - -`-gui`: Launch the graphical user interface (GUI). - -`-threads count|max`: Specify the number of threads to -use (or use max available). - -`-log file_name`: Log output to the specified file. - -`-metrics file_name`: Save performance metrics to the -specified file. - -`-python`: Execute the cmd_file as a Python script. - -# ARGUMENTS - -`cmd_file`: The command file containing OpenROAD commands to be executed. - -# EXAMPLES - -**openroad -help**: Prints the help information - -**openroad -version -exit**: Prints the version information, and exits the program thereafter. - -**openroad -threads max -log test.log -metrics test.metrics**: Prints the log and metric -respectively to `test.log` and `test.metrics`. Also runs the script with maximum - available number of threads. - -**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl commands can be run. - -# TCL COMMANDS - -These Tcl-based commands are callable from within the -OpenROAD binary. - -- read_lef [-tech] [-library] filename - - - Read Library Exchange Format (.lef) files. - - - tech: Technology-specific information - - - library: .lib files - -- read_def filename - - - Read Design Exchange Format (.def) files. - -- write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename - - Write Design Exchange Format (.def) files. - - - version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF - version to use. - -- read_verilog filename - - - Read Verilog (.v) input file. - -- write_verilog filename - - - Write Verilog (.v) file based on current database. -- read_db filename - - - Read OpenDB (.odb) database files. - -- write_db filename - - - Write OpenDB (.odb) database files. - -- write_abstract_lef filename - - - Write abstract Library Exchange Format (.lef) files - based on current database. - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. \ No newline at end of file diff --git a/docs/manpages/cat2/clear_io_pin_constraints.cat b/docs/manpages/cat2/clear_io_pin_constraints.cat deleted file mode 100644 index f622e9bb7e5..00000000000 --- a/docs/manpages/cat2/clear_io_pin_constraints.cat +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: clear_io_pin_constraints(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -clear_io_pin_constraints - clear io pin constraints - -# SYNOPSIS - -clear_io_pin_constraints - - -# DESCRIPTION - -The `clear_io_pin_constraints` command clears all the previously-defined -constraints and pin shape patterns created with `set_io_pin_constraint` or -`define_pin_shape_pattern`. - -# OPTIONS - -`-hor_length`: The length (in microns) of the horizontal pins. - -`-ver_length`: The length (in microns) of the vertical pins. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/define_pin_shape_pattern.cat b/docs/manpages/cat2/define_pin_shape_pattern.cat deleted file mode 100644 index b4aad0d6444..00000000000 --- a/docs/manpages/cat2/define_pin_shape_pattern.cat +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: define_pin_shape_pattern(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -define_pin_shape_pattern - define pin shape pattern - -# SYNOPSIS - -define_pin_shape_pattern - -layer layer - -x_step x_step - -y_step y_step - -region {llx lly urx ury} - -size {width height} - [-pin_keepout dist] - - -# DESCRIPTION - -The `define_pin_shape_pattern` command defines a pin placement grid on the -specified layer. This grid has positions inside the die area, not only at -the edges of the die boundary. - -# OPTIONS - -`-layer`: The single top-most routing layer of the placement grid. - -`-x_step, -y_step`: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. - -`-region`: The `{llx, lly, urx, ury}` region of the placement grid (in microns). - -`-size`: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. - -`-pin_keepout`: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/place_pin.cat b/docs/manpages/cat2/place_pin.cat deleted file mode 100644 index c79e07fa513..00000000000 --- a/docs/manpages/cat2/place_pin.cat +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: place_pin(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -place_pin - place pin - -# SYNOPSIS - -place_pin - -pin_name pin_name - -layer layer - -location {x y} - [-pin_size {width height}] - [-force_to_die_boundary] - - -# DESCRIPTION - -The `place_pin` command places a specific pin in the specified location with the specified size. -It is recommended that individual pins be placed before the `place_pins` command, -as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. - -To place an individual pin: - -# OPTIONS - -`-hor_layers`: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. - -`-ver_layers`: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. - -`-corner_avoidance`: The distance (in microns) from each corner within which pin placement should be avoided. - -`-min_distance`: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. - -`-min_distance_in_tracks`: Flag that allows setting the min distance in number of tracks instead of microns. - -`-exclude`: A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. - -`-group_pins`: A list of pins to be placed together on the die boundary. - -`-annealing`: Flag to enable simulated annealing pin placement. - -`-write_pin_placement`: A file with the pin placement generated in the format of multiple calls for the `place_pin` command. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/place_pins.cat b/docs/manpages/cat2/place_pins.cat deleted file mode 100644 index dd488313269..00000000000 --- a/docs/manpages/cat2/place_pins.cat +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: place_pins(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -place_pins - place pins - -# SYNOPSIS - -place_pins - -hor_layers h_layers - -ver_layers v_layers - [-random_seed seed] - [-random] - [-corner_avoidance length] - [-min_distance distance] - [-min_distance_in_tracks] - [-exclude region] - [-group_pins pin_list] - [-annealing] - [-write_pin_placement file_name] - - -# DESCRIPTION - -The `place_pins` command places all pins together. Use the following command to perform pin placement: - -# OPTIONS - -`-random_seed`: Specify the seed for random operations. - -`-random`: When this flag is enabled, the pin placement is random. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_io_pin_constraint.cat b/docs/manpages/cat2/set_io_pin_constraint.cat deleted file mode 100644 index 98799930d1e..00000000000 --- a/docs/manpages/cat2/set_io_pin_constraint.cat +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: set_io_pin_constraint(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -set_io_pin_constraint - set io pin constraint - -# SYNOPSIS - -set_io_pin_constraint - [-direction direction] - [-pin_names names] - [-region edge:interval] - [-mirrored_pins names] - [-group] - [-order] - - -# DESCRIPTION - -The `set_io_pin_constraint` command sets region constraints for pins according -to the pin direction or the pin name. This command can be called multiple -times with different constraints. - -You can use the `set_io_pin_constraint` command to restrict pins to the -pin placement grid created with the `define_pin_shape_pattern` command. - -It is possible to use the `-region`, `-group` and `-order` arguments together -per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be -called alone. - -# OPTIONS - -`-direction`: Pin direction (`input`, `output`, `inout`, or `feedthrough`). - -`-pin_names`: List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. - -`-region`: Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. - -`-mirrored_pins`: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. - -`-group`: Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. - -`-order`: Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_length.cat b/docs/manpages/cat2/set_pin_length.cat deleted file mode 100644 index be5431dc971..00000000000 --- a/docs/manpages/cat2/set_pin_length.cat +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: set_pin_length(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -set_pin_length - set pin length - -# SYNOPSIS - -set_pin_length - [-hor_length h_length] - [-ver_length v_length] - - -# DESCRIPTION - -The `set_pin_length` command defines the length of all vertical and horizontal -pins. - -# OPTIONS - -`-hor_extension`: The length (in microns) for the horizontal pins. - -`-ver_extension`: The length (in microns) for the vertical pins. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_length_extension.cat b/docs/manpages/cat2/set_pin_length_extension.cat deleted file mode 100644 index 8804fc302b4..00000000000 --- a/docs/manpages/cat2/set_pin_length_extension.cat +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: set_pin_length_extension(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -set_pin_length_extension - set pin length extension - -# SYNOPSIS - -set_pin_length_extension - [-hor_extension h_extension] - [-ver_extension v_extension] - - -# DESCRIPTION - -The `set_pin_length_extension` command defines the an extension of the length -of all vertical and horizontal pins. Note that this command may generate pins -partially outside the die area. - -# OPTIONS - -`-hor_multiplier`: The thickness multiplier for the horizontal pins. - -`-ver_multiplier`: The thickness multiplier for the vertical pins. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_pin_thick_multiplier.cat b/docs/manpages/cat2/set_pin_thick_multiplier.cat deleted file mode 100644 index 40ec7b61f30..00000000000 --- a/docs/manpages/cat2/set_pin_thick_multiplier.cat +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: set_pin_thick_multiplier(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -set_pin_thick_multiplier - set pin thick multiplier - -# SYNOPSIS - -set_pin_thick_multiplier - [-hor_multiplier h_mult] - [-ver_multiplier v_mult] - - -# DESCRIPTION - -The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all -vertical and horizontal pins. - -# OPTIONS - -`-temperature`: Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. - -`-max_iterations`: The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. - -`-perturb_per_iter`: The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-alpha`: The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/set_simulated_annealing_parameters.cat b/docs/manpages/cat2/set_simulated_annealing_parameters.cat deleted file mode 100644 index ff116816d34..00000000000 --- a/docs/manpages/cat2/set_simulated_annealing_parameters.cat +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: set_simulated_annealing_parameters(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -set_simulated_annealing_parameters - set simulated annealing parameters - -# SYNOPSIS - -set_simulated_annealing - [-temperature temperature] - [-max_iterations iter] - [-perturb_per_iter perturbs] - [-alpha alpha] - - -# DESCRIPTION - -The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. - -# OPTIONS - -`-pin_name`: The name of a pin of the design. - -`-layer`: The routing layer where the pin is placed. - -`-location`: The center of the pin (in microns). - -`-pin_size`: Tthe width and height of the pin (in microns). - -`-force_to_die_boundary`: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat2/write_pin_placement.cat b/docs/manpages/cat2/write_pin_placement.cat deleted file mode 100644 index bd4be4f0de5..00000000000 --- a/docs/manpages/cat2/write_pin_placement.cat +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: write_pin_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 23/12/17 ---- - -# NAME - -write_pin_placement - write pin placement - -# SYNOPSIS - -write_pin_placement - file_name - - -# DESCRIPTION - -The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: - -# OPTIONS - -`file_name`: The name of the file with the pin placement. - -# ARGUMENTS - -# EXAMPLES - -# ENVIRONMENT - -# FILES - -# SEE ALSO - -# HISTORY - -# BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/cat3/aaaa.cat b/docs/manpages/cat3/aaaa.cat deleted file mode 100644 index 3c8c7e9d038..00000000000 --- a/docs/manpages/cat3/aaaa.cat +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Using NiX to develop pandoc -author: John MacFarlane ---- - -The source directory contains `shell.nix` and `flake.nix`, -so if you have NiX installed, you can use either `nix shell` -or `nix develop` can be used to obtain a shell with pandoc -dependencies installed. - -To set up `direnv` so that the NiX shell is automatically -activated whenever the directory is entered, add the following -`.envrc` in the pandoc source directory: - -``` -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" -fi -use flake -``` - -This uses [nix-direnv] for caching. See its web page for -further help. - -[nix-direnv]: https://github.com/nix-community/nix-direnv diff --git a/docs/manpages/man1/openroad.html b/docs/manpages/html/html1/openroad.html similarity index 78% rename from docs/manpages/man1/openroad.html rename to docs/manpages/html/html1/openroad.html index f6ef6664889..04a80176ffa 100644 --- a/docs/manpages/man1/openroad.html +++ b/docs/manpages/html/html1/openroad.html @@ -4,8 +4,7 @@ - - openroad(0) + openroad - - -
-

openroad

-

2023/11/13

-
-

NAME

-

openroad - OpenROAD command-line-interface.

-

SYNOPSIS

-

openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] [-metrics file_name] cmd_file

-

openroad [-python] cmd_file

-

DESCRIPTION

-

The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file.

-

OPTIONS

-

-help: Display help information.

-

-version: Display version information.

-

-no_init: Skip initialization steps.

-

-exit: Exit after executing commands in cmd_file.

-

-gui: Launch the graphical user interface (GUI).

-

-threads count|max: Specify the number of threads to use (or use max available).

-

-log file_name: Log output to the specified file.

-

-metrics file_name: Save performance metrics to the specified file.

-

-python: Execute the cmd_file as a Python script.

-

ARGUMENTS

-

cmd_file: The command file containing OpenROAD commands to be executed.

-

EXAMPLES

-

openroad -help: Prints the help information

-

openroad -version -exit: Prints the version information, and exits the program thereafter.

-

openroad -threads max -log test.log -metrics test.metrics: Prints the log and metric respectively to test.log and test.metrics. Also runs the script with maximum available number of threads.

-

openroad -gui: Launches OpenROAD GUI, which further interactive Tcl commands can be run.

-

TCL COMMANDS

-

These Tcl-based commands are callable from within the OpenROAD binary.

-
    -
  • read_lef [-tech] [-library] filename

    -
      -
    • Read Library Exchange Format (.lef) files.

    • -
    • tech: Technology-specific information

    • -
    • library: .lib files

    • -
  • -
  • read_def filename

    -
      -
    • Read Design Exchange Format (.def) files.

    • -
  • -
  • write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename

    -
      -
    • Write Design Exchange Format (.def) files.

    • -
    • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use.

    • -
  • -
  • read_verilog filename

    -
      -
    • Read Verilog (.v) input file.

    • -
  • -
  • write_verilog filename

    -
      -
    • Write Verilog (.v) file based on current database.

    • -
  • -
  • read_db filename

    -
      -
    • Read OpenDB (.odb) database files.

    • -
  • -
  • write_db filename

    -
      -
    • Write OpenDB (.odb) database files.

    • -
  • -
  • write_abstract_lef filename

    -
      -
    • Write abstract Library Exchange Format (.lef) files based on current database.

    • -
  • -
-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/clear_io_pin_constraints.html b/docs/manpages/html/html2/clear_io_pin_constraints.html deleted file mode 100644 index 8bd12ee2fec..00000000000 --- a/docs/manpages/html/html2/clear_io_pin_constraints.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - clear_io_pin_constraints - - - -
-

clear_io_pin_constraints

-

23/12/17

-
-

NAME

-

clear_io_pin_constraints - clear io pin constraints

-

SYNOPSIS

-

clear_io_pin_constraints

-

DESCRIPTION

-

The clear_io_pin_constraints command clears all the previously-defined constraints and pin shape patterns created with set_io_pin_constraint or define_pin_shape_pattern.

-

OPTIONS

-

-hor_length: The length (in microns) of the horizontal pins.

-

-ver_length: The length (in microns) of the vertical pins.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/define_pin_shape_pattern.html b/docs/manpages/html/html2/define_pin_shape_pattern.html deleted file mode 100644 index b0c7e80cda1..00000000000 --- a/docs/manpages/html/html2/define_pin_shape_pattern.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - define_pin_shape_pattern - - - -
-

define_pin_shape_pattern

-

23/12/17

-
-

NAME

-

define_pin_shape_pattern - define pin shape pattern

-

SYNOPSIS

-

define_pin_shape_pattern -layer layer -x_step x_step -y_step y_step -region {llx lly urx ury} -size {width height} [-pin_keepout dist]

-

DESCRIPTION

-

The define_pin_shape_pattern command defines a pin placement grid on the specified layer. This grid has positions inside the die area, not only at the edges of the die boundary.

-

OPTIONS

-

-layer: The single top-most routing layer of the placement grid.

-

-x_step, -y_step: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively.

-

-region: The {llx, lly, urx, ury} region of the placement grid (in microns).

-

-size: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region.

-

-pin_keepout: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the layer minimum spacing.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/place_pin.html b/docs/manpages/html/html2/place_pin.html deleted file mode 100644 index 25a32b0b2f1..00000000000 --- a/docs/manpages/html/html2/place_pin.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - place_pin - - - -
-

place_pin

-

23/12/17

-
-

NAME

-

place_pin - place pin

-

SYNOPSIS

-

place_pin -pin_name pin_name -layer layer -location {x y} [-pin_size {width height}] [-force_to_die_boundary]

-

DESCRIPTION

-

The place_pin command places a specific pin in the specified location with the specified size. It is recommended that individual pins be placed before the place_pins command, as the routing tracks occupied by these individual pins will be blocked, preventing overlaps.

-

To place an individual pin:

-

OPTIONS

-

-hor_layers: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names.

-

-ver_layers: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names.

-

-corner_avoidance: The distance (in microns) from each corner within which pin placement should be avoided.

-

-min_distance: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin.

-

-min_distance_in_tracks: Flag that allows setting the min distance in number of tracks instead of microns.

-

-exclude: A region where pins cannot be placed. Either top|bottom|left|right:edge_interval, which is the edge interval from the selected edge; begin:end for begin-end of all edges.

-

-group_pins: A list of pins to be placed together on the die boundary.

-

-annealing: Flag to enable simulated annealing pin placement.

-

-write_pin_placement: A file with the pin placement generated in the format of multiple calls for the place_pin command.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/place_pins.html b/docs/manpages/html/html2/place_pins.html deleted file mode 100644 index 568f1c92d68..00000000000 --- a/docs/manpages/html/html2/place_pins.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - place_pins - - - -
-

place_pins

-

23/12/17

-
-

NAME

-

place_pins - place pins

-

SYNOPSIS

-

place_pins -hor_layers h_layers -ver_layers v_layers [-random_seed seed] [-random] [-corner_avoidance length] [-min_distance distance] [-min_distance_in_tracks] [-exclude region] [-group_pins pin_list] [-annealing] [-write_pin_placement file_name]

-

DESCRIPTION

-

The place_pins command places all pins together. Use the following command to perform pin placement:

-

OPTIONS

-

-random_seed: Specify the seed for random operations.

-

-random: When this flag is enabled, the pin placement is random.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/set_io_pin_constraint.html b/docs/manpages/html/html2/set_io_pin_constraint.html deleted file mode 100644 index 059a2b4ced6..00000000000 --- a/docs/manpages/html/html2/set_io_pin_constraint.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - set_io_pin_constraint - - - -
-

set_io_pin_constraint

-

23/12/17

-
-

NAME

-

set_io_pin_constraint - set io pin constraint

-

SYNOPSIS

-

set_io_pin_constraint [-direction direction] [-pin_names names] [-region edge:interval] [-mirrored_pins names] [-group] [-order]

-

DESCRIPTION

-

The set_io_pin_constraint command sets region constraints for pins according to the pin direction or the pin name. This command can be called multiple times with different constraints.

-

You can use the set_io_pin_constraint command to restrict pins to the pin placement grid created with the define_pin_shape_pattern command.

-

It is possible to use the -region, -group and -order arguments together per set_io_pin_constraint call, but the -mirrored_pins argument should be called alone.

-

OPTIONS

-

-direction: Pin direction (input, output, inout, or feedthrough).

-

-pin_names: List of names. Only one of (-direction, -pin_names) should be used in a single call for the set_io_pin_constraint command.

-

-region: Syntax is -region edge:interval. The edge values are (top|bottom|left|right). The interval can be the whole edge with the wildcard * value or a range of values.

-

-mirrored_pins: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list must be even. For example, in set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}, the pins pin1 and pin2 will be placed symmetrically to each other. Same for pin3 and pin4, and for pin5 and pin6.

-

-group: Flag places together on the die boundary the pin list defined in -pin_names, similar to the -group_pins option on the place_pins command.

-

-order: Flag places the pins ordered in ascending x/y position and must be used only when -group is also used.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/set_pin_length.html b/docs/manpages/html/html2/set_pin_length.html deleted file mode 100644 index 13d66d1bbb0..00000000000 --- a/docs/manpages/html/html2/set_pin_length.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - set_pin_length - - - -
-

set_pin_length

-

23/12/17

-
-

NAME

-

set_pin_length - set pin length

-

SYNOPSIS

-

set_pin_length [-hor_length h_length] [-ver_length v_length]

-

DESCRIPTION

-

The set_pin_length command defines the length of all vertical and horizontal pins.

-

OPTIONS

-

-hor_extension: The length (in microns) for the horizontal pins.

-

-ver_extension: The length (in microns) for the vertical pins.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/set_pin_length_extension.html b/docs/manpages/html/html2/set_pin_length_extension.html deleted file mode 100644 index 3bf02d8f4b1..00000000000 --- a/docs/manpages/html/html2/set_pin_length_extension.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - set_pin_length_extension - - - -
-

set_pin_length_extension

-

23/12/17

-
-

NAME

-

set_pin_length_extension - set pin length extension

-

SYNOPSIS

-

set_pin_length_extension [-hor_extension h_extension] [-ver_extension v_extension]

-

DESCRIPTION

-

The set_pin_length_extension command defines the an extension of the length of all vertical and horizontal pins. Note that this command may generate pins partially outside the die area.

-

OPTIONS

-

-hor_multiplier: The thickness multiplier for the horizontal pins.

-

-ver_multiplier: The thickness multiplier for the vertical pins.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/set_pin_thick_multiplier.html b/docs/manpages/html/html2/set_pin_thick_multiplier.html deleted file mode 100644 index 294b6cf13d8..00000000000 --- a/docs/manpages/html/html2/set_pin_thick_multiplier.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - set_pin_thick_multiplier - - - -
-

set_pin_thick_multiplier

-

23/12/17

-
-

NAME

-

set_pin_thick_multiplier - set pin thick multiplier

-

SYNOPSIS

-

set_pin_thick_multiplier [-hor_multiplier h_mult] [-ver_multiplier v_mult]

-

DESCRIPTION

-

The set_pin_thick_multiplier command defines a multiplier for the thickness of all vertical and horizontal pins.

-

OPTIONS

-

-temperature: Temperature parameter. The default value is 1.0, and the allowed values are floats [0, MAX_FLOAT].

-

-max_iterations: The maximum number of iterations. The default value is 2000, and the allowed values are integers [0, MAX_INT].

-

-perturb_per_iter: The number of perturbations per iteration. The default value is 0, and the allowed values are integers [0, MAX_INT].

-

-alpha: The temperature decay factor. The default value is 0.985, and the allowed values are floats (0, 1].

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/set_simulated_annealing_parameters.html b/docs/manpages/html/html2/set_simulated_annealing_parameters.html deleted file mode 100644 index 12609afe858..00000000000 --- a/docs/manpages/html/html2/set_simulated_annealing_parameters.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - set_simulated_annealing_parameters - - - -
-

set_simulated_annealing_parameters

-

23/12/17

-
-

NAME

-

set_simulated_annealing_parameters - set simulated annealing parameters

-

SYNOPSIS

-

set_simulated_annealing [-temperature temperature] [-max_iterations iter] [-perturb_per_iter perturbs] [-alpha alpha]

-

DESCRIPTION

-

The set_simulated_annealing command defines the parameters for simulated annealing pin placement.

-

OPTIONS

-

-pin_name: The name of a pin of the design.

-

-layer: The routing layer where the pin is placed.

-

-location: The center of the pin (in microns).

-

-pin_size: Tthe width and height of the pin (in microns).

-

-force_to_die_boundary: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html2/write_pin_placement.html b/docs/manpages/html/html2/write_pin_placement.html deleted file mode 100644 index c66879ca881..00000000000 --- a/docs/manpages/html/html2/write_pin_placement.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - write_pin_placement - - - -
-

write_pin_placement

-

23/12/17

-
-

NAME

-

write_pin_placement - write pin placement

-

SYNOPSIS

-

write_pin_placement file_name

-

DESCRIPTION

-

The write_pin_placement command writes a file with the pin placement in the format of multiple calls for the place_pin command:

-

OPTIONS

-

file_name: The name of the file with the pin placement.

-

ARGUMENTS

-

EXAMPLES

-

ENVIRONMENT

-

FILES

-

SEE ALSO

-

HISTORY

-

BUGS

-

COPYRIGHT

-

Copyright (c) 2024, The Regents of the University of California. All rights reserved.

-

AUTHORS

-

Jack Luar (TODO@TODO.com).

- - diff --git a/docs/manpages/html/html3/aaaa.html b/docs/manpages/html/html3/aaaa.html deleted file mode 100644 index 3af91a4a021..00000000000 --- a/docs/manpages/html/html3/aaaa.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - Using NiX to develop pandoc - - - -
-

Using NiX to develop pandoc

-
-

The source directory contains shell.nix and flake.nix, so if you have NiX installed, you can use either nix shell or nix develop can be used to obtain a shell with pandoc dependencies installed.

-

To set up direnv so that the NiX shell is automatically activated whenever the directory is entered, add the following .envrc in the pandoc source directory:

-
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
-    source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
-fi
-use flake
-

This uses nix-direnv (https://github.com/nix-community/nix-direnv) for caching. See its web page for further help.

-

AUTHORS

-

John MacFarlane.

- - diff --git a/docs/manpages/man/man1/openroad.1 b/docs/manpages/man/man1/openroad.1 deleted file mode 100644 index 4daa0c4716b..00000000000 --- a/docs/manpages/man/man1/openroad.1 +++ /dev/null @@ -1,127 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "openroad" "0" "2023/11/13" "" "" -.hy -.SH NAME -.PP -openroad - OpenROAD command-line-interface. -.SH SYNOPSIS -.PP -openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads -count|max] [-log file_name] [-metrics file_name] cmd_file -.PP -openroad [-python] cmd_file -.SH DESCRIPTION -.PP -The \f[B]openroad\f[R] command is the command-line interface for -OpenROAD, an open-source initiative for chip design and optimization. -It provides a range of options to control its behavior and execute -commands specified in the cmd_file. -.SH OPTIONS -.PP -\f[C]-help\f[R]: Display help information. -.PP -\f[C]-version\f[R]: Display version information. -.PP -\f[C]-no_init\f[R]: Skip initialization steps. -.PP -\f[C]-exit\f[R]: Exit after executing commands in cmd_file. -.PP -\f[C]-gui\f[R]: Launch the graphical user interface (GUI). -.PP -\f[C]-threads count|max\f[R]: Specify the number of threads to use (or -use max available). -.PP -\f[C]-log file_name\f[R]: Log output to the specified file. -.PP -\f[C]-metrics file_name\f[R]: Save performance metrics to the specified -file. -.PP -\f[C]-python\f[R]: Execute the cmd_file as a Python script. -.SH ARGUMENTS -.PP -\f[C]cmd_file\f[R]: The command file containing OpenROAD commands to be -executed. -.SH EXAMPLES -.PP -\f[B]openroad -help\f[R]: Prints the help information -.PP -\f[B]openroad -version -exit\f[R]: Prints the version information, and -exits the program thereafter. -.PP -\f[B]openroad -threads max -log test.log -metrics test.metrics\f[R]: -Prints the log and metric respectively to \f[C]test.log\f[R] and -\f[C]test.metrics\f[R]. -Also runs the script with maximum available number of threads. -.PP -\f[B]openroad -gui\f[R]: Launches OpenROAD GUI, which further -interactive Tcl commands can be run. -.SH TCL COMMANDS -.PP -These Tcl-based commands are callable from within the OpenROAD binary. -.IP \[bu] 2 -read_lef [-tech] [-library] filename -.RS 2 -.IP \[bu] 2 -Read Library Exchange Format (.lef) files. -.IP \[bu] 2 -tech: Technology-specific information -.IP \[bu] 2 -library: .lib files -.RE -.IP \[bu] 2 -read_def filename -.RS 2 -.IP \[bu] 2 -Read Design Exchange Format (.def) files. -.RE -.IP \[bu] 2 -write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename -.RS 2 -.IP \[bu] 2 -Write Design Exchange Format (.def) files. -.IP \[bu] 2 -version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. -.RE -.IP \[bu] 2 -read_verilog filename -.RS 2 -.IP \[bu] 2 -Read Verilog (.v) input file. -.RE -.IP \[bu] 2 -write_verilog filename -.RS 2 -.IP \[bu] 2 -Write Verilog (.v) file based on current database. -.RE -.IP \[bu] 2 -read_db filename -.RS 2 -.IP \[bu] 2 -Read OpenDB (.odb) database files. -.RE -.IP \[bu] 2 -write_db filename -.RS 2 -.IP \[bu] 2 -Write OpenDB (.odb) database files. -.RE -.IP \[bu] 2 -write_abstract_lef filename -.RS 2 -.IP \[bu] 2 -Write abstract Library Exchange Format (.lef) files based on current -database. -.RE -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/clear_io_pin_constraints.2 b/docs/manpages/man/man2/clear_io_pin_constraints.2 deleted file mode 100644 index d5ac398bc8b..00000000000 --- a/docs/manpages/man/man2/clear_io_pin_constraints.2 +++ /dev/null @@ -1,33 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "clear_io_pin_constraints" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -clear_io_pin_constraints - clear io pin constraints -.SH SYNOPSIS -.PP -clear_io_pin_constraints -.SH DESCRIPTION -.PP -The \f[C]clear_io_pin_constraints\f[R] command clears all the -previously-defined constraints and pin shape patterns created with -\f[C]set_io_pin_constraint\f[R] or \f[C]define_pin_shape_pattern\f[R]. -.SH OPTIONS -.PP -\f[C]-hor_length\f[R]: The length (in microns) of the horizontal pins. -.PP -\f[C]-ver_length\f[R]: The length (in microns) of the vertical pins. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/define_pin_shape_pattern.2 b/docs/manpages/man/man2/define_pin_shape_pattern.2 deleted file mode 100644 index 5635c56ab30..00000000000 --- a/docs/manpages/man/man2/define_pin_shape_pattern.2 +++ /dev/null @@ -1,49 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "define_pin_shape_pattern" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -define_pin_shape_pattern - define pin shape pattern -.SH SYNOPSIS -.PP -define_pin_shape_pattern -layer layer -x_step x_step -y_step y_step --region {llx lly urx ury} -size {width height} [-pin_keepout dist] -.SH DESCRIPTION -.PP -The \f[C]define_pin_shape_pattern\f[R] command defines a pin placement -grid on the specified layer. -This grid has positions inside the die area, not only at the edges of -the die boundary. -.SH OPTIONS -.PP -\f[C]-layer\f[R]: The single top-most routing layer of the placement -grid. -.PP -\f[C]-x_step, -y_step\f[R]: The distance (in microns) between each valid -position on the grid in the x- and y-directions, respectively. -.PP -\f[C]-region\f[R]: The \f[C]{llx, lly, urx, ury}\f[R] region of the -placement grid (in microns). -.PP -\f[C]-size\f[R]: The width and height (in microns) of the pins assigned -to this grid. -The centers of the pins are placed on the grid positions. -Pins may have half of their shapes outside the defined region. -.PP -\f[C]-pin_keepout\f[R]: The boundary (in microns) around existing -routing obstructions that the pins should avoid; this defaults to the -\f[C]layer\f[R] minimum spacing. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/place_pin.2 b/docs/manpages/man/man2/place_pin.2 deleted file mode 100644 index d6bb81f1609..00000000000 --- a/docs/manpages/man/man2/place_pin.2 +++ /dev/null @@ -1,66 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "place_pin" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -place_pin - place pin -.SH SYNOPSIS -.PP -place_pin -pin_name pin_name -layer layer -location {x y} [-pin_size -{width height}] [-force_to_die_boundary] -.SH DESCRIPTION -.PP -The \f[C]place_pin\f[R] command places a specific pin in the specified -location with the specified size. -It is recommended that individual pins be placed before the -\f[C]place_pins\f[R] command, as the routing tracks occupied by these -individual pins will be blocked, preventing overlaps. -.PP -To place an individual pin: -.SH OPTIONS -.PP -\f[C]-hor_layers\f[R]: The layers to create the metal shapes of pins -placed in horizontal tracks. -It can be a single layer or a list of layer names. -.PP -\f[C]-ver_layers\f[R]: The layers to create the metal shapes of pins -placed in vertical tracks. -It can be a single layer or a list of layer names. -.PP -\f[C]-corner_avoidance\f[R]: The distance (in microns) from each corner -within which pin placement should be avoided. -.PP -\f[C]-min_distance\f[R]: The minimum distance between pins on the die -boundary. -This distance can be in microns (default) or in number of tracks between -each pin. -.PP -\f[C]-min_distance_in_tracks\f[R]: Flag that allows setting the min -distance in number of tracks instead of microns. -.PP -\f[C]-exclude\f[R]: A region where pins cannot be placed. -Either \f[C]top|bottom|left|right:edge_interval\f[R], which is the edge -interval from the selected edge; \f[C]begin:end\f[R] for begin-end of -all edges. -.PP -\f[C]-group_pins\f[R]: A list of pins to be placed together on the die -boundary. -.PP -\f[C]-annealing\f[R]: Flag to enable simulated annealing pin placement. -.PP -\f[C]-write_pin_placement\f[R]: A file with the pin placement generated -in the format of multiple calls for the \f[C]place_pin\f[R] command. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/place_pins.2 b/docs/manpages/man/man2/place_pins.2 deleted file mode 100644 index 925223dab5a..00000000000 --- a/docs/manpages/man/man2/place_pins.2 +++ /dev/null @@ -1,36 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "place_pins" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -place_pins - place pins -.SH SYNOPSIS -.PP -place_pins -hor_layers h_layers -ver_layers v_layers [-random_seed seed] -[-random] [-corner_avoidance length] [-min_distance distance] -[-min_distance_in_tracks] [-exclude region] [-group_pins pin_list] -[-annealing] [-write_pin_placement file_name] -.SH DESCRIPTION -.PP -The \f[C]place_pins\f[R] command places all pins together. -Use the following command to perform pin placement: -.SH OPTIONS -.PP -\f[C]-random_seed\f[R]: Specify the seed for random operations. -.PP -\f[C]-random\f[R]: When this flag is enabled, the pin placement is -random. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/set_io_pin_constraint.2 b/docs/manpages/man/man2/set_io_pin_constraint.2 deleted file mode 100644 index 114d78c384b..00000000000 --- a/docs/manpages/man/man2/set_io_pin_constraint.2 +++ /dev/null @@ -1,67 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "set_io_pin_constraint" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -set_io_pin_constraint - set io pin constraint -.SH SYNOPSIS -.PP -set_io_pin_constraint [-direction direction] [-pin_names names] [-region -edge:interval] [-mirrored_pins names] [-group] [-order] -.SH DESCRIPTION -.PP -The \f[C]set_io_pin_constraint\f[R] command sets region constraints for -pins according to the pin direction or the pin name. -This command can be called multiple times with different constraints. -.PP -You can use the \f[C]set_io_pin_constraint\f[R] command to restrict pins -to the pin placement grid created with the -\f[C]define_pin_shape_pattern\f[R] command. -.PP -It is possible to use the \f[C]-region\f[R], \f[C]-group\f[R] and -\f[C]-order\f[R] arguments together per \f[C]set_io_pin_constraint\f[R] -call, but the \f[C]-mirrored_pins\f[R] argument should be called alone. -.SH OPTIONS -.PP -\f[C]-direction\f[R]: Pin direction (\f[C]input\f[R], \f[C]output\f[R], -\f[C]inout\f[R], or \f[C]feedthrough\f[R]). -.PP -\f[C]-pin_names\f[R]: List of names. -Only one of (\f[C]-direction\f[R], \f[C]-pin_names\f[R]) should be used -in a single call for the \f[C]set_io_pin_constraint\f[R] command. -.PP -\f[C]-region\f[R]: Syntax is \f[C]-region edge:interval\f[R]. -The \f[C]edge\f[R] values are (\f[C]top|bottom|left|right\f[R]). -The \f[C]interval\f[R] can be the whole edge with the wildcard -\f[C]*\f[R] value or a range of values. -.PP -\f[C]-mirrored_pins\f[R]: List of pins that sets pairs of pins that will -be symmetrically placed in the vertical or the horizontal edges. -The number of pins in this list \f[B]must be even\f[R]. -For example, in -\f[C]set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}\f[R], -the pins \f[C]pin1\f[R] and \f[C]pin2\f[R] will be placed symmetrically -to each other. -Same for \f[C]pin3\f[R] and \f[C]pin4\f[R], and for \f[C]pin5\f[R] and -\f[C]pin6\f[R]. -.PP -\f[C]-group\f[R]: Flag places together on the die boundary the pin list -defined in \f[C]-pin_names,\f[R] similar to the \f[C]-group_pins\f[R] -option on the \f[C]place_pins\f[R] command. -.PP -\f[C]-order\f[R]: Flag places the pins ordered in ascending x/y position -and must be used only when \f[C]-group\f[R] is also used. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/set_pin_length.2 b/docs/manpages/man/man2/set_pin_length.2 deleted file mode 100644 index e64325cfcc1..00000000000 --- a/docs/manpages/man/man2/set_pin_length.2 +++ /dev/null @@ -1,33 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "set_pin_length" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -set_pin_length - set pin length -.SH SYNOPSIS -.PP -set_pin_length [-hor_length h_length] [-ver_length v_length] -.SH DESCRIPTION -.PP -The \f[C]set_pin_length\f[R] command defines the length of all vertical -and horizontal pins. -.SH OPTIONS -.PP -\f[C]-hor_extension\f[R]: The length (in microns) for the horizontal -pins. -.PP -\f[C]-ver_extension\f[R]: The length (in microns) for the vertical pins. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/set_pin_length_extension.2 b/docs/manpages/man/man2/set_pin_length_extension.2 deleted file mode 100644 index 0517b0b4fc0..00000000000 --- a/docs/manpages/man/man2/set_pin_length_extension.2 +++ /dev/null @@ -1,36 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "set_pin_length_extension" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -set_pin_length_extension - set pin length extension -.SH SYNOPSIS -.PP -set_pin_length_extension [-hor_extension h_extension] [-ver_extension -v_extension] -.SH DESCRIPTION -.PP -The \f[C]set_pin_length_extension\f[R] command defines the an extension -of the length of all vertical and horizontal pins. -Note that this command may generate pins partially outside the die area. -.SH OPTIONS -.PP -\f[C]-hor_multiplier\f[R]: The thickness multiplier for the horizontal -pins. -.PP -\f[C]-ver_multiplier\f[R]: The thickness multiplier for the vertical -pins. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/set_pin_thick_multiplier.2 b/docs/manpages/man/man2/set_pin_thick_multiplier.2 deleted file mode 100644 index e059066b0b2..00000000000 --- a/docs/manpages/man/man2/set_pin_thick_multiplier.2 +++ /dev/null @@ -1,45 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "set_pin_thick_multiplier" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -set_pin_thick_multiplier - set pin thick multiplier -.SH SYNOPSIS -.PP -set_pin_thick_multiplier [-hor_multiplier h_mult] [-ver_multiplier -v_mult] -.SH DESCRIPTION -.PP -The \f[C]set_pin_thick_multiplier\f[R] command defines a multiplier for -the thickness of all vertical and horizontal pins. -.SH OPTIONS -.PP -\f[C]-temperature\f[R]: Temperature parameter. -The default value is \f[C]1.0\f[R], and the allowed values are floats -\f[C][0, MAX_FLOAT]\f[R]. -.PP -\f[C]-max_iterations\f[R]: The maximum number of iterations. -The default value is \f[C]2000\f[R], and the allowed values are integers -\f[C][0, MAX_INT]\f[R]. -.PP -\f[C]-perturb_per_iter\f[R]: The number of perturbations per iteration. -The default value is \f[C]0\f[R], and the allowed values are integers -\f[C][0, MAX_INT]\f[R]. -.PP -\f[C]-alpha\f[R]: The temperature decay factor. -The default value is \f[C]0.985\f[R], and the allowed values are floats -\f[C](0, 1]\f[R]. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/set_simulated_annealing_parameters.2 b/docs/manpages/man/man2/set_simulated_annealing_parameters.2 deleted file mode 100644 index f23d64610c1..00000000000 --- a/docs/manpages/man/man2/set_simulated_annealing_parameters.2 +++ /dev/null @@ -1,40 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "set_simulated_annealing_parameters" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -set_simulated_annealing_parameters - set simulated annealing parameters -.SH SYNOPSIS -.PP -set_simulated_annealing [-temperature temperature] [-max_iterations -iter] [-perturb_per_iter perturbs] [-alpha alpha] -.SH DESCRIPTION -.PP -The \f[C]set_simulated_annealing\f[R] command defines the parameters for -simulated annealing pin placement. -.SH OPTIONS -.PP -\f[C]-pin_name\f[R]: The name of a pin of the design. -.PP -\f[C]-layer\f[R]: The routing layer where the pin is placed. -.PP -\f[C]-location\f[R]: The center of the pin (in microns). -.PP -\f[C]-pin_size\f[R]: Tthe width and height of the pin (in microns). -.PP -\f[C]-force_to_die_boundary\f[R]: When this flag is enabled, the pin -will be snapped to the nearest routing track, next to the die boundary. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man2/write_pin_placement.2 b/docs/manpages/man/man2/write_pin_placement.2 deleted file mode 100644 index b4852bcad9d..00000000000 --- a/docs/manpages/man/man2/write_pin_placement.2 +++ /dev/null @@ -1,31 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "write_pin_placement" "2" "23/12/17" "" "" -.hy -.SH NAME -.PP -write_pin_placement - write pin placement -.SH SYNOPSIS -.PP -write_pin_placement file_name -.SH DESCRIPTION -.PP -The \f[C]write_pin_placement\f[R] command writes a file with the pin -placement in the format of multiple calls for the \f[C]place_pin\f[R] -command: -.SH OPTIONS -.PP -\f[C]file_name\f[R]: The name of the file with the pin placement. -.SH ARGUMENTS -.SH EXAMPLES -.SH ENVIRONMENT -.SH FILES -.SH SEE ALSO -.SH HISTORY -.SH BUGS -.SH COPYRIGHT -.PP -Copyright (c) 2024, The Regents of the University of California. -All rights reserved. -.SH AUTHORS -Jack Luar (TODO\[at]TODO.com). diff --git a/docs/manpages/man/man3/aaaa.3 b/docs/manpages/man/man3/aaaa.3 deleted file mode 100644 index 9dbe64f5684..00000000000 --- a/docs/manpages/man/man3/aaaa.3 +++ /dev/null @@ -1,28 +0,0 @@ -.\" Automatically generated by Pandoc 2.9.2.1 -.\" -.TH "Using NiX to develop pandoc" "" "" "" "" -.hy -.PP -The source directory contains \f[C]shell.nix\f[R] and -\f[C]flake.nix\f[R], so if you have NiX installed, you can use either -\f[C]nix shell\f[R] or \f[C]nix develop\f[R] can be used to obtain a -shell with pandoc dependencies installed. -.PP -To set up \f[C]direnv\f[R] so that the NiX shell is automatically -activated whenever the directory is entered, add the following -\f[C].envrc\f[R] in the pandoc source directory: -.IP -.nf -\f[C] -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url \[dq]https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc\[dq] \[dq]sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=\[dq] -fi -use flake -\f[R] -.fi -.PP -This uses nix-direnv (https://github.com/nix-community/nix-direnv) for -caching. -See its web page for further help. -.SH AUTHORS -John MacFarlane. diff --git a/docs/manpages/md/man2/add_ruler.md b/docs/manpages/md/man2/add_ruler.md deleted file mode 100644 index 2088d561a6e..00000000000 --- a/docs/manpages/md/man2/add_ruler.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: add_ruler(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -add_ruler - add ruler - -# SYNOPSIS - -gui::add_ruler - x0 y0 x1 y1 - [label] - [name] - [euclidian] - - -# DESCRIPTION - -To add a ruler to the layout: - -1. either press ``k`` and use the mouse to place it visually. -To disable snapping for the ruler when adding, hold the ``Ctrl`` key, and to allow non-horizontal or vertical snapping when completing the ruler hold the ``Shift`` key. - -2. or use the command: - -Returns: name of the newly created ruler. - -# OPTIONS - -`x0, y0`: first end point of the ruler in microns. - -`x1, y1`: second end point of the ruler in microns. - -`label`: text label for the ruler. - -`name`: name of the ruler. - -`euclidian`: ``1`` for euclidian ruler, and ``0`` for regular ruler. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/assign_io_bump.md b/docs/manpages/md/man2/assign_io_bump.md index 427f4ddec4c..260de4dc93a 100644 --- a/docs/manpages/md/man2/assign_io_bump.md +++ b/docs/manpages/md/man2/assign_io_bump.md @@ -1,7 +1,7 @@ --- title: assign_io_bump(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/buffer_ports.md b/docs/manpages/md/man2/buffer_ports.md new file mode 100644 index 00000000000..1ccb7421248 --- /dev/null +++ b/docs/manpages/md/man2/buffer_ports.md @@ -0,0 +1,41 @@ +--- +title: buffer_ports(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +buffer_ports - buffer ports + +# SYNOPSIS + +buffer_ports + [-inputs] + [-outputs] + [-max_utilization util] + + +# DESCRIPTION + +The `buffer_ports -inputs` command adds a buffer between the input and its +loads. The `buffer_ports -outputs` adds a buffer between the port driver +and the output port. Inserting buffers on input and output ports makes +the block input capacitances and output drives independent of the block +internals. + +# OPTIONS + +`-inputs, -outputs`: Insert a buffer between the input and load, output and load respectively. The default behavior is `-inputs` and `-outputs` set if neither is specified. + +`-max_utilization`: Defines the percentage of core area used. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/center_at.md b/docs/manpages/md/man2/center_at.md deleted file mode 100644 index 55103dc602a..00000000000 --- a/docs/manpages/md/man2/center_at.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: center_at(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -center_at - center at - -# SYNOPSIS - -gui::center_at - [x y] - - -# DESCRIPTION - -To move the layout to new area: - -# OPTIONS - -`x, y`: new center of layout - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/check_antennas.md b/docs/manpages/md/man2/check_antennas.md index 1176534515e..867e0648345 100644 --- a/docs/manpages/md/man2/check_antennas.md +++ b/docs/manpages/md/man2/check_antennas.md @@ -1,7 +1,7 @@ --- title: check_antennas(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/check_display_controls.md b/docs/manpages/md/man2/check_display_controls.md deleted file mode 100644 index f4c31a1051e..00000000000 --- a/docs/manpages/md/man2/check_display_controls.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: check_display_controls(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -check_display_controls - check display controls - -# SYNOPSIS - -gui::check_display_controls - name - display_type - - -# DESCRIPTION - -To check the visibility or selectability of elements in the layout: - -# OPTIONS - -`name`: is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. - -`display_type`: is either ``visible`` or ``selectable`` - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/check_placement.md b/docs/manpages/md/man2/check_placement.md index e60bad9919f..5aaa015d3d8 100644 --- a/docs/manpages/md/man2/check_placement.md +++ b/docs/manpages/md/man2/check_placement.md @@ -1,7 +1,7 @@ --- title: check_placement(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME @@ -27,7 +27,7 @@ The `check_placement` command checks the placement legality. It returns `-disallow_one_site_gaps`: Disable one site gap during placement check. -`-report_file_name`: File name for saving the report to (e.g. `report.json`. +`-report_filename`: File name for saving the report to (e.g. `report.json`. # ARGUMENTS diff --git a/docs/manpages/md/man2/clear_highlights.md b/docs/manpages/md/man2/clear_highlights.md deleted file mode 100644 index d18f5725ecb..00000000000 --- a/docs/manpages/md/man2/clear_highlights.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: clear_highlights(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -clear_highlights - clear highlights - -# SYNOPSIS - -gui::clear_highlights - [highlight_group] - - -# DESCRIPTION - -To clear the highlight groups: - -# OPTIONS - -`highlight_group`: group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/clear_io_pin_constraints.md b/docs/manpages/md/man2/clear_io_pin_constraints.md index 9e389a7bc5d..80835539e98 100644 --- a/docs/manpages/md/man2/clear_io_pin_constraints.md +++ b/docs/manpages/md/man2/clear_io_pin_constraints.md @@ -1,7 +1,7 @@ --- title: clear_io_pin_constraints(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/clear_rulers.md b/docs/manpages/md/man2/clear_rulers.md deleted file mode 100644 index 67784ac7263..00000000000 --- a/docs/manpages/md/man2/clear_rulers.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: clear_rulers(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -clear_rulers - clear rulers - -# SYNOPSIS - -gui::clear_rulers - - -# DESCRIPTION - -To remove all the rulers: - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/clock_tree_synthesis.md b/docs/manpages/md/man2/clock_tree_synthesis.md index bd4f1c7e269..c62beb916ac 100644 --- a/docs/manpages/md/man2/clock_tree_synthesis.md +++ b/docs/manpages/md/man2/clock_tree_synthesis.md @@ -1,7 +1,7 @@ --- title: clock_tree_synthesis(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/configure_cts_characterization.md b/docs/manpages/md/man2/configure_cts_characterization.md index 0326a3709da..0a55cafcb4b 100644 --- a/docs/manpages/md/man2/configure_cts_characterization.md +++ b/docs/manpages/md/man2/configure_cts_characterization.md @@ -1,7 +1,7 @@ --- title: configure_cts_characterization(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/connect_by_abutment.md b/docs/manpages/md/man2/connect_by_abutment.md index 5fe6499847a..791026b5dce 100644 --- a/docs/manpages/md/man2/connect_by_abutment.md +++ b/docs/manpages/md/man2/connect_by_abutment.md @@ -1,7 +1,7 @@ --- title: connect_by_abutment(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/create_logic_port.md b/docs/manpages/md/man2/create_logic_port.md new file mode 100644 index 00000000000..86b47bb110f --- /dev/null +++ b/docs/manpages/md/man2/create_logic_port.md @@ -0,0 +1,37 @@ +--- +title: create_logic_port(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +create_logic_port - create logic port + +# SYNOPSIS + +create_logic_port + [-direction direction] + port_name + + +# DESCRIPTION + +This command creates logic port. Direction must be specified from: +`in`, `out`, `inout`. + +# OPTIONS + +`-direction`: Direction of the port (`in`, `out`, `inout`). + +`port_name`: Port name. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_menu_item.md b/docs/manpages/md/man2/create_menu_item.md deleted file mode 100644 index 46fb776f057..00000000000 --- a/docs/manpages/md/man2/create_menu_item.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: create_menu_item(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -create_menu_item - create menu item - -# SYNOPSIS - -create_menu_item [-name name] - [-path menu_path] - -text item_text - -script tcl_script - [-shortcut key_shortcut] - [-echo] - - -# DESCRIPTION - -This command add items to the menubar. -Returns: name of the new item, either ``name`` or ``actionX``. - -To remove the item: - -``` -gui::remove_menu_item name -``` - -# OPTIONS - -`item_text`: The text to put on the item - -`tcl_script`: The tcl script to evaluate when the button is pressed - -`name`: (optional) name of the item, used when deleting the item - -`menu_path`: (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu" - -`key_shortcut`: (optional) key shortcut to trigger this item - -`echo`: (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_power_domain.md b/docs/manpages/md/man2/create_power_domain.md new file mode 100644 index 00000000000..193f052e56b --- /dev/null +++ b/docs/manpages/md/man2/create_power_domain.md @@ -0,0 +1,36 @@ +--- +title: create_power_domain(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +create_power_domain - create power domain + +# SYNOPSIS + +create_power_domain + [-elements elements] + name + + +# DESCRIPTION + +This command creates power domain for a group of modules. + +# OPTIONS + +`-elements`: List of module paths that belong this this domain OR `*` for top domain. + +`name`: Domain name. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_power_switch.md b/docs/manpages/md/man2/create_power_switch.md new file mode 100644 index 00000000000..dad16392b7b --- /dev/null +++ b/docs/manpages/md/man2/create_power_switch.md @@ -0,0 +1,48 @@ +--- +title: create_power_switch(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +create_power_switch - create power switch + +# SYNOPSIS + +create_power_switch + [-domain domain] + [-output_supply_port output_supply_port] + [-input_supply_port input_supply_port] + [-control_port control_port] + [-on_state on_state] + name + + +# DESCRIPTION + +This command creates power switch. + +# OPTIONS + +`-domain`: Power domain name. + +`-output_supply_port`: Output supply port of the switch. + +`-input_supply_port`: Input supply port of the switch. + +`-control_port`: Control port on the switch. + +`-on_state`: One of {`state_name`, `input_supply_port`, `boolean_expression`}. + +`name`: Power switch name. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_toolbar_button.md b/docs/manpages/md/man2/create_toolbar_button.md deleted file mode 100644 index 2aa238a5c37..00000000000 --- a/docs/manpages/md/man2/create_toolbar_button.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: create_toolbar_button(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -create_toolbar_button - create toolbar button - -# SYNOPSIS - -create_toolbar_button [-name name] - -text button_text - -script tcl_script - [-echo] - - -# DESCRIPTION - -This command creates toolbar button with name set using the -`-text` flag and accompanying logic in the `-script` flag. - -Returns: name of the new button, either ``name`` or ``buttonX``. - -To remove the button: - -``` -gui::remove_toolbar_button name -``` - -# OPTIONS - -`button_text`: The text to put on the button. - -`tcl_script`: The tcl script to evaluate when the button is pressed. - -`name`: The name of the button, used when deleting the button. - -`echo`: This indicate that the commands in the ``tcl_script`` should be echoed in the log. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/cut_rows.md b/docs/manpages/md/man2/cut_rows.md new file mode 100644 index 00000000000..8d5d3962dca --- /dev/null +++ b/docs/manpages/md/man2/cut_rows.md @@ -0,0 +1,67 @@ +--- +title: cut_rows(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +cut_rows - cut rows + +# SYNOPSIS + +cut_rows + [-endcap_master endcap_master] + [-halo_width_x halo_x] + [-halo_width_y halo_y] + + +# DESCRIPTION + +This command cuts rows. + +# OPTIONS + +`-tapcell_master`: Master used as a tapcell. + +`-endcap_master`: Master used as an endcap. + +`-distance`: Distance (in microns) between each tapcell in the checkerboard. + +`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. + +`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. + +`-tap_nwintie_master`: Master cell placed at the top and bottom of|macros and the core area according the row orientation. + +`-tap_nwin2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwintie_master` + +`-tap_nwin3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwin2_master`. + +`-tap_nwouttie_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. + +`-tap_nwout2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwouttie_master`. + +`-tap_nwout3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation | This master should be smaller than `tap_nwout2_master`. + +`-incnrcap_nwin_master`: Master cell placed at the corners of macros, according the row orientation. + +`-incnrcap_nwout_master`: Master cell placed at the corners of macros, according the row orientation. + +`-cnrcap_nwin_master`: Macro cell placed at the corners the core area according the row orientation. + +`-cnrcap_nwout_master`: Macro cell placed at the corners the core area according the row orientation. + +`-tap_prefix`: Prefix for the tapcell instances. The default value is `TAP_`. + +`-endcap_prefix`: Prefix for the endcaps instances. The default value is `PHY_`. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/define_pin_shape_pattern.md b/docs/manpages/md/man2/define_pin_shape_pattern.md index 1f30e23dcc3..d808bcbc6b1 100644 --- a/docs/manpages/md/man2/define_pin_shape_pattern.md +++ b/docs/manpages/md/man2/define_pin_shape_pattern.md @@ -1,7 +1,7 @@ --- title: define_pin_shape_pattern(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/delete_ruler.md b/docs/manpages/md/man2/delete_ruler.md deleted file mode 100644 index ade0288d5b9..00000000000 --- a/docs/manpages/md/man2/delete_ruler.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: delete_ruler(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -delete_ruler - delete ruler - -# SYNOPSIS - -gui::delete_ruler - name - - -# DESCRIPTION - -To remove a single ruler: - -# OPTIONS - -`name`: name of the ruler. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/density_fill.md b/docs/manpages/md/man2/density_fill.md index 412a0f41295..1a7adf41367 100644 --- a/docs/manpages/md/man2/density_fill.md +++ b/docs/manpages/md/man2/density_fill.md @@ -1,7 +1,7 @@ --- title: density_fill(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/design_created.md b/docs/manpages/md/man2/design_created.md deleted file mode 100644 index 25e547d9af6..00000000000 --- a/docs/manpages/md/man2/design_created.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: design_created(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -design_created - design created - -# SYNOPSIS - -gui::design_created - - -# DESCRIPTION - -Announce to the GUI that a design was loaded -(note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/detailed_placement.md b/docs/manpages/md/man2/detailed_placement.md index 7e0f89e2afd..034907c93b6 100644 --- a/docs/manpages/md/man2/detailed_placement.md +++ b/docs/manpages/md/man2/detailed_placement.md @@ -1,7 +1,7 @@ --- title: detailed_placement(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME @@ -27,7 +27,7 @@ to legal locations after global placement. `-disallow_one_site_gaps`: Disable one site gap during placement check. -`-report_file_name`: File name for saving the report to (e.g. `report.json`. +`-report_file_name`: File name for saving the report to (e.g. `report.json`.) # ARGUMENTS diff --git a/docs/manpages/md/man2/display_timing_cone.md b/docs/manpages/md/man2/display_timing_cone.md deleted file mode 100644 index 51864553417..00000000000 --- a/docs/manpages/md/man2/display_timing_cone.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: display_timing_cone(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -display_timing_cone - display timing cone - -# SYNOPSIS - -display_timing_cone pin - [-fanin] - [-fanout] - [-off] - - -# DESCRIPTION - -This command displays timing cones for a pin given options. - -# OPTIONS - -`pin`: name of the instance or block pin. - -`fanin`: (optional) display the fanin timing cone. - -`fanout`: (optional) display the fanout timing cone. - -`off`: (optional) remove the timing cone. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/draw_route_guides.md b/docs/manpages/md/man2/draw_route_guides.md deleted file mode 100644 index 8d97e0da0e0..00000000000 --- a/docs/manpages/md/man2/draw_route_guides.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: draw_route_guides(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -draw_route_guides - draw route guides - -# SYNOPSIS - -draw_route_guides - net_names - [-show_pin_locations] - - -# DESCRIPTION - -The `draw_route_guides` command plots the route guides for a set of nets. -To erase the route guides from the GUI, pass an empty list to this command: -`draw_route_guides {}`. - -# OPTIONS - -`file_name`: Guide file name. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/dump_heatmap_name.md b/docs/manpages/md/man2/dump_heatmap_name.md deleted file mode 100644 index afcd01363dd..00000000000 --- a/docs/manpages/md/man2/dump_heatmap_name.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: dump_heatmap_name(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -dump_heatmap_name - dump heatmap name - -# SYNOPSIS - -gui::dump_heatmap - name - filename - - -# DESCRIPTION - -To save the raw data from the heat maps ins a comma separated value (CSV) format: - -# OPTIONS - -`name`: is the name of the heatmap. - -`filename`: path to the file to write the data to. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/estimate_parasitics.md b/docs/manpages/md/man2/estimate_parasitics.md index 7128d12ce2a..62778e8ccba 100644 --- a/docs/manpages/md/man2/estimate_parasitics.md +++ b/docs/manpages/md/man2/estimate_parasitics.md @@ -1,7 +1,7 @@ --- title: estimate_parasitics(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME @@ -10,22 +10,27 @@ estimate_parasitics - estimate parasitics # SYNOPSIS -estimate_parasitics -global_routing +estimate_parasitics + -placement|-global_routing # DESCRIPTION -This command estimates RC parasitics based on global route results -by using the `-global_routing` option of the `estimate_parasitics` command. +Estimate RC parasitics based on placed component pin locations. If there are +no component locations, then no parasitics are added. The resistance and capacitance +values are per distance unit of a routing wire. Use the `set_units` command to check +units or `set_cmd_units` to change units. The goal is to represent "average" +routing layer resistance and capacitance. If the set_wire_rc command is not +called before resizing, then the default_wireload model specified in the first +Liberty file read or with the SDC set_wire_load command is used to make parasitics. -```{note} -To see the function definition for `estimate_parasitics`, refer to -[Resizer docs](../rsz/README.md#estimate-parasitics). -``` +After the `global_route` command has been called, the global routing topology +and layers can be used to estimate parasitics with the `-global_routing` +flag. # OPTIONS -This command has no switches. +`-placement or -global_routing`: Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. # ARGUMENTS diff --git a/docs/manpages/md/man2/evaluate_hypergraph_partition.md b/docs/manpages/md/man2/evaluate_hypergraph_partition.md index bc71ee2f839..81eb3d0e68f 100644 --- a/docs/manpages/md/man2/evaluate_hypergraph_partition.md +++ b/docs/manpages/md/man2/evaluate_hypergraph_partition.md @@ -1,7 +1,7 @@ --- title: evaluate_hypergraph_partition(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/evaluate_part_design_solution.md b/docs/manpages/md/man2/evaluate_part_design_solution.md index b0de63ae1c2..319aee8bb00 100644 --- a/docs/manpages/md/man2/evaluate_part_design_solution.md +++ b/docs/manpages/md/man2/evaluate_part_design_solution.md @@ -1,7 +1,7 @@ --- title: evaluate_part_design_solution(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/filler_placement.md b/docs/manpages/md/man2/filler_placement.md index 58cb8c98d22..d68555337e5 100644 --- a/docs/manpages/md/man2/filler_placement.md +++ b/docs/manpages/md/man2/filler_placement.md @@ -1,7 +1,7 @@ --- title: filler_placement(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/focus_net.md b/docs/manpages/md/man2/focus_net.md deleted file mode 100644 index 9fd0f53d5ad..00000000000 --- a/docs/manpages/md/man2/focus_net.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: focus_net(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -focus_net - focus net - -# SYNOPSIS - -focus_net net - [-remove] - [-clear] - - -# DESCRIPTION - -This command limits the drawing to specified net. - -# OPTIONS - -`pin`: name of the net. - -`remove`: (optional) removes the net from from the focus. - -`clear`: (optional) clears all nets from focus. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/get_selection_property.md b/docs/manpages/md/man2/get_selection_property.md deleted file mode 100644 index 41238b2be49..00000000000 --- a/docs/manpages/md/man2/get_selection_property.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: get_selection_property(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -get_selection_property - get selection property - -# SYNOPSIS - -gui::get_selection_property - name - - -# DESCRIPTION - -To get the properties for the current selection in the Inspector: - -# OPTIONS - -`name`: name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/global_route.md b/docs/manpages/md/man2/global_route.md deleted file mode 100644 index 4efe4a287b8..00000000000 --- a/docs/manpages/md/man2/global_route.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: global_route(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -global_route - global route - -# SYNOPSIS - -global_route - [-guide_file out_file] - [-congestion_iterations iterations] - [-congestion_report_file file_name] - [-congestion_report_iter_step steps] - [-grid_origin {x y}] - [-critical_nets_percentage percent] - [-allow_congestion] - [-verbose] - [-start_incremental] - [-end_incremental] - - -# DESCRIPTION - -This command performs global routing with the option to use a `guide_file`. -You may also choose to use incremental global routing using `-start_incremental`. - -# OPTIONS - -`-guide_file`: Set the output guides file name (e.g., `route.guide`). - -`-congestion_iterations`: Set the number of iterations made to remove the overflow of the routing. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. - -`-congestion_report_file`: Set the file name to save the congestion report. The file generated can be read by the DRC viewer in the GUI (e.g., `report_file.rpt`). - -`-congestion_report_iter_step`: Set the number of iterations to report. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-grid_origin`: Set the (x, y) origin of the routing grid in DBU. For example, `-grid_origin {1 1}` corresponds to the die (0, 0) + 1 DBU in each x--, y- direction. - -`-critical_nets_percentage`: Set the percentage of nets with the worst slack value that are considered timing critical, having preference over other nets during congestion iterations (e.g. `-critical_nets_percentage 30`). The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-allow_congestion`: Allow global routing results to be generated with remaining congestion. The default is false. - -`-verbose`: This flag enables the full reporting of the global routing. - -`-start_incremental`: This flag initializes the GRT listener to get the net modified. The default is false. - -`-end_incremental`: This flag run incremental GRT with the nets modified. The default is false. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/global_route_debug.md b/docs/manpages/md/man2/global_route_debug.md deleted file mode 100644 index 92210a6c9a2..00000000000 --- a/docs/manpages/md/man2/global_route_debug.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: global_route_debug(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -global_route_debug - global route debug - -# SYNOPSIS - -global_route_debug - [-st] - [-rst] - [-tree2D] - [-tree3D] - [-saveSttInput file_name] - [-net net_name] - - -# DESCRIPTION - -The `global_route_debug` command allows you to start a debug mode to view the status of the Steiner Trees. -It also allows you to dump the input positions for the Steiner tree creation of a net. -This must be used before calling the `global_route` command. -Set the name of the net and the trees that you want to visualize. - -# OPTIONS - -`-net`: List of nets to report the wirelength. Use `*` to report the wire length for all nets of the design. - -`-file`: The name of the file for the wirelength report. - -`-global_route`: Report the wire length of the global routing. - -`-detailed_route`: Report the wire length of the detailed routing. - -`-verbose`: This flag enables the full reporting of the layer-wise wirelength information. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/gui_display_controls.md b/docs/manpages/md/man2/gui_display_controls.md deleted file mode 100644 index 34d52a31965..00000000000 --- a/docs/manpages/md/man2/gui_display_controls.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: gui_display_controls(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -gui_display_controls - gui display controls - -# SYNOPSIS - -gui::check_display_controls - name - display_type - - -# DESCRIPTION - -To check the visibility or selectability of elements in the layout: - -# OPTIONS - -`name`: is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. - -`display_type`: is either ``visible`` or ``selectable`` - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/heat_maps.md b/docs/manpages/md/man2/heat_maps.md deleted file mode 100644 index 8b7256a4616..00000000000 --- a/docs/manpages/md/man2/heat_maps.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: heat_maps(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -heat_maps - heat maps - -# SYNOPSIS - -gui::set_heatmap - name - [option] - [value] - - -# DESCRIPTION - -The currently availble heat maps are: - -- ``Power`` -- ``Routing`` -- ``Placement`` -- ``IRDrop`` - -### Set Heatmap - -To control the settings in the heat maps: -These options can also be modified in the GUI by double-clicking the underlined display control for the heat map. - -# OPTIONS - -`name`: is the name of the heatmap. - -`option`: is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. - -`value`: is the new value for the specified option. This is not used when rebuilding map. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/hide.md b/docs/manpages/md/man2/hide.md deleted file mode 100644 index 97920d32b44..00000000000 --- a/docs/manpages/md/man2/hide.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: hide(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -hide - hide - -# SYNOPSIS - -gui::hide - - -# DESCRIPTION - -To close the GUI and return to the command-line: - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/highlight_instance.md b/docs/manpages/md/man2/highlight_instance.md deleted file mode 100644 index 356a7459ae0..00000000000 --- a/docs/manpages/md/man2/highlight_instance.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: highlight_instance(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -highlight_instance - highlight instance - -# SYNOPSIS - -gui::highlight_inst - name - [highlight_group] - - -# DESCRIPTION - -To highlight an instance: - -# OPTIONS - -`name`: name of the instance to highlight. - -`highlight_group`: group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/highlight_net.md b/docs/manpages/md/man2/highlight_net.md deleted file mode 100644 index e96a037536b..00000000000 --- a/docs/manpages/md/man2/highlight_net.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: highlight_net(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -highlight_net - highlight net - -# SYNOPSIS - -gui::highlight_net - name - [highlight_group] - - -# DESCRIPTION - -To highlight a net: - -# OPTIONS - -`name`: name of the net to highlight - -`highlight_group`: group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/input_dialog.md b/docs/manpages/md/man2/input_dialog.md deleted file mode 100644 index d00015056cc..00000000000 --- a/docs/manpages/md/man2/input_dialog.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: input_dialog(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -input_dialog - input dialog - -# SYNOPSIS - -gui::input_dialog - title - question - - -# DESCRIPTION - -To request user input via the GUI: -Returns: a string with the input, or empty string if canceled. - -# OPTIONS - -`timeout`: is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/insert_dft.md b/docs/manpages/md/man2/insert_dft.md index cd1578ae1e6..7e0a5bff30f 100644 --- a/docs/manpages/md/man2/insert_dft.md +++ b/docs/manpages/md/man2/insert_dft.md @@ -1,7 +1,7 @@ --- title: insert_dft(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/load_drc.md b/docs/manpages/md/man2/load_drc.md deleted file mode 100644 index 70264a10f3b..00000000000 --- a/docs/manpages/md/man2/load_drc.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: load_drc(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -load_drc - load drc - -# SYNOPSIS - -gui::load_drc filename - - -# DESCRIPTION - -To load the results of a DRC report: - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/macro_placement.md b/docs/manpages/md/man2/macro_placement.md deleted file mode 100644 index 5d268af6d3f..00000000000 --- a/docs/manpages/md/man2/macro_placement.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: macro_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/11 ---- - -# NAME - -macro_placement - macro placement - -# SYNOPSIS - -macro_placement - [-halo {halo_x halo_y}] - [-channel {channel_x channel_y}] - [-fence_region {lx ly ux uy}] - [-snap_layer snap_layer_number] - [-style corner_wax_wl|corner_min_wl] - - -# DESCRIPTION - -This command performs macro placement. -For placement style, `corner_max_wl` means that choosing the partitions that maximise the wirelength -of connections between the macros to force them to the corners. Vice versa for `corner_min_wl`. - -Macros will be placed with $max(halo * 2, channel)$ spacing between macros, and between -macros and the fence/die boundary. If no solutions are found, try reducing the -channel/halo. - -# OPTIONS - -`-halo`: Horizontal and vertical halo around macros (microns). - -`-channel`: Horizontal and vertical channel width between macros (microns). - -`-fence_region`: Restrict macro placements to a region (microns). Defaults to the core area. - -`-snap_layer_number`: Snap macro origins to this routing layer track. - -`-style`: Placement style, to choose either `corner_max_wl` or `corner_min_wl`. The default value is `corner_max_wl`. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/make_false_io_site.md b/docs/manpages/md/man2/make_false_io_site.md index 544002c4b55..414a60f18e2 100644 --- a/docs/manpages/md/man2/make_false_io_site.md +++ b/docs/manpages/md/man2/make_false_io_site.md @@ -1,7 +1,7 @@ --- title: make_false_io_site(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/make_io_bump_array.md b/docs/manpages/md/man2/make_io_bump_array.md index a7341329723..9f9353748db 100644 --- a/docs/manpages/md/man2/make_io_bump_array.md +++ b/docs/manpages/md/man2/make_io_bump_array.md @@ -1,7 +1,7 @@ --- title: make_io_bump_array(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/make_io_sites.md b/docs/manpages/md/man2/make_io_sites.md index c130b378b79..b858870a7df 100644 --- a/docs/manpages/md/man2/make_io_sites.md +++ b/docs/manpages/md/man2/make_io_sites.md @@ -1,7 +1,7 @@ --- title: make_io_sites(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/map_power_switch.md b/docs/manpages/md/man2/map_power_switch.md new file mode 100644 index 00000000000..c63c5665e6e --- /dev/null +++ b/docs/manpages/md/man2/map_power_switch.md @@ -0,0 +1,39 @@ +--- +title: map_power_switch(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +map_power_switch - map power switch + +# SYNOPSIS + +map_power_switch + [-switch_name_list switch_name_list] + [-lib_cells lib_cells] + [-port_map port_map] + + +# DESCRIPTION + +This command maps existing power switch. + +# OPTIONS + +`-switch_name_list`: A list of switches (as defined by create_power_switch) to map. + +`-lib_cells`: A list of library cells that could be mapped to the power switch + +`-port_map`: A map that associates model ports defined by create_power_switch to logical ports + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/optimize_mirroring.md b/docs/manpages/md/man2/optimize_mirroring.md index acf0b6c2da3..c67428c75d1 100644 --- a/docs/manpages/md/man2/optimize_mirroring.md +++ b/docs/manpages/md/man2/optimize_mirroring.md @@ -1,7 +1,7 @@ --- title: optimize_mirroring(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/pause.md b/docs/manpages/md/man2/pause.md deleted file mode 100644 index 8039a961081..00000000000 --- a/docs/manpages/md/man2/pause.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: pause(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -pause - pause - -# SYNOPSIS - -gui::pause - [timeout] - - -# DESCRIPTION - -Pause the execution of the script: - -# OPTIONS - -`name`: of the widget. For example, the display controls would be "Display Control". - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/pdn.txt b/docs/manpages/md/man2/pdn.txt index dbd2c4c1d6e..96c825d6d4f 100644 --- a/docs/manpages/md/man2/pdn.txt +++ b/docs/manpages/md/man2/pdn.txt @@ -1,94 +1,96 @@ -# PDNGEN +# Power Distribution Network Generator +The power distribution network (PDN) generator module in OpenROAD (`pdn`) +is based on the PDNGEN tool. This utility aims to simplify the process of adding a power grid into a floorplan. The aim is to specify a small set of power grid policies to be applied to the design, such as layers to use, stripe width and spacing, then have the utility generate the actual metal straps. Grid policies can be defined over the stdcell area, and over areas occupied by macros. -```{seealso} -To work with UPF files, refer to [Read UPF Utility](../upf/README.md). +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. ``` -## Commands +### Build Power Grid -### Define Power Switch Cell +Build a power grid in accordance with the information specified. -Define a power switch cell that will be inserted into a power grid -``` -define_power_switch_cell -name \ - -control \ - [-acknowledge ] \ - -switched_power \ - -power \ - -ground +```tcl +pdngen + [-skip_trim] + [-dont_add_pins] + [-reset] + [-ripup] + [-report_only] + [-failed_via_report file] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | The name of the power switch cell. | -| `-control` | The name of the power control port of the power switch cell. | -| `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -| `-switched_power` | Defines the name of the pin that outputs the switched power net | -| `-power` | Defines the name of the pin that connects to the unswitched power net. | -| `-ground` | Defines the name of the pin that connects to the ground net. | - -#### Examples -``` -define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS - -``` +| `-skip_trim` | Skip the metal trim step, which attempts to remove metal stubs. | +| `-dont_add_pins` | Prevent the creation of block pins. | +| `-reset` | Reset the grid and domain specifications. | +| `-ripup` | Ripup the existing power grid, as specified by the voltage domains. | +| `-report_only` | Print the current specifications. | +| `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | -### Define voltage domains +### Define Voltage Domains Defines a named voltage domain with the names of the power and ground nets for a region. -The -region argument specifies the name of a region of the design. This region must already exist in the floorplan before referencing it with the set_voltage_domain command. If the -region argument is not supplied then region is the entire extent of the design. - -The -name argument is used to define a name for the voltage domain that can be used in the `define_pdn_grid` command -The -power and -ground arguments are used to define the names of the nets to be use for power and ground respectively within this voltage domain. +This region must already exist in the floorplan before referencing it with the `set_voltage_domain` command. If the `-region` argument is not supplied then region is the entire core area of the design. -If the voltage domain is a switched power domain, then the name of the swiched power net must be specified with the -switched_power option. -``` -set_voltage_domain [-name name] \ - -power power_net \ - -ground ground_net \ - [-region region_name] \ - [-secondary_power secondary_power_net] \ - [-switched_power ] +```tcl +set_voltage_domain + -name domain_name + -power power_net_name + -ground ground_net_name + [-region region_name] + [-secondary_power secondary_power_net] + [-switched_power switched_power_net] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | Defines the name of the voltage domain, default is "Core" or region name if provided | -| `-power` | Specifies the name of the power net for this voltage domain | -| `-ground` | Specifies the name of the ground net for this voltage domain | -| `-region` | Specifies a region of the design occupied by this voltage domain | -| `-secondary_power` | Specifies the name of the secondary power net for this voltage domain | -| `-switched_power` | Specifies the name of the switched power net for switched power domains, | - -#### Examples -``` +| `-name` | Defines the name of the voltage domain, default is "Core" or region name if provided. | +| `-power` | Specifies the name of the power net for this voltage domain. | +| `-ground` | Specifies the name of the ground net for this voltage domain. | +| `-region` | Specifies a region of the design occupied by this voltage domain. | +| `-secondary_power` | Specifies the name of the secondary power net for this voltage domain. | +| `-switched_power` | Specifies the name of the switched power net for switched power domains. | + +Example usage: + +```tcl set_voltage_domain -power VDD -ground VSS set_voltage_domain -name TEMP_ANALOG -region TEMP_ANALOG -power VIN -ground VSS set_voltage_domain -region test_domain -power VDD -ground VSS -secondary_power VREG ``` -### Define power grids +### Define Power Grid (General) Define the rules to describe a power grid pattern to be placed in the design. +```{warning} +`define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! ``` -define_pdn_grid [-name ] \ - [-pins ] \ - [-starts_with (POWER|GROUND)] \ - [-voltage_domain ] \ - [-starts_with (POWER|GROUND)] \ - [-obstructions ] + +```tcl +define_pdn_grid + [-name name] + [-voltage_domain list_of_domain_names] + [-pins list_of_pin_layers] + [-starts_with POWER|GROUND] + [-starts_with POWER|GROUND] + [-obstructions list_of_layers] ``` #### Options @@ -96,34 +98,36 @@ define_pdn_grid [-name ] \ | Switch Name | Description | | ----- | ----- | | `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created) | +| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | | `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND) | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | - +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | -#### Examples +Example usage: -``` +```tcl define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} ``` +### Define Power Grid (Macros) -### Define a macro power grid - -``` -define_pdn_grid -macro \ - [-name name] \ - [-grid_over_pg_pins|-grid_over_boundary] \ - [-orient ] \ - [-instances ] \ - [-default] \ - [-halo ] \ - [-voltage_domain ] \ - [-starts_with (POWER|GROUND)] \ - [-obstructions ] \ - [-bump] +```tcl +define_pdn_grid + -macro + [-name name] + [-grid_over_pg_pins|-grid_over_boundary] + [-voltage_domain list_of_domain_names] + [-orient list_of_valid_orientations] + [-instances list_of_instances] + [-cells list_of_cells] + [-default] + [-halo list_of_halo_values] + [-pins list_of_pin_layers] + [-starts_with POWER|GROUND] + [-obstructions list_of_layers] + [-power_switch_cell name] + [-power_control signal_name] + [-power_control_network STAR|DAISY] ``` #### Options @@ -132,188 +136,205 @@ define_pdn_grid -macro \ | ----- | ----- | | `-macro` | Defines the type of grid being added as a macro. | | `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created) | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND) | -| `-grid_over_boundary` | Place the power grid over the entire macro. | -| `-grid_over_pg_pins` | Place the power grid over the power ground pins of the macro. (Default) | +| `-grid_over_pg_pins`, `-grid_over_boundary` | Place the power grid over the power ground pins of the macro. (Default True), or Place the power grid over the entire macro. | +| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created). | +| `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | | `-instances` | For a macro, defines a set of valid instances. Macros with a matching instance name will use this grid specification. | | `-cells` | For a macro, defines a set of valid cells. Macros which are instances of one of these cells will use this grid specification. | | `-default` | For a macro, specifies this is a default grid that can be overwritten. | -| `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | -| `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively. (Default: 0) | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | -| `-bump` | Flag to indicate this is a grid for a cover cell | +| `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively (Default: 0). | +| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +| `-power_switch_cell` | Defines the name of the coarse grain power switch cell to be used wherever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. | +| `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | +| `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. | -#### Examples +Example usage: -``` +```tcl define_pdn_grid -macro -name ram -orient {R0 R180 MX MY} -grid_over_pg_pins -starts_with POWER -pin_direction vertical define_pdn_grid -macro -name rotated_rams -orient {E FE W FW} -grid_over_boundary -starts_with POWER -pin_direction horizontal ``` -### Define a grid for an existing routing +### Define Power Grid for an existing routing solution -``` -define_pdn_grid [-name ] \ - -existing \ - [-obstructions ] +```tcl +define_pdn_grid + -existing + [-name name] + [-obstructions list_of_layers] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | Defines a name to use when referring to this grid definition. Defaults to `existing_grid` | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | +| `-existing` | Flag to enable defining for existing routing solution. | +| `-name` | Defines a name to use when referring to this grid definition (defaults to `existing_grid`). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | -#### Examples +Example usage: -``` +```tcl define_pdn_grid -name main_grid -existing ``` -### Power switch insertion +### Define Power Switch Cell -``` -define_pdn_grid [-name ] \ - [-switch_cell ] \ - [-power_control ] \ - [-power_control_network (STAR|DAISY)] +Define a power switch cell that will be inserted into a power grid + +```tcl +define_power_switch_cell + -name name + -control control_pin + -power_switchable power_switchable_pin + -power unswitched_power_pin + -ground ground_pin + [-acknowledge acknowledge_pin_name] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-switch_cell` | Defines the name of the coarse grain power switch cell to be used for this grid. | -| `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | -| `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY | - - -The `-switch_cell` argument is used to specify the name of a coarse-grain power switch cell that is to be inserted whereever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. +| `-name` | The name of the power switch cell. | +| `-control` | The name of the power control port of the power switch cell. | +| `-switched_power` | Defines the name of the pin that outputs the switched power net. | +| `-power` | Defines the name of the pin that connects to the unswitched power net. | +| `-ground` | Defines the name of the pin that connects to the ground net. | +| `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -The `-power_control` argument specifies the name of the power control signal that must be connected to the inserted power control cells. +Example usage: -The `-power_control_network` argument specifies how the power control signal is to be connected to the power switches. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. +```tcl +define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS +``` -### Add straps / stripes +### Add Straps/Stripes Defines a pattern of power and ground stripes in a single layer to be added to a power grid. -``` -add_pdn_stripe [-grid grid_name] \ - -layer layer_name \ - -width width_value \ - [-pitch pitch_value] \ - [-spacing spacing_value] \ - [-offset offset_value] \ - [-starts_with (POWER|GROUND)] \ - [-followpins] \ - [-extend_to_boundary] \ - [-extend_to_core_ring] \ - [-snap_to_grid] \ - [-number_of_straps count] \ - [-nets list_of_nets] +```tcl +add_pdn_stripe + -layer layer_name + [-grid grid_name] + [-width width_value] + [-followpins] + [-extend_to_core_ring] + [-pitch pitch_value] + [-spacing spacing_value] + [-offset offset_value] + [-starts_with POWER|GROUND] + [-extend_to_boundary] + [-snap_to_grid] + [-number_of_straps count] + [-nets list_of_nets] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-grid` | Specifies the grid to which this stripe definition will be added. (Default: Last grid defined by `define_pdn_grid`) | -| `-layer` | Specifies the name of the layer for these stripes | -| `-width` | Value for the width of stripe | -| `-pitch` | Value for the distance between each power/ground pair | -| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2) | +| `-layer` | Specifies the name of the layer for these stripes. | +| `-grid` | Specifies the grid to which this stripe definition will be added. (Default: Last grid defined by `define_pdn_grid`). | +| `-width` | Value for the width of stripe. | +| `-followpins` | Indicates that the stripe forms part of the stdcell rails, pitch and spacing are dictated by the stdcell rows, the `-width` is not needed if it can be determined from the cells. | +| `-extend_to_core_ring` | Extend the stripes to the core PG ring. | +| `-pitch` | Value for the distance between each power/ground pair. | +| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch (Default: pitch / 2). | | `-offset` | Value for the offset of the stripe from the lower left corner of the design core area. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting) | -| `-followpins` | Indicates that the stripe forms part of the stdcell rails, pitch and spacing are dictated by the stdcell rows, the `-width` is not needed if it can be determined from the cells | -| `-extend_to_boundary` | Extend the stripes to the boundary of the grid | -| `-snap_to_grid` | Snap the stripes to the defined routing grid | -| `-number_of_straps` | Number of power/ground pairs to add | -| `-nets` | Limit straps to just this list of nets | - -#### Examples -``` +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | +| `-extend_to_boundary` | Extend the stripes to the boundary of the grid. | +| `-snap_to_grid` | Snap the stripes to the defined routing grid. | +| `-number_of_straps` | Number of power/ground pairs to add. | +| `-nets` | Limit straps to just this list of nets. | + +Example usage: + +```tcl add_pdn_stripe -grid main_grid -layer metal1 -followpins add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins -add pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND +add_pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND ``` -### Add rings +### Add Rings -The `add_pnd_ring` command is used to define power/ground rings around a grid region. The ring structure is built using two layers that are orthogonal to each other. A power/ground pair will be added above and below the grid using the horizontal layer, with another power/ground pair to the left and right using the vertical layer. Together these 4 pairs of power/ground stripes form a ring around the specified grid. Power straps on these layers that are inside the enclosed region are extend to connect to the ring. +The `add_pdn_ring` command is used to define power/ground rings around a grid region. The ring structure is built using two layers that are orthogonal to each other. A power/ground pair will be added above and below the grid using the horizontal layer, with another power/ground pair to the left and right using the vertical layer. Together these 4 pairs of power/ground stripes form a ring around the specified grid. Power straps on these layers that are inside the enclosed region are extend to connect to the ring. -``` -add_pdn_ring [-grid grid_name] \ - -layers layer_name \ - -widths (width_value|list_of_2_values) \ - -spacings (spacing_value|list_of_2_values) \ - [-core_offset offset_value] \ - [-pad_offset offset_value] \ - [-add_connect] \ - [-extend_to_boundary] \ - [-connect_to_pads] \ - [-connect_to_pad_layers layers] \ - [-starts_with (POWER|GROUND)] \ - [-nets list_of_nets] +```tcl +add_pdn_ring + -layers layer_name + -widths width_value|list_of_2_values + -spacings spacing_value|list_of_2_values + [-grid grid_name] + [-core_offsets offset_value] + [-pad_offsets offset_value] + [-add_connect] + [-extend_to_boundary] + [-connect_to_pads] + [-connect_to_pad_layers layers] + [-starts_with POWER|GROUND] + [-nets list_of_nets] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-grid` | Specifies the name of the grid to which this ring defintion will be added. (Default: Last grid created by defin_pdn_grid)| -| `-layer` | Specifies the name of the layer for these stripes | -| `-width` | Value for the width of the stdcell rail | -| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2) | -| `-core_offset` | Value for the offset of the ring from the grid region | -| `-pad_offset` | When defining a power grid for the top level of an SoC, can be used to define the offset of ring from the pad cells | -| `-add_connect` | Automatically add a connection between the two layers | -| `-extend_to_boundary` | Extend the rings to the grid boundary | -| `-connect_to_pads` | The core side of the pad pins will be connected to the ring | -| `-connect_to_pad_layers` | Restrict the pad pins layers to this list | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting) | -| `-nets` | Limit straps to just this list of nets | - -#### Examples -``` +| `-layers` | Specifies the name of the layer for these stripes. | +| `-widths` | Value for the width of the stdcell rail. | +| `-spacings` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2). | +| `-grid` | Specifies the name of the grid to which this ring defintion will be added. (Default: Last grid created by `define_pdn_grid`). | +| `-core_offsets` | Value for the offset of the ring from the grid region. | +| `-pad_offsets` | When defining a power grid for the top level of an SoC, can be used to define the offset of ring from the pad cells. | +| `-add_connect` | Automatically add a connection between the two layers. | +| `-extend_to_boundary` | Extend the rings to the grid boundary. | +| `-connect_to_pads` | The core side of the pad pins will be connected to the ring. | +| `-connect_to_pad_layers` | Restrict the pad pins layers to this list. | +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | +| `-nets` | Limit straps to just this list of nets. | + +Example usage: + +```tcl add_pdn_ring -grid main_grid -layer {metal6 metal7} -widths 5.0 -spacings 3.0 -core_offset 5 ``` -### Add connections +### Add Connections The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. -``` -add_pdn_connect [-grid grid_name] \ - [-layers list_of_two_layers] \ - [-cut_pitch pitch_value] \ - [-fixed_vias list_of_fixed_vias] \ - [-dont_use_vias list_of_vias] \ - [-max_rows rows] \ - [-max_columns columns] \ - [-ongrid ongrid_layers] \ - [-split_cuts split_cuts_mapping] +```tcl +add_pdn_connect + -layers list_of_two_layers + [-grid grid_name] + [-cut_pitch pitch_value] + [-fixed_vias list_of_fixed_vias] + [-dont_use_vias list_of_vias] + [-max_rows rows] + [-max_columns columns] + [-ongrid ongrid_layers] + [-split_cuts split_cuts_mapping] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-grid` | Specifies the name of the grid definition to which this connection will be added. (Default: Last grid created by `define_pdn_grid`) | -| `-layers` | Layers to be connected where there are overlapping power or overlapping ground nets | -| `-cut_pitch` | When the two layers are parallel e.g. overlapping stdcell rails, specify the distance between via cuts | -| `-fixed_vias` | List of fixed vias to be used to form the via stack | -| `-dont_use_vias` | List or pattern of vias to not use to form the via stack | -| `-max_rows` | Maximum number of rows when adding arrays of vias | -| `-max_columns` | Maximum number of columns when adding arrays of vias | -| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid | +| `-layers` | Layers to be connected where there are overlapping power or overlapping ground nets. | +| `-grid` | Specifies the name of the grid definition to which this connection will be added (Default: Last grid created by `define_pdn_grid`). | +| `-cut_pitch` | When the two layers are parallel e.g. overlapping stdcell rails, specify the distance between via cuts. | +| `-fixed_vias` | List of fixed vias to be used to form the via stack. | +| `-dont_use_vias` | List or pattern of vias to not use to form the via stack. | +| `-max_rows` | Maximum number of rows when adding arrays of vias. | +| `-max_columns` | Maximum number of columns when adding arrays of vias. | +| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | | `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | -#### Examples +Example usage: -``` +```tcl add_pdn_connect -grid main_grid -layers {metal1 metal2} -cut_pitch 0.16 add_pdn_connect -grid main_grid -layers {metal2 metal4} add_pdn_connect -grid main_grid -layers {metal4 metal7} @@ -326,62 +347,42 @@ add_pdn_connect -grid rotated_rams -layers {metal4 metal6} add_pdn_connect -grid rotated_rams -layers {metal6 metal7} ``` -### Build power grid - -Build a power grid in accordance with the information specified. - -``` -pdngen [-skip_trim] \ - [-dont_add_pins] \ - [-reset] \ - [-ripup] \ - [-report_only] \ - [-failed_via_report file] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-skip_trim` | Skip the metal trim step, which attempts to remove metal stubs | -| `-dont_add_pins` | Prevent the creation of block pins during | -| `-reset` | Reset the grid and domain specifications | -| `-ripup` | Ripup the existing power grid, as specified by the voltage domains | -| `-report_only` | Print the current specifications | -| `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | - -### Repairing power grid vias after detailed routing +### Repairing Power Grid vias after Detailed Routing To remove vias which generate DRC violations after detailed placement and routing use `repair_pdn_vias`. -``` -repair_pdn_vias [-all] \ - [-net net_name] +```tcl +repair_pdn_vias + [-all] + [-net net_name] ``` #### Options -| Name | Description | +| Switch Name | Description | | ----- | ----- | -| `-all` | Repair vias on all supply nets | -| `-net` | Repair only vias on the specified net | - -### Converting former PDNGEN configuration file to tcl commands +| `-all` | Repair vias on all supply nets. | +| `-net` | Repair only vias on the specified net. | -To get an initial conversion from the former PDNGEN configuration file to the current tcl commands use `convert_pdn_config`. -This command will provide an initial set of commands based on the provided file, it is recommended that the user double-check -the conversion to ensure nothing was missed. +### Useful Developer Commands -``` -convert_pdn_config config_file -``` +If you are a developer, you might find these useful. More details can be found in the [source file](../src/PdnGen.cc) or the [swig file](PdnGen.i). -#### Options - -| Name | Description | +| Command Name | Description | | ----- | ----- | -| `config_file` | Path to the old configuration file | - +| `name_cmp` | Compare 2 input strings `obj1` and `obj2` if they are equal. | +| `check_design_state` | Check if design is loaded. | +| `get_layer` | Get the layer reference of layer name. | +| `get_voltage_domains` | Gets a Tcl list of power domains in design. | +| `match_orientation` | Checks if a given orientation `orient` is within a list of orientations `orients`. | +| `get_insts` | Get Tcl list of instances. | +| `get_masters` | Get Tcl list of masters. | +| `get_one_to_two` | If a Tcl list has one element `{x}`, Tcl list `{x x}` is returned. If a Tcl list of two elements `{y y}`, list as is returned. Otherwise, for any other list lengths, error is triggered. | +| `get_one_to_four` | Similar logic for above function, except the logic only works for lists of length one, two and four respectively. All other list lengths triggers error. | +| `get_obstructions` | Get Tcl list of layers. | +| `get_starts_with` | If value starts with `POWER`, return 1; else if value starts with `GROUND` return 0; else return error. | +| `get_mterm` | Find master terminal. | +| `get_orientations` | Get list of valid orientations. | ## Example scripts @@ -415,53 +416,15 @@ add_pdn_connect -layers {metal9 metal10} pdngen ``` -### Sroute - -The `add_sroute_connect` command is employed for connecting pins located -outside of a specific power domain to the power ring, especially in cases where -multiple power domains are present. During `sroute`, multi-cut vias will be added -for new connections. The use of fixed vias from the technology file should be -specified for the connection using the `add_sroute_connect` command. The use -of max_rows and max_columns defines the row and column limit for the via stack. - -``` -add_sroute_connect - -layers list_of_2_layers - -cut_pitch pitch_value - [-net net] - [-outerNet outerNet] - [-fixed_vias list_of_vias] - [-max_rows rows] - [-max_columns columns] - [-metalwidths metalwidths] - [-metalspaces metalspaces] - [-ongrid ongrid_layers] - [-insts inst] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | The inner net where the power ring exists. | -| `-outerNet` | The outer net where instances/pins that need to get connected exist. | -| `-layers` | The metal layers for vertical stripes within inner power ring. | -| `-cut_pitch` | Distance between via cuts when the two layers are parallel, e.g., overlapping stdcell rails. (Default:200 200) | -| `-fixed_vias` | List of fixed vias to be used to form the via stack. | -| `-max_rows` | Maximum number of rows when adding arrays of vias. (Default:10) | -| `-max_columns` | Maximum number of columns when adding arrays of vias. (Default:10) | -| `-metalwidths` | Width for each metal layer. | -| `-metalspaces` | Spacing of each metal layer. | -| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | -| `-insts` | List of all the instances that contain the pin that needs to get connected with power ring. (Default:nothing) | +## Regression tests -#### Examples +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). -``` -add_sroute_connect -net "VIN" -outerNet "VDD" -layers {met1 met4} -cut_pitch {200 200} -fixed_vias {M3M4_PR_M} -metalwidths {1000 1000} -metalspaces {800} -ongrid {met3 met4} -insts "temp_analog_1.a_header_0" +Simply run the following script: +```shell +./test/regression ``` -## Regression tests ## Limitations @@ -473,6 +436,8 @@ Currently the following assumptions are made: ## FAQs +Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+pdn) about this tool. + ## License -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. +BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/docs/manpages/md/man2/place_bondpad.md b/docs/manpages/md/man2/place_bondpad.md index 55dd50cbb6a..663080bdede 100644 --- a/docs/manpages/md/man2/place_bondpad.md +++ b/docs/manpages/md/man2/place_bondpad.md @@ -1,7 +1,7 @@ --- title: place_bondpad(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_corners.md b/docs/manpages/md/man2/place_corners.md index 723e8f5c0ca..e878bbb4b9b 100644 --- a/docs/manpages/md/man2/place_corners.md +++ b/docs/manpages/md/man2/place_corners.md @@ -1,7 +1,7 @@ --- title: place_corners(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_endcaps.md b/docs/manpages/md/man2/place_endcaps.md new file mode 100644 index 00000000000..91fb3b70672 --- /dev/null +++ b/docs/manpages/md/man2/place_endcaps.md @@ -0,0 +1,55 @@ +--- +title: place_endcaps(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +place_endcaps - place endcaps + +# SYNOPSIS + +place_endcaps + [-corner master] + [-edge_corner master] + [-endcap masters] + [-endcap_horizontal masters] + [-endcap_vertical master] + [-prefix prefix] + [-left_top_corner master] + [-right_top_corner master] + [-left_bottom_corner master] + [-right_bottom_corner master] + [-left_top_edge master] + [-right_top_edge master] + [-left_bottom_edge master] + [-right_bottom_edge master] + [-left_edge master] + [-right_edge master] + [-top_edge masters] + [-bottom_edge masters] + + +# DESCRIPTION + +Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the +LEF58 `CLASS` specification foe endcaps. + +# OPTIONS + +`-endcap_master`: Master used as an endcap. + +`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. + +`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_io_fill.md b/docs/manpages/md/man2/place_io_fill.md index c418c547d5e..a0768812d46 100644 --- a/docs/manpages/md/man2/place_io_fill.md +++ b/docs/manpages/md/man2/place_io_fill.md @@ -1,7 +1,7 @@ --- title: place_io_fill(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_io_terminals.md b/docs/manpages/md/man2/place_io_terminals.md index ef31e00da67..3e384ef690b 100644 --- a/docs/manpages/md/man2/place_io_terminals.md +++ b/docs/manpages/md/man2/place_io_terminals.md @@ -1,7 +1,7 @@ --- title: place_io_terminals(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_pad.md b/docs/manpages/md/man2/place_pad.md index 733296177ae..391c461bb07 100644 --- a/docs/manpages/md/man2/place_pad.md +++ b/docs/manpages/md/man2/place_pad.md @@ -1,7 +1,7 @@ --- title: place_pad(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_pads.md b/docs/manpages/md/man2/place_pads.md deleted file mode 100644 index 4556932ffbb..00000000000 --- a/docs/manpages/md/man2/place_pads.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: place_pads(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/11 ---- - -# NAME - -place_pads - place pads - -# SYNOPSIS - -place_pad - -row row_name - -location offset - -mirror - [-master master] - name - - -# DESCRIPTION - -To place a pad into the pad ring. - -# OPTIONS - -`-row`: Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. - -`-location`: Offset from the bottom left chip edge to place the pad at. - -`-mirror`: Specifies if the pad should be mirrored. - -`-master`: Name of the instance master if the instance needs to be created. - -`name`: Name of the instance. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_pin.md b/docs/manpages/md/man2/place_pin.md index 67c63a221e2..510cb9e2111 100644 --- a/docs/manpages/md/man2/place_pin.md +++ b/docs/manpages/md/man2/place_pin.md @@ -1,7 +1,7 @@ --- title: place_pin(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_pins.md b/docs/manpages/md/man2/place_pins.md index dfa1d6403d0..9b3a702152e 100644 --- a/docs/manpages/md/man2/place_pins.md +++ b/docs/manpages/md/man2/place_pins.md @@ -1,7 +1,7 @@ --- title: place_pins(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/place_tapcells.md b/docs/manpages/md/man2/place_tapcells.md new file mode 100644 index 00000000000..5d56660a423 --- /dev/null +++ b/docs/manpages/md/man2/place_tapcells.md @@ -0,0 +1,68 @@ +--- +title: place_tapcells(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +place_tapcells - place tapcells + +# SYNOPSIS + +place_tapcells + -master tapcell_master + -distance dist + + +# DESCRIPTION + +This command is used for tapcell placement only. + +# OPTIONS + +`-prefix`: Prefix to use for the boundary cells. Defaults to "PHY_". + +`-corner`: Master for the corner cells on the outer corners. + +`-edge_corner`: Master for the corner cells on the inner corners. + +`-endcap`: Master used as an endcap. + +`-endcap_horizontal`: List of masters for the top and bottom row endcaps. (overrides `-endcap`). + +`-endcap_vertical`: Master for the left and right row endcaps. (overrides `-endcap`). + +`-left_top_corner`: Master for the corner cells on the outer top left corner. (overrides `-corner`). + +`-right_top_corner`: Master for the corner cells on the outer top right corner. (overrides `-corner`). + +`-left_bottom_corner`: Master for the corner cells on the outer bottom left corner. (overrides `-corner`). + +`-right_bottom_corner`: Master for the corner cells on the outer bottom right corner. (overrides `-corner`). + +`-left_top_edge`: Master for the corner cells on the inner top left corner. (overrides `-edge_corner`). + +`-right_top_edge`: Master for the corner cells on the inner top right corner. (overrides `-edge_corner`). + +`-left_bottom_edge`: Master for the corner cells on the inner bottom left corner. (overrides `-edge_corner`). + +`-right_bottom_edge`: Master for the corner cells on the inner bottom right corner. (overrides `-edge_corner`). + +`-left_edge`: Master for the left row endcaps. (overrides `-endcap_vertical`). + +`-right_edge`: Master for the right row endcaps. (overrides `-endcap_vertical`). + +`-top_edge`: List of masters for the top row endcaps. (overrides `-endcap_horizontal`). + +`-bottom_edge`: List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/placing_io_fill.md b/docs/manpages/md/man2/placing_io_fill.md deleted file mode 100644 index 8046f5ab0e3..00000000000 --- a/docs/manpages/md/man2/placing_io_fill.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: placing_io_fill(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/11 ---- - -# NAME - -placing_io_fill - placing io fill - -# SYNOPSIS - -place_io_fill - -row row_name - [-permit_overlaps masters] - masters - - -# DESCRIPTION - -To place the IO filler cells. - -# OPTIONS - -`-row`: Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. - -`-permit_overlaps`: Names of the masters for the IO filler cells that allow for overlapping. - -`masters`: Names of the masters for the IO filler cells. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/preview_dft.md b/docs/manpages/md/man2/preview_dft.md index 500cb829fd1..88157bab39d 100644 --- a/docs/manpages/md/man2/preview_dft.md +++ b/docs/manpages/md/man2/preview_dft.md @@ -1,7 +1,7 @@ --- title: preview_dft(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/rcx.txt b/docs/manpages/md/man2/rcx.txt index 05d3e4752d7..5cbea0d4b55 100644 --- a/docs/manpages/md/man2/rcx.txt +++ b/docs/manpages/md/man2/rcx.txt @@ -27,6 +27,8 @@ objects. Optionally, OpenRCX can generate a `.spef` file. ### Define Process Corner +This command defines proccess corner. + ```tcl define_process_corner [-ext_model_index index] @@ -93,7 +95,7 @@ write_spef | `-nets` | Net name. | | `filename` | Output filename. | -### Scale RC +### Adjust RC Use the `adjust_rc` command to scale the resistance, ground, and coupling capacitance. @@ -113,7 +115,7 @@ adjust_rc | `-cc_factor` | Scale factor for coupling capacitance. | | `-gndc_factor` | Scale factor for ground capacitance. | -### Comparing SPEF files +### Diff SPEF The `diff_spef` command compares the parasitics in the reference database `.spef`. The output of this command is `diff_spef.out` @@ -139,7 +141,7 @@ diff_spef | `-r_cc_cap` | Read coupled capacitance. | | `r_conn` | Read connections. | -### Extraction Rules File Generation +### Bench Wires The `bench_wires` command produces a layout which contains various patterns that are used to characterize per-unit length R and C values. The generated patterns model @@ -178,7 +180,7 @@ bench_wires | `-s_list` | Lists of wire spacing multipliers from the minimum spacing defined in the LEF. The list will be the input index on the OpenRCX RC table (Extraction Rules file). | | `-over_dist`, `-under_dist` | Consider over and under metal distance respectively. | -### Generate verilog netlist +### Bench Verilog `bench_verilog` is used after the `bench_wires` command. This command generates a Verilog netlist of the generated pattern layout by the `bench_wires` @@ -200,7 +202,7 @@ bench_verilog | ----- | ----- | | `filename` | Name for the Verilog output file (e.g., `output.v`). | -### Read SPEF +### Bench Read SPEF The `bench_read_spef` command reads a `.spef` file and stores the parasitics into the database. @@ -216,7 +218,7 @@ bench_read_spef | ----- | ----- | | `filename` | Path to the input `.spef` file. | -### Write Rule File +### Write Rules The `write_rules` command writes the Extraction Rules file (RC technology file) for OpenRCX. It processes the parasitics data from the layout patterns that are diff --git a/docs/manpages/md/man2/rdl_route.md b/docs/manpages/md/man2/rdl_route.md index 466948920ae..1d23d880f29 100644 --- a/docs/manpages/md/man2/rdl_route.md +++ b/docs/manpages/md/man2/rdl_route.md @@ -1,7 +1,7 @@ --- title: rdl_route(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/read_partitioning.md b/docs/manpages/md/man2/read_partitioning.md index 0b36297505d..a81a06cf1ed 100644 --- a/docs/manpages/md/man2/read_partitioning.md +++ b/docs/manpages/md/man2/read_partitioning.md @@ -1,7 +1,7 @@ --- title: read_partitioning(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/zoom_in.md b/docs/manpages/md/man2/read_upf.md similarity index 63% rename from docs/manpages/md/man2/zoom_in.md rename to docs/manpages/md/man2/read_upf.md index 414b7a06ed2..9334d698077 100644 --- a/docs/manpages/md/man2/zoom_in.md +++ b/docs/manpages/md/man2/read_upf.md @@ -1,26 +1,26 @@ --- -title: zoom_in(2) +title: read_upf(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME -zoom_in - zoom in +read_upf - read upf # SYNOPSIS -gui::zoom_in - [x y] +read_upf + -file file # DESCRIPTION -To zoom in the layout: +Sources the UPF file. # OPTIONS -`x, y`: new center of layout +`-file`: Path to `.upf` file. # ARGUMENTS diff --git a/docs/manpages/md/man2/remove_buffers.md b/docs/manpages/md/man2/remove_buffers.md new file mode 100644 index 00000000000..ede1c9d93c8 --- /dev/null +++ b/docs/manpages/md/man2/remove_buffers.md @@ -0,0 +1,34 @@ +--- +title: remove_buffers(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +remove_buffers - remove buffers + +# SYNOPSIS + +remove_buffers + + +# DESCRIPTION + +Use the `remove_buffers` command to remove buffers inserted by synthesis. This +step is recommended before using `repair_design` so that there is more flexibility +in buffering nets. + +# OPTIONS + +This command has no switches. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_fillers.md b/docs/manpages/md/man2/remove_fillers.md index 9efa75c116b..452222a439c 100644 --- a/docs/manpages/md/man2/remove_fillers.md +++ b/docs/manpages/md/man2/remove_fillers.md @@ -1,7 +1,7 @@ --- title: remove_fillers(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/remove_io_bump.md b/docs/manpages/md/man2/remove_io_bump.md index 46a9f06bf2e..afd1b9c3d6f 100644 --- a/docs/manpages/md/man2/remove_io_bump.md +++ b/docs/manpages/md/man2/remove_io_bump.md @@ -1,7 +1,7 @@ --- title: remove_io_bump(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/remove_io_bump_array.md b/docs/manpages/md/man2/remove_io_bump_array.md index 6cc3f1ba5f9..1ba9fac479c 100644 --- a/docs/manpages/md/man2/remove_io_bump_array.md +++ b/docs/manpages/md/man2/remove_io_bump_array.md @@ -1,7 +1,7 @@ --- title: remove_io_bump_array(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/remove_io_rows.md b/docs/manpages/md/man2/remove_io_rows.md index 9be8e18d69f..3c209faacc2 100644 --- a/docs/manpages/md/man2/remove_io_rows.md +++ b/docs/manpages/md/man2/remove_io_rows.md @@ -1,7 +1,7 @@ --- title: remove_io_rows(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/repair_antennas.md b/docs/manpages/md/man2/repair_antennas.md deleted file mode 100644 index bbd5655a2f2..00000000000 --- a/docs/manpages/md/man2/repair_antennas.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: repair_antennas(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -repair_antennas - repair antennas - -# SYNOPSIS - -repair_antennas - [diode_cell] - [-iterations iterations] - [-ratio_margin margin] - - -# DESCRIPTION - -The `repair_antennas` command checks the global routing for antenna -violations and repairs the violations by inserting diodes near the -gates of the violating nets. By default the command runs only one -iteration to repair antennas. Filler instances added by the -`filler_placement` command should NOT be in the database when -`repair_antennas` is called. - -See LEF/DEF 5.8 Language Reference, Appendix C, "Calculating and -Fixing Process Antenna Violations" for a [description](coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) -of antenna violations. - -If no `diode_cell` argument is specified the LEF cell with class CORE, ANTENNACELL will be used. -If any repairs are made the filler instances are remove and must be -placed with the `filler_placement` command. - -If the LEF technology layer `ANTENNADIFFSIDEAREARATIO` properties are constant -instead of PWL, inserting diodes will not improve the antenna ratios, -and thus, no -diodes are inserted. The following warning message will be reported: - -``` -[WARNING GRT-0243] Unable to repair antennas on net with diodes. -``` - -# OPTIONS - -`diode_cell`: Diode cell to fix antenna violations. - -`-iterations`: Number of iterations. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-ratio_margin`: Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/enabled.md b/docs/manpages/md/man2/repair_clock_inverters.md similarity index 62% rename from docs/manpages/md/man2/enabled.md rename to docs/manpages/md/man2/repair_clock_inverters.md index 0af97f5d7c9..99aa6fce8fc 100644 --- a/docs/manpages/md/man2/enabled.md +++ b/docs/manpages/md/man2/repair_clock_inverters.md @@ -1,21 +1,21 @@ --- -title: enabled(2) +title: repair_clock_inverters(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME -enabled - enabled +repair_clock_inverters - repair clock inverters # SYNOPSIS -gui::enabled +repair_clock_inverters # DESCRIPTION -Determine is the GUI is active: +This command repairs clock inverters. # OPTIONS diff --git a/docs/manpages/md/man2/repair_clock_nets.md b/docs/manpages/md/man2/repair_clock_nets.md new file mode 100644 index 00000000000..df7c06427e3 --- /dev/null +++ b/docs/manpages/md/man2/repair_clock_nets.md @@ -0,0 +1,38 @@ +--- +title: repair_clock_nets(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +repair_clock_nets - repair clock nets + +# SYNOPSIS + +repair_clock_nets + [-max_wire_length max_wire_length] + + +# DESCRIPTION + +The `clock_tree_synthesis` command inserts a clock tree in the design +but may leave a long wire from the clock input pin to the clock tree +root buffer. + +The `repair_clock_nets` command inserts buffers in the +wire from the clock input pin to the clock root buffer. + +# OPTIONS + +`-max_wire_length`: Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_design.md b/docs/manpages/md/man2/repair_design.md new file mode 100644 index 00000000000..29f2ab3feec --- /dev/null +++ b/docs/manpages/md/man2/repair_design.md @@ -0,0 +1,51 @@ +--- +title: repair_design(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +repair_design - repair design + +# SYNOPSIS + +repair_design + [-max_wire_length max_length] + [-slew_margin slew_margin] + [-cap_margin cap_margin] + [-max_utilization util] + [-verbose] + + +# DESCRIPTION + +The `repair_design` command inserts buffers on nets to repair max slew, max +capacitance and max fanout violations, and on long wires to reduce RC delay in +the wire. It also resizes gates to normalize slews. Use `estimate_parasitics +-placement` before `repair_design` to estimate parasitics considered +during repair. Placement-based parasitics cannot accurately predict +routed parasitics, so a margin can be used to "over-repair" the design +to compensate. + +# OPTIONS + +`-max_wire_length`: Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. + +`-slew_margin`: Add a slew margin. The default value is `0`, the allowed values are integers `[0, 100]`. + +`-cap_margin`: Add a capactitance margin. The default value is `0`, the allowed values are integers `[0, 100]`. + +`-max_utilization`: Defines the percentage of core area used. + +`-verbose`: Enable verbose logging on progress of the repair. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_tie_fanout.md b/docs/manpages/md/man2/repair_tie_fanout.md new file mode 100644 index 00000000000..bcc76f136f0 --- /dev/null +++ b/docs/manpages/md/man2/repair_tie_fanout.md @@ -0,0 +1,40 @@ +--- +title: repair_tie_fanout(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +repair_tie_fanout - repair tie fanout + +# SYNOPSIS + +repair_tie_fanout + [-separation dist] + [-verbose] + lib_port + + +# DESCRIPTION + +The `repair_tie_fanout` command connects each tie high/low load to a copy +of the tie high/low cell. + +# OPTIONS + +`-separation`: Tie high/low insts are separated from the load by this value (Liberty units, usually microns). + +`-verbose`: Enable verbose logging of repair progress. + +`lib_port`: Tie high/low port, which can be a library/cell/port name or object returned by `get_lib_pins`. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_timing.md b/docs/manpages/md/man2/repair_timing.md new file mode 100644 index 00000000000..53a7e226723 --- /dev/null +++ b/docs/manpages/md/man2/repair_timing.md @@ -0,0 +1,63 @@ +--- +title: repair_timing(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +repair_timing - repair timing + +# SYNOPSIS + +repair_timing + [-setup] + [-hold] + [-setup_margin setup_margin] + [-hold_margin hold_margin] + [-allow_setup_violations] + [-repair_tns tns_end_percent] + [-max_utilization util] + [-max_buffer_percent buffer_percent] + [-verbose] + + +# DESCRIPTION + +The `repair_timing` command repairs setup and hold violations. It +should be run after clock tree synthesis with propagated clocks. +Setup repair is done before hold repair so that hold repair does not +cause setup checks to fail. + +The worst setup path is always repaired. Next, violating paths to +endpoints are repaired to reduced the total negative slack. + +# OPTIONS + +`-setup`: Repair setup timing. + +`-hold`: Repair hold timing. + +`-setup_margin`: Add additional setup slack margin. + +`-hold_margin`: Add additional hold slack margin. + +`-allow_setup_violations`: While repairing hold violations, buffers are not inserted that will cause setup violations unless `-allow_setup_violations` is specified. + +`-repair_tns`: Percentage of violating endpoints to repair (0-100). When `tns_end_percent` is zero (the default), only the worst endpoint is repaired. When `tns_end_percent` is 100, all violating endpoints are repaired. + +`-max_utilization`: Defines the percentage of core area used. + +`-max_buffer_percent`: Specify a maximum number of buffers to insert to repair hold violations as a percentage of the number of instances in the design. The default value is `20`, and the allowed values are integers `[0, 100]`. + +`-verbose`: Enable verbose logging of the repair progress. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_cts.md b/docs/manpages/md/man2/report_cts.md index da7f886e334..33643abc88f 100644 --- a/docs/manpages/md/man2/report_cts.md +++ b/docs/manpages/md/man2/report_cts.md @@ -1,7 +1,7 @@ --- title: report_cts(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/fit.md b/docs/manpages/md/man2/report_design_area.md similarity index 56% rename from docs/manpages/md/man2/fit.md rename to docs/manpages/md/man2/report_design_area.md index 726e0cedf48..92f2f289f2b 100644 --- a/docs/manpages/md/man2/fit.md +++ b/docs/manpages/md/man2/report_design_area.md @@ -1,21 +1,22 @@ --- -title: fit(2) +title: report_design_area(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME -fit - fit +report_design_area - report design area # SYNOPSIS -gui::fit +report_design_area # DESCRIPTION -To fit the whole layout in the window: +The `report_design_area` command reports the area of the design's components +and the utilization. # OPTIONS diff --git a/docs/manpages/md/man2/report_dft_config.md b/docs/manpages/md/man2/report_dft_config.md index b3e9863689e..a60204da886 100644 --- a/docs/manpages/md/man2/report_dft_config.md +++ b/docs/manpages/md/man2/report_dft_config.md @@ -1,7 +1,7 @@ --- title: report_dft_config(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/report_floating_nets.md b/docs/manpages/md/man2/report_floating_nets.md new file mode 100644 index 00000000000..7e9822a4f4c --- /dev/null +++ b/docs/manpages/md/man2/report_floating_nets.md @@ -0,0 +1,33 @@ +--- +title: report_floating_nets(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +report_floating_nets - report floating nets + +# SYNOPSIS + +report_floating_nets + [-verbose] + + +# DESCRIPTION + +The `report_floating_nets` command reports nets with only one pin connection. + +# OPTIONS + +`-verbose`: Print the net names. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_wire_length.md b/docs/manpages/md/man2/report_wire_length.md deleted file mode 100644 index bfe9165308c..00000000000 --- a/docs/manpages/md/man2/report_wire_length.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: report_wire_length(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -report_wire_length - report wire length - -# SYNOPSIS - -report_wire_length - [-net net_list] - [-file file] - [-global_route] - [-detailed_route] - [-verbose] - - -# DESCRIPTION - -The `report_wire_length` command reports the wire length of the nets. Use the `-global_route` -and the `-detailed_route` flags to report the wire length from global and detailed routing, -respectively. If none of these flags are used, the tool will identify the state of the design -and report the wire length accordingly. - -Example: `report_wire_length -net {clk net60} -global_route -detailed_route -verbose -file out.csv` - -# OPTIONS - -`net_names`: Tcl list of set of nets (e.g. `{net1, net2}`). - -`-show_pin_locations`: Draw circles for the pin positions on the routing grid. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/rsz.txt b/docs/manpages/md/man2/rsz.txt index 7388f7bf0ee..05c148cd92f 100644 --- a/docs/manpages/md/man2/rsz.txt +++ b/docs/manpages/md/man2/rsz.txt @@ -92,7 +92,7 @@ estimate_parasitics | ----- | ----- | | `-placement` or `-global_routing` | Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. | -### Set Don't Use +### Set Dont Use The `set_dont_use` command removes library cells from consideration by the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` @@ -100,18 +100,16 @@ or a list of cell names (`wildcards` allowed). For example, `DLY*` says do not use cells with names that begin with `DLY` in all libraries. ```tcl -set_dont_use lib_cells -unset_dont_use lib_cells +set_dont_use lib_cells # unset_dont_use lib_cells ``` -### Set Don't Touch +### Set Dont Touch The `set_dont_touch` command prevents the resizer commands from modifying instances or nets. ```tcl -set_dont_touch instances_nets -unset_dont_touch instances_nets +set_dont_touch instances_nets # unset_dont_touch instances_nets ``` ### Buffer Ports @@ -240,7 +238,9 @@ this option be used with global routing based parasitics. The `clock_tree_synthesis` command inserts a clock tree in the design but may leave a long wire from the clock input pin to the clock tree -root buffer. The `repair_clock_nets` command inserts buffers in the +root buffer. + +The `repair_clock_nets` command inserts buffers in the wire from the clock input pin to the clock root buffer. ```tcl @@ -256,6 +256,8 @@ repair_clock_nets ### Repair Clock Inverters +This command repairs clock inverters. + ```tcl repair_clock_inverters ``` @@ -284,7 +286,7 @@ report_floating_nets | ----- | ----- | | `-verbose` | Print the net names. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/Resizer.cc) or the [swig file](./src/Resizer.i). @@ -307,7 +309,7 @@ If you are a developer, you might find these useful. More details can be found i A typical `resizer` command file (after a design and Liberty libraries have been read) is shown below. -```tcl +``` read_sdc gcd.sdc set_wire_rc -layer metal2 @@ -325,7 +327,7 @@ repair_timing Note that OpenSTA commands can be used to report timing metrics before or after resizing the design. -```tcl +``` set_wire_rc -layer metal2 report_checks report_tns diff --git a/docs/manpages/md/man2/save_clocktree_image.md b/docs/manpages/md/man2/save_clocktree_image.md deleted file mode 100644 index 0e5579f3d38..00000000000 --- a/docs/manpages/md/man2/save_clocktree_image.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: save_clocktree_image(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -save_clocktree_image - save clocktree image - -# SYNOPSIS - -save_clocktree_image filename - -clock clock_name - [-width width] - [-height height] - [-corner corner] - - -# DESCRIPTION - -This command saves the screenshot of clocktree given options -to `filename`. - -# OPTIONS - -`filename`: path to save the image to. - -`-clock`: name of the clock to save the clocktree for. - -`-corner`: name of the timing corner to save the clocktree for, default to the first corner defined. - -`-height`: height of the image in pixels, defaults to the height of the GUI widget. - -`-width`: width of the image in pixels, defaults to the width of the GUI widget. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/save_display_controls.md b/docs/manpages/md/man2/save_display_controls.md deleted file mode 100644 index e02092c3d03..00000000000 --- a/docs/manpages/md/man2/save_display_controls.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: save_display_controls(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -save_display_controls - save display controls - -# SYNOPSIS - -gui::save_display_controls -gui::restore_display_controls - - -# DESCRIPTION - -When performing a batch operation changing the display controls settings, the following commands can be used to save the current state of the display controls and restore them at the end. - -# OPTIONS - -`title`: is the title of the input message box. - -`question`: is the text for the message box. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/save_image.md b/docs/manpages/md/man2/save_image.md deleted file mode 100644 index 66b21a27c57..00000000000 --- a/docs/manpages/md/man2/save_image.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: save_image(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -save_image - save image - -# SYNOPSIS - -save_image [-resolution microns_per_pixel] - [-area {x0 y0 x1 y1}] - [-width width] - [-display_option {option value}] - filename - - -# DESCRIPTION - -This command can be both be used when the GUI is active and not active -to save a screenshot with various options. - -# OPTIONS - -`filename`: path to save the image to. - -`x0, y0`: first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block - -`x1, y1`: second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block - -`microns_per_pixel`: resolution in microns per pixel to use when saving the image, default will match what the GUI has selected - -`width`: width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution`` - -`option`: specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}`` - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/select.md b/docs/manpages/md/man2/select.md deleted file mode 100644 index a7ccd190ef8..00000000000 --- a/docs/manpages/md/man2/select.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: select(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -select - select - -# SYNOPSIS - -select -type object_type - [-name glob_pattern] - [-filter attribute=value] - [-case_insensitive] - [-highlight group] - - -# DESCRIPTION - -This command selects object based on options. -Returns: number of objects selected. - -# OPTIONS - -`object_type`: name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations - -`glob_pattern`: (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive - -`attribute=value`: (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins) - -`group`: (optional) add the selection to the specific highlighting group. Values can be 0 to 7. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/select_at.md b/docs/manpages/md/man2/select_at.md deleted file mode 100644 index 2a92b4ceaf5..00000000000 --- a/docs/manpages/md/man2/select_at.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: select_at(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -select_at - select at - -# SYNOPSIS - -gui::select_at x y -gui::select_at x y append -gui::select_at x0 y0 x1 y1 -gui::select_at x0 y0 x1 y1 append - - -# DESCRIPTION - -To add items at a specific point or in an area: - -# OPTIONS - -`x, y`: point in the layout area in microns. - -`x0, y0`: first corner of the layout area in microns. - -`x1, y1`: second corner of the layout area in microns. - -`append`: if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/select_next.md b/docs/manpages/md/man2/select_next.md deleted file mode 100644 index 5346b216403..00000000000 --- a/docs/manpages/md/man2/select_next.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: select_next(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -select_next - select next - -# SYNOPSIS - -gui::select_next - - -# DESCRIPTION - -To navigate through multiple selected items: -Returns: current index of the selected item. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/select_previous.md b/docs/manpages/md/man2/select_previous.md deleted file mode 100644 index bf9d48e2443..00000000000 --- a/docs/manpages/md/man2/select_previous.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: select_previous(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -select_previous - select previous - -# SYNOPSIS - -gui::select_previous - - -# DESCRIPTION - -To navigate through multiple selected items: -Returns: current index of the selected item. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/selection_add_instance.md b/docs/manpages/md/man2/selection_add_instance.md deleted file mode 100644 index 01093c6aa20..00000000000 --- a/docs/manpages/md/man2/selection_add_instance.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: selection_add_instance(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -selection_add_instance - selection add instance - -# SYNOPSIS - -gui::selection_add_inst - name - - -# DESCRIPTION - -To add a single instance to the selected items: - -# OPTIONS - -`name`: name of the instance to add. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/selection_add_instances.md b/docs/manpages/md/man2/selection_add_instances.md deleted file mode 100644 index a699aa1dc73..00000000000 --- a/docs/manpages/md/man2/selection_add_instances.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: selection_add_instances(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -selection_add_instances - selection add instances - -# SYNOPSIS - -gui::selection_add_insts - name_regex - - -# DESCRIPTION - -To add several instances to the selected items using a regex: - -# OPTIONS - -`name_regex`: regular expression of the instance names to add. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/selection_add_net.md b/docs/manpages/md/man2/selection_add_net.md deleted file mode 100644 index 71042eb129b..00000000000 --- a/docs/manpages/md/man2/selection_add_net.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: selection_add_net(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -selection_add_net - selection add net - -# SYNOPSIS - -gui::selection_add_net - name - - -# DESCRIPTION - -To add a single net to the selected items: - -# OPTIONS - -`name`: name of the net to add - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/selection_add_nets.md b/docs/manpages/md/man2/selection_add_nets.md deleted file mode 100644 index 447a3fbe1fe..00000000000 --- a/docs/manpages/md/man2/selection_add_nets.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: selection_add_nets(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -selection_add_nets - selection add nets - -# SYNOPSIS - -gui::selection_add_nets - name_regex - - -# DESCRIPTION - -To add several nets to the selected items using a regex: - -# OPTIONS - -`name_regex`: regular expression of the net names to add - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/selection_animate.md b/docs/manpages/md/man2/selection_animate.md deleted file mode 100644 index 194f22133d6..00000000000 --- a/docs/manpages/md/man2/selection_animate.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: selection_animate(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -selection_animate - selection animate - -# SYNOPSIS - -gui::selection_animate - [repeat] - - -# DESCRIPTION - -To animate the current selection in the Inspector: - -# OPTIONS - -`repeat`: indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_dft_config.md b/docs/manpages/md/man2/set_dft_config.md index f55457011b4..7bb3afb4400 100644 --- a/docs/manpages/md/man2/set_dft_config.md +++ b/docs/manpages/md/man2/set_dft_config.md @@ -1,7 +1,7 @@ --- title: set_dft_config(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_display_controls.md b/docs/manpages/md/man2/set_display_controls.md deleted file mode 100644 index f8d8acfc88d..00000000000 --- a/docs/manpages/md/man2/set_display_controls.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: set_display_controls(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_display_controls - set display controls - -# SYNOPSIS - -gui::set_display_controls - name - [display_type] - [value] - - -# DESCRIPTION - -Control the visible and selected elements in the layout: - -# OPTIONS - -`name`: is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. - -`display_type`: is either ``visible`` or ``selectable`` - -`value`: is either ``true`` or ``false`` - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_domain_area.md b/docs/manpages/md/man2/set_domain_area.md new file mode 100644 index 00000000000..2c37df6fe99 --- /dev/null +++ b/docs/manpages/md/man2/set_domain_area.md @@ -0,0 +1,36 @@ +--- +title: set_domain_area(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +set_domain_area - set domain area + +# SYNOPSIS + +set_domain_area + domain_name + -area {llx lly urx ury} + + +# DESCRIPTION + +This command sets the power domain area. + +# OPTIONS + +`domain_name`: Power domain name. + +`-area`: x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/clear_selections.md b/docs/manpages/md/man2/set_dont_touch.md similarity index 53% rename from docs/manpages/md/man2/clear_selections.md rename to docs/manpages/md/man2/set_dont_touch.md index 33267203567..d5845cf3ef1 100644 --- a/docs/manpages/md/man2/clear_selections.md +++ b/docs/manpages/md/man2/set_dont_touch.md @@ -1,21 +1,22 @@ --- -title: clear_selections(2) +title: set_dont_touch(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/10 +date: 24/01/14 --- # NAME -clear_selections - clear selections +set_dont_touch - set dont touch # SYNOPSIS -gui::clear_selections +set_dont_touch instances_nets # unset_dont_touch instances_nets # DESCRIPTION -To clear the current set of selected items: +The `set_dont_touch` command prevents the resizer commands from +modifying instances or nets. # OPTIONS diff --git a/docs/manpages/md/man2/set_dont_use.md b/docs/manpages/md/man2/set_dont_use.md new file mode 100644 index 00000000000..2c8670c5943 --- /dev/null +++ b/docs/manpages/md/man2/set_dont_use.md @@ -0,0 +1,35 @@ +--- +title: set_dont_use(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +set_dont_use - set dont use + +# SYNOPSIS + +set_dont_use lib_cells # unset_dont_use lib_cells + + +# DESCRIPTION + +The `set_dont_use` command removes library cells from consideration by +the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` +or a list of cell names (`wildcards` allowed). For example, `DLY*` says do +not use cells with names that begin with `DLY` in all libraries. + +# OPTIONS + +This command has no switches. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_global_routing_layer_adjustment.md b/docs/manpages/md/man2/set_global_routing_layer_adjustment.md deleted file mode 100644 index 0f13be370df..00000000000 --- a/docs/manpages/md/man2/set_global_routing_layer_adjustment.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: set_global_routing_layer_adjustment(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_global_routing_layer_adjustment - set global routing layer adjustment - -# SYNOPSIS - -set_global_routing_layer_adjustment layer adjustment - - -# DESCRIPTION - -The `set_global_routing_layer_adjustment` command sets routing resource -adjustments in the routing layers of the design. Such adjustments reduce the number of -routing tracks that the global router assumes to exist. This promotes the spreading of routing -and reduces peak congestion, to reduce challenges for detailed routing. - -You can set adjustment for a -specific layer, e.g., `set_global_routing_layer_adjustment Metal4 0.5` reduces -the routing resources of routing layer `Metal4` by 50%. You can also set adjustment -for all layers at once using `*`, e.g., `set_global_routing_layer_adjustment * 0.3` reduces the routing resources of all routing layers by 30%. And, you can -also set resource adjustment for a layer range, e.g.: `set_global_routing_layer_adjustment -Metal4-Metal8 0.3` reduces the routing resources of routing layers `Metal4`, -`Metal5`, `Metal6`, `Metal7` and `Metal8` by 30%. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_global_routing_random.md b/docs/manpages/md/man2/set_global_routing_random.md deleted file mode 100644 index dc5bb4f475f..00000000000 --- a/docs/manpages/md/man2/set_global_routing_random.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: set_global_routing_random(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_global_routing_random - set global routing random - -# SYNOPSIS - -set_global_routing_random - [-seed seed] - [-capacities_perturbation_percentage percent] - [-perturbation_amount value] - - -# DESCRIPTION - -The command randomizes global routing by shuffling the order of the nets -and randomly subtracts or adds to the capacities of a random set of edges. - -Example: -`set_global_routing_random -seed 42 \ - -capacities_perturbation_percentage 50 \ - -perturbation_amount 2` - -# OPTIONS - -`-seed`: Sets the random seed (must be non-zero for randomization). - -`-capacities_perturbation_percentage`: Sets the percentage of edges whose capacities are perturbed. By default, the edge capacities are perturbed by adding or subtracting 1 (track) from the original capacity. - -`-perturbation_amount`: Sets the perturbation value of the edge capacities. This option is only meaningful when `-capacities_perturbation_percentage` is used. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_global_routing_region_adjustment.md b/docs/manpages/md/man2/set_global_routing_region_adjustment.md deleted file mode 100644 index a5fb03f5d4e..00000000000 --- a/docs/manpages/md/man2/set_global_routing_region_adjustment.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: set_global_routing_region_adjustment(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_global_routing_region_adjustment - set global routing region adjustment - -# SYNOPSIS - -set_global_routing_region_adjustment - {lower_left_x lower_left_y upper_right_x upper_right_y} - -layer layer - -adjustment adjustment - - -# DESCRIPTION - -Set global routing region adjustment. -Example: `set_global_routing_region_adjustment {1.5 2 20 30.5} -layer Metal4 -adjustment 0.7` - -# OPTIONS - -`lower_left_x, lower_left_y, upper_right_x , upper_right_y`: Bounding box to consider. - -`-layer`: Integer for the layer number (e.g. for M1 you would use 1). - -`-adjustment`: Float indicating the percentage reduction of each edge in the specified layer. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_heatmap.md b/docs/manpages/md/man2/set_heatmap.md deleted file mode 100644 index 07d67ebae18..00000000000 --- a/docs/manpages/md/man2/set_heatmap.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: set_heatmap(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_heatmap - set heatmap - -# SYNOPSIS - -gui::set_heatmap - name - [option] - [value] - - -# DESCRIPTION - -To control the settings in the heat maps: - -The currently availble heat maps are: -- ``Power`` -- ``Routing`` -- ``Placement`` -- ``IRDrop`` - -These options can also be modified in the GUI by double-clicking the underlined display control for the heat map. - -# OPTIONS - -`name`: is the name of the heatmap. - -`option`: is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. - -`value`: is the new value for the specified option. This is not used when rebuilding map. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_io_pin_constraint.md b/docs/manpages/md/man2/set_io_pin_constraint.md index 6b39abbdcab..ea996495c05 100644 --- a/docs/manpages/md/man2/set_io_pin_constraint.md +++ b/docs/manpages/md/man2/set_io_pin_constraint.md @@ -1,7 +1,7 @@ --- title: set_io_pin_constraint(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_isolation.md b/docs/manpages/md/man2/set_isolation.md new file mode 100644 index 00000000000..ae597963c83 --- /dev/null +++ b/docs/manpages/md/man2/set_isolation.md @@ -0,0 +1,54 @@ +--- +title: set_isolation(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +set_isolation - set isolation + +# SYNOPSIS + +set_isolation + [-domain domain] + [-applies_to applies_to] + [-clamp_value clamp_value] + [-isolation_signal isolation_signal] + [-isolation_sense isolation_sense] + [-location location] + [-update] + name + + +# DESCRIPTION + +This command creates or update isolation strategy. + +# OPTIONS + +`-domain`: Power domain + +`-applies_to`: Restricts the strategy to apply one of these (`inputs`, `outputs`, `both`). + +`-clamp_value`: Value the isolation can drive (`0`, `1`). + +`-isolation_signal`: The control signal for this strategy. + +`-isolation_sense`: The active level of isolation control signal. + +`-location`: Domain in which isolation cells are placed (`parent`, `self`, `fanout`). + +`-update`: Only available if using existing strategy, will error if the strategy doesn't exist. + +`name`: Isolation strategy name. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_layer_rc.md b/docs/manpages/md/man2/set_layer_rc.md new file mode 100644 index 00000000000..17fb2397def --- /dev/null +++ b/docs/manpages/md/man2/set_layer_rc.md @@ -0,0 +1,47 @@ +--- +title: set_layer_rc(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +set_layer_rc - set layer rc + +# SYNOPSIS + +set_layer_rc + [-layer layer] + [-via via_layer] + [-resistance res] + [-capacitance cap] + [-corner corner] + + +# DESCRIPTION + +The `set_layer_rc` command can be used to set the resistance and capacitance +for a layer or via. This is useful if these values are missing from the LEF file, +or to override the values in the LEF. + +# OPTIONS + +`-layer`: Set layer name to modify. Note that the layer must be a routing layer. + +`-via`: Select via layer name. Note that via resistance is per cut/via, not area-based. + +`-resistance`: Resistance per unit length, same convention as `set_wire_rc`. + +`-capacitance`: Capacitance per unit length, same convention as `set_wire_rc`. + +`-corner`: Process corner to use. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_macro_extension.md b/docs/manpages/md/man2/set_macro_extension.md deleted file mode 100644 index a3ce72ba3b7..00000000000 --- a/docs/manpages/md/man2/set_macro_extension.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: set_macro_extension(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_macro_extension - set macro extension - -# SYNOPSIS - -set_macro_extension extension - - -# DESCRIPTION - -This command sets the halo (in terms of GCells) along the boundaries of macros. -A `GCell` is typically defined in terms of `Mx` routing tracks. -Example: `set_macro_extension 2` - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_nets_to_route.md b/docs/manpages/md/man2/set_nets_to_route.md deleted file mode 100644 index a149b288365..00000000000 --- a/docs/manpages/md/man2/set_nets_to_route.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: set_nets_to_route(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_nets_to_route - set nets to route - -# SYNOPSIS - -set_nets_to_route - net_names - - -# DESCRIPTION - -The `set_nets_to_route` command defines a list of nets to route. Only the nets -defined in this command are routed, leaving the remaining nets without any -global route guides. - -# OPTIONS - -`net_names`: Tcl list of set of nets (e.g. `{net1, net2}`). - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_pin_length.md b/docs/manpages/md/man2/set_pin_length.md index 23bdfa711f8..837aa61c632 100644 --- a/docs/manpages/md/man2/set_pin_length.md +++ b/docs/manpages/md/man2/set_pin_length.md @@ -1,7 +1,7 @@ --- title: set_pin_length(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_pin_length_extension.md b/docs/manpages/md/man2/set_pin_length_extension.md index 93882fece91..51b900c65f2 100644 --- a/docs/manpages/md/man2/set_pin_length_extension.md +++ b/docs/manpages/md/man2/set_pin_length_extension.md @@ -1,7 +1,7 @@ --- title: set_pin_length_extension(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_pin_offset.md b/docs/manpages/md/man2/set_pin_offset.md deleted file mode 100644 index 8aaf52a4838..00000000000 --- a/docs/manpages/md/man2/set_pin_offset.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: set_pin_offset(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_pin_offset - set pin offset - -# SYNOPSIS - -set_pin_offset offset - - -# DESCRIPTION - -This command sets the pin offset distance. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_pin_thick_multiplier.md b/docs/manpages/md/man2/set_pin_thick_multiplier.md index 936d6daa879..c9d5935bdd3 100644 --- a/docs/manpages/md/man2/set_pin_thick_multiplier.md +++ b/docs/manpages/md/man2/set_pin_thick_multiplier.md @@ -1,7 +1,7 @@ --- title: set_pin_thick_multiplier(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_placement_padding.md b/docs/manpages/md/man2/set_placement_padding.md index 65443c347e9..d633ae59d64 100644 --- a/docs/manpages/md/man2/set_placement_padding.md +++ b/docs/manpages/md/man2/set_placement_padding.md @@ -1,7 +1,7 @@ --- title: set_placement_padding(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_resolution.md b/docs/manpages/md/man2/set_resolution.md deleted file mode 100644 index 02ba12bbfc9..00000000000 --- a/docs/manpages/md/man2/set_resolution.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: set_resolution(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_resolution - set resolution - -# SYNOPSIS - -gui::set_resolution - [resolution] - - -# DESCRIPTION - -To change the resolution to a specific value: - -# OPTIONS - -`resolution`: database units per pixel. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_routing_alpha.md b/docs/manpages/md/man2/set_routing_alpha.md deleted file mode 100644 index 48db363ec14..00000000000 --- a/docs/manpages/md/man2/set_routing_alpha.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: set_routing_alpha(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_routing_alpha - set routing alpha - -# SYNOPSIS - -set_routing_alpha - [-net net_name] - [-min_fanout fanout] - [-min_hpwl hpwl] - alpha - - -# DESCRIPTION - -This command sets routing alphas for a given net `net_name`. - -By default the global router uses heuristic rectilinear Steiner minimum -trees (RSMTs) as an initial basis to construct route guides. An RSMT -tries to minimize the total wirelength needed to connect a given set -of pins. The Prim-Dijkstra heuristic is an alternative net topology -algorithm that supports a trade-off between total wirelength and maximum -path depth from the net driver to its loads. The `set_routing_alpha` -command enables the Prim/Dijkstra algorithm and sets the alpha parameter -used to trade-off wirelength and path depth. Alpha is between 0.0 -and 1.0. When alpha is 0.0 the net topology minimizes total wirelength -(i.e. capacitance). When alpha is 1.0 it minimizes longest path between -the driver and loads (i.e., maximum resistance). Typical values are -0.4-0.8. You can call it multiple times for different nets. - -Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. - -# OPTIONS - -`-net`: Net name. - -`-min_fanout`: Set the minimum number for fanout. - -`-min_hpwl`: Set the minimum half-perimetere wirelength (microns). - -`alpha`: Float between 0 and 1 describing the trade-off between wirelength and path depth. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_routing_layers.md b/docs/manpages/md/man2/set_routing_layers.md deleted file mode 100644 index d2e6ad2ce2b..00000000000 --- a/docs/manpages/md/man2/set_routing_layers.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: set_routing_layers(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -set_routing_layers - set routing layers - -# SYNOPSIS - -set_routing_layers - [-signal min-max] - [-clock min-max] - - -# DESCRIPTION - -This command sets the minimum and maximum routing layers for signal and clock nets. -Example: `set_routing_layers -signal Metal2-Metal10 -clock Metal6-Metal9` - -# OPTIONS - -`-signal`: Set the min and max routing signal layer (names) in this format "%s-%s". - -`-clock`: Set the min and max routing clock layer (names) in this format "%s-%s". - -`Argument Name`: Description - -`extension`: Number of `GCells` added to the blockage boundaries from macros. The default `GCell` size is 15 `M3` pitches. - -`offset`: Pin offset in microns (must be a positive integer). - -`layer`: Integer for the layer number (e.g. for M1 you would use 1). - -`adjustment`: Float indicating the percentage reduction of each edge in the specified layer. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_simulated_annealing_parameters.md b/docs/manpages/md/man2/set_simulated_annealing_parameters.md index d20a1bdb68d..0800722fcf2 100644 --- a/docs/manpages/md/man2/set_simulated_annealing_parameters.md +++ b/docs/manpages/md/man2/set_simulated_annealing_parameters.md @@ -1,7 +1,7 @@ --- title: set_simulated_annealing_parameters(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/set_wire_rc.md b/docs/manpages/md/man2/set_wire_rc.md new file mode 100644 index 00000000000..9a1eb6b620e --- /dev/null +++ b/docs/manpages/md/man2/set_wire_rc.md @@ -0,0 +1,51 @@ +--- +title: set_wire_rc(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +set_wire_rc - set wire rc + +# SYNOPSIS + +set_wire_rc + [-clock] + [-signal] + [-layer layer_name] + +or +set_wire_rc + [-resistance res] + [-capacitance cap] + + +# DESCRIPTION + +The `set_wire_rc` command sets the resistance and capacitance used to estimate +delay of routing wires. Separate values can be specified for clock and data +nets with the `-signal` and `-clock` flags. Without either `-signal` or +`-clock` the resistance and capacitance for clocks and data nets are set. + +# OPTIONS + +`-clock`: Enable setting of RC for clock nets. + +`-signal`: Enable setting of RC for signal nets. + +`-layer`: Use the LEF technology resistance and area/edge capacitance values for the layer. This is used for a default width wire on the layer. + +`-resistance`: Resistance per unit length, units are from the first Liberty file read, usually in the form of $\frac{resistanceUnit}{distanceUnit}$. Usually kΩ/µm. + +`-capacitance`: Capacitance per unit length, units are from the first Liberty file read, usually in the form of $\frac{capacitanceUnit}{distanceUnit}$. Usually pF/µm. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/show.md b/docs/manpages/md/man2/show.md deleted file mode 100644 index 3499e5c4b77..00000000000 --- a/docs/manpages/md/man2/show.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: show(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -show - show - -# SYNOPSIS - -gui::show - [script] - [interactive] - - -# DESCRIPTION - -To open the GUI from the command-line (this command does not return until the GUI is closed): - -# OPTIONS - -`script`: TCL script to evaluate in the GUI. - -`interactive`: indicates if true the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/tap.txt b/docs/manpages/md/man2/tap.txt index 8aac734a389..dddfbd8c74a 100644 --- a/docs/manpages/md/man2/tap.txt +++ b/docs/manpages/md/man2/tap.txt @@ -9,7 +9,19 @@ Tapcell and endcap insertion. - Parameters without square brackets `-param2 param2` are required. ``` -### Add Tapcell/Endcap +### Tapcell + +This command inserts tapcells or endcaps. + +The figures below show two examples of tapcell insertion. When only the +`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement +is similar to Figure 1. When the remaining masters are give, the tapcell +placement is similar to Figure 2. + +| | | +|:--:|:--:| +| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | + ```tcl tapcell @@ -54,16 +66,9 @@ tapcell | `-tap_prefix` | Prefix for the tapcell instances. The default value is `TAP_`. | | `-endcap_prefix` | Prefix for the endcaps instances. The default value is `PHY_`. | -The figures below show two examples of tapcell insertion. When only the -`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement -is similar to Figure 1. When the remaining masters are give, the tapcell -placement is similar to Figure 2. +### Cut Rows -| | | -|:--:|:--:| -| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | - -### Only cutting rows +This command cuts rows. ```tcl cut_rows @@ -80,7 +85,7 @@ cut_rows | `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | | `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | -### Only adding boundary/endcap cells +### Place Endcaps Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the LEF58 `CLASS` specification foe endcaps. @@ -130,7 +135,9 @@ place_endcaps | `-top_edge` | List of masters for the top row endcaps. (overrides `-endcap_horizontal`). | | `-bottom_edge` | List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). | -### Only adding tapcells cells +### Place Tapcells + +This command is used for tapcell placement only. ```tcl place_tapcells @@ -146,7 +153,9 @@ place_tapcells | `-distance` | Distance between tapcells. | -### Remove Tapcells/Endcaps +### Tapcell Ripup + +This command is used for removing tapcells or endcaps based on their prefix. ```tcl tapcell_ripup @@ -165,7 +174,7 @@ tapcell_ripup You can find script examples for both 45nm and 14nm in `./etc/scripts` -```tcl +``` ./etc/scripts/example_14nm.tcl ./etc/scripts/example_45nm.tcl ``` diff --git a/docs/manpages/md/man2/tapcell.md b/docs/manpages/md/man2/tapcell.md new file mode 100644 index 00000000000..f2cf9c5ce82 --- /dev/null +++ b/docs/manpages/md/man2/tapcell.md @@ -0,0 +1,58 @@ +--- +title: tapcell(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +tapcell - tapcell + +# SYNOPSIS + +tapcell + [-tapcell_master tapcell_master] + [-endcap_master endcap_master] + [-distance dist] + [-halo_width_x halo_x] + [-halo_width_y halo_y] + [-tap_nwin2_master tap_nwin2_master] + [-tap_nwin3_master tap_nwin3_master] + [-tap_nwout2_master tap_nwout2_master] + [-tap_nwout3_master tap_nwout3_master] + [-tap_nwintie_master tap_nwintie_master] + [-tap_nwouttie_master tap_nwouttie_master] + [-cnrcap_nwin_master cnrcap_nwin_master] + [-cnrcap_nwout_master cnrcap_nwout_master] + [-incnrcap_nwin_master incnrcap_nwin_master] + [-incnrcap_nwout_master incnrcap_nwout_master] + [-tap_prefix tap_prefix] + [-endcap_prefix endcap_prefix] + + +# DESCRIPTION + +This command inserts tapcells or endcaps. + +The figures below show two examples of tapcell insertion. When only the +`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement +is similar to Figure 1. When the remaining masters are give, the tapcell +placement is similar to Figure 2. + +| | | +|:--:|:--:| +| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | + +# OPTIONS + +`Figure 1: Tapcell insertion representation`: Figure 2: Tapcell insertion around macro representation + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/tapcell_ripup.md b/docs/manpages/md/man2/tapcell_ripup.md new file mode 100644 index 00000000000..f7a68f1adff --- /dev/null +++ b/docs/manpages/md/man2/tapcell_ripup.md @@ -0,0 +1,36 @@ +--- +title: tapcell_ripup(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +tapcell_ripup - tapcell ripup + +# SYNOPSIS + +tapcell_ripup + -tap_prefix tap_prefix + -endcap_prefix endcap_prefix + + +# DESCRIPTION + +This command is used for removing tapcells or endcaps based on their prefix. + +# OPTIONS + +`-master`: Master to use for the tapcells. + +`-distance`: Distance between tapcells. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/triton_part_design.md b/docs/manpages/md/man2/triton_part_design.md index abf84381613..0e8de341d30 100644 --- a/docs/manpages/md/man2/triton_part_design.md +++ b/docs/manpages/md/man2/triton_part_design.md @@ -1,7 +1,7 @@ --- title: triton_part_design(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/triton_part_hypergraph.md b/docs/manpages/md/man2/triton_part_hypergraph.md index 98ba51d4aa1..b57cc4c9ece 100644 --- a/docs/manpages/md/man2/triton_part_hypergraph.md +++ b/docs/manpages/md/man2/triton_part_hypergraph.md @@ -1,7 +1,7 @@ --- title: triton_part_hypergraph(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/upf.txt b/docs/manpages/md/man2/upf.txt index ba1d6b25897..edc3800941a 100644 --- a/docs/manpages/md/man2/upf.txt +++ b/docs/manpages/md/man2/upf.txt @@ -27,6 +27,8 @@ read_upf ### Create Power Domain +This command creates power domain for a group of modules. + ```tcl create_power_domain [-elements elements] @@ -42,6 +44,9 @@ create_power_domain ### Create Logic Port +This command creates logic port. Direction must be specified from: +`in`, `out`, `inout`. + ```tcl create_logic_port [-direction direction] @@ -57,6 +62,8 @@ create_logic_port ### Create Power Switch +This command creates power switch. + ```tcl create_power_switch [-domain domain] @@ -78,7 +85,9 @@ create_power_switch | `-on_state` | One of {`state_name`, `input_supply_port`, `boolean_expression`}. | | `name` | Power switch name. | -### Create or Update Isolation Strategy +### Set Isolation + +This command creates or update isolation strategy. ```tcl set_isolation @@ -105,7 +114,9 @@ set_isolation | `-update` | Only available if using existing strategy, will error if the strategy doesn't exist. | | `name` | Isolation strategy name. | -### Set Interface cell +### Use Interface cell + +This command sets the interface cell. ```tcl use_interface_cell @@ -124,6 +135,8 @@ use_interface_cell ### Set Domain Area +This command sets the power domain area. + ```tcl set_domain_area domain_name @@ -138,7 +151,9 @@ set_domain_area | `-area` | x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. | -### Map existing power switch +### Map Power Switch + +This command maps existing power switch. ```tcl map_power_switch @@ -159,7 +174,7 @@ map_power_switch Example script demonstrating how to run `upf` related commands can be found here: -```tcl +``` ./test/upf_test.tcl ``` diff --git a/docs/manpages/md/man2/use_interface_cell.md b/docs/manpages/md/man2/use_interface_cell.md new file mode 100644 index 00000000000..ff7743addf9 --- /dev/null +++ b/docs/manpages/md/man2/use_interface_cell.md @@ -0,0 +1,39 @@ +--- +title: use_interface_cell(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +use_interface_cell - use interface cell + +# SYNOPSIS + +use_interface_cell + [-domain domain] + [-strategy strategy] + [-lib_cells lib_cells] + + +# DESCRIPTION + +This command sets the interface cell. + +# OPTIONS + +`-domain`: Power domain name. + +`-strategy`: Isolation strategy name. + +`-lib_cells`: List of lib cells that could be used. + +# ARGUMENTS + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/write_guides.md b/docs/manpages/md/man2/write_guides.md deleted file mode 100644 index c1ad110b0b2..00000000000 --- a/docs/manpages/md/man2/write_guides.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: write_guides(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -write_guides - write guides - -# SYNOPSIS - -write_guides file_name - - -# DESCRIPTION - -This command writes global routing guides, which can be used as input -for global routing. - -Example: `write_guides route.guide`. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/write_partition_verilog.md b/docs/manpages/md/man2/write_partition_verilog.md index c5d7c216e5f..fa76ec932df 100644 --- a/docs/manpages/md/man2/write_partition_verilog.md +++ b/docs/manpages/md/man2/write_partition_verilog.md @@ -1,7 +1,7 @@ --- title: write_partition_verilog(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/11 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/write_pin_placement.md b/docs/manpages/md/man2/write_pin_placement.md index 1dd88542606..b4d1174ea74 100644 --- a/docs/manpages/md/man2/write_pin_placement.md +++ b/docs/manpages/md/man2/write_pin_placement.md @@ -1,7 +1,7 @@ --- title: write_pin_placement(2) author: Jack Luar (TODO@TODO.com) -date: 24/01/09 +date: 24/01/14 --- # NAME diff --git a/docs/manpages/md/man2/zoom_out.md b/docs/manpages/md/man2/zoom_out.md deleted file mode 100644 index f182cf88a2d..00000000000 --- a/docs/manpages/md/man2/zoom_out.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: zoom_out(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -zoom_out - zoom out - -# SYNOPSIS - -gui::zoom_out - [x y] - - -# DESCRIPTION - -To zoom out the layout: - -# OPTIONS - -`x, y`: new center of layout - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/zoom_to.md b/docs/manpages/md/man2/zoom_to.md deleted file mode 100644 index e64b1947ddf..00000000000 --- a/docs/manpages/md/man2/zoom_to.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: zoom_to(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/10 ---- - -# NAME - -zoom_to - zoom to - -# SYNOPSIS - -gui::zoom_to - [x0 y0 x1 y1] - - -# DESCRIPTION - -To zoom in our out to a specific region: - -# OPTIONS - -`x0, y0`: first corner of the layout area in microns - -`x1, y1`: second corner of the layout area in microns - -# ARGUMENTS - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index bf7be4da155..5c8dd464539 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -10,8 +10,17 @@ # list of edited docs SRC_DIR = "./md/man2" -# problematic: drt, gpl, grt, gui, ifp, mpl2, -tools = ["par"]#"pad", "fin", "dpl", "dft", "cts", "ant", "ppl"] +# problematic: drt, gpl, grt, gui, ifp, mpl2, pdn, psm +# psm: need to handle the table wrt the #### Options, not all tables. +# also you need to change the ### FUNCTION_NAME parsing. Sometimes the +# function name could be something weird like `diff_spef` or `pdngen` +# so it would be better to have a more informative header for the RTD docs. +# rmp: many level 3 headers +# sta: documentation is hosted elsewhere. (not currently in RTD also.) +# +tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ + "tap", "upf"] +#tools = ["rsz"] docs = [f"{SRC_DIR}/{tool}.txt" for tool in tools] # identify key section and stored in ManPage class. From 89bf8dc6506c7b3c57969ab0bfd314b9e66fed80 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 14 Jan 2024 13:57:50 +0000 Subject: [PATCH 23/88] 18 of 28 tools done. drt. also included fix to make parsing more reliable. we now parse all functions for options and arguments, regardless if they have any. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/md/man2/assign_io_bump.md | 2 + docs/manpages/md/man2/buffer_ports.md | 2 + docs/manpages/md/man2/check_antennas.md | 2 + docs/manpages/md/man2/check_placement.md | 2 + .../md/man2/clear_io_pin_constraints.md | 2 + docs/manpages/md/man2/clock_tree_synthesis.md | 2 + .../md/man2/configure_cts_characterization.md | 2 + docs/manpages/md/man2/connect_by_abutment.md | 2 + docs/manpages/md/man2/create_logic_port.md | 2 + docs/manpages/md/man2/create_power_domain.md | 2 + docs/manpages/md/man2/create_power_switch.md | 2 + docs/manpages/md/man2/cut_rows.md | 30 +--- .../md/man2/define_pin_shape_pattern.md | 2 + docs/manpages/md/man2/density_fill.md | 2 + docs/manpages/md/man2/detailed_placement.md | 2 + docs/manpages/md/man2/detailed_route.md | 101 ++++++++++++ docs/manpages/md/man2/detailed_route_debug.md | 75 +++++++++ docs/manpages/md/man2/drt.txt | 12 +- docs/manpages/md/man2/estimate_parasitics.md | 2 + .../md/man2/evaluate_hypergraph_partition.md | 2 + .../md/man2/evaluate_part_design_solution.md | 2 + docs/manpages/md/man2/filler_placement.md | 2 + docs/manpages/md/man2/insert_dft.md | 2 + docs/manpages/md/man2/make_false_io_site.md | 2 + docs/manpages/md/man2/make_io_bump_array.md | 2 + docs/manpages/md/man2/make_io_sites.md | 2 + docs/manpages/md/man2/map_power_switch.md | 2 + docs/manpages/md/man2/optimize_mirroring.md | 2 + docs/manpages/md/man2/par.txt | 2 +- docs/manpages/md/man2/pin_access.md | 62 ++++++++ docs/manpages/md/man2/place_bondpad.md | 2 + docs/manpages/md/man2/place_corners.md | 2 + docs/manpages/md/man2/place_endcaps.md | 38 ++++- docs/manpages/md/man2/place_io_fill.md | 2 + docs/manpages/md/man2/place_io_terminals.md | 2 + docs/manpages/md/man2/place_pad.md | 2 + docs/manpages/md/man2/place_pin.md | 2 + docs/manpages/md/man2/place_pins.md | 4 + docs/manpages/md/man2/place_tapcells.md | 38 +---- docs/manpages/md/man2/preview_dft.md | 2 + docs/manpages/md/man2/rdl_route.md | 18 +++ docs/manpages/md/man2/read_partitioning.md | 2 + docs/manpages/md/man2/read_upf.md | 2 + docs/manpages/md/man2/remove_buffers.md | 2 + docs/manpages/md/man2/remove_fillers.md | 2 + docs/manpages/md/man2/remove_io_bump.md | 4 +- docs/manpages/md/man2/remove_io_bump_array.md | 2 + docs/manpages/md/man2/remove_io_rows.md | 2 + .../md/man2/repair_clock_inverters.md | 2 + docs/manpages/md/man2/repair_clock_nets.md | 2 + docs/manpages/md/man2/repair_design.md | 2 + docs/manpages/md/man2/repair_tie_fanout.md | 2 + docs/manpages/md/man2/repair_timing.md | 2 + docs/manpages/md/man2/report_cts.md | 6 + docs/manpages/md/man2/report_design_area.md | 2 + docs/manpages/md/man2/report_dft_config.md | 2 + docs/manpages/md/man2/report_floating_nets.md | 26 +++ docs/manpages/md/man2/set_dft_config.md | 2 + docs/manpages/md/man2/set_domain_area.md | 2 + docs/manpages/md/man2/set_dont_touch.md | 2 + docs/manpages/md/man2/set_dont_use.md | 2 + .../manpages/md/man2/set_io_pin_constraint.md | 2 + docs/manpages/md/man2/set_isolation.md | 2 + docs/manpages/md/man2/set_layer_rc.md | 2 + docs/manpages/md/man2/set_pin_length.md | 2 + .../md/man2/set_pin_length_extension.md | 2 + .../md/man2/set_pin_thick_multiplier.md | 2 + .../manpages/md/man2/set_placement_padding.md | 2 + .../set_simulated_annealing_parameters.md | 2 + docs/manpages/md/man2/set_wire_rc.md | 2 + docs/manpages/md/man2/tapcell.md | 36 ++++- docs/manpages/md/man2/tapcell_ripup.md | 6 +- docs/manpages/md/man2/triton_part_design.md | 2 + .../md/man2/triton_part_hypergraph.md | 2 + docs/manpages/md/man2/use_interface_cell.md | 2 + .../md/man2/write_partition_verilog.md | 2 + docs/manpages/md/man2/write_pin_placement.md | 26 ++- docs/manpages/scripts/md_roff_compat.py | 148 +++++++++++------- 78 files changed, 623 insertions(+), 131 deletions(-) create mode 100644 docs/manpages/md/man2/detailed_route.md create mode 100644 docs/manpages/md/man2/detailed_route_debug.md create mode 100644 docs/manpages/md/man2/pin_access.md diff --git a/docs/manpages/md/man2/assign_io_bump.md b/docs/manpages/md/man2/assign_io_bump.md index 260de4dc93a..73fb155ea7c 100644 --- a/docs/manpages/md/man2/assign_io_bump.md +++ b/docs/manpages/md/man2/assign_io_bump.md @@ -45,6 +45,8 @@ assign_io_bump -net p_ddr_addr_6_o BUMP_7_0 # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/buffer_ports.md b/docs/manpages/md/man2/buffer_ports.md index 1ccb7421248..4dc65392621 100644 --- a/docs/manpages/md/man2/buffer_ports.md +++ b/docs/manpages/md/man2/buffer_ports.md @@ -32,6 +32,8 @@ internals. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/check_antennas.md b/docs/manpages/md/man2/check_antennas.md index 867e0648345..814871c3962 100644 --- a/docs/manpages/md/man2/check_antennas.md +++ b/docs/manpages/md/man2/check_antennas.md @@ -27,6 +27,8 @@ The `check_antennas` command will check for antenna violations. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/check_placement.md b/docs/manpages/md/man2/check_placement.md index 5aaa015d3d8..f8661308ae9 100644 --- a/docs/manpages/md/man2/check_placement.md +++ b/docs/manpages/md/man2/check_placement.md @@ -31,6 +31,8 @@ The `check_placement` command checks the placement legality. It returns # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/clear_io_pin_constraints.md b/docs/manpages/md/man2/clear_io_pin_constraints.md index 80835539e98..72ce00212f3 100644 --- a/docs/manpages/md/man2/clear_io_pin_constraints.md +++ b/docs/manpages/md/man2/clear_io_pin_constraints.md @@ -25,6 +25,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/clock_tree_synthesis.md b/docs/manpages/md/man2/clock_tree_synthesis.md index c62beb916ac..a5aa1544f9a 100644 --- a/docs/manpages/md/man2/clock_tree_synthesis.md +++ b/docs/manpages/md/man2/clock_tree_synthesis.md @@ -69,6 +69,8 @@ Perform clock tree synthesis. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/configure_cts_characterization.md b/docs/manpages/md/man2/configure_cts_characterization.md index 0a55cafcb4b..6a1b667e012 100644 --- a/docs/manpages/md/man2/configure_cts_characterization.md +++ b/docs/manpages/md/man2/configure_cts_characterization.md @@ -34,6 +34,8 @@ as well as the number of steps they will be divided for characterization. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/connect_by_abutment.md b/docs/manpages/md/man2/connect_by_abutment.md index 791026b5dce..6f318c93cf7 100644 --- a/docs/manpages/md/man2/connect_by_abutment.md +++ b/docs/manpages/md/man2/connect_by_abutment.md @@ -23,6 +23,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/create_logic_port.md b/docs/manpages/md/man2/create_logic_port.md index 86b47bb110f..8792729b612 100644 --- a/docs/manpages/md/man2/create_logic_port.md +++ b/docs/manpages/md/man2/create_logic_port.md @@ -28,6 +28,8 @@ This command creates logic port. Direction must be specified from: # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/create_power_domain.md b/docs/manpages/md/man2/create_power_domain.md index 193f052e56b..14ce3adc43b 100644 --- a/docs/manpages/md/man2/create_power_domain.md +++ b/docs/manpages/md/man2/create_power_domain.md @@ -27,6 +27,8 @@ This command creates power domain for a group of modules. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/create_power_switch.md b/docs/manpages/md/man2/create_power_switch.md index dad16392b7b..6b0ccbc6db4 100644 --- a/docs/manpages/md/man2/create_power_switch.md +++ b/docs/manpages/md/man2/create_power_switch.md @@ -39,6 +39,8 @@ This command creates power switch. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/cut_rows.md b/docs/manpages/md/man2/cut_rows.md index 8d5d3962dca..7806f0ef18f 100644 --- a/docs/manpages/md/man2/cut_rows.md +++ b/docs/manpages/md/man2/cut_rows.md @@ -22,42 +22,16 @@ This command cuts rows. # OPTIONS -`-tapcell_master`: Master used as a tapcell. - `-endcap_master`: Master used as an endcap. -`-distance`: Distance (in microns) between each tapcell in the checkerboard. - `-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. `-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. -`-tap_nwintie_master`: Master cell placed at the top and bottom of|macros and the core area according the row orientation. - -`-tap_nwin2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwintie_master` - -`-tap_nwin3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwin2_master`. - -`-tap_nwouttie_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. - -`-tap_nwout2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwouttie_master`. - -`-tap_nwout3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation | This master should be smaller than `tap_nwout2_master`. - -`-incnrcap_nwin_master`: Master cell placed at the corners of macros, according the row orientation. - -`-incnrcap_nwout_master`: Master cell placed at the corners of macros, according the row orientation. - -`-cnrcap_nwin_master`: Macro cell placed at the corners the core area according the row orientation. - -`-cnrcap_nwout_master`: Macro cell placed at the corners the core area according the row orientation. - -`-tap_prefix`: Prefix for the tapcell instances. The default value is `TAP_`. - -`-endcap_prefix`: Prefix for the endcaps instances. The default value is `PHY_`. - # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/define_pin_shape_pattern.md b/docs/manpages/md/man2/define_pin_shape_pattern.md index d808bcbc6b1..fa79ac1f0f1 100644 --- a/docs/manpages/md/man2/define_pin_shape_pattern.md +++ b/docs/manpages/md/man2/define_pin_shape_pattern.md @@ -39,6 +39,8 @@ the edges of the die boundary. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/density_fill.md b/docs/manpages/md/man2/density_fill.md index 1a7adf41367..d6cc4afff70 100644 --- a/docs/manpages/md/man2/density_fill.md +++ b/docs/manpages/md/man2/density_fill.md @@ -27,6 +27,8 @@ This command performs density fill to meet metal density DRC rules. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/detailed_placement.md b/docs/manpages/md/man2/detailed_placement.md index 034907c93b6..c011dfac387 100644 --- a/docs/manpages/md/man2/detailed_placement.md +++ b/docs/manpages/md/man2/detailed_placement.md @@ -31,6 +31,8 @@ to legal locations after global placement. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/detailed_route.md b/docs/manpages/md/man2/detailed_route.md new file mode 100644 index 00000000000..2151675b725 --- /dev/null +++ b/docs/manpages/md/man2/detailed_route.md @@ -0,0 +1,101 @@ +--- +title: detailed_route(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +detailed_route - detailed route + +# SYNOPSIS + +detailed_route + [-output_maze filename] + [-output_drc filename] + [-output_cmap filename] + [-output_guide_coverage filename] + [-drc_report_iter_step step] + [-db_process_node name] + [-disable_via_gen] + [-droute_end_iter iter] + [-via_in_pin_bottom_layer layer] + [-via_in_pin_top_layer layer] + [-or_seed seed] + [-or_k_ k] + [-bottom_routing_layer layer] + [-top_routing_layer layer] + [-verbose level] + [-distributed] + [-remote_host rhost] + [-remote_port rport] + [-shared_volume vol] + [-cloud_size sz] + [-clean_patches] + [-no_pin_access] + [-min_access_points count] + [-save_guide_updates] + [-repair_pdn_vias layer] + + +# DESCRIPTION + +This command performs detailed routing. + +# OPTIONS + +`-output_maze`: Path to output maze log file (e.g. `output_maze.log`). + +`-output_drc`: Path to output DRC report file (e.g. `output_drc.rpt`). + +`-output_cmap`: Path to output congestion map file (e.g. `output.cmap`). + +`-output_guide_coverage`: Path to output guide coverage file (e.g. `sample_coverage.csv`). + +`-drc_report_iter_step`: Report DRC on each iteration which is a multiple of this step. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. + +`-db_process_node`: Specify the process node. + +`-disable_via_gen`: Option to diable via generation with bottom and top routing layer. The default value is disabled. + +`-droute_end_iter`: Number of detailed routing iterations. The default value is `-1`, and the allowed values are integers `[1, 64]`. + +`-via_in_pin_bottom_layer`: Via-in pin bottom layer name. + +`-via_in_pin_top_layer`: Via-in pin top layer name. + +`-or_seed`: Refer to developer arguments [here](#developer-arguments). + +`-or_k`: Refer to developer arguments [here](#developer-arguments). + +`-bottom_routing_layer`: Bottommost routing layer name. + +`-top_routing_layer`: Topmost routing layer name. + +`-verbose`: Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) + +`-distributed`: Refer to distributed arguments [here](#distributed-arguments). + +`-clean_patches`: Clean unneeded patches during detailed routing. + +`-no_pin_access`: Disables pin access for routing. + +`-min_access_points`: Minimum access points for standard cell and macro cell pins. + +`-save_guide_updates`: Flag to save guides updates. + +`-repair_pdn_vias`: This option is used for PDKs where M1 and M2 power rails run in parallel. + +# ARGUMENTS + +`-or_seed`: Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. + +`-or_k`: Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/detailed_route_debug.md b/docs/manpages/md/man2/detailed_route_debug.md new file mode 100644 index 00000000000..618c4ec08c1 --- /dev/null +++ b/docs/manpages/md/man2/detailed_route_debug.md @@ -0,0 +1,75 @@ +--- +title: detailed_route_debug(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +detailed_route_debug - detailed route debug + +# SYNOPSIS + +detailed_route_debug + [-pa] + [-ta] + [-dr] + [-maze] + [-net name] + [-pin name] + [-worker x y] + [-iter iter] + [-pa_markers] + [-dump_dr] + [-dump_dir dir] + [-pa_edge] + [-pa_commit] + [-write_net_tracks] + + +# DESCRIPTION + +The following command and arguments are useful when debugging error +messages from `drt` and to understand its behavior. + +# OPTIONS + +`-pa`: Enable debug for pin access. + +`-ta`: Enable debug for track assignment. + +`-dr`: Enable debug for detailed routing. + +`-maze`: Enable debug for maze routing. + +`-net`: Enable debug for net name. + +`-pin`: Enable debug for pin name. + +`-worker`: Debugs routes that pass through the point `{x, y}`. + +`-iter`: Specifies the number of debug iterations. The default value is `0`, and the accepted values are integers `[0, MAX_INT`. + +`-pa_markers`: Enable pin access markers. + +`-dump_dr`: Filename for detailed routing dump. + +`-dump_dir`: Directory for detailed routing dump. + +`-pa_edge`: Enable visibility of pin access edges. + +`-pa_commit`: Enable visibility of pin access commits. + +`-write_net_tracks`: Enable writing of net track assigments. + +# ARGUMENTS + +This command has no arguments. + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/drt.txt b/docs/manpages/md/man2/drt.txt index a64c5d30175..a3a9f643c20 100644 --- a/docs/manpages/md/man2/drt.txt +++ b/docs/manpages/md/man2/drt.txt @@ -25,6 +25,8 @@ guide format. ### Detailed Route +This command performs detailed routing. + ```tcl detailed_route [-output_maze filename] @@ -89,7 +91,7 @@ Some arguments that are helpful for developers are listed here. | `-or_seed` | Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. | | `-or_k` | Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -### Detailed Route Debugging +### Detailed Route Debug The following command and arguments are useful when debugging error messages from `drt` and to understand its behavior. @@ -131,7 +133,9 @@ detailed_route_debug | `-pa_commit` | Enable visibility of pin access commits. | | `-write_net_tracks` | Enable writing of net track assigments. | -### Check Pin Access +### Pin Access + +This function checks pin access. ```tcl pin_access @@ -158,7 +162,7 @@ pin_access | `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) | | `-distributed` | Refer to distributed arguments [here](#distributed-arguments). | -### Distributed arguments +#### Distributed Arguments We have compiled all distributed arguments in this section. @@ -174,7 +178,7 @@ Additional setup is required. Please refer to this [guide](./doc/Distributed.md) | `-shared_volume` | The mount path of the nfs shared folder. | | `-cloud_size` | The number of workers. | -### Useful developer functions +## Useful developer functions If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonRoute.cpp) or the [swig file](./src/TritonRoute.i). diff --git a/docs/manpages/md/man2/estimate_parasitics.md b/docs/manpages/md/man2/estimate_parasitics.md index 62778e8ccba..c00aff44286 100644 --- a/docs/manpages/md/man2/estimate_parasitics.md +++ b/docs/manpages/md/man2/estimate_parasitics.md @@ -34,6 +34,8 @@ flag. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/evaluate_hypergraph_partition.md b/docs/manpages/md/man2/evaluate_hypergraph_partition.md index 81eb3d0e68f..4b9511e8fe1 100644 --- a/docs/manpages/md/man2/evaluate_hypergraph_partition.md +++ b/docs/manpages/md/man2/evaluate_hypergraph_partition.md @@ -54,6 +54,8 @@ This command evaluates hypergraph partition. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/evaluate_part_design_solution.md b/docs/manpages/md/man2/evaluate_part_design_solution.md index 319aee8bb00..2c846b5572f 100644 --- a/docs/manpages/md/man2/evaluate_part_design_solution.md +++ b/docs/manpages/md/man2/evaluate_part_design_solution.md @@ -93,6 +93,8 @@ This command evaluates partition design solution. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/filler_placement.md b/docs/manpages/md/man2/filler_placement.md index d68555337e5..d1d4815cf0c 100644 --- a/docs/manpages/md/man2/filler_placement.md +++ b/docs/manpages/md/man2/filler_placement.md @@ -32,6 +32,8 @@ from `FILLER_` use `-prefix `. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/insert_dft.md b/docs/manpages/md/man2/insert_dft.md index 7e0a5bff30f..ce12f0c60f2 100644 --- a/docs/manpages/md/man2/insert_dft.md +++ b/docs/manpages/md/man2/insert_dft.md @@ -30,6 +30,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/make_false_io_site.md b/docs/manpages/md/man2/make_false_io_site.md index 414a60f18e2..1707ab614bb 100644 --- a/docs/manpages/md/man2/make_false_io_site.md +++ b/docs/manpages/md/man2/make_false_io_site.md @@ -39,6 +39,8 @@ make_fake_io_site -name IO_CSITE -width 200 -height 204 # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/make_io_bump_array.md b/docs/manpages/md/man2/make_io_bump_array.md index 9f9353748db..fec2923dd5d 100644 --- a/docs/manpages/md/man2/make_io_bump_array.md +++ b/docs/manpages/md/man2/make_io_bump_array.md @@ -45,6 +45,8 @@ make_io_bump_array -bump BUMP -origin "200 200" -rows 14 -columns 14 -pitch "200 # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/make_io_sites.md b/docs/manpages/md/man2/make_io_sites.md index b858870a7df..ba8167fdae4 100644 --- a/docs/manpages/md/man2/make_io_sites.md +++ b/docs/manpages/md/man2/make_io_sites.md @@ -52,6 +52,8 @@ make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOS # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/map_power_switch.md b/docs/manpages/md/man2/map_power_switch.md index c63c5665e6e..3a660d38d6f 100644 --- a/docs/manpages/md/man2/map_power_switch.md +++ b/docs/manpages/md/man2/map_power_switch.md @@ -30,6 +30,8 @@ This command maps existing power switch. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/optimize_mirroring.md b/docs/manpages/md/man2/optimize_mirroring.md index c67428c75d1..8ab30901363 100644 --- a/docs/manpages/md/man2/optimize_mirroring.md +++ b/docs/manpages/md/man2/optimize_mirroring.md @@ -24,6 +24,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/par.txt b/docs/manpages/md/man2/par.txt index 938e08d322c..0c55634afa2 100644 --- a/docs/manpages/md/man2/par.txt +++ b/docs/manpages/md/man2/par.txt @@ -575,7 +575,7 @@ set timing_guardband true set part_design_solution_file "${design}_part_design.hgr.part.${num_parts}" ############################################################################################## -### TritonPart with slack progagation +## TritonPart with slack progagation ############################################################################################## puts "Start TritonPart with slack propagation" # call triton_part to partition the netlist diff --git a/docs/manpages/md/man2/pin_access.md b/docs/manpages/md/man2/pin_access.md new file mode 100644 index 00000000000..ca362e3057b --- /dev/null +++ b/docs/manpages/md/man2/pin_access.md @@ -0,0 +1,62 @@ +--- +title: pin_access(2) +author: Jack Luar (TODO@TODO.com) +date: 24/01/14 +--- + +# NAME + +pin_access - pin access + +# SYNOPSIS + +pin_access + [-db_process_node name] + [-bottom_routing_layer layer] + [-top_routing_layer layer] + [-min_access_points count] + [-verbose level] + [-distributed] + [-remote_host rhost] + [-remote_port rport] + [-shared_volume vol] + [-cloud_size sz] + + +# DESCRIPTION + +This function checks pin access. + +# OPTIONS + +`-db_process_node`: Specify process node. + +`-bottom_routing_layer`: Bottommost routing layer. + +`-top_routing_layer`: Topmost routing layer. + +`-min_access_points`: Minimum number of access points per pin. + +`-verbose`: Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) + +`-distributed`: Refer to distributed arguments [here](#distributed-arguments). + +# ARGUMENTS + +`-distributed`: Enable distributed mode with Kubernetes and Google Cloud. + +`-remote_host`: The host IP. + +`-remote_port`: The value of the port to access from. + +`-shared_volume`: The mount path of the nfs shared folder. + +`-cloud_size`: The number of workers. + +# EXAMPLES + +# SEE ALSO + +# COPYRIGHT + +Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_bondpad.md b/docs/manpages/md/man2/place_bondpad.md index 663080bdede..e65ed4a762c 100644 --- a/docs/manpages/md/man2/place_bondpad.md +++ b/docs/manpages/md/man2/place_bondpad.md @@ -39,6 +39,8 @@ place_bondpad -bond PAD IO_* # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_corners.md b/docs/manpages/md/man2/place_corners.md index e878bbb4b9b..b79e1cf672b 100644 --- a/docs/manpages/md/man2/place_corners.md +++ b/docs/manpages/md/man2/place_corners.md @@ -27,6 +27,8 @@ This command places the corner cells. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_endcaps.md b/docs/manpages/md/man2/place_endcaps.md index 91fb3b70672..209213a09dd 100644 --- a/docs/manpages/md/man2/place_endcaps.md +++ b/docs/manpages/md/man2/place_endcaps.md @@ -38,14 +38,46 @@ LEF58 `CLASS` specification foe endcaps. # OPTIONS -`-endcap_master`: Master used as an endcap. +`-prefix`: Prefix to use for the boundary cells. Defaults to "PHY_". -`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. +`-corner`: Master for the corner cells on the outer corners. -`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. +`-edge_corner`: Master for the corner cells on the inner corners. + +`-endcap`: Master used as an endcap. + +`-endcap_horizontal`: List of masters for the top and bottom row endcaps. (overrides `-endcap`). + +`-endcap_vertical`: Master for the left and right row endcaps. (overrides `-endcap`). + +`-left_top_corner`: Master for the corner cells on the outer top left corner. (overrides `-corner`). + +`-right_top_corner`: Master for the corner cells on the outer top right corner. (overrides `-corner`). + +`-left_bottom_corner`: Master for the corner cells on the outer bottom left corner. (overrides `-corner`). + +`-right_bottom_corner`: Master for the corner cells on the outer bottom right corner. (overrides `-corner`). + +`-left_top_edge`: Master for the corner cells on the inner top left corner. (overrides `-edge_corner`). + +`-right_top_edge`: Master for the corner cells on the inner top right corner. (overrides `-edge_corner`). + +`-left_bottom_edge`: Master for the corner cells on the inner bottom left corner. (overrides `-edge_corner`). + +`-right_bottom_edge`: Master for the corner cells on the inner bottom right corner. (overrides `-edge_corner`). + +`-left_edge`: Master for the left row endcaps. (overrides `-endcap_vertical`). + +`-right_edge`: Master for the right row endcaps. (overrides `-endcap_vertical`). + +`-top_edge`: List of masters for the top row endcaps. (overrides `-endcap_horizontal`). + +`-bottom_edge`: List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_io_fill.md b/docs/manpages/md/man2/place_io_fill.md index a0768812d46..568406e6ba0 100644 --- a/docs/manpages/md/man2/place_io_fill.md +++ b/docs/manpages/md/man2/place_io_fill.md @@ -39,6 +39,8 @@ place_io_fill -row IO_EAST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5u # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_io_terminals.md b/docs/manpages/md/man2/place_io_terminals.md index 3e384ef690b..568fe8ad948 100644 --- a/docs/manpages/md/man2/place_io_terminals.md +++ b/docs/manpages/md/man2/place_io_terminals.md @@ -31,6 +31,8 @@ place_io_terminals u_*/VDD # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_pad.md b/docs/manpages/md/man2/place_pad.md index 391c461bb07..734f0680816 100644 --- a/docs/manpages/md/man2/place_pad.md +++ b/docs/manpages/md/man2/place_pad.md @@ -45,6 +45,8 @@ place_pad -master sky130_fd_io__top_power_hvc_wpad -row IO_SOUTH -location 517.5 # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_pin.md b/docs/manpages/md/man2/place_pin.md index 510cb9e2111..3df54359d17 100644 --- a/docs/manpages/md/man2/place_pin.md +++ b/docs/manpages/md/man2/place_pin.md @@ -40,6 +40,8 @@ To place an individual pin: # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_pins.md b/docs/manpages/md/man2/place_pins.md index 9b3a702152e..2c6bf79e50a 100644 --- a/docs/manpages/md/man2/place_pins.md +++ b/docs/manpages/md/man2/place_pins.md @@ -50,6 +50,10 @@ The `place_pins` command places all pins together. Use the following command to # ARGUMENTS +`-random_seed`: Specify the seed for random operations. + +`-random`: When this flag is enabled, the pin placement is random. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/place_tapcells.md b/docs/manpages/md/man2/place_tapcells.md index 5d56660a423..edcc1869265 100644 --- a/docs/manpages/md/man2/place_tapcells.md +++ b/docs/manpages/md/man2/place_tapcells.md @@ -21,44 +21,14 @@ This command is used for tapcell placement only. # OPTIONS -`-prefix`: Prefix to use for the boundary cells. Defaults to "PHY_". +`-master`: Master to use for the tapcells. -`-corner`: Master for the corner cells on the outer corners. - -`-edge_corner`: Master for the corner cells on the inner corners. - -`-endcap`: Master used as an endcap. - -`-endcap_horizontal`: List of masters for the top and bottom row endcaps. (overrides `-endcap`). - -`-endcap_vertical`: Master for the left and right row endcaps. (overrides `-endcap`). - -`-left_top_corner`: Master for the corner cells on the outer top left corner. (overrides `-corner`). - -`-right_top_corner`: Master for the corner cells on the outer top right corner. (overrides `-corner`). - -`-left_bottom_corner`: Master for the corner cells on the outer bottom left corner. (overrides `-corner`). - -`-right_bottom_corner`: Master for the corner cells on the outer bottom right corner. (overrides `-corner`). - -`-left_top_edge`: Master for the corner cells on the inner top left corner. (overrides `-edge_corner`). - -`-right_top_edge`: Master for the corner cells on the inner top right corner. (overrides `-edge_corner`). - -`-left_bottom_edge`: Master for the corner cells on the inner bottom left corner. (overrides `-edge_corner`). - -`-right_bottom_edge`: Master for the corner cells on the inner bottom right corner. (overrides `-edge_corner`). - -`-left_edge`: Master for the left row endcaps. (overrides `-endcap_vertical`). - -`-right_edge`: Master for the right row endcaps. (overrides `-endcap_vertical`). - -`-top_edge`: List of masters for the top row endcaps. (overrides `-endcap_horizontal`). - -`-bottom_edge`: List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). +`-distance`: Distance between tapcells. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/preview_dft.md b/docs/manpages/md/man2/preview_dft.md index 88157bab39d..f29261b25d2 100644 --- a/docs/manpages/md/man2/preview_dft.md +++ b/docs/manpages/md/man2/preview_dft.md @@ -26,6 +26,8 @@ not perform any modification to the design. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/rdl_route.md b/docs/manpages/md/man2/rdl_route.md index 1d23d880f29..7178679cf71 100644 --- a/docs/manpages/md/man2/rdl_route.md +++ b/docs/manpages/md/man2/rdl_route.md @@ -43,8 +43,26 @@ To route the RDL for the bump arrays. `nets`: Nets to route. +`Command Name`: Description + +`find_site`: Find site given site name. + +`find_master`: Find master given master name. + +`find_instance`: Find instance given instance name. + +`find_net`: Find net given net name. + +`assert_required`: Assert argument that is required for `cmd` + +`connect_iterm`: Connect instance terminals. Required inputs are: `inst_name`, `iterm_name`, `net_name`. + +`convert_tcl`: These functions read from $ICeWall::library parameters to generate a standalone Tcl script. + # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/read_partitioning.md b/docs/manpages/md/man2/read_partitioning.md index a81a06cf1ed..32bc265bd8c 100644 --- a/docs/manpages/md/man2/read_partitioning.md +++ b/docs/manpages/md/man2/read_partitioning.md @@ -27,6 +27,8 @@ This command reads the partition file into design. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/read_upf.md b/docs/manpages/md/man2/read_upf.md index 9334d698077..e5b0ec84743 100644 --- a/docs/manpages/md/man2/read_upf.md +++ b/docs/manpages/md/man2/read_upf.md @@ -24,6 +24,8 @@ Sources the UPF file. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/remove_buffers.md b/docs/manpages/md/man2/remove_buffers.md index ede1c9d93c8..39e9f31b8e9 100644 --- a/docs/manpages/md/man2/remove_buffers.md +++ b/docs/manpages/md/man2/remove_buffers.md @@ -25,6 +25,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/remove_fillers.md b/docs/manpages/md/man2/remove_fillers.md index 452222a439c..885e8692f82 100644 --- a/docs/manpages/md/man2/remove_fillers.md +++ b/docs/manpages/md/man2/remove_fillers.md @@ -23,6 +23,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/remove_io_bump.md b/docs/manpages/md/man2/remove_io_bump.md index afd1b9c3d6f..ee30f191aca 100644 --- a/docs/manpages/md/man2/remove_io_bump.md +++ b/docs/manpages/md/man2/remove_io_bump.md @@ -20,10 +20,12 @@ This command removes a single bump instance. # OPTIONS -`instance_name`: Name of the bump. +`-bump`: Name of the bump master. # ARGUMENTS +`instance_name`: Name of the bump. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/remove_io_bump_array.md b/docs/manpages/md/man2/remove_io_bump_array.md index 1ba9fac479c..9525f62d0a9 100644 --- a/docs/manpages/md/man2/remove_io_bump_array.md +++ b/docs/manpages/md/man2/remove_io_bump_array.md @@ -30,6 +30,8 @@ remove_io_bump_array -bump BUMP # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/remove_io_rows.md b/docs/manpages/md/man2/remove_io_rows.md index 3c209faacc2..0893389b307 100644 --- a/docs/manpages/md/man2/remove_io_rows.md +++ b/docs/manpages/md/man2/remove_io_rows.md @@ -23,6 +23,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/repair_clock_inverters.md b/docs/manpages/md/man2/repair_clock_inverters.md index 99aa6fce8fc..bf031865637 100644 --- a/docs/manpages/md/man2/repair_clock_inverters.md +++ b/docs/manpages/md/man2/repair_clock_inverters.md @@ -23,6 +23,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/repair_clock_nets.md b/docs/manpages/md/man2/repair_clock_nets.md index df7c06427e3..705ac82db83 100644 --- a/docs/manpages/md/man2/repair_clock_nets.md +++ b/docs/manpages/md/man2/repair_clock_nets.md @@ -29,6 +29,8 @@ wire from the clock input pin to the clock root buffer. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/repair_design.md b/docs/manpages/md/man2/repair_design.md index 29f2ab3feec..13c4bf8adf6 100644 --- a/docs/manpages/md/man2/repair_design.md +++ b/docs/manpages/md/man2/repair_design.md @@ -42,6 +42,8 @@ to compensate. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/repair_tie_fanout.md b/docs/manpages/md/man2/repair_tie_fanout.md index bcc76f136f0..8c0d032056b 100644 --- a/docs/manpages/md/man2/repair_tie_fanout.md +++ b/docs/manpages/md/man2/repair_tie_fanout.md @@ -31,6 +31,8 @@ of the tie high/low cell. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/repair_timing.md b/docs/manpages/md/man2/repair_timing.md index 53a7e226723..9de80fa003d 100644 --- a/docs/manpages/md/man2/repair_timing.md +++ b/docs/manpages/md/man2/repair_timing.md @@ -54,6 +54,8 @@ endpoints are repaired to reduced the total negative slack. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/report_cts.md b/docs/manpages/md/man2/report_cts.md index 33643abc88f..87c6972d273 100644 --- a/docs/manpages/md/man2/report_cts.md +++ b/docs/manpages/md/man2/report_cts.md @@ -26,8 +26,14 @@ This command is used to extract the following metrics after a successful `clock_ `-out_file`: The file to save `cts` reports. If this parameter is omitted, the report is streamed to `stdout` and not saved. +`Command Name`: Description + +`clock_tree_synthesis_debug`: Option to plot the CTS to GUI. + # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/report_design_area.md b/docs/manpages/md/man2/report_design_area.md index 92f2f289f2b..cf54d1e40fe 100644 --- a/docs/manpages/md/man2/report_design_area.md +++ b/docs/manpages/md/man2/report_design_area.md @@ -24,6 +24,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/report_dft_config.md b/docs/manpages/md/man2/report_dft_config.md index a60204da886..3648514a132 100644 --- a/docs/manpages/md/man2/report_dft_config.md +++ b/docs/manpages/md/man2/report_dft_config.md @@ -24,6 +24,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/report_floating_nets.md b/docs/manpages/md/man2/report_floating_nets.md index 7e9822a4f4c..b57ff171dda 100644 --- a/docs/manpages/md/man2/report_floating_nets.md +++ b/docs/manpages/md/man2/report_floating_nets.md @@ -22,8 +22,34 @@ The `report_floating_nets` command reports nets with only one pin connection. `-verbose`: Print the net names. +`Command Name`: Description + +`repair_setup_pin`: Repair setup pin violation. + +`check_parasitics`: Check if the `estimate_parasitics` command has been called. + +`parse_time_margin_arg`: Get the raw value for timing margin (e.g. `slack_margin`, `setup_margin`, `hold_margin`) + +`parse_percent_margin_arg`: Get the above margin in perentage format. + +`parse_margin_arg`: Same as `parse_percent_margin_arg`. + +`parse_max_util`: Check maximum utilization. + +`parse_max_wire_length`: Get maximum wirelength. + +`check_corner_wire_caps`: Check wire capacitance for corner. + +`check_max_wire_length`: Check if wirelength is allowed by rsz for minimum delay. + +`dblayer_wire_rc`: Get layer RC values. + +`set_dblayer_wire_rc`: Set layer RC values. + # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_dft_config.md b/docs/manpages/md/man2/set_dft_config.md index 7bb3afb4400..1653dbde5f7 100644 --- a/docs/manpages/md/man2/set_dft_config.md +++ b/docs/manpages/md/man2/set_dft_config.md @@ -27,6 +27,8 @@ The command `set_dft_config` sets the DFT configuration variables. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_domain_area.md b/docs/manpages/md/man2/set_domain_area.md index 2c37df6fe99..18ffb7496a8 100644 --- a/docs/manpages/md/man2/set_domain_area.md +++ b/docs/manpages/md/man2/set_domain_area.md @@ -27,6 +27,8 @@ This command sets the power domain area. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_dont_touch.md b/docs/manpages/md/man2/set_dont_touch.md index d5845cf3ef1..90ab813c616 100644 --- a/docs/manpages/md/man2/set_dont_touch.md +++ b/docs/manpages/md/man2/set_dont_touch.md @@ -24,6 +24,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_dont_use.md b/docs/manpages/md/man2/set_dont_use.md index 2c8670c5943..980b282a5ff 100644 --- a/docs/manpages/md/man2/set_dont_use.md +++ b/docs/manpages/md/man2/set_dont_use.md @@ -26,6 +26,8 @@ This command has no switches. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_io_pin_constraint.md b/docs/manpages/md/man2/set_io_pin_constraint.md index ea996495c05..731c4bde37b 100644 --- a/docs/manpages/md/man2/set_io_pin_constraint.md +++ b/docs/manpages/md/man2/set_io_pin_constraint.md @@ -48,6 +48,8 @@ called alone. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_isolation.md b/docs/manpages/md/man2/set_isolation.md index ae597963c83..1c9f604cef5 100644 --- a/docs/manpages/md/man2/set_isolation.md +++ b/docs/manpages/md/man2/set_isolation.md @@ -45,6 +45,8 @@ This command creates or update isolation strategy. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_layer_rc.md b/docs/manpages/md/man2/set_layer_rc.md index 17fb2397def..9a7b154201c 100644 --- a/docs/manpages/md/man2/set_layer_rc.md +++ b/docs/manpages/md/man2/set_layer_rc.md @@ -38,6 +38,8 @@ or to override the values in the LEF. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_pin_length.md b/docs/manpages/md/man2/set_pin_length.md index 837aa61c632..e93298d69bb 100644 --- a/docs/manpages/md/man2/set_pin_length.md +++ b/docs/manpages/md/man2/set_pin_length.md @@ -28,6 +28,8 @@ pins. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_pin_length_extension.md b/docs/manpages/md/man2/set_pin_length_extension.md index 51b900c65f2..431b5531bae 100644 --- a/docs/manpages/md/man2/set_pin_length_extension.md +++ b/docs/manpages/md/man2/set_pin_length_extension.md @@ -29,6 +29,8 @@ partially outside the die area. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_pin_thick_multiplier.md b/docs/manpages/md/man2/set_pin_thick_multiplier.md index c9d5935bdd3..f4607215140 100644 --- a/docs/manpages/md/man2/set_pin_thick_multiplier.md +++ b/docs/manpages/md/man2/set_pin_thick_multiplier.md @@ -28,6 +28,8 @@ vertical and horizontal pins. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_placement_padding.md b/docs/manpages/md/man2/set_placement_padding.md index d633ae59d64..645b0465c78 100644 --- a/docs/manpages/md/man2/set_placement_padding.md +++ b/docs/manpages/md/man2/set_placement_padding.md @@ -43,6 +43,8 @@ specify padding for all instances of a common master, use the `-filter` # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_simulated_annealing_parameters.md b/docs/manpages/md/man2/set_simulated_annealing_parameters.md index 0800722fcf2..8f5d0b22ac7 100644 --- a/docs/manpages/md/man2/set_simulated_annealing_parameters.md +++ b/docs/manpages/md/man2/set_simulated_annealing_parameters.md @@ -33,6 +33,8 @@ The `set_simulated_annealing` command defines the parameters for simulated annea # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/set_wire_rc.md b/docs/manpages/md/man2/set_wire_rc.md index 9a1eb6b620e..38465ab6c61 100644 --- a/docs/manpages/md/man2/set_wire_rc.md +++ b/docs/manpages/md/man2/set_wire_rc.md @@ -42,6 +42,8 @@ nets with the `-signal` and `-clock` flags. Without either `-signal` or # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/tapcell.md b/docs/manpages/md/man2/tapcell.md index f2cf9c5ce82..6ee58c40492 100644 --- a/docs/manpages/md/man2/tapcell.md +++ b/docs/manpages/md/man2/tapcell.md @@ -45,10 +45,44 @@ placement is similar to Figure 2. # OPTIONS -`Figure 1: Tapcell insertion representation`: Figure 2: Tapcell insertion around macro representation +`-tapcell_master`: Master used as a tapcell. + +`-endcap_master`: Master used as an endcap. + +`-distance`: Distance (in microns) between each tapcell in the checkerboard. + +`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. + +`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. + +`-tap_nwintie_master`: Master cell placed at the top and bottom of|macros and the core area according the row orientation. + +`-tap_nwin2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwintie_master` + +`-tap_nwin3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwin2_master`. + +`-tap_nwouttie_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. + +`-tap_nwout2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwouttie_master`. + +`-tap_nwout3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation | This master should be smaller than `tap_nwout2_master`. + +`-incnrcap_nwin_master`: Master cell placed at the corners of macros, according the row orientation. + +`-incnrcap_nwout_master`: Master cell placed at the corners of macros, according the row orientation. + +`-cnrcap_nwin_master`: Macro cell placed at the corners the core area according the row orientation. + +`-cnrcap_nwout_master`: Macro cell placed at the corners the core area according the row orientation. + +`-tap_prefix`: Prefix for the tapcell instances. The default value is `TAP_`. + +`-endcap_prefix`: Prefix for the endcaps instances. The default value is `PHY_`. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/tapcell_ripup.md b/docs/manpages/md/man2/tapcell_ripup.md index f7a68f1adff..270317e0693 100644 --- a/docs/manpages/md/man2/tapcell_ripup.md +++ b/docs/manpages/md/man2/tapcell_ripup.md @@ -21,12 +21,14 @@ This command is used for removing tapcells or endcaps based on their prefix. # OPTIONS -`-master`: Master to use for the tapcells. +`-tap_prefix`: Remove tapcells with said prefix. -`-distance`: Distance between tapcells. +`-endcap_prefix`: Remove endcaps with said prefix. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/triton_part_design.md b/docs/manpages/md/man2/triton_part_design.md index 0e8de341d30..342f57f68f9 100644 --- a/docs/manpages/md/man2/triton_part_design.md +++ b/docs/manpages/md/man2/triton_part_design.md @@ -150,6 +150,8 @@ This command partitions the design netlist. Note that design must be loaded in m # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/triton_part_hypergraph.md b/docs/manpages/md/man2/triton_part_hypergraph.md index b57cc4c9ece..f948facc257 100644 --- a/docs/manpages/md/man2/triton_part_hypergraph.md +++ b/docs/manpages/md/man2/triton_part_hypergraph.md @@ -120,6 +120,8 @@ This command performs hypergraph netlist partitioning. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/use_interface_cell.md b/docs/manpages/md/man2/use_interface_cell.md index ff7743addf9..a50a13c4e49 100644 --- a/docs/manpages/md/man2/use_interface_cell.md +++ b/docs/manpages/md/man2/use_interface_cell.md @@ -30,6 +30,8 @@ This command sets the interface cell. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/write_partition_verilog.md b/docs/manpages/md/man2/write_partition_verilog.md index fa76ec932df..766d7f89600 100644 --- a/docs/manpages/md/man2/write_partition_verilog.md +++ b/docs/manpages/md/man2/write_partition_verilog.md @@ -30,6 +30,8 @@ This command writes the partition result to verilog. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/md/man2/write_pin_placement.md b/docs/manpages/md/man2/write_pin_placement.md index b4d1174ea74..71cae97aad1 100644 --- a/docs/manpages/md/man2/write_pin_placement.md +++ b/docs/manpages/md/man2/write_pin_placement.md @@ -20,12 +20,34 @@ The `write_pin_placement` command writes a file with the pin placement in the fo # OPTIONS -`-random_seed`: Specify the seed for random operations. +`file_name`: The name of the file with the pin placement. -`-random`: When this flag is enabled, the pin placement is random. +`Command Name`: Description + +`parse_edge`: Parse edge (top/bottom/left/right). + +`parse_direction`: Parse direction. + +`parse_excludes_arg`: Parse excluded arguments. + +`parse_group_pins_arg`: Parse group pins arguments. + +`parse_layer_name`: Parse layer name. + +`parse_pin_names`: Parse pin names. + +`get_edge_extreme`: Get extremes of edge. + +`exclude_intervals`: Set exclude interval. + +`add_pins_to_constraint`: Add pins to constrained region. + +`add_pins_to_top_layer`: Add pins to top layer. # ARGUMENTS +This command has no arguments. + # EXAMPLES # SEE ALSO diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index 5c8dd464539..3f41c0efee8 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -10,7 +10,7 @@ # list of edited docs SRC_DIR = "./md/man2" -# problematic: drt, gpl, grt, gui, ifp, mpl2, pdn, psm +# problematic: gpl, grt, gui, ifp, mpl2, pdn, psm # psm: need to handle the table wrt the #### Options, not all tables. # also you need to change the ### FUNCTION_NAME parsing. Sometimes the # function name could be something weird like `diff_spef` or `pdngen` @@ -19,8 +19,8 @@ # sta: documentation is hosted elsewhere. (not currently in RTD also.) # tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ - "tap", "upf"] -#tools = ["rsz"] + "tap", "upf", "drt"] +#tools = ["drt"] docs = [f"{SRC_DIR}/{tool}.txt" for tool in tools] # identify key section and stored in ManPage class. @@ -30,6 +30,7 @@ def __init__(self): self.desc = "" self.synopsis = "" self.switches = {} + self.args = {} self.datetime = datetime.datetime.now().strftime("%y/%m/%d") def write_roff_file(self): @@ -45,6 +46,7 @@ def write_roff_file(self): self.write_synopsis(f) self.write_description(f) self.write_options(f) + self.write_arguments(f) self.write_placeholder(f) #TODO. self.write_copyright(f) @@ -90,13 +92,24 @@ def write_options(self, f): for key, val in self.switches.items(): f.write(f"\n`{key}`: {val}\n") + def write_arguments(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# ARGUMENTS\n") + if not self.args: + f.write(f"\nThis command has no arguments.\n") + for key, val in self.args.items(): + f.write(f"\n`{key}`: {val}\n") + + def write_placeholder(self, f): assert isinstance(f, io.TextIOBase) and\ f.writable(), "File pointer is not open for writing." # TODO: these are all not populated currently, not parseable from docs. # TODO: Arguments can actually be parsed, but you need to preprocess the synopsis further. - sections = ["ARGUMENTS", "EXAMPLES", "SEE ALSO"] + sections = ["EXAMPLES", "SEE ALSO"] for s in sections: f.write(f"\n# {s}\n") @@ -130,6 +143,41 @@ def extract_tcl_code(text): tcl_code_matches = [x for x in tcl_code_matches if "./test/gcd.tcl" not in x] return tcl_code_matches +def extract_arguments(text): + # Goal is to extract all the text from the end of tcl code to the next ### header. + # Returns options and arguments. + level2 = extract_headers(text, 2) + level3 = extract_headers(text, 3) + + # form these 2 regex styles. + # ### Header 1 {text} ### Header2; ### Header n-2 {text} ### Header n-1 + # ### Header n {text} ## closest_level2_header + first = [rf'### ({level3[i]})(.*?)### ({level3[i+1]})' for i in range(len(level3) - 1)] + + # find the next closest level2 header to the last level3 header. + closest_level2 = [text.find(x) - text.find(level3[-1]) for x in level2] + closest_level2_idx = [idx for idx, x in enumerate(closest_level2) if x > 0][0] + + second = [rf"### ({level3[-1]})(.*?)## ({level2[closest_level2_idx]})"] + final_options, final_args = [], [] + for idx, regex in enumerate(first + second): + match = re.findall(regex, text, flags = re.DOTALL) + # get text until the next header + a = match[0][1] + a = a[a.find("#"):] + options = a.split("####")[1:] + if not options: + final_options.append([]) + final_args.append([]) + continue + options, args = options[0], options[1:] + final_options.append(extract_tables(options)) + tmp_arg = [] + for arg in args: + tmp_arg.extend(extract_tables(arg)) + final_args.append(tmp_arg) + return final_options, final_args + def extract_tables(text): # Find all lines that start with "|" table_pattern = r'^\s*\|.*$' @@ -138,8 +186,24 @@ def extract_tables(text): # Exclude matches containing HTML tags table_matches = [table for table in table_matches if not re.search(r'<.*?>', table)] + # Remove text containing switch + table_matches = [table for table in table_matches if "Switch Name" not in table] + + # Remove text containing "---" + table_matches = [table for table in table_matches if "---" not in table] + return table_matches +def parse_switch(text): + # Find the index of the 1nd and last occurrence of "|". Since some content might contain "|" + switch_name = text.split("|")[1] + switch_name = switch_name.replace("`", "").strip() + second_pipe_index = text.find("|", text.find("|") + 1) + last_pipe_index = text.rfind("|") + switch_description = text[second_pipe_index+1: last_pipe_index-1] + return switch_name, switch_description + + if __name__ == "__main__": for doc in docs: text = open(doc).read() @@ -154,55 +218,29 @@ def extract_tables(text): # synopsis content func_synopsis = extract_tcl_code(text) - # switch names (TODO: needs refactoring...) - switch_names = extract_tables(text) - idx = 0 - func_switches, tmp = [], [] - for s in switch_names: - # TODO: Handle developer commands - if "Command Name" in s: - break - if "Switch Name" in s: - if tmp: func_switches.append(tmp) - tmp = [] - tmp.append(s.strip()) - if tmp: func_switches.append(tmp) - - print(len(func_names)); print(func_names) - print(len(func_descs)); print(func_descs) - print(len(func_synopsis)); print(func_synopsis) - print(len(func_switches)); print(func_switches) - - # grouping the parsed outputs together - offset_switch_idx = 0 + # arguments + func_options, func_args = extract_arguments(text) + for func_id in range(len(func_synopsis)): - temp = ManPage() - - temp.name = func_names[func_id] - temp.desc = func_descs[func_id] - temp.synopsis = func_synopsis[func_id] - - # logic if synopsis is one liner, it means that it has no switches - if len(temp.synopsis.split("\n")) == 2: - temp.write_roff_file() - offset_switch_idx += 1 - continue - - - switches = func_switches[func_id - offset_switch_idx] - switches_dict = {} - for idx, x in enumerate(switches): - # Skip header and | --- | dividers. - if idx == 0: continue - if "---" in x: continue - switch_name = x.split("|")[1] - # Find the index of the 2nd and last occurrence of "|". Since some content might contain "|" - second_pipe_index = x.find("|", x.find("|") + 1) - last_pipe_index = x.rfind("|") - switch_description = x[second_pipe_index+1: last_pipe_index-1] - switch_name = switch_name.replace("`", "").strip() - switches_dict[switch_name] = switch_description - temp.switches = switches_dict - temp.write_roff_file() - - print('Ok') \ No newline at end of file + manpage = ManPage() + manpage.name = func_names[func_id] + manpage.desc = func_descs[func_id] + manpage.synopsis = func_synopsis[func_id] + if func_options[func_id]: + # convert it to dict + # TODO change this into a function. Or subsume under option/args parsing. + switches_dict = {} + for line in func_options[func_id]: + key, val = parse_switch(line) + switches_dict[key] = val + manpage.switches = switches_dict + + if func_args[func_id]: + # convert it to dict + args_dict = {} + for line in func_args[func_id]: + key, val = parse_switch(line) + args_dict[key] = val + manpage.args = args_dict + + manpage.write_roff_file() \ No newline at end of file From 1a9027c559ce8a79ab7c9fce2e17794d80286638 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:56:25 +0000 Subject: [PATCH 24/88] 26 of 28 tools done. gpl grt ifp mpl2 pdn psm rmp rcx. plus bugfix for extract_arguments Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/.gitignore | 3 + docs/manpages/md/man2/assign_io_bump.md | 56 ----- docs/manpages/md/man2/buffer_ports.md | 43 ---- docs/manpages/md/man2/check_antennas.md | 38 ---- docs/manpages/md/man2/check_placement.md | 42 ---- .../md/man2/clear_io_pin_constraints.md | 36 ---- docs/manpages/md/man2/clock_tree_synthesis.md | 80 -------- .../md/man2/configure_cts_characterization.md | 45 ---- docs/manpages/md/man2/connect_by_abutment.md | 34 --- docs/manpages/md/man2/create_logic_port.md | 39 ---- docs/manpages/md/man2/create_power_domain.md | 38 ---- docs/manpages/md/man2/create_power_switch.md | 50 ----- docs/manpages/md/man2/cut_rows.md | 41 ---- .../md/man2/define_pin_shape_pattern.md | 50 ----- docs/manpages/md/man2/density_fill.md | 38 ---- docs/manpages/md/man2/detailed_placement.md | 42 ---- docs/manpages/md/man2/detailed_route.md | 101 --------- docs/manpages/md/man2/detailed_route_debug.md | 75 ------- docs/manpages/md/man2/estimate_parasitics.md | 45 ---- .../md/man2/evaluate_hypergraph_partition.md | 65 ------ .../md/man2/evaluate_part_design_solution.md | 104 ---------- docs/manpages/md/man2/filler_placement.md | 43 ---- docs/manpages/md/man2/gpl.txt | 6 +- docs/manpages/md/man2/grt.txt | 19 +- docs/manpages/md/man2/ifp.txt | 73 +++---- docs/manpages/md/man2/insert_dft.md | 41 ---- docs/manpages/md/man2/make_false_io_site.md | 50 ----- docs/manpages/md/man2/make_io_bump_array.md | 56 ----- docs/manpages/md/man2/make_io_sites.md | 63 ------ docs/manpages/md/man2/map_power_switch.md | 41 ---- docs/manpages/md/man2/mpl2.txt | 16 +- docs/manpages/md/man2/optimize_mirroring.md | 35 ---- docs/manpages/md/man2/pdn.txt | 194 ++++++++---------- docs/manpages/md/man2/pin_access.md | 62 ------ docs/manpages/md/man2/place_bondpad.md | 50 ----- docs/manpages/md/man2/place_corners.md | 38 ---- docs/manpages/md/man2/place_endcaps.md | 87 -------- docs/manpages/md/man2/place_io_fill.md | 50 ----- docs/manpages/md/man2/place_io_terminals.md | 42 ---- docs/manpages/md/man2/place_pad.md | 56 ----- docs/manpages/md/man2/place_pin.md | 51 ----- docs/manpages/md/man2/place_pins.md | 63 ------ docs/manpages/md/man2/place_tapcells.md | 38 ---- docs/manpages/md/man2/preview_dft.md | 37 ---- docs/manpages/md/man2/psm.txt | 17 +- docs/manpages/md/man2/rdl_route.md | 72 ------- docs/manpages/md/man2/read_partitioning.md | 38 ---- docs/manpages/md/man2/read_upf.md | 35 ---- docs/manpages/md/man2/remove_buffers.md | 36 ---- docs/manpages/md/man2/remove_fillers.md | 34 --- docs/manpages/md/man2/remove_io_bump.md | 35 ---- docs/manpages/md/man2/remove_io_bump_array.md | 41 ---- docs/manpages/md/man2/remove_io_rows.md | 34 --- .../md/man2/repair_clock_inverters.md | 34 --- docs/manpages/md/man2/repair_clock_nets.md | 40 ---- docs/manpages/md/man2/repair_design.md | 53 ----- docs/manpages/md/man2/repair_tie_fanout.md | 42 ---- docs/manpages/md/man2/repair_timing.md | 65 ------ docs/manpages/md/man2/report_cts.md | 43 ---- docs/manpages/md/man2/report_design_area.md | 35 ---- docs/manpages/md/man2/report_dft_config.md | 35 ---- docs/manpages/md/man2/report_floating_nets.md | 59 ------ docs/manpages/md/man2/rmp.txt | 22 +- docs/manpages/md/man2/set_dft_config.md | 38 ---- docs/manpages/md/man2/set_domain_area.md | 38 ---- docs/manpages/md/man2/set_dont_touch.md | 35 ---- docs/manpages/md/man2/set_dont_use.md | 37 ---- .../manpages/md/man2/set_io_pin_constraint.md | 59 ------ docs/manpages/md/man2/set_isolation.md | 56 ----- docs/manpages/md/man2/set_layer_rc.md | 49 ----- docs/manpages/md/man2/set_pin_length.md | 39 ---- .../md/man2/set_pin_length_extension.md | 40 ---- .../md/man2/set_pin_thick_multiplier.md | 39 ---- .../manpages/md/man2/set_placement_padding.md | 54 ----- .../set_simulated_annealing_parameters.md | 44 ---- docs/manpages/md/man2/set_wire_rc.md | 53 ----- docs/manpages/md/man2/tapcell.md | 92 --------- docs/manpages/md/man2/tapcell_ripup.md | 38 ---- docs/manpages/md/man2/triton_part_design.md | 161 --------------- .../md/man2/triton_part_hypergraph.md | 131 ------------ docs/manpages/md/man2/use_interface_cell.md | 41 ---- .../md/man2/write_partition_verilog.md | 41 ---- docs/manpages/md/man2/write_pin_placement.md | 57 ----- docs/manpages/scripts/md_roff_compat.py | 24 ++- 84 files changed, 181 insertions(+), 4031 deletions(-) delete mode 100644 docs/manpages/md/man2/assign_io_bump.md delete mode 100644 docs/manpages/md/man2/buffer_ports.md delete mode 100644 docs/manpages/md/man2/check_antennas.md delete mode 100644 docs/manpages/md/man2/check_placement.md delete mode 100644 docs/manpages/md/man2/clear_io_pin_constraints.md delete mode 100644 docs/manpages/md/man2/clock_tree_synthesis.md delete mode 100644 docs/manpages/md/man2/configure_cts_characterization.md delete mode 100644 docs/manpages/md/man2/connect_by_abutment.md delete mode 100644 docs/manpages/md/man2/create_logic_port.md delete mode 100644 docs/manpages/md/man2/create_power_domain.md delete mode 100644 docs/manpages/md/man2/create_power_switch.md delete mode 100644 docs/manpages/md/man2/cut_rows.md delete mode 100644 docs/manpages/md/man2/define_pin_shape_pattern.md delete mode 100644 docs/manpages/md/man2/density_fill.md delete mode 100644 docs/manpages/md/man2/detailed_placement.md delete mode 100644 docs/manpages/md/man2/detailed_route.md delete mode 100644 docs/manpages/md/man2/detailed_route_debug.md delete mode 100644 docs/manpages/md/man2/estimate_parasitics.md delete mode 100644 docs/manpages/md/man2/evaluate_hypergraph_partition.md delete mode 100644 docs/manpages/md/man2/evaluate_part_design_solution.md delete mode 100644 docs/manpages/md/man2/filler_placement.md delete mode 100644 docs/manpages/md/man2/insert_dft.md delete mode 100644 docs/manpages/md/man2/make_false_io_site.md delete mode 100644 docs/manpages/md/man2/make_io_bump_array.md delete mode 100644 docs/manpages/md/man2/make_io_sites.md delete mode 100644 docs/manpages/md/man2/map_power_switch.md delete mode 100644 docs/manpages/md/man2/optimize_mirroring.md delete mode 100644 docs/manpages/md/man2/pin_access.md delete mode 100644 docs/manpages/md/man2/place_bondpad.md delete mode 100644 docs/manpages/md/man2/place_corners.md delete mode 100644 docs/manpages/md/man2/place_endcaps.md delete mode 100644 docs/manpages/md/man2/place_io_fill.md delete mode 100644 docs/manpages/md/man2/place_io_terminals.md delete mode 100644 docs/manpages/md/man2/place_pad.md delete mode 100644 docs/manpages/md/man2/place_pin.md delete mode 100644 docs/manpages/md/man2/place_pins.md delete mode 100644 docs/manpages/md/man2/place_tapcells.md delete mode 100644 docs/manpages/md/man2/preview_dft.md delete mode 100644 docs/manpages/md/man2/rdl_route.md delete mode 100644 docs/manpages/md/man2/read_partitioning.md delete mode 100644 docs/manpages/md/man2/read_upf.md delete mode 100644 docs/manpages/md/man2/remove_buffers.md delete mode 100644 docs/manpages/md/man2/remove_fillers.md delete mode 100644 docs/manpages/md/man2/remove_io_bump.md delete mode 100644 docs/manpages/md/man2/remove_io_bump_array.md delete mode 100644 docs/manpages/md/man2/remove_io_rows.md delete mode 100644 docs/manpages/md/man2/repair_clock_inverters.md delete mode 100644 docs/manpages/md/man2/repair_clock_nets.md delete mode 100644 docs/manpages/md/man2/repair_design.md delete mode 100644 docs/manpages/md/man2/repair_tie_fanout.md delete mode 100644 docs/manpages/md/man2/repair_timing.md delete mode 100644 docs/manpages/md/man2/report_cts.md delete mode 100644 docs/manpages/md/man2/report_design_area.md delete mode 100644 docs/manpages/md/man2/report_dft_config.md delete mode 100644 docs/manpages/md/man2/report_floating_nets.md delete mode 100644 docs/manpages/md/man2/set_dft_config.md delete mode 100644 docs/manpages/md/man2/set_domain_area.md delete mode 100644 docs/manpages/md/man2/set_dont_touch.md delete mode 100644 docs/manpages/md/man2/set_dont_use.md delete mode 100644 docs/manpages/md/man2/set_io_pin_constraint.md delete mode 100644 docs/manpages/md/man2/set_isolation.md delete mode 100644 docs/manpages/md/man2/set_layer_rc.md delete mode 100644 docs/manpages/md/man2/set_pin_length.md delete mode 100644 docs/manpages/md/man2/set_pin_length_extension.md delete mode 100644 docs/manpages/md/man2/set_pin_thick_multiplier.md delete mode 100644 docs/manpages/md/man2/set_placement_padding.md delete mode 100644 docs/manpages/md/man2/set_simulated_annealing_parameters.md delete mode 100644 docs/manpages/md/man2/set_wire_rc.md delete mode 100644 docs/manpages/md/man2/tapcell.md delete mode 100644 docs/manpages/md/man2/tapcell_ripup.md delete mode 100644 docs/manpages/md/man2/triton_part_design.md delete mode 100644 docs/manpages/md/man2/triton_part_hypergraph.md delete mode 100644 docs/manpages/md/man2/use_interface_cell.md delete mode 100644 docs/manpages/md/man2/write_partition_verilog.md delete mode 100644 docs/manpages/md/man2/write_pin_placement.md diff --git a/docs/manpages/.gitignore b/docs/manpages/.gitignore index f820cf945b4..9e00e1e93c6 100644 --- a/docs/manpages/.gitignore +++ b/docs/manpages/.gitignore @@ -1 +1,4 @@ test/results + +# dont save intermediate results +md/man2/*md diff --git a/docs/manpages/md/man2/assign_io_bump.md b/docs/manpages/md/man2/assign_io_bump.md deleted file mode 100644 index 73fb155ea7c..00000000000 --- a/docs/manpages/md/man2/assign_io_bump.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: assign_io_bump(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -assign_io_bump - assign io bump - -# SYNOPSIS - -assign_io_bump - -net net - [-terminal iterm] - [-dont_route] - instance - - -# DESCRIPTION - -This command assigns a net to a bump instance. - -Example usage: - -``` -assign_io_bump -net p_ddr_addr_9_o BUMP_6_0 -assign_io_bump -net p_ddr_addr_8_o BUMP_6_2 -assign_io_bump -net DVSS BUMP_6_4 -assign_io_bump -net DVDD BUMP_7_3 -assign_io_bump -net DVDD -terminal u_dvdd/DVDD BUMP_8_3 -assign_io_bump -net p_ddr_addr_7_o BUMP_7_1 -assign_io_bump -net p_ddr_addr_6_o BUMP_7_0 -``` - -# OPTIONS - -`-net`: Net to connect to. - -`-terminal`: Instance terminal to route to. - -`-dont_route`: Flag to indicate that this bump should not be routed, only perform assignment. - -`instance`: Name of the bump. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/buffer_ports.md b/docs/manpages/md/man2/buffer_ports.md deleted file mode 100644 index 4dc65392621..00000000000 --- a/docs/manpages/md/man2/buffer_ports.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: buffer_ports(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -buffer_ports - buffer ports - -# SYNOPSIS - -buffer_ports - [-inputs] - [-outputs] - [-max_utilization util] - - -# DESCRIPTION - -The `buffer_ports -inputs` command adds a buffer between the input and its -loads. The `buffer_ports -outputs` adds a buffer between the port driver -and the output port. Inserting buffers on input and output ports makes -the block input capacitances and output drives independent of the block -internals. - -# OPTIONS - -`-inputs, -outputs`: Insert a buffer between the input and load, output and load respectively. The default behavior is `-inputs` and `-outputs` set if neither is specified. - -`-max_utilization`: Defines the percentage of core area used. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/check_antennas.md b/docs/manpages/md/man2/check_antennas.md deleted file mode 100644 index 814871c3962..00000000000 --- a/docs/manpages/md/man2/check_antennas.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: check_antennas(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -check_antennas - check antennas - -# SYNOPSIS - -check_antennas - [-net net] - [-verbose] - - -# DESCRIPTION - -The `check_antennas` command will check for antenna violations. - -# OPTIONS - -`-verbose`: Report all antenna calculations for violating nets. - -`-net`: Check antennas on the specified net. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/check_placement.md b/docs/manpages/md/man2/check_placement.md deleted file mode 100644 index f8661308ae9..00000000000 --- a/docs/manpages/md/man2/check_placement.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: check_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -check_placement - check placement - -# SYNOPSIS - -check_placement - [-verbose] - [-disallow_one_site_gaps] - [-report_filename filename] - - -# DESCRIPTION - -The `check_placement` command checks the placement legality. It returns -`0` if the placement is legal. - -# OPTIONS - -`-verbose`: Enable verbose logging. - -`-disallow_one_site_gaps`: Disable one site gap during placement check. - -`-report_filename`: File name for saving the report to (e.g. `report.json`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/clear_io_pin_constraints.md b/docs/manpages/md/man2/clear_io_pin_constraints.md deleted file mode 100644 index 72ce00212f3..00000000000 --- a/docs/manpages/md/man2/clear_io_pin_constraints.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: clear_io_pin_constraints(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -clear_io_pin_constraints - clear io pin constraints - -# SYNOPSIS - -clear_io_pin_constraints - - -# DESCRIPTION - -The `clear_io_pin_constraints` command clears all the previously-defined -constraints and pin shape patterns created with `set_io_pin_constraint` or -`define_pin_shape_pattern`. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/clock_tree_synthesis.md b/docs/manpages/md/man2/clock_tree_synthesis.md deleted file mode 100644 index a5aa1544f9a..00000000000 --- a/docs/manpages/md/man2/clock_tree_synthesis.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: clock_tree_synthesis(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -clock_tree_synthesis - clock tree synthesis - -# SYNOPSIS - -clock_tree_synthesis - -buf_list - [-root_buf root_buf] - [-wire_unit wire_unit] - [-clk_nets ] - [-distance_between_buffers] - [-branching_point_buffers_distance] - [-clustering_exponent] - [-clustering_unbalance_ratio] - [-sink_clustering_enable] - [-sink_clustering_size cluster_size] - [-sink_clustering_max_diameter max_diameter] - [-balance_levels] - [-num_static_layers] - [-sink_clustering_buffer] - - -# DESCRIPTION - -Perform clock tree synthesis. - -# OPTIONS - -`-buf_list`: Tcl list of master cells (buffers) that will be considered when making the wire segments (e.g. `{BUFXX, BUFYY}`). - -`-root_buffer`: The master cell of the buffer that serves as root for the clock tree. If this parameter is omitted, the first master cell from `-buf_list` is taken. - -`-wire_unit`: Minimum unit distance between buffers for a specific wire. If this parameter is omitted, the code gets the value from ten times the height of `-root_buffer`. - -`-clk_nets`: String containing the names of the clock roots. If this parameter is omitted, `cts` looks for the clock roots automatically. - -`-distance_between_buffers`: Distance (in microns) between buffers that `cts` should use when creating the tree. When using this parameter, the clock tree algorithm is simplified and only uses a fraction of the segments from the LUT. - -`-branching_point_buffers_distance`: Distance (in microns) that a branch has to have in order for a buffer to be inserted on a branch end-point. This requires the `-distance_between_buffers` value to be set. - -`-clustering_exponent`: Value that determines the power used on the difference between sink and means on the CKMeans clustering algorithm. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. - -`-clustering_unbalance_ratio`: Value determines each cluster's maximum capacity during CKMeans. A value of `0.5` (i.e., 50%) means that each cluster will have exactly half of all sinks for a specific region (half for each branch). The default value is `0.6`, and the allowed values are floats `[0, 1.0]`. - -`-sink_clustering_enable`: Enables pre-clustering of sinks to create one level of sub-tree before building H-tree. Each cluster is driven by buffer which becomes end point of H-tree structure. - -`-sink_clustering_size`: Specifies the maximum number of sinks per cluster. The default value is `20`, and the allowed values are integers `[0, MAX_INT]`. - -`-sink_clustering_max_diameter`: Specifies maximum diameter (in microns) of sink cluster. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. - -`-balance_levels`: Attempt to keep a similar number of levels in the clock tree across non-register cells (e.g., clock-gate or inverter). The default value is `False`, and the allowed values are bool. - -`-num_static_layers`: Set the number of static layers. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-sink_clustering_buffer`: Set the sink clustering buffer(s) to be used. - -`-obstruction_aware`: Enables obstruction-aware buffering such that clock buffers are not placed on top of blockages or hard macros. This option may reduce legalizer displacement, leading to better latency, skew or timing QoR. The default value is `False`, and the allowed values are bool. - -`-apply_ndr`: Applies 2X spacing non-default rule to all clock nets except leaf-level nets. The default value is `False`. - -`-insertion_delay`: Considers insertion delays in macro timing models to improve clustering. The default value is `False`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/configure_cts_characterization.md b/docs/manpages/md/man2/configure_cts_characterization.md deleted file mode 100644 index 6a1b667e012..00000000000 --- a/docs/manpages/md/man2/configure_cts_characterization.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: configure_cts_characterization(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -configure_cts_characterization - configure cts characterization - -# SYNOPSIS - -configure_cts_characterization - [-max_slew max_slew] - [-max_cap max_cap] - [-slew_steps slew_steps] - [-cap_steps cap_steps] - - -# DESCRIPTION - -Configure key CTS characterization parameters, for example maximum slew and capacitance, -as well as the number of steps they will be divided for characterization. - -# OPTIONS - -`-max_slew`: Max slew value (in the current time unit) that the characterization will test. If this parameter is omitted, the code would use max slew value for specified buffer in `buf_list` from liberty file. - -`-max_cap`: Max capacitance value (in the current capacitance unit) that the characterization will test. If this parameter is omitted, the code would use max cap value for specified buffer in `buf_list` from liberty file. - -`-slew_steps`: Number of steps that `max_slew` will be divided into for characterization. The default value is `12`, and the allowed values are integers `[0, MAX_INT]`. - -`-cap_steps`: Number of steps that `max_cap` will be divided into for characterization. The default value is `34`, and the allowed values are integers `[0, MAX_INT]`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/connect_by_abutment.md b/docs/manpages/md/man2/connect_by_abutment.md deleted file mode 100644 index 6f318c93cf7..00000000000 --- a/docs/manpages/md/man2/connect_by_abutment.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: connect_by_abutment(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -connect_by_abutment - connect by abutment - -# SYNOPSIS - -connect_by_abutment - - -# DESCRIPTION - -Once the ring is complete, use the following command to connect the ring signals. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_logic_port.md b/docs/manpages/md/man2/create_logic_port.md deleted file mode 100644 index 8792729b612..00000000000 --- a/docs/manpages/md/man2/create_logic_port.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: create_logic_port(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -create_logic_port - create logic port - -# SYNOPSIS - -create_logic_port - [-direction direction] - port_name - - -# DESCRIPTION - -This command creates logic port. Direction must be specified from: -`in`, `out`, `inout`. - -# OPTIONS - -`-direction`: Direction of the port (`in`, `out`, `inout`). - -`port_name`: Port name. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_power_domain.md b/docs/manpages/md/man2/create_power_domain.md deleted file mode 100644 index 14ce3adc43b..00000000000 --- a/docs/manpages/md/man2/create_power_domain.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: create_power_domain(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -create_power_domain - create power domain - -# SYNOPSIS - -create_power_domain - [-elements elements] - name - - -# DESCRIPTION - -This command creates power domain for a group of modules. - -# OPTIONS - -`-elements`: List of module paths that belong this this domain OR `*` for top domain. - -`name`: Domain name. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/create_power_switch.md b/docs/manpages/md/man2/create_power_switch.md deleted file mode 100644 index 6b0ccbc6db4..00000000000 --- a/docs/manpages/md/man2/create_power_switch.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: create_power_switch(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -create_power_switch - create power switch - -# SYNOPSIS - -create_power_switch - [-domain domain] - [-output_supply_port output_supply_port] - [-input_supply_port input_supply_port] - [-control_port control_port] - [-on_state on_state] - name - - -# DESCRIPTION - -This command creates power switch. - -# OPTIONS - -`-domain`: Power domain name. - -`-output_supply_port`: Output supply port of the switch. - -`-input_supply_port`: Input supply port of the switch. - -`-control_port`: Control port on the switch. - -`-on_state`: One of {`state_name`, `input_supply_port`, `boolean_expression`}. - -`name`: Power switch name. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/cut_rows.md b/docs/manpages/md/man2/cut_rows.md deleted file mode 100644 index 7806f0ef18f..00000000000 --- a/docs/manpages/md/man2/cut_rows.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: cut_rows(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -cut_rows - cut rows - -# SYNOPSIS - -cut_rows - [-endcap_master endcap_master] - [-halo_width_x halo_x] - [-halo_width_y halo_y] - - -# DESCRIPTION - -This command cuts rows. - -# OPTIONS - -`-endcap_master`: Master used as an endcap. - -`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. - -`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/define_pin_shape_pattern.md b/docs/manpages/md/man2/define_pin_shape_pattern.md deleted file mode 100644 index fa79ac1f0f1..00000000000 --- a/docs/manpages/md/man2/define_pin_shape_pattern.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: define_pin_shape_pattern(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -define_pin_shape_pattern - define pin shape pattern - -# SYNOPSIS - -define_pin_shape_pattern - -layer layer - -x_step x_step - -y_step y_step - -region {llx lly urx ury} - -size {width height} - [-pin_keepout dist] - - -# DESCRIPTION - -The `define_pin_shape_pattern` command defines a pin placement grid on the -specified layer. This grid has positions inside the die area, not only at -the edges of the die boundary. - -# OPTIONS - -`-layer`: The single top-most routing layer of the placement grid. - -`-x_step, -y_step`: The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. - -`-region`: The `{llx, lly, urx, ury}` region of the placement grid (in microns). - -`-size`: The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. - -`-pin_keepout`: The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/density_fill.md b/docs/manpages/md/man2/density_fill.md deleted file mode 100644 index d6cc4afff70..00000000000 --- a/docs/manpages/md/man2/density_fill.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: density_fill(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -density_fill - density fill - -# SYNOPSIS - -density_fill - [-rules rules_file] - [-area {lx ly ux uy}] - - -# DESCRIPTION - -This command performs density fill to meet metal density DRC rules. - -# OPTIONS - -`-rules`: Specify `json` rule file. - -`-area`: Optional. If not specified, the core area will be used. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/detailed_placement.md b/docs/manpages/md/man2/detailed_placement.md deleted file mode 100644 index c011dfac387..00000000000 --- a/docs/manpages/md/man2/detailed_placement.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: detailed_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -detailed_placement - detailed placement - -# SYNOPSIS - -detailed_placement - [-max_displacement disp|{disp_x disp_y}] - [-disallow_one_site_gaps] - [-report_file_name filename] - - -# DESCRIPTION - -The `detailed_placement` command performs detailed placement of instances -to legal locations after global placement. - -# OPTIONS - -`-max_displacement`: Max distance that an instance can be moved (in microns) when finding a site where it can be placed. Either set one value for both directions or set `{disp_x disp_y}` for individual directions. The default values are `{500, 100}`, and the allowed values within are integers `[0, MAX_INT]`. - -`-disallow_one_site_gaps`: Disable one site gap during placement check. - -`-report_file_name`: File name for saving the report to (e.g. `report.json`.) - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/detailed_route.md b/docs/manpages/md/man2/detailed_route.md deleted file mode 100644 index 2151675b725..00000000000 --- a/docs/manpages/md/man2/detailed_route.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: detailed_route(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -detailed_route - detailed route - -# SYNOPSIS - -detailed_route - [-output_maze filename] - [-output_drc filename] - [-output_cmap filename] - [-output_guide_coverage filename] - [-drc_report_iter_step step] - [-db_process_node name] - [-disable_via_gen] - [-droute_end_iter iter] - [-via_in_pin_bottom_layer layer] - [-via_in_pin_top_layer layer] - [-or_seed seed] - [-or_k_ k] - [-bottom_routing_layer layer] - [-top_routing_layer layer] - [-verbose level] - [-distributed] - [-remote_host rhost] - [-remote_port rport] - [-shared_volume vol] - [-cloud_size sz] - [-clean_patches] - [-no_pin_access] - [-min_access_points count] - [-save_guide_updates] - [-repair_pdn_vias layer] - - -# DESCRIPTION - -This command performs detailed routing. - -# OPTIONS - -`-output_maze`: Path to output maze log file (e.g. `output_maze.log`). - -`-output_drc`: Path to output DRC report file (e.g. `output_drc.rpt`). - -`-output_cmap`: Path to output congestion map file (e.g. `output.cmap`). - -`-output_guide_coverage`: Path to output guide coverage file (e.g. `sample_coverage.csv`). - -`-drc_report_iter_step`: Report DRC on each iteration which is a multiple of this step. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-db_process_node`: Specify the process node. - -`-disable_via_gen`: Option to diable via generation with bottom and top routing layer. The default value is disabled. - -`-droute_end_iter`: Number of detailed routing iterations. The default value is `-1`, and the allowed values are integers `[1, 64]`. - -`-via_in_pin_bottom_layer`: Via-in pin bottom layer name. - -`-via_in_pin_top_layer`: Via-in pin top layer name. - -`-or_seed`: Refer to developer arguments [here](#developer-arguments). - -`-or_k`: Refer to developer arguments [here](#developer-arguments). - -`-bottom_routing_layer`: Bottommost routing layer name. - -`-top_routing_layer`: Topmost routing layer name. - -`-verbose`: Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) - -`-distributed`: Refer to distributed arguments [here](#distributed-arguments). - -`-clean_patches`: Clean unneeded patches during detailed routing. - -`-no_pin_access`: Disables pin access for routing. - -`-min_access_points`: Minimum access points for standard cell and macro cell pins. - -`-save_guide_updates`: Flag to save guides updates. - -`-repair_pdn_vias`: This option is used for PDKs where M1 and M2 power rails run in parallel. - -# ARGUMENTS - -`-or_seed`: Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. - -`-or_k`: Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/detailed_route_debug.md b/docs/manpages/md/man2/detailed_route_debug.md deleted file mode 100644 index 618c4ec08c1..00000000000 --- a/docs/manpages/md/man2/detailed_route_debug.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: detailed_route_debug(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -detailed_route_debug - detailed route debug - -# SYNOPSIS - -detailed_route_debug - [-pa] - [-ta] - [-dr] - [-maze] - [-net name] - [-pin name] - [-worker x y] - [-iter iter] - [-pa_markers] - [-dump_dr] - [-dump_dir dir] - [-pa_edge] - [-pa_commit] - [-write_net_tracks] - - -# DESCRIPTION - -The following command and arguments are useful when debugging error -messages from `drt` and to understand its behavior. - -# OPTIONS - -`-pa`: Enable debug for pin access. - -`-ta`: Enable debug for track assignment. - -`-dr`: Enable debug for detailed routing. - -`-maze`: Enable debug for maze routing. - -`-net`: Enable debug for net name. - -`-pin`: Enable debug for pin name. - -`-worker`: Debugs routes that pass through the point `{x, y}`. - -`-iter`: Specifies the number of debug iterations. The default value is `0`, and the accepted values are integers `[0, MAX_INT`. - -`-pa_markers`: Enable pin access markers. - -`-dump_dr`: Filename for detailed routing dump. - -`-dump_dir`: Directory for detailed routing dump. - -`-pa_edge`: Enable visibility of pin access edges. - -`-pa_commit`: Enable visibility of pin access commits. - -`-write_net_tracks`: Enable writing of net track assigments. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/estimate_parasitics.md b/docs/manpages/md/man2/estimate_parasitics.md deleted file mode 100644 index c00aff44286..00000000000 --- a/docs/manpages/md/man2/estimate_parasitics.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: estimate_parasitics(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -estimate_parasitics - estimate parasitics - -# SYNOPSIS - -estimate_parasitics - -placement|-global_routing - - -# DESCRIPTION - -Estimate RC parasitics based on placed component pin locations. If there are -no component locations, then no parasitics are added. The resistance and capacitance -values are per distance unit of a routing wire. Use the `set_units` command to check -units or `set_cmd_units` to change units. The goal is to represent "average" -routing layer resistance and capacitance. If the set_wire_rc command is not -called before resizing, then the default_wireload model specified in the first -Liberty file read or with the SDC set_wire_load command is used to make parasitics. - -After the `global_route` command has been called, the global routing topology -and layers can be used to estimate parasitics with the `-global_routing` -flag. - -# OPTIONS - -`-placement or -global_routing`: Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/evaluate_hypergraph_partition.md b/docs/manpages/md/man2/evaluate_hypergraph_partition.md deleted file mode 100644 index 4b9511e8fe1..00000000000 --- a/docs/manpages/md/man2/evaluate_hypergraph_partition.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: evaluate_hypergraph_partition(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -evaluate_hypergraph_partition - evaluate hypergraph partition - -# SYNOPSIS - -evaluate_hypergraph_solution - -num_parts num_parts - -balance_constraint balance_constraint - -hypergraph_file hypergraph_file - -solution_file solution_file - [-base_balance base_balance] - [-vertex_dimension vertex_dimension] - [-hyperedge_dimension hyperedge_dimension] - [-fixed_file fixed_file] - [-group_file group_file] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] - - -# DESCRIPTION - -This command evaluates hypergraph partition. - -# OPTIONS - -`-num_parts`: Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. - -`-balance_constraint`: Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. - -`-vertex_dimension`: Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-hyperedge_dimension`: Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-hypergraph_file`: Path to hypergraph file. - -`-solution_file`: Path to solution file. - -`-base_balance`: Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. - -`-fixed_file`: Path to fixed vertices constraint file. - -`-group_file`: Path to `stay together` attributes file. - -`-e_wt_factors`: Hyperedge weight factor. - -`-v_wt_factors`: Vertex weight factor. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/evaluate_part_design_solution.md b/docs/manpages/md/man2/evaluate_part_design_solution.md deleted file mode 100644 index 2c846b5572f..00000000000 --- a/docs/manpages/md/man2/evaluate_part_design_solution.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: evaluate_part_design_solution(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -evaluate_part_design_solution - evaluate part design solution - -# SYNOPSIS - -evaluate_part_design_solution - [-num_parts num_parts] - [-balance_constraint balance_constraint] - [-base_balance base_balance] - [-timing_aware_flag timing_aware_flag] - [-top_n top_n] - [-fence_flag fence_flag] - [-fence_lx fence_lx] - [-fence_ly fence_ly] - [-fence_ux fence_ux] - [-fence_uy fence_uy] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-hypergraph_file hypergraph_file] - [-hypergraph_int_weight_file hypergraph_int_weight_file] - [-solution_file solution_file] - [-net_timing_factor net_timing_factor] - [-path_timing_factor path_timing_factor] - [-path_snaking_factor path_snaking_factor] - [-timing_exp_factor timing_exp_factor] - [-extra_delay extra_delay] - [-guardband_flag guardband_flag] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] - - -# DESCRIPTION - -This command evaluates partition design solution. - -# OPTIONS - -`-num_parts`: Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. - -`-balance_constraint`: Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. - -`-base_balance`: Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. - -`-timing_aware_flag`: Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. - -`-top_n`: Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. - -`-fence_flag`: Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. - -`-fence_lx`: Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_ly`: Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_ux`: Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_uy`: Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. - -`-fixed_file`: Path to fixed vertices constraint file. - -`-community_file`: Path to `community` attributes file to guide the partitioning process. - -`-group_file`: Path to `stay together` attributes file. - -`-hypergraph_file`: Path to hypergraph file. - -`-hypergraph_int_weight_file`: Path to `hMETIS` format integer weight file. - -`-solution_file`: Path to solution file. - -`-net_timing_factor`: Hyperedge timing weight factor. The default value is `1.0`, and the allowed values are floats. - -`-path_timing_factor`: Cutting critical timing path weight factor. The default value is `1.0`, and the allowed values are floats. - -`-path_snaking_factor`: Snaking a critical path weight factor. The default value is `1.0`, and the allowed values are floats. - -`-timing_exp_factor`: Timing exponential factor for normalized slack. Thedefault value is `1.0`, and the allowed values are floats. - -`-extra_delay`: Extra delay introduced by a cut. The default value is `1e-9`, and the allowed values are floats. - -`-guardband_flag`: Enable timing guardband option. The default value is 1`false`, and the allowed values are booleans. - -`-e_wt_factors`: Hyperedge weight factors. - -`-v_wt_factors`: Vertex weight factors. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/filler_placement.md b/docs/manpages/md/man2/filler_placement.md deleted file mode 100644 index d1d4815cf0c..00000000000 --- a/docs/manpages/md/man2/filler_placement.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: filler_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -filler_placement - filler placement - -# SYNOPSIS - -filler_placement - [-prefix prefix] - filler_masters - - -# DESCRIPTION - -The `filler_placement` command fills gaps between detail-placed instances -to connect the power and ground rails in the rows. `filler_masters` is a -list of master/macro names to use for filling the gaps. Wildcard matching -is supported, so `FILL*` will match, e.g., `FILLCELL_X1 FILLCELL_X16 FILLCELL_X2 -FILLCELL_X32 FILLCELL_X4 FILLCELL_X8`. To specify a different naming prefix -from `FILLER_` use `-prefix `. - -# OPTIONS - -`-prefix`: Prefix to name the filler cells. The default value is `FILLER_`. - -`filler_masters`: Filler master cells. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/gpl.txt b/docs/manpages/md/man2/gpl.txt index e08ec44b4ee..2667891bbce 100644 --- a/docs/manpages/md/man2/gpl.txt +++ b/docs/manpages/md/man2/gpl.txt @@ -71,7 +71,7 @@ global_placement [-timing_driven_nets_percentage] ``` -#### General Arguments +#### Options | Switch Name | Description | | ----- | ----- | @@ -116,11 +116,11 @@ global_placement | `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. | -### Useful developer functions +### Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i). -```tcl +``` # debugging global placement global_placement_debug -pause -update -inst -draw_bins -initial diff --git a/docs/manpages/md/man2/grt.txt b/docs/manpages/md/man2/grt.txt index 134c0803b22..1e016398ea2 100644 --- a/docs/manpages/md/man2/grt.txt +++ b/docs/manpages/md/man2/grt.txt @@ -276,19 +276,6 @@ write_guides file_name | ----- | ----- | | `file_name` | Guide file name. | -### Estimate Parasitics - -This command estimates RC parasitics based on global route results -by using the `-global_routing` option of the `estimate_parasitics` command. - -```{note} -To see the function definition for `estimate_parasitics`, refer to -[Resizer docs](../rsz/README.md#estimate-parasitics). -``` - -```tcl -estimate_parasitics -global_routing -``` ### Draw Route Guides @@ -373,7 +360,9 @@ Examples scripts demonstrating how to run FastRoute on a sample design of `gcd` ./test/gcd.tcl ``` -### Read Global Routing Guides +### Read Guides + +This command reads global routing guides. ```tcl read_guides file_name @@ -385,7 +374,7 @@ read_guides file_name | ----- | ----- | | `file_name` | Path to global routing guide. | -### Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/GlobalRouter.cpp) or the [swig file](./src/GlobalRouter.i). diff --git a/docs/manpages/md/man2/ifp.txt b/docs/manpages/md/man2/ifp.txt index 39df418aaf3..39eb7950d38 100644 --- a/docs/manpages/md/man2/ifp.txt +++ b/docs/manpages/md/man2/ifp.txt @@ -13,43 +13,14 @@ This tool initializes floorplan constraints, die/core area, and makes tracks. Do note that there are two ways of setting the floorplan dimensions. The user can either specify manually die/core area, or -specify the utilization/aspect ratio. +specify the utilization/aspect ratio. If you set both, +unexpected behaviour might occur. -#### Method 1: Automatic die size calculation +- Method 1: Automatic die size calculation +Example: `initialize_floorplan -utilization 70 -aspect_ratio 1.0 -core_space 0.0 -sites FreePDK45_38x28_10R_NP_162NW_34O` -```tcl -initialize_floorplan - [-utilization util] - [-aspect_ratio ratio] - [-core_space space | {bottom top left right}] - [-sites site_name] -``` -##### Options - -| Switch Name | Description | -| ----- | ----- | -| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | -| `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | - - -#### Method 2: Set die/core area - -```tcl -initialize_floorplan - [-die_area {llx lly urx ury}] - [-core_area {llx lly urx ury}] - [-sites site_name] -``` - -##### Options - -| Switch Name | Description | -| ----- | ----- | -| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, ...}`) | +- Method 2: Set die/core area +Example: `initialize_floorplan -die_area 0 0 2000 2000 -core_area 100 100 1900 1900` -sites FreePDK45_38x28_10R_NP_162NW_34O` The die area and core area used to write ROWs can be specified explicitly with the `-die_area` and `-core_area` arguments. Alternatively, the die and @@ -68,10 +39,32 @@ die = ( 0, 0 ) core_height + core_space_bottom + core_space_top ) ``` + +```tcl +initialize_floorplan + [-utilization util] + [-aspect_ratio ratio] + [-core_space space | {bottom top left right}] + [-sites site_name] + [-die_area {llx lly urx ury}] + [-core_area {llx lly urx ury}] + [-sites site_name] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | +| `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | +| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | +| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | +| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | + ### Make Tracks The `initialize_floorplan` command removes existing tracks. - Use the `make_tracks` command to add routing tracks to a floorplan. ```tcl @@ -91,9 +84,9 @@ make_tracks | `-x_pitch`, `-y_pitch` | If set, overrides the LEF technology x-/y- pitch. Use the same unit as in the LEF file. | | `-x_offset`, `-y_offset` | If set, overrides the LEF technology x-/y- offset. Use the same unit as in the LEFT file. | -### Inserting tieoff cells +### Insert tiecells -To insert tiecells: +This comamnd inserts tiecells. ```tcl insert_tiecells @@ -108,7 +101,7 @@ insert_tiecells | `tie_pin` | Indicates the master and port to use to tie off nets. For example, `LOGIC0_X1/Z` for the Nangate45 library, where `LOGIC0_X1` is the master and `Z` is the output port on the master. | | `-prefix` | Used to control the prefix of the new tiecell names. This will default to `TIEOFF_`. | -### Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/InitFloorplan.cc) or the [swig file](./src/InitFloorPlan.i). @@ -120,7 +113,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts on running `ifp` for a sample design of `mpd_top` are as follows: -```tcl +``` ./test/upf_test.tcl ``` diff --git a/docs/manpages/md/man2/insert_dft.md b/docs/manpages/md/man2/insert_dft.md deleted file mode 100644 index ce12f0c60f2..00000000000 --- a/docs/manpages/md/man2/insert_dft.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: insert_dft(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -insert_dft - insert dft - -# SYNOPSIS - -insert_dft - - -# DESCRIPTION - -Implements the scan chains into the design by performing the following actions: - -1. Scan Replace. -2. Scan Architect. -3. Scan Stitch. - -The end result will be a design with scan flops connected to form the scan -chains. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/make_false_io_site.md b/docs/manpages/md/man2/make_false_io_site.md deleted file mode 100644 index 1707ab614bb..00000000000 --- a/docs/manpages/md/man2/make_false_io_site.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: make_false_io_site(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -make_false_io_site - make false io site - -# SYNOPSIS - -make_fake_io_site - -name name - -width width - -height height - - -# DESCRIPTION - -If the library does not contain sites for the IO cells, the following command can be used to add them. -This should not be used unless the sites are not in the library. - -Example usage: - -``` -make_fake_io_site -name IO_HSITE -width 1 -height 204 -make_fake_io_site -name IO_VSITE -width 1 -height 200 -make_fake_io_site -name IO_CSITE -width 200 -height 204 -``` - -# OPTIONS - -`-name`: Name of the site. - -`-width`: Width of the site (in microns). - -`-height`: Height of the site (in microns). - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/make_io_bump_array.md b/docs/manpages/md/man2/make_io_bump_array.md deleted file mode 100644 index fec2923dd5d..00000000000 --- a/docs/manpages/md/man2/make_io_bump_array.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: make_io_bump_array(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -make_io_bump_array - make io bump array - -# SYNOPSIS - -make_io_bump_array - -bump master - -origin {x y} - -rows rows - -columns columns - -pitch {x y} - [-prefix prefix] - - -# DESCRIPTION - -This command defines a bump array. - -Example usage: - -``` -make_io_bump_array -bump BUMP -origin "200 200" -rows 14 -columns 14 -pitch "200 200" -``` - -# OPTIONS - -`-bump`: Name of the bump master. - -`-origin`: Origin of the array. - -`-rows`: Number of rows to create. - -`-columns`: Number of columns to create. - -`-pitch`: Pitch of the array. - -`-prefix`: Name prefix for the bump array. The default value is `BUMP_`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/make_io_sites.md b/docs/manpages/md/man2/make_io_sites.md deleted file mode 100644 index ba8167fdae4..00000000000 --- a/docs/manpages/md/man2/make_io_sites.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: make_io_sites(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -make_io_sites - make io sites - -# SYNOPSIS - -make_io_sites - -horizontal_site site - -vertical_site site - -corner_site site - -offset offset - [-rotation_horizontal rotation] - [-rotation_vertical rotation] - [-rotation_corner rotation] - [-ring_index index] - - -# DESCRIPTION - -This command defines an IO site for the pads to be placed into. - -Example usage: - -``` -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -rotation_horizontal R180 -``` - -# OPTIONS - -`-horizontal_site`: Name of the site for the horizontal pads (east and west). - -`-vertical_site`: Name of the site for the vertical pads (north and south). - -`-corner_site`: Name of the site for the corner cells. - -`-offset`: Offset from the die edge to place the rows. - -`-rotation_horizontal`: Rotation to apply to the horizontal sites to ensure pads are placed correctly. The default value is `R0`. - -`-rotation_vertical`: Rotation to apply to the vertical sites to ensure pads are placed correctly. The default value is `R0`. - -`-rotation_corner`: Rotation to apply to the corner sites to ensure pads are placed correctly. The default value is `R0`. - -`-ring_index`: Used to specify the index of the ring in case of multiple rings. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/map_power_switch.md b/docs/manpages/md/man2/map_power_switch.md deleted file mode 100644 index 3a660d38d6f..00000000000 --- a/docs/manpages/md/man2/map_power_switch.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: map_power_switch(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -map_power_switch - map power switch - -# SYNOPSIS - -map_power_switch - [-switch_name_list switch_name_list] - [-lib_cells lib_cells] - [-port_map port_map] - - -# DESCRIPTION - -This command maps existing power switch. - -# OPTIONS - -`-switch_name_list`: A list of switches (as defined by create_power_switch) to map. - -`-lib_cells`: A list of library cells that could be mapped to the power switch - -`-port_map`: A map that associates model ports defined by create_power_switch to logical ports - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/mpl2.txt b/docs/manpages/md/man2/mpl2.txt index 78a04e2711d..97a3db6385e 100644 --- a/docs/manpages/md/man2/mpl2.txt +++ b/docs/manpages/md/man2/mpl2.txt @@ -11,7 +11,9 @@ planning approach that exploits the hierarchy and data flow inherent in the desi - Parameters without square brackets `-param2 param2` are required. ``` -### Hier-RTLMP algorithm +### RTL Macro Placer + +This command executes the Hier-RTLMP algorithm for macro placement. ```tcl rtl_macro_placer @@ -47,7 +49,7 @@ rtl_macro_placer [-write_macro_placement file_name] ``` -#### Generic Parameters +#### Options | Switch Name | Description | | ----- | ----- | @@ -69,7 +71,6 @@ rtl_macro_placer | `-report_directory` | Save reports to this directory. | | `-write_macro_placement` | Generates a file with the macro placement in the format of multiple calls for the `place_macro` command. | - #### Simulated Annealing Weight parameters Do note that while action probabilities are normalized to 1.0, the weights are not necessarily normalized. @@ -87,12 +88,19 @@ Do note that while action probabilities are normalized to 1.0, the weights are n ### Write Macro Placement -Command to write a file with the macro placement in the format of multiple calls for the `place_macro` command: +Command to write a file with the macro placement in the format of +multiple calls for the `place_macro` command: ```tcl write_macro_placement file_name ``` +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `filename` | Filename to write the macro placement flow commands to. | + ### Place Macro Command for placement of one specific macro. diff --git a/docs/manpages/md/man2/optimize_mirroring.md b/docs/manpages/md/man2/optimize_mirroring.md deleted file mode 100644 index 8ab30901363..00000000000 --- a/docs/manpages/md/man2/optimize_mirroring.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: optimize_mirroring(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -optimize_mirroring - optimize mirroring - -# SYNOPSIS - -optimize_mirroring - - -# DESCRIPTION - -The `optimize_mirroring` command mirrors instances about the Y axis in -a weak attempt to reduce the total half-perimeter wirelength (HPWL). - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/pdn.txt b/docs/manpages/md/man2/pdn.txt index 96c825d6d4f..3f567be054d 100644 --- a/docs/manpages/md/man2/pdn.txt +++ b/docs/manpages/md/man2/pdn.txt @@ -15,7 +15,7 @@ be defined over the stdcell area, and over areas occupied by macros. - Parameters without square brackets `-param2 param2` are required. ``` -### Build Power Grid +### PDNGen Build a power grid in accordance with the information specified. @@ -40,12 +40,20 @@ pdngen | `-report_only` | Print the current specifications. | | `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | -### Define Voltage Domains +### Set Voltage Domain Defines a named voltage domain with the names of the power and ground nets for a region. This region must already exist in the floorplan before referencing it with the `set_voltage_domain` command. If the `-region` argument is not supplied then region is the entire core area of the design. +Example usage: + +``` +set_voltage_domain -power VDD -ground VSS +set_voltage_domain -name TEMP_ANALOG -region TEMP_ANALOG -power VIN -ground VSS +set_voltage_domain -region test_domain -power VDD -ground VSS -secondary_power VREG +``` + ```tcl set_voltage_domain -name domain_name @@ -67,122 +75,92 @@ set_voltage_domain | `-secondary_power` | Specifies the name of the secondary power net for this voltage domain. | | `-switched_power` | Specifies the name of the switched power net for switched power domains. | -Example usage: +### Define PDN Grid -```tcl -set_voltage_domain -power VDD -ground VSS -set_voltage_domain -name TEMP_ANALOG -region TEMP_ANALOG -power VIN -ground VSS -set_voltage_domain -region test_domain -power VDD -ground VSS -secondary_power VREG +```{warning} +`define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! ``` -### Define Power Grid (General) - +- Method 1: General Usage Define the rules to describe a power grid pattern to be placed in the design. -```{warning} -`define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! -``` +Example usage: -```tcl -define_pdn_grid - [-name name] - [-voltage_domain list_of_domain_names] - [-pins list_of_pin_layers] - [-starts_with POWER|GROUND] - [-starts_with POWER|GROUND] - [-obstructions list_of_layers] +``` +define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} ``` -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | -| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +- Method 2: Macros +Define the rules for one or more macros. Example usage: -```tcl -define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} +``` +define_pdn_grid -macro -name ram -orient {R0 R180 MX MY} -grid_over_pg_pins -starts_with POWER -pin_direction vertical +define_pdn_grid -macro -name rotated_rams -orient {E FE W FW} -grid_over_boundary -starts_with POWER -pin_direction horizontal ``` -### Define Power Grid (Macros) +- Method 3: Modify existing power domain +Modify pre-existing power domain. + +Example usage: + +``` +define_pdn_grid -name main_grid -existing +``` ```tcl define_pdn_grid - -macro - [-name name] + [-name name] + [-voltage_domain list_of_domain_names] + [-pins list_of_pin_layers] + [-starts_with POWER|GROUND] + [-obstructions list_of_layers] + [-macro] [-grid_over_pg_pins|-grid_over_boundary] - [-voltage_domain list_of_domain_names] [-orient list_of_valid_orientations] [-instances list_of_instances] [-cells list_of_cells] [-default] [-halo list_of_halo_values] - [-pins list_of_pin_layers] - [-starts_with POWER|GROUND] - [-obstructions list_of_layers] [-power_switch_cell name] [-power_control signal_name] [-power_control_network STAR|DAISY] + [-existing] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-macro` | Defines the type of grid being added as a macro. | | `-name` | Defines a name to use when referring to this grid definition. | +| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | +| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +| `-macro` | Defines the type of grid being added as a macro. | | `-grid_over_pg_pins`, `-grid_over_boundary` | Place the power grid over the power ground pins of the macro. (Default True), or Place the power grid over the entire macro. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created). | | `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | | `-instances` | For a macro, defines a set of valid instances. Macros with a matching instance name will use this grid specification. | | `-cells` | For a macro, defines a set of valid cells. Macros which are instances of one of these cells will use this grid specification. | | `-default` | For a macro, specifies this is a default grid that can be overwritten. | | `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively (Default: 0). | -| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | | `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | | `-power_switch_cell` | Defines the name of the coarse grain power switch cell to be used wherever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. | | `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | | `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. | +| `-existing` | Flag to enable defining for existing routing solution. | -Example usage: - -```tcl -define_pdn_grid -macro -name ram -orient {R0 R180 MX MY} -grid_over_pg_pins -starts_with POWER -pin_direction vertical -define_pdn_grid -macro -name rotated_rams -orient {E FE W FW} -grid_over_boundary -starts_with POWER -pin_direction horizontal -``` - -### Define Power Grid for an existing routing solution - -```tcl -define_pdn_grid - -existing - [-name name] - [-obstructions list_of_layers] -``` -#### Options +### Define Power Switch Cell -| Switch Name | Description | -| ----- | ----- | -| `-existing` | Flag to enable defining for existing routing solution. | -| `-name` | Defines a name to use when referring to this grid definition (defaults to `existing_grid`). | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +Define a power switch cell that will be inserted into a power grid Example usage: -```tcl -define_pdn_grid -name main_grid -existing ``` - -### Define Power Switch Cell - -Define a power switch cell that will be inserted into a power grid +define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS +``` ```tcl define_power_switch_cell @@ -205,15 +183,17 @@ define_power_switch_cell | `-ground` | Defines the name of the pin that connects to the ground net. | | `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -Example usage: +### Add PDN Stripe -```tcl -define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS -``` +Defines a pattern of power and ground stripes in a single layer to be added to a power grid. -### Add Straps/Stripes +Example usage: -Defines a pattern of power and ground stripes in a single layer to be added to a power grid. +``` +add_pdn_stripe -grid main_grid -layer metal1 -followpins +add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins +add_pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND +``` ```tcl add_pdn_stripe @@ -250,17 +230,22 @@ add_pdn_stripe | `-number_of_straps` | Number of power/ground pairs to add. | | `-nets` | Limit straps to just this list of nets. | -Example usage: -```tcl -add_pdn_stripe -grid main_grid -layer metal1 -followpins -add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins -add_pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND -``` +### Add PDN Ring -### Add Rings +The `add_pdn_ring` command is used to define power/ground rings around a grid region. +The ring structure is built using two layers that are orthogonal to each other. +A power/ground pair will be added above and below the grid using the horizontal +layer, with another power/ground pair to the left and right using the vertical layer. +Together these 4 pairs of power/ground stripes form a ring around the specified grid. +Power straps on these layers that are inside the enclosed region are extend to +connect to the ring. -The `add_pdn_ring` command is used to define power/ground rings around a grid region. The ring structure is built using two layers that are orthogonal to each other. A power/ground pair will be added above and below the grid using the horizontal layer, with another power/ground pair to the left and right using the vertical layer. Together these 4 pairs of power/ground stripes form a ring around the specified grid. Power straps on these layers that are inside the enclosed region are extend to connect to the ring. +Example usage: + +``` +add_pdn_ring -grid main_grid -layer {metal6 metal7} -widths 5.0 -spacings 3.0 -core_offset 5 +``` ```tcl add_pdn_ring @@ -295,15 +280,24 @@ add_pdn_ring | `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | | `-nets` | Limit straps to just this list of nets. | -Example usage: +### Add PDN Connect + +The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. + +Example usage: -```tcl -add_pdn_ring -grid main_grid -layer {metal6 metal7} -widths 5.0 -spacings 3.0 -core_offset 5 ``` +add_pdn_connect -grid main_grid -layers {metal1 metal2} -cut_pitch 0.16 +add_pdn_connect -grid main_grid -layers {metal2 metal4} +add_pdn_connect -grid main_grid -layers {metal4 metal7} -### Add Connections +add_pdn_connect -grid ram -layers {metal4 metal5} +add_pdn_connect -grid ram -layers {metal5 metal6} +add_pdn_connect -grid ram -layers {metal6 metal7} -The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. +add_pdn_connect -grid rotated_rams -layers {metal4 metal6} +add_pdn_connect -grid rotated_rams -layers {metal6 metal7} +``` ```tcl add_pdn_connect @@ -332,24 +326,10 @@ add_pdn_connect | `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | | `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | -Example usage: - -```tcl -add_pdn_connect -grid main_grid -layers {metal1 metal2} -cut_pitch 0.16 -add_pdn_connect -grid main_grid -layers {metal2 metal4} -add_pdn_connect -grid main_grid -layers {metal4 metal7} - -add_pdn_connect -grid ram -layers {metal4 metal5} -add_pdn_connect -grid ram -layers {metal5 metal6} -add_pdn_connect -grid ram -layers {metal6 metal7} - -add_pdn_connect -grid rotated_rams -layers {metal4 metal6} -add_pdn_connect -grid rotated_rams -layers {metal6 metal7} -``` - -### Repairing Power Grid vias after Detailed Routing +### Repair PDN Vias -To remove vias which generate DRC violations after detailed placement and routing use `repair_pdn_vias`. +To remove vias which generate DRC violations after detailed placement +and routing use `repair_pdn_vias`. ```tcl repair_pdn_vias @@ -364,7 +344,7 @@ repair_pdn_vias | `-all` | Repair vias on all supply nets. | | `-net` | Repair only vias on the specified net. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](../src/PdnGen.cc) or the [swig file](PdnGen.i). @@ -386,7 +366,7 @@ If you are a developer, you might find these useful. More details can be found i ## Example scripts -### Defining a SoC power grid with pads +## Defining a SoC power grid with pads ``` add_global_connection -net VDD -pin_pattern {^VDD$} -power diff --git a/docs/manpages/md/man2/pin_access.md b/docs/manpages/md/man2/pin_access.md deleted file mode 100644 index ca362e3057b..00000000000 --- a/docs/manpages/md/man2/pin_access.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: pin_access(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -pin_access - pin access - -# SYNOPSIS - -pin_access - [-db_process_node name] - [-bottom_routing_layer layer] - [-top_routing_layer layer] - [-min_access_points count] - [-verbose level] - [-distributed] - [-remote_host rhost] - [-remote_port rport] - [-shared_volume vol] - [-cloud_size sz] - - -# DESCRIPTION - -This function checks pin access. - -# OPTIONS - -`-db_process_node`: Specify process node. - -`-bottom_routing_layer`: Bottommost routing layer. - -`-top_routing_layer`: Topmost routing layer. - -`-min_access_points`: Minimum number of access points per pin. - -`-verbose`: Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) - -`-distributed`: Refer to distributed arguments [here](#distributed-arguments). - -# ARGUMENTS - -`-distributed`: Enable distributed mode with Kubernetes and Google Cloud. - -`-remote_host`: The host IP. - -`-remote_port`: The value of the port to access from. - -`-shared_volume`: The mount path of the nfs shared folder. - -`-cloud_size`: The number of workers. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_bondpad.md b/docs/manpages/md/man2/place_bondpad.md deleted file mode 100644 index e65ed4a762c..00000000000 --- a/docs/manpages/md/man2/place_bondpad.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: place_bondpad(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_bondpad - place bondpad - -# SYNOPSIS - -place_bondpad - -bond master - [-offset {x y}] - [-rotation rotation] - io_instances - - -# DESCRIPTION - -To place the wirebond pads over the IO cells. - -Example usage: - -``` -place_bondpad -bond PAD IO_* -``` - -# OPTIONS - -`-bond`: Name of the bondpad master. - -`-offset`: Offset to place the bondpad at with respect to the io instance. - -`-rotation`: Rotation of the bondpad. - -`io_instances`: Names of the instances to add bond pads to. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_corners.md b/docs/manpages/md/man2/place_corners.md deleted file mode 100644 index b79e1cf672b..00000000000 --- a/docs/manpages/md/man2/place_corners.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: place_corners(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_corners - place corners - -# SYNOPSIS - -place_corners - master - [-ring_index index] - - -# DESCRIPTION - -This command places the corner cells. - -# OPTIONS - -`master`: Name of the master for the corners. - -`-ring_index`: Used to specify the index of the ring in case of multiple rings. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_endcaps.md b/docs/manpages/md/man2/place_endcaps.md deleted file mode 100644 index 209213a09dd..00000000000 --- a/docs/manpages/md/man2/place_endcaps.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: place_endcaps(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_endcaps - place endcaps - -# SYNOPSIS - -place_endcaps - [-corner master] - [-edge_corner master] - [-endcap masters] - [-endcap_horizontal masters] - [-endcap_vertical master] - [-prefix prefix] - [-left_top_corner master] - [-right_top_corner master] - [-left_bottom_corner master] - [-right_bottom_corner master] - [-left_top_edge master] - [-right_top_edge master] - [-left_bottom_edge master] - [-right_bottom_edge master] - [-left_edge master] - [-right_edge master] - [-top_edge masters] - [-bottom_edge masters] - - -# DESCRIPTION - -Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the -LEF58 `CLASS` specification foe endcaps. - -# OPTIONS - -`-prefix`: Prefix to use for the boundary cells. Defaults to "PHY_". - -`-corner`: Master for the corner cells on the outer corners. - -`-edge_corner`: Master for the corner cells on the inner corners. - -`-endcap`: Master used as an endcap. - -`-endcap_horizontal`: List of masters for the top and bottom row endcaps. (overrides `-endcap`). - -`-endcap_vertical`: Master for the left and right row endcaps. (overrides `-endcap`). - -`-left_top_corner`: Master for the corner cells on the outer top left corner. (overrides `-corner`). - -`-right_top_corner`: Master for the corner cells on the outer top right corner. (overrides `-corner`). - -`-left_bottom_corner`: Master for the corner cells on the outer bottom left corner. (overrides `-corner`). - -`-right_bottom_corner`: Master for the corner cells on the outer bottom right corner. (overrides `-corner`). - -`-left_top_edge`: Master for the corner cells on the inner top left corner. (overrides `-edge_corner`). - -`-right_top_edge`: Master for the corner cells on the inner top right corner. (overrides `-edge_corner`). - -`-left_bottom_edge`: Master for the corner cells on the inner bottom left corner. (overrides `-edge_corner`). - -`-right_bottom_edge`: Master for the corner cells on the inner bottom right corner. (overrides `-edge_corner`). - -`-left_edge`: Master for the left row endcaps. (overrides `-endcap_vertical`). - -`-right_edge`: Master for the right row endcaps. (overrides `-endcap_vertical`). - -`-top_edge`: List of masters for the top row endcaps. (overrides `-endcap_horizontal`). - -`-bottom_edge`: List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_io_fill.md b/docs/manpages/md/man2/place_io_fill.md deleted file mode 100644 index 568406e6ba0..00000000000 --- a/docs/manpages/md/man2/place_io_fill.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -title: place_io_fill(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_io_fill - place io fill - -# SYNOPSIS - -place_io_fill - -row row_name - [-permit_overlaps masters] - masters - - -# DESCRIPTION - -To place the IO filler cells. - -Example usage: - -``` -place_io_fill -row IO_NORTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_SOUTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_WEST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_EAST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -``` - -# OPTIONS - -`-row`: Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. - -`-permit_overlaps`: Names of the masters for the IO filler cells that allow for overlapping. - -`masters`: Names of the masters for the IO filler cells. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_io_terminals.md b/docs/manpages/md/man2/place_io_terminals.md deleted file mode 100644 index 568fe8ad948..00000000000 --- a/docs/manpages/md/man2/place_io_terminals.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: place_io_terminals(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_io_terminals - place io terminals - -# SYNOPSIS - -place_io_terminals - inst_pins - - -# DESCRIPTION - -In the case where the bond pads are integrated into the padcell, the IO terminals need to be placed. -This command place terminals on the padring. - -Example usage: -``` -place_io_terminals u_*/PAD -place_io_terminals u_*/VDD -``` - -# OPTIONS - -`inst_pins`: Instance pins to place the terminals on. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_pad.md b/docs/manpages/md/man2/place_pad.md deleted file mode 100644 index 734f0680816..00000000000 --- a/docs/manpages/md/man2/place_pad.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: place_pad(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_pad - place pad - -# SYNOPSIS - -place_pad - -row row_name - -location offset - -mirror - [-master master] - name - - -# DESCRIPTION - -To place a pad into the pad ring. - -Example usage: - -``` -place_pad -row IO_SOUTH -location 280.0 {u_clk.u_in} -place_pad -row IO_SOUTH -location 360.0 -mirror {u_reset.u_in} -place_pad -master sky130_fd_io__top_ground_hvc_wpad -row IO_SOUTH -location 439.5 {u_vzz_0} -place_pad -master sky130_fd_io__top_power_hvc_wpad -row IO_SOUTH -location 517.5 {u_v18_0} -``` - -# OPTIONS - -`-row`: Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. - -`-location`: Offset from the bottom left chip edge to place the pad at. - -`-mirror`: Specifies if the pad should be mirrored. - -`-master`: Name of the instance master if the instance needs to be created. - -`name`: Name of the instance. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_pin.md b/docs/manpages/md/man2/place_pin.md deleted file mode 100644 index 3df54359d17..00000000000 --- a/docs/manpages/md/man2/place_pin.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: place_pin(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_pin - place pin - -# SYNOPSIS - -place_pin - -pin_name pin_name - -layer layer - -location {x y} - [-pin_size {width height}] - [-force_to_die_boundary] - - -# DESCRIPTION - -The `place_pin` command places a specific pin in the specified location with the specified size. -It is recommended that individual pins be placed before the `place_pins` command, -as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. - -To place an individual pin: - -# OPTIONS - -`-pin_name`: The name of a pin of the design. - -`-layer`: The routing layer where the pin is placed. - -`-location`: The center of the pin (in microns). - -`-pin_size`: Tthe width and height of the pin (in microns). - -`-force_to_die_boundary`: When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_pins.md b/docs/manpages/md/man2/place_pins.md deleted file mode 100644 index 2c6bf79e50a..00000000000 --- a/docs/manpages/md/man2/place_pins.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: place_pins(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_pins - place pins - -# SYNOPSIS - -place_pins - -hor_layers h_layers - -ver_layers v_layers - [-random_seed seed] - [-random] - [-corner_avoidance length] - [-min_distance distance] - [-min_distance_in_tracks] - [-exclude region] - [-group_pins pin_list] - [-annealing] - [-write_pin_placement file_name] - - -# DESCRIPTION - -The `place_pins` command places all pins together. Use the following command to perform pin placement: - -# OPTIONS - -`-hor_layers`: The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. - -`-ver_layers`: The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. - -`-corner_avoidance`: The distance (in microns) from each corner within which pin placement should be avoided. - -`-min_distance`: The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. - -`-min_distance_in_tracks`: Flag that allows setting the min distance in number of tracks instead of microns. - -`-exclude`: A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. - -`-group_pins`: A list of pins to be placed together on the die boundary. - -`-annealing`: Flag to enable simulated annealing pin placement. - -`-write_pin_placement`: A file with the pin placement generated in the format of multiple calls for the `place_pin` command. - -# ARGUMENTS - -`-random_seed`: Specify the seed for random operations. - -`-random`: When this flag is enabled, the pin placement is random. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/place_tapcells.md b/docs/manpages/md/man2/place_tapcells.md deleted file mode 100644 index edcc1869265..00000000000 --- a/docs/manpages/md/man2/place_tapcells.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: place_tapcells(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -place_tapcells - place tapcells - -# SYNOPSIS - -place_tapcells - -master tapcell_master - -distance dist - - -# DESCRIPTION - -This command is used for tapcell placement only. - -# OPTIONS - -`-master`: Master to use for the tapcells. - -`-distance`: Distance between tapcells. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/preview_dft.md b/docs/manpages/md/man2/preview_dft.md deleted file mode 100644 index f29261b25d2..00000000000 --- a/docs/manpages/md/man2/preview_dft.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: preview_dft(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -preview_dft - preview dft - -# SYNOPSIS - -preview_dft - [-verbose] - - -# DESCRIPTION - -Prints a preview of the scan chains that will be stitched by `insert_dft`. Use -this command to iterate and try different DFT configurations. This command do -not perform any modification to the design. - -# OPTIONS - -`-verbose`: Shows more information about each one of the scan chains that will be created. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/psm.txt b/docs/manpages/md/man2/psm.txt index 792cdbf6ca7..92491d87c0c 100644 --- a/docs/manpages/md/man2/psm.txt +++ b/docs/manpages/md/man2/psm.txt @@ -25,6 +25,8 @@ Features: ### Analyze Power Grid +This command analyzes power grid. + ```tcl analyze_power_grid [-vsrc vsrc_file] @@ -57,8 +59,11 @@ analyze_power_grid ### Check Power Grid +This command checks power grid. + ```tcl -check_power_grid -net net_name +check_power_grid + -net net_name ``` #### Options @@ -67,7 +72,9 @@ check_power_grid -net net_name | ----- | ----- | | `-net` | Name of the net to analyze. Must be a power or ground net name. | -### Write Spice Power Grid +### Write PG Spice + +This command writes the `spice` file for power grid. ```tcl write_pg_spice @@ -91,6 +98,8 @@ write_pg_spice ### Set PDNSim Net voltage +This command sets PDNSim net voltage. + ```tcl set_pdnsim_net_voltage [-net net_name] @@ -104,7 +113,7 @@ set_pdnsim_net_voltage | `-net` | Name of the net to analyze. It must be a power or ground net name. | | `-voltage` | Sets the voltage on a specific net. If this option is not given, the Liberty file's voltage value is obtained from operating conditions. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/pdnsim.cpp) or the [swig file](./src/pdnsim.i). @@ -116,7 +125,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts demonstrating how to run PDNSim on a sample design on `aes` as follows: -```tcl +``` ./test/aes_test_vdd.tcl ./test/aes_test_vss.tcl ``` diff --git a/docs/manpages/md/man2/rdl_route.md b/docs/manpages/md/man2/rdl_route.md deleted file mode 100644 index 7178679cf71..00000000000 --- a/docs/manpages/md/man2/rdl_route.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: rdl_route(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -rdl_route - rdl route - -# SYNOPSIS - -rdl_route - -layer layer - [-bump_via access_via] - [-pad_via access_via] - [-width width] - [-spacing spacing] - [-turn_penalty penalty] - [-allow45] - nets - - -# DESCRIPTION - -To route the RDL for the bump arrays. - -# OPTIONS - -`-layer`: Layer to route on. - -`-bump_via`: Via to use to to connect the bump to the routing layer. - -`-pad_via`: Via to use to to connect the pad cell to the routing layer. - -`-width`: Width of the routing. Defaults to minimum width for each respective layer. - -`-spacing`: Spacing of the routing. Defaults to minimum spacing for each respective layer. - -`-turn_penalty`: Scaling factor to apply to discurage turning to allow for straighter routes. The default value is `2.0`, and the allowed values are floats. - -`-allow45`: Specifies that 45 degree routing is permitted. - -`nets`: Nets to route. - -`Command Name`: Description - -`find_site`: Find site given site name. - -`find_master`: Find master given master name. - -`find_instance`: Find instance given instance name. - -`find_net`: Find net given net name. - -`assert_required`: Assert argument that is required for `cmd` - -`connect_iterm`: Connect instance terminals. Required inputs are: `inst_name`, `iterm_name`, `net_name`. - -`convert_tcl`: These functions read from $ICeWall::library parameters to generate a standalone Tcl script. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/read_partitioning.md b/docs/manpages/md/man2/read_partitioning.md deleted file mode 100644 index 32bc265bd8c..00000000000 --- a/docs/manpages/md/man2/read_partitioning.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: read_partitioning(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -read_partitioning - read partitioning - -# SYNOPSIS - -read_partitioning - -read_file name - [-instance_map_file file_path] - - -# DESCRIPTION - -This command reads the partition file into design. - -# OPTIONS - -`-read_file`: Read partitioning file (usually with the extension `.part`). The file format must match the same format as the output of `write_partition_verilog`. - -`-instance_map_file`: Instance mapping file. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/read_upf.md b/docs/manpages/md/man2/read_upf.md deleted file mode 100644 index e5b0ec84743..00000000000 --- a/docs/manpages/md/man2/read_upf.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: read_upf(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -read_upf - read upf - -# SYNOPSIS - -read_upf - -file file - - -# DESCRIPTION - -Sources the UPF file. - -# OPTIONS - -`-file`: Path to `.upf` file. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_buffers.md b/docs/manpages/md/man2/remove_buffers.md deleted file mode 100644 index 39e9f31b8e9..00000000000 --- a/docs/manpages/md/man2/remove_buffers.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: remove_buffers(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -remove_buffers - remove buffers - -# SYNOPSIS - -remove_buffers - - -# DESCRIPTION - -Use the `remove_buffers` command to remove buffers inserted by synthesis. This -step is recommended before using `repair_design` so that there is more flexibility -in buffering nets. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_fillers.md b/docs/manpages/md/man2/remove_fillers.md deleted file mode 100644 index 885e8692f82..00000000000 --- a/docs/manpages/md/man2/remove_fillers.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: remove_fillers(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -remove_fillers - remove fillers - -# SYNOPSIS - -remove_fillers - - -# DESCRIPTION - -This command removes all filler cells. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_io_bump.md b/docs/manpages/md/man2/remove_io_bump.md deleted file mode 100644 index ee30f191aca..00000000000 --- a/docs/manpages/md/man2/remove_io_bump.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: remove_io_bump(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -remove_io_bump - remove io bump - -# SYNOPSIS - -remove_io_bump - instance_name - - -# DESCRIPTION - -This command removes a single bump instance. - -# OPTIONS - -`-bump`: Name of the bump master. - -# ARGUMENTS - -`instance_name`: Name of the bump. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_io_bump_array.md b/docs/manpages/md/man2/remove_io_bump_array.md deleted file mode 100644 index 9525f62d0a9..00000000000 --- a/docs/manpages/md/man2/remove_io_bump_array.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: remove_io_bump_array(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -remove_io_bump_array - remove io bump array - -# SYNOPSIS - -remove_io_bump_array - -bump master - - -# DESCRIPTION - -This command removes the entire bump array. - -Example usage: - -``` -remove_io_bump_array -bump BUMP -``` - -# OPTIONS - -`-bump`: Name of the bump master. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/remove_io_rows.md b/docs/manpages/md/man2/remove_io_rows.md deleted file mode 100644 index 0893389b307..00000000000 --- a/docs/manpages/md/man2/remove_io_rows.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: remove_io_rows(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -remove_io_rows - remove io rows - -# SYNOPSIS - -remove_io_rows - - -# DESCRIPTION - -When the padring is complete, the following command can remove the IO rows to avoid causing confusion with the other tools. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_clock_inverters.md b/docs/manpages/md/man2/repair_clock_inverters.md deleted file mode 100644 index bf031865637..00000000000 --- a/docs/manpages/md/man2/repair_clock_inverters.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: repair_clock_inverters(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -repair_clock_inverters - repair clock inverters - -# SYNOPSIS - -repair_clock_inverters - - -# DESCRIPTION - -This command repairs clock inverters. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_clock_nets.md b/docs/manpages/md/man2/repair_clock_nets.md deleted file mode 100644 index 705ac82db83..00000000000 --- a/docs/manpages/md/man2/repair_clock_nets.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: repair_clock_nets(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -repair_clock_nets - repair clock nets - -# SYNOPSIS - -repair_clock_nets - [-max_wire_length max_wire_length] - - -# DESCRIPTION - -The `clock_tree_synthesis` command inserts a clock tree in the design -but may leave a long wire from the clock input pin to the clock tree -root buffer. - -The `repair_clock_nets` command inserts buffers in the -wire from the clock input pin to the clock root buffer. - -# OPTIONS - -`-max_wire_length`: Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_design.md b/docs/manpages/md/man2/repair_design.md deleted file mode 100644 index 13c4bf8adf6..00000000000 --- a/docs/manpages/md/man2/repair_design.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: repair_design(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -repair_design - repair design - -# SYNOPSIS - -repair_design - [-max_wire_length max_length] - [-slew_margin slew_margin] - [-cap_margin cap_margin] - [-max_utilization util] - [-verbose] - - -# DESCRIPTION - -The `repair_design` command inserts buffers on nets to repair max slew, max -capacitance and max fanout violations, and on long wires to reduce RC delay in -the wire. It also resizes gates to normalize slews. Use `estimate_parasitics --placement` before `repair_design` to estimate parasitics considered -during repair. Placement-based parasitics cannot accurately predict -routed parasitics, so a margin can be used to "over-repair" the design -to compensate. - -# OPTIONS - -`-max_wire_length`: Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. - -`-slew_margin`: Add a slew margin. The default value is `0`, the allowed values are integers `[0, 100]`. - -`-cap_margin`: Add a capactitance margin. The default value is `0`, the allowed values are integers `[0, 100]`. - -`-max_utilization`: Defines the percentage of core area used. - -`-verbose`: Enable verbose logging on progress of the repair. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_tie_fanout.md b/docs/manpages/md/man2/repair_tie_fanout.md deleted file mode 100644 index 8c0d032056b..00000000000 --- a/docs/manpages/md/man2/repair_tie_fanout.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: repair_tie_fanout(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -repair_tie_fanout - repair tie fanout - -# SYNOPSIS - -repair_tie_fanout - [-separation dist] - [-verbose] - lib_port - - -# DESCRIPTION - -The `repair_tie_fanout` command connects each tie high/low load to a copy -of the tie high/low cell. - -# OPTIONS - -`-separation`: Tie high/low insts are separated from the load by this value (Liberty units, usually microns). - -`-verbose`: Enable verbose logging of repair progress. - -`lib_port`: Tie high/low port, which can be a library/cell/port name or object returned by `get_lib_pins`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/repair_timing.md b/docs/manpages/md/man2/repair_timing.md deleted file mode 100644 index 9de80fa003d..00000000000 --- a/docs/manpages/md/man2/repair_timing.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: repair_timing(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -repair_timing - repair timing - -# SYNOPSIS - -repair_timing - [-setup] - [-hold] - [-setup_margin setup_margin] - [-hold_margin hold_margin] - [-allow_setup_violations] - [-repair_tns tns_end_percent] - [-max_utilization util] - [-max_buffer_percent buffer_percent] - [-verbose] - - -# DESCRIPTION - -The `repair_timing` command repairs setup and hold violations. It -should be run after clock tree synthesis with propagated clocks. -Setup repair is done before hold repair so that hold repair does not -cause setup checks to fail. - -The worst setup path is always repaired. Next, violating paths to -endpoints are repaired to reduced the total negative slack. - -# OPTIONS - -`-setup`: Repair setup timing. - -`-hold`: Repair hold timing. - -`-setup_margin`: Add additional setup slack margin. - -`-hold_margin`: Add additional hold slack margin. - -`-allow_setup_violations`: While repairing hold violations, buffers are not inserted that will cause setup violations unless `-allow_setup_violations` is specified. - -`-repair_tns`: Percentage of violating endpoints to repair (0-100). When `tns_end_percent` is zero (the default), only the worst endpoint is repaired. When `tns_end_percent` is 100, all violating endpoints are repaired. - -`-max_utilization`: Defines the percentage of core area used. - -`-max_buffer_percent`: Specify a maximum number of buffers to insert to repair hold violations as a percentage of the number of instances in the design. The default value is `20`, and the allowed values are integers `[0, 100]`. - -`-verbose`: Enable verbose logging of the repair progress. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_cts.md b/docs/manpages/md/man2/report_cts.md deleted file mode 100644 index 87c6972d273..00000000000 --- a/docs/manpages/md/man2/report_cts.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: report_cts(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -report_cts - report cts - -# SYNOPSIS - -report_cts - [-out_file file] - - -# DESCRIPTION - -This command is used to extract the following metrics after a successful `clock_tree_synthesis` run. -- Number of Clock Roots -- Number of Buffers Inserted -- Number of Clock Subnets -- Number of Sinks. - -# OPTIONS - -`-out_file`: The file to save `cts` reports. If this parameter is omitted, the report is streamed to `stdout` and not saved. - -`Command Name`: Description - -`clock_tree_synthesis_debug`: Option to plot the CTS to GUI. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_design_area.md b/docs/manpages/md/man2/report_design_area.md deleted file mode 100644 index cf54d1e40fe..00000000000 --- a/docs/manpages/md/man2/report_design_area.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: report_design_area(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -report_design_area - report design area - -# SYNOPSIS - -report_design_area - - -# DESCRIPTION - -The `report_design_area` command reports the area of the design's components -and the utilization. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_dft_config.md b/docs/manpages/md/man2/report_dft_config.md deleted file mode 100644 index 3648514a132..00000000000 --- a/docs/manpages/md/man2/report_dft_config.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: report_dft_config(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -report_dft_config - report dft config - -# SYNOPSIS - -report_dft_config - - -# DESCRIPTION - -Prints the current DFT configuration to be used by `preview_dft` and -`insert_dft`. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/report_floating_nets.md b/docs/manpages/md/man2/report_floating_nets.md deleted file mode 100644 index b57ff171dda..00000000000 --- a/docs/manpages/md/man2/report_floating_nets.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: report_floating_nets(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -report_floating_nets - report floating nets - -# SYNOPSIS - -report_floating_nets - [-verbose] - - -# DESCRIPTION - -The `report_floating_nets` command reports nets with only one pin connection. - -# OPTIONS - -`-verbose`: Print the net names. - -`Command Name`: Description - -`repair_setup_pin`: Repair setup pin violation. - -`check_parasitics`: Check if the `estimate_parasitics` command has been called. - -`parse_time_margin_arg`: Get the raw value for timing margin (e.g. `slack_margin`, `setup_margin`, `hold_margin`) - -`parse_percent_margin_arg`: Get the above margin in perentage format. - -`parse_margin_arg`: Same as `parse_percent_margin_arg`. - -`parse_max_util`: Check maximum utilization. - -`parse_max_wire_length`: Get maximum wirelength. - -`check_corner_wire_caps`: Check wire capacitance for corner. - -`check_max_wire_length`: Check if wirelength is allowed by rsz for minimum delay. - -`dblayer_wire_rc`: Get layer RC values. - -`set_dblayer_wire_rc`: Set layer RC values. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/rmp.txt b/docs/manpages/md/man2/rmp.txt index 79c8efa38c4..244827be12f 100644 --- a/docs/manpages/md/man2/rmp.txt +++ b/docs/manpages/md/man2/rmp.txt @@ -18,28 +18,24 @@ by the user as per the interface described below. - Parameters without square brackets `-param2 param2` are required. ``` +### Restructure + Restructuring can be done in two modes: area or delay. -### Area Mode +- Method 1: Area Mode +Example: `restructure -liberty_file ckt.lib -target area -tielo_pin ABC -tiehi_pin DEF` + +- Method 2: Timing Mode +Example: `restructure -liberty_file ckt.lib -target delay -tielo_pin ABC -tiehi_pin DEF -slack_threshold 1 -depth_threshold 2` ```tcl restructure -liberty_file liberty_file - -target area + -target area|delay -tielo_pin tielo_pin_name -tiehi_pin tiehi_pin_name -``` - -### Timing Mode - -```tcl -restructure - -liberty_file liberty_file - -target delay -slack_threshold slack_val -depth_threshold depth_threshold - -tielo_pin tielo_pin_name - -tiehi_pin tiehi_pin_name ``` #### Options @@ -57,7 +53,7 @@ restructure Example scripts on running `rmp` for a sample design of `gcd` as follows: -```tcl +``` ./test/gcd_restructure.tcl ``` diff --git a/docs/manpages/md/man2/set_dft_config.md b/docs/manpages/md/man2/set_dft_config.md deleted file mode 100644 index 1653dbde5f7..00000000000 --- a/docs/manpages/md/man2/set_dft_config.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: set_dft_config(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_dft_config - set dft config - -# SYNOPSIS - -set_dft_config - [-max_length ] - [-clock_mixing ] - - -# DESCRIPTION - -The command `set_dft_config` sets the DFT configuration variables. - -# OPTIONS - -`-max_length`: The maxinum number of bits that can be in each scan chain. - -`-clock_mixing`: How architect will mix the scan flops based on the clock driver. `no_mix`: Creates scan chains with only one type of clock and edge. This may create unbalanced chains. `clock_mix`: Craetes scan chains mixing clocks and edges. Falling edge flops are going to be stitched before rising edge. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_domain_area.md b/docs/manpages/md/man2/set_domain_area.md deleted file mode 100644 index 18ffb7496a8..00000000000 --- a/docs/manpages/md/man2/set_domain_area.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: set_domain_area(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_domain_area - set domain area - -# SYNOPSIS - -set_domain_area - domain_name - -area {llx lly urx ury} - - -# DESCRIPTION - -This command sets the power domain area. - -# OPTIONS - -`domain_name`: Power domain name. - -`-area`: x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_dont_touch.md b/docs/manpages/md/man2/set_dont_touch.md deleted file mode 100644 index 90ab813c616..00000000000 --- a/docs/manpages/md/man2/set_dont_touch.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: set_dont_touch(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_dont_touch - set dont touch - -# SYNOPSIS - -set_dont_touch instances_nets # unset_dont_touch instances_nets - - -# DESCRIPTION - -The `set_dont_touch` command prevents the resizer commands from -modifying instances or nets. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_dont_use.md b/docs/manpages/md/man2/set_dont_use.md deleted file mode 100644 index 980b282a5ff..00000000000 --- a/docs/manpages/md/man2/set_dont_use.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: set_dont_use(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_dont_use - set dont use - -# SYNOPSIS - -set_dont_use lib_cells # unset_dont_use lib_cells - - -# DESCRIPTION - -The `set_dont_use` command removes library cells from consideration by -the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` -or a list of cell names (`wildcards` allowed). For example, `DLY*` says do -not use cells with names that begin with `DLY` in all libraries. - -# OPTIONS - -This command has no switches. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_io_pin_constraint.md b/docs/manpages/md/man2/set_io_pin_constraint.md deleted file mode 100644 index 731c4bde37b..00000000000 --- a/docs/manpages/md/man2/set_io_pin_constraint.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: set_io_pin_constraint(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_io_pin_constraint - set io pin constraint - -# SYNOPSIS - -set_io_pin_constraint - [-direction direction] - [-pin_names names] - [-region edge:interval] - [-mirrored_pins names] - [-group] - [-order] - - -# DESCRIPTION - -The `set_io_pin_constraint` command sets region constraints for pins according -to the pin direction or the pin name. This command can be called multiple -times with different constraints. - -You can use the `set_io_pin_constraint` command to restrict pins to the -pin placement grid created with the `define_pin_shape_pattern` command. - -It is possible to use the `-region`, `-group` and `-order` arguments together -per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be -called alone. - -# OPTIONS - -`-direction`: Pin direction (`input`, `output`, `inout`, or `feedthrough`). - -`-pin_names`: List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. - -`-region`: Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. - -`-mirrored_pins`: List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. - -`-group`: Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. - -`-order`: Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_isolation.md b/docs/manpages/md/man2/set_isolation.md deleted file mode 100644 index 1c9f604cef5..00000000000 --- a/docs/manpages/md/man2/set_isolation.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: set_isolation(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_isolation - set isolation - -# SYNOPSIS - -set_isolation - [-domain domain] - [-applies_to applies_to] - [-clamp_value clamp_value] - [-isolation_signal isolation_signal] - [-isolation_sense isolation_sense] - [-location location] - [-update] - name - - -# DESCRIPTION - -This command creates or update isolation strategy. - -# OPTIONS - -`-domain`: Power domain - -`-applies_to`: Restricts the strategy to apply one of these (`inputs`, `outputs`, `both`). - -`-clamp_value`: Value the isolation can drive (`0`, `1`). - -`-isolation_signal`: The control signal for this strategy. - -`-isolation_sense`: The active level of isolation control signal. - -`-location`: Domain in which isolation cells are placed (`parent`, `self`, `fanout`). - -`-update`: Only available if using existing strategy, will error if the strategy doesn't exist. - -`name`: Isolation strategy name. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_layer_rc.md b/docs/manpages/md/man2/set_layer_rc.md deleted file mode 100644 index 9a7b154201c..00000000000 --- a/docs/manpages/md/man2/set_layer_rc.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: set_layer_rc(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_layer_rc - set layer rc - -# SYNOPSIS - -set_layer_rc - [-layer layer] - [-via via_layer] - [-resistance res] - [-capacitance cap] - [-corner corner] - - -# DESCRIPTION - -The `set_layer_rc` command can be used to set the resistance and capacitance -for a layer or via. This is useful if these values are missing from the LEF file, -or to override the values in the LEF. - -# OPTIONS - -`-layer`: Set layer name to modify. Note that the layer must be a routing layer. - -`-via`: Select via layer name. Note that via resistance is per cut/via, not area-based. - -`-resistance`: Resistance per unit length, same convention as `set_wire_rc`. - -`-capacitance`: Capacitance per unit length, same convention as `set_wire_rc`. - -`-corner`: Process corner to use. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_pin_length.md b/docs/manpages/md/man2/set_pin_length.md deleted file mode 100644 index e93298d69bb..00000000000 --- a/docs/manpages/md/man2/set_pin_length.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: set_pin_length(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_pin_length - set pin length - -# SYNOPSIS - -set_pin_length - [-hor_length h_length] - [-ver_length v_length] - - -# DESCRIPTION - -The `set_pin_length` command defines the length of all vertical and horizontal -pins. - -# OPTIONS - -`-hor_length`: The length (in microns) of the horizontal pins. - -`-ver_length`: The length (in microns) of the vertical pins. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_pin_length_extension.md b/docs/manpages/md/man2/set_pin_length_extension.md deleted file mode 100644 index 431b5531bae..00000000000 --- a/docs/manpages/md/man2/set_pin_length_extension.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: set_pin_length_extension(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_pin_length_extension - set pin length extension - -# SYNOPSIS - -set_pin_length_extension - [-hor_extension h_extension] - [-ver_extension v_extension] - - -# DESCRIPTION - -The `set_pin_length_extension` command defines the an extension of the length -of all vertical and horizontal pins. Note that this command may generate pins -partially outside the die area. - -# OPTIONS - -`-hor_extension`: The length (in microns) for the horizontal pins. - -`-ver_extension`: The length (in microns) for the vertical pins. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_pin_thick_multiplier.md b/docs/manpages/md/man2/set_pin_thick_multiplier.md deleted file mode 100644 index f4607215140..00000000000 --- a/docs/manpages/md/man2/set_pin_thick_multiplier.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: set_pin_thick_multiplier(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_pin_thick_multiplier - set pin thick multiplier - -# SYNOPSIS - -set_pin_thick_multiplier - [-hor_multiplier h_mult] - [-ver_multiplier v_mult] - - -# DESCRIPTION - -The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all -vertical and horizontal pins. - -# OPTIONS - -`-hor_multiplier`: The thickness multiplier for the horizontal pins. - -`-ver_multiplier`: The thickness multiplier for the vertical pins. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_placement_padding.md b/docs/manpages/md/man2/set_placement_padding.md deleted file mode 100644 index 645b0465c78..00000000000 --- a/docs/manpages/md/man2/set_placement_padding.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: set_placement_padding(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_placement_padding - set placement padding - -# SYNOPSIS - -set_placement_padding - -global|-masters masters|-instances insts - [-right site_count] - [-left site_count] - - -# DESCRIPTION - -The `set_placement_padding` command sets left and right padding in multiples -of the row site width. Use the `set_placement_padding` command before -legalizing placement to leave room for routing. Use the `-global` flag -for padding that applies to all instances. Use `-instances` -for instance-specific padding. The instances `insts` can be a list of instance -names, or an instance object returned by the SDC `get_cells` command. To -specify padding for all instances of a common master, use the `-filter` -"ref_name == " option to `get_cells`. - -# OPTIONS - -`-global`: Set padding globally using `left` and `right` values. - -`-masters`: Set padding only for these masters using `left` and `right` values. - -`-instances`: For `-instances`, you will set padding only for these insts using `left` and `right` values. - -`-left`: Left padding (in site count). - -`-right`: Right padding (in site count). - -`instances`: Set padding for these list of instances. Not to be confused with the `-instances` switch above. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_simulated_annealing_parameters.md b/docs/manpages/md/man2/set_simulated_annealing_parameters.md deleted file mode 100644 index 8f5d0b22ac7..00000000000 --- a/docs/manpages/md/man2/set_simulated_annealing_parameters.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: set_simulated_annealing_parameters(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_simulated_annealing_parameters - set simulated annealing parameters - -# SYNOPSIS - -set_simulated_annealing - [-temperature temperature] - [-max_iterations iter] - [-perturb_per_iter perturbs] - [-alpha alpha] - - -# DESCRIPTION - -The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. - -# OPTIONS - -`-temperature`: Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. - -`-max_iterations`: The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. - -`-perturb_per_iter`: The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-alpha`: The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/set_wire_rc.md b/docs/manpages/md/man2/set_wire_rc.md deleted file mode 100644 index 38465ab6c61..00000000000 --- a/docs/manpages/md/man2/set_wire_rc.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: set_wire_rc(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -set_wire_rc - set wire rc - -# SYNOPSIS - -set_wire_rc - [-clock] - [-signal] - [-layer layer_name] - -or -set_wire_rc - [-resistance res] - [-capacitance cap] - - -# DESCRIPTION - -The `set_wire_rc` command sets the resistance and capacitance used to estimate -delay of routing wires. Separate values can be specified for clock and data -nets with the `-signal` and `-clock` flags. Without either `-signal` or -`-clock` the resistance and capacitance for clocks and data nets are set. - -# OPTIONS - -`-clock`: Enable setting of RC for clock nets. - -`-signal`: Enable setting of RC for signal nets. - -`-layer`: Use the LEF technology resistance and area/edge capacitance values for the layer. This is used for a default width wire on the layer. - -`-resistance`: Resistance per unit length, units are from the first Liberty file read, usually in the form of $\frac{resistanceUnit}{distanceUnit}$. Usually kΩ/µm. - -`-capacitance`: Capacitance per unit length, units are from the first Liberty file read, usually in the form of $\frac{capacitanceUnit}{distanceUnit}$. Usually pF/µm. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/tapcell.md b/docs/manpages/md/man2/tapcell.md deleted file mode 100644 index 6ee58c40492..00000000000 --- a/docs/manpages/md/man2/tapcell.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: tapcell(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -tapcell - tapcell - -# SYNOPSIS - -tapcell - [-tapcell_master tapcell_master] - [-endcap_master endcap_master] - [-distance dist] - [-halo_width_x halo_x] - [-halo_width_y halo_y] - [-tap_nwin2_master tap_nwin2_master] - [-tap_nwin3_master tap_nwin3_master] - [-tap_nwout2_master tap_nwout2_master] - [-tap_nwout3_master tap_nwout3_master] - [-tap_nwintie_master tap_nwintie_master] - [-tap_nwouttie_master tap_nwouttie_master] - [-cnrcap_nwin_master cnrcap_nwin_master] - [-cnrcap_nwout_master cnrcap_nwout_master] - [-incnrcap_nwin_master incnrcap_nwin_master] - [-incnrcap_nwout_master incnrcap_nwout_master] - [-tap_prefix tap_prefix] - [-endcap_prefix endcap_prefix] - - -# DESCRIPTION - -This command inserts tapcells or endcaps. - -The figures below show two examples of tapcell insertion. When only the -`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement -is similar to Figure 1. When the remaining masters are give, the tapcell -placement is similar to Figure 2. - -| | | -|:--:|:--:| -| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | - -# OPTIONS - -`-tapcell_master`: Master used as a tapcell. - -`-endcap_master`: Master used as an endcap. - -`-distance`: Distance (in microns) between each tapcell in the checkerboard. - -`-halo_width_x`: Horizontal halo size (in microns) around macros during cut rows. - -`-halo_width_y`: Vertical halo size (in microns) around macros during cut rows. - -`-tap_nwintie_master`: Master cell placed at the top and bottom of|macros and the core area according the row orientation. - -`-tap_nwin2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwintie_master` - -`-tap_nwin3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwin2_master`. - -`-tap_nwouttie_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. - -`-tap_nwout2_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwouttie_master`. - -`-tap_nwout3_master`: Master cell placed at the top and bottom of macros and the core area according the row orientation | This master should be smaller than `tap_nwout2_master`. - -`-incnrcap_nwin_master`: Master cell placed at the corners of macros, according the row orientation. - -`-incnrcap_nwout_master`: Master cell placed at the corners of macros, according the row orientation. - -`-cnrcap_nwin_master`: Macro cell placed at the corners the core area according the row orientation. - -`-cnrcap_nwout_master`: Macro cell placed at the corners the core area according the row orientation. - -`-tap_prefix`: Prefix for the tapcell instances. The default value is `TAP_`. - -`-endcap_prefix`: Prefix for the endcaps instances. The default value is `PHY_`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/tapcell_ripup.md b/docs/manpages/md/man2/tapcell_ripup.md deleted file mode 100644 index 270317e0693..00000000000 --- a/docs/manpages/md/man2/tapcell_ripup.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: tapcell_ripup(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -tapcell_ripup - tapcell ripup - -# SYNOPSIS - -tapcell_ripup - -tap_prefix tap_prefix - -endcap_prefix endcap_prefix - - -# DESCRIPTION - -This command is used for removing tapcells or endcaps based on their prefix. - -# OPTIONS - -`-tap_prefix`: Remove tapcells with said prefix. - -`-endcap_prefix`: Remove endcaps with said prefix. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/triton_part_design.md b/docs/manpages/md/man2/triton_part_design.md deleted file mode 100644 index 342f57f68f9..00000000000 --- a/docs/manpages/md/man2/triton_part_design.md +++ /dev/null @@ -1,161 +0,0 @@ ---- -title: triton_part_design(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -triton_part_design - triton part design - -# SYNOPSIS - -triton_part_design - [-num_parts num_parts] - [-balance_constraint balance_constraint] - [-base_balance base_balance] - [-seed seed] - [-timing_aware_flag timing_aware_flag] - [-top_n top_n] - [-placement_flag placement_flag] - [-fence_flag fence_flag] - [-fence_lx fence_lx] - [-fence_ly fence_ly] - [-fence_ux fence_ux] - [-fence_uy fence_uy] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-solution_file solution_file] - [-net_timing_factor net_timing_factor] - [-path_timing_factor path_timing_factor] - [-path_snaking_factor path_snaking_factor] - [-timing_exp_factor timing_exp_factor] - [-extra_delay extra_delay] - [-guardband_flag guardband_flag] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] - [-placement_wt_factors placement_wt_factors] - [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] - [-thr_coarsen_vertices thr_coarsen_vertices] - [-thr_coarsen_hyperedges thr_coarsen_hyperedges] - [-coarsening_ratio coarsening_ratio] - [-max_coarsen_iters max_coarsen_iters] - [-adj_diff_ratio adj_diff_ratio] - [-min_num_vertices_each_part min_num_vertices_each_part] - [-num_initial_solutions num_initial_solutions] - [-num_best_initial_solutions num_best_initial_solutions] - [-refiner_iters refiner_iters] - [-max_moves max_moves] - [-early_stop_ratio early_stop_ratio] - [-total_corking_passes total_corking_passes] - [-v_cycle_flag v_cycle_flag ] - [-max_num_vcycle max_num_vcycle] - [-num_coarsen_solutions num_coarsen_solutions] - [-num_vertices_threshold_ilp num_vertices_threshold_ilp] - [-global_net_threshold global_net_threshold] - - -# DESCRIPTION - -This command partitions the design netlist. Note that design must be loaded in memory. - -# OPTIONS - -`-num_parts`: Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. - -`-balance_constraint`: Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. - -`-base_balance`: Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. - -`-seed`: Random seed. The default value is `1`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. - -`-timing_aware_flag`: Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. - -`-top_n`: Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT`. - -`-placement_flag`: Enable placement driven partitioning. The default value is `false`, and the allowed values are booleans. - -`-fence_flag`: Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. - -`-fence_lx`: Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_ly`: Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_ux`: Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. - -`-fence_uy`: Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. - -`-fixed_file`: Path to fixed vertices constraint file - -`-community_file`: Path to `community` attributes file to guide the partitioning process. - -`-group_file`: Path to `stay together` attributes file. - -`-solution_file`: Path to solution file. - -`-net_timing_factor`: Hyperedge timing weight factor (default 1.0, float). - -`-path_timing_factor`: Cutting critical timing path weight factor (default 1.0, float). - -`-path_snaking_factor`: Snaking a critical path weight factor (default 1.0, float). - -`-timing_exp_factor`: Timing exponential factor for normalized slack (default 1.0, float). - -`-extra_delay`: Extra delay introduced by a cut (default 1e-9, float). - -`-guardband_flag`: Enable timing guardband option (default false, bool). - -`-e_wt_factors`: Hyperedge weight factor. - -`-v_wt_factors`: Vertex weight factor. - -`-placement_wt_factors`: Placement weight factor. - -`-thr_coarsen_hyperedge_size_skip`: Threshold for ignoring large hyperedge. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. - -`-thr_coarsen_vertices`: Number of vertices of coarsest hypergraph. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. - -`-thr_coarsen_hyperedges`: Number of vertices of coarsest hypergraph. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. - -`-coarsening_ratio`: Coarsening ratio of two adjacent hypergraphs. The default value is `1.5`, and the allowed values are floats. - -`-max_coarsen_iters`: Number of iterations. The default value is `30`, and the allowed values are integers `[0, MAX_INT]`. - -`-adj_diff_ratio`: Minimum ratio difference of two adjacent hypergraphs. The default value is `0.0001`, and the allowed values are floats. - -`-min_num_vertices_each_part`: Minimum number of vertices in each partition. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. - -`-num_initial_solutions`: Number of initial solutions. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. - -`-num_best_initial_solutions`: Number of top initial solutions to filter out. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. - -`-refiner_iters`: Refinement iterations. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. - -`-max_moves`: The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. - -`-early_stop_ratio`: Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exists the current FM pass. The intention behind this being that most of the gains are achieved by the first few FM moves. The default value is `0.5`, and the allowed values are floats. - -`-total_corking_passes`: Maximum level of traversing the buckets to solve the "corking effect". The default value is `25`, and the allowed values are integers `[0, MAX_INT]`. - -`-v_cycle_flag`: Disables v-cycle is used to refine partitions. The default value is `true`, and the allowed values are booleans. - -`-max_num_vcycle`: Maximum number of vcycles. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-num_coarsen_solutions`: Number of coarsening solutions with different randoms seed. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. - -`-num_vertices_threshold_ilp`: Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. - -`-global_net_threshold`: If the net is larger than this, it will be ignored by TritonPart. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/triton_part_hypergraph.md b/docs/manpages/md/man2/triton_part_hypergraph.md deleted file mode 100644 index f948facc257..00000000000 --- a/docs/manpages/md/man2/triton_part_hypergraph.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: triton_part_hypergraph(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -triton_part_hypergraph - triton part hypergraph - -# SYNOPSIS - -triton_part_hypergraph - -hypergraph_file hypergraph_file - -num_parts num_parts - -balance_constraint balance_constraint - [-base_balance base_balance] - [-seed seed] - [-vertex_dimension vertex_dimension] - [-hyperedge_dimension hyperedge_dimension] - [-placement_dimension placement_dimension] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-placement_file placement_file] - [-e_wt_factors e_wt_factors] - [-v_wt_factors ] - [-placement_wt_factors ] - [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] - [-thr_coarsen_vertices thr_coarsen_vertices] - [-thr_coarsen_hyperedges thr_coarsen_hyperedges] - [-coarsening_ratio coarsening_ratio] - [-max_coarsen_iters max_coarsen_iters] - [-adj_diff_ratio adj_diff_ratio] - [-min_num_vertices_each_part min_num_vertices_each_part] - [-num_initial_solutions num_initial_solutions] - [-num_best_initial_solutions num_best_initial_solutions] - [-refiner_iters refiner_iters] - [-max_moves max_moves] - [-early_stop_ratio early_stop_ratio] - [-total_corking_passes total_corking_passes] - [-v_cycle_flag v_cycle_flag ] - [-max_num_vcycle max_num_vcycle] - [-num_coarsen_solutions num_coarsen_solutions] - [-num_vertices_threshold_ilp num_vertices_threshold_ilp] - [-global_net_threshold global_net_threshold] - - -# DESCRIPTION - -This command performs hypergraph netlist partitioning. - -# OPTIONS - -`-num_parts`: Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. - -`-balance_constraint`: Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. - -`-base_balance`: Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. - -`-seed`: Random seed. The default value is `0`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. - -`-vertex_dimension`: Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-hyperedge_dimension`: Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. - -`-placement_dimension`: Number of dimensions for canvas, if placement information is provided. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. - -`-hypergraph_file`: Path to hypergraph file. - -`-fixed_file`: Path to fixed vertices constraint file. - -`-community_file`: Path to `community` attributes file to guide the partitioning process. - -`-group_file`: Path to `stay together` attributes file. - -`-placement_file`: Placement information file, each line corresponds to a group fixed vertices, community and placement attributes following the [hMETIS](https://course.ece.cmu.edu/~ee760/760docs/hMetisManual.pdf) format. - -`-e_wt_factors`: Hyperedge weight factor. - -`-v_wt_factors`: Vertex weight factors. - -`-placement_wt_factors`: Placement weight factors. - -`-thr_coarsen_hyperedge_size_skip`: Threshold for ignoring large hyperedge (default 200, integer). - -`-thr_coarsen_vertices`: Number of vertices of coarsest hypergraph (default 10, integer). - -`-thr_coarsen_hyperedges`: Number of vertices of coarsest hypergraph (default 50, integer). - -`-coarsening_ratio`: Coarsening ratio of two adjacent hypergraphs (default 1.6, float). - -`-max_coarsen_iters`: Number of iterations (default 30, integer). - -`-adj_diff_ratio`: Minimum difference of two adjacent hypergraphs (default 0.0001, float). - -`-min_num_vertices_each_part`: Minimum number of vertices in each partition (default 4, integer). - -`-num_initial_solutions`: Number of initial solutions (default 50, integer). - -`-num_best_initial_solutions`: Number of top initial solutions to filter out (default 10, integer). - -`-refiner_iters`: Refinement iterations (default 10, integer). - -`-max_moves`: The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement (default 60, integer). - -`-early_stop_ratio`: Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exits the current FM pass. The intention behind this is that most of the gains are achieved by the first few FM moves. (default 0.5, float). - -`-total_corking_passes`: Maximum level of traversing the buckets to solve the "corking effect" (default 25, integer). - -`-v_cycle_flag`: Disables v-cycle is used to refine partitions (default true, bool). - -`-max_num_vcycle`: Maximum number of `vcycles` (default 1, integer). - -`-num_coarsen_solutions`: Number of coarsening solutions with different randoms seed (default 3, integer). - -`-num_vertices_threshold_ilp`: Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning.(default 50, integer). - -`-global_net_threshold`: If the net is larger than this, it will be ignored by TritonPart (default 1000, integer). - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/use_interface_cell.md b/docs/manpages/md/man2/use_interface_cell.md deleted file mode 100644 index a50a13c4e49..00000000000 --- a/docs/manpages/md/man2/use_interface_cell.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: use_interface_cell(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -use_interface_cell - use interface cell - -# SYNOPSIS - -use_interface_cell - [-domain domain] - [-strategy strategy] - [-lib_cells lib_cells] - - -# DESCRIPTION - -This command sets the interface cell. - -# OPTIONS - -`-domain`: Power domain name. - -`-strategy`: Isolation strategy name. - -`-lib_cells`: List of lib cells that could be used. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/write_partition_verilog.md b/docs/manpages/md/man2/write_partition_verilog.md deleted file mode 100644 index 766d7f89600..00000000000 --- a/docs/manpages/md/man2/write_partition_verilog.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: write_partition_verilog(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -write_partition_verilog - write partition verilog - -# SYNOPSIS - -write_partition_verilog - [-port_prefix prefix] - [-module_suffix suffix] - [file] - - -# DESCRIPTION - -This command writes the partition result to verilog. - -# OPTIONS - -`-port_prefix`: Port name prefix. - -`-module_suffix`: Module name suffix. - -`file`: Filename to write parition verilog to. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/md/man2/write_pin_placement.md b/docs/manpages/md/man2/write_pin_placement.md deleted file mode 100644 index 71cae97aad1..00000000000 --- a/docs/manpages/md/man2/write_pin_placement.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: write_pin_placement(2) -author: Jack Luar (TODO@TODO.com) -date: 24/01/14 ---- - -# NAME - -write_pin_placement - write pin placement - -# SYNOPSIS - -write_pin_placement - file_name - - -# DESCRIPTION - -The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: - -# OPTIONS - -`file_name`: The name of the file with the pin placement. - -`Command Name`: Description - -`parse_edge`: Parse edge (top/bottom/left/right). - -`parse_direction`: Parse direction. - -`parse_excludes_arg`: Parse excluded arguments. - -`parse_group_pins_arg`: Parse group pins arguments. - -`parse_layer_name`: Parse layer name. - -`parse_pin_names`: Parse pin names. - -`get_edge_extreme`: Get extremes of edge. - -`exclude_intervals`: Set exclude interval. - -`add_pins_to_constraint`: Add pins to constrained region. - -`add_pins_to_top_layer`: Add pins to top layer. - -# ARGUMENTS - -This command has no arguments. - -# EXAMPLES - -# SEE ALSO - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index 3f41c0efee8..6a8fd054812 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -10,17 +10,19 @@ # list of edited docs SRC_DIR = "./md/man2" -# problematic: gpl, grt, gui, ifp, mpl2, pdn, psm -# psm: need to handle the table wrt the #### Options, not all tables. +# problematic: gui, rcx # also you need to change the ### FUNCTION_NAME parsing. Sometimes the # function name could be something weird like `diff_spef` or `pdngen` # so it would be better to have a more informative header for the RTD docs. -# rmp: many level 3 headers +# TODO: New function name parsing. Instead of parsing level3 header. +# parse the func_name from the tcl itself. Then the level3 header can be used to +# be the description of the function. E.g. `func_name - Useful Function Description` in the roff. # sta: documentation is hosted elsewhere. (not currently in RTD also.) # tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ - "tap", "upf", "drt"] -#tools = ["drt"] + "tap", "upf", "drt", "gpl", "grt", "ifp", "mpl2", "pdn", "psm",\ + "rmp", "rcx"] +#tools = ["rcx"] docs = [f"{SRC_DIR}/{tool}.txt" for tool in tools] # identify key section and stored in ManPage class. @@ -125,7 +127,7 @@ def extract_headers(text, level = 1): pattern = r'^#{%d}\s+(.*)$' % level headers = re.findall(pattern, text, flags=re.MULTILINE) # TODO: Handle developer commands - if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") + #if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") return headers def extract_description(text): @@ -155,13 +157,15 @@ def extract_arguments(text): first = [rf'### ({level3[i]})(.*?)### ({level3[i+1]})' for i in range(len(level3) - 1)] # find the next closest level2 header to the last level3 header. - closest_level2 = [text.find(x) - text.find(level3[-1]) for x in level2] + closest_level2 = [text.find(f"## {x}") - text.find(f"### {level3[-1]}") for x in level2] closest_level2_idx = [idx for idx, x in enumerate(closest_level2) if x > 0][0] + # This will disambiguate cases where different level headers share the same name. second = [rf"### ({level3[-1]})(.*?)## ({level2[closest_level2_idx]})"] final_options, final_args = [], [] for idx, regex in enumerate(first + second): match = re.findall(regex, text, flags = re.DOTALL) + #print(regex) # get text until the next header a = match[0][1] a = a[a.find("#"):] @@ -221,6 +225,12 @@ def parse_switch(text): # arguments func_options, func_args = extract_arguments(text) + #print(f"Names: {len(func_names)}") + #print(f"Desc: {len(func_descs)}") + #print(f"Syn: {len(func_synopsis)}") + #print(f"Options: {len(func_options)}") + #print(f"Args: {len(func_args)}") + for func_id in range(len(func_synopsis)): manpage = ManPage() manpage.name = func_names[func_id] From b98564fffdad11237447ef30236aa3f0513d63e5 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:46:32 +0000 Subject: [PATCH 25/88] 27 of 28 tools done. gui handling by converting colons to underscore Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/manpages/.gitignore | 3 + docs/manpages/md/man2/gui.txt | 364 ++++++++++++++---------- docs/manpages/scripts/md_roff_compat.py | 8 +- src/utl/src/Utl.tcl | 5 +- 4 files changed, 223 insertions(+), 157 deletions(-) diff --git a/docs/manpages/.gitignore b/docs/manpages/.gitignore index 9e00e1e93c6..39777356896 100644 --- a/docs/manpages/.gitignore +++ b/docs/manpages/.gitignore @@ -2,3 +2,6 @@ test/results # dont save intermediate results md/man2/*md +html +man +cat diff --git a/docs/manpages/md/man2/gui.txt b/docs/manpages/md/man2/gui.txt index 1a3456a068a..55ed81b8319 100644 --- a/docs/manpages/md/man2/gui.txt +++ b/docs/manpages/md/man2/gui.txt @@ -17,59 +17,79 @@ This command creates toolbar button with name set using the Returns: name of the new button, either ``name`` or ``buttonX``. -To remove the button: - -``` -gui::remove_toolbar_button name +```tcl +create_toolbar_button + [-name name] + -text button_text + -script tcl_script + [-echo] ``` +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `-name` | The name of the button, used when deleting the button. | +| `-text` | The text to put on the button. | +| `-script` | The tcl script to evaluate when the button is pressed. | +| `-echo` | This indicate that the commands in the ``tcl_script`` should be echoed in the log. | + +### gui::Remove Toolbar Button + +To remove toolbar button: + ```tcl -create_toolbar_button [-name name] - -text button_text - -script tcl_script - [-echo] +gui::remove_toolbar_button + name ``` #### Options | Switch Name | Description | | ---- | ---- | -| `button_text` | The text to put on the button. | -| `tcl_script` | The tcl script to evaluate when the button is pressed. | -| `name` | The name of the button, used when deleting the button. | -| `echo` | This indicate that the commands in the ``tcl_script`` should be echoed in the log. | +| `-name` | The name of the button, used when deleting the button. | ### Create Menu Item This command add items to the menubar. Returns: name of the new item, either ``name`` or ``actionX``. -To remove the item: -``` -gui::remove_menu_item name +```tcl +create_menu_item + [-name name] + [-path menu_path] + -text item_text + -script tcl_script + [-shortcut key_shortcut] + [-echo] ``` +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `-name` | (optional) name of the item, used when deleting the item.| +| `-path`| (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu".| +| `-text` | The text to put on the item.| +| `-script` | The tcl script to evaluate when the button is pressed.| +| `-shortcut`| (optional) key shortcut to trigger this item.| +| `-echo` | (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. | + +### gui::Remove Menu Item + +To remove menu item: + ```tcl -create_menu_item [-name name] - [-path menu_path] - -text item_text - -script tcl_script - [-shortcut key_shortcut] - [-echo] +gui::remove_menu_item + name ``` #### Options | Switch Name | Description | | ---- | ---- | -| `item_text` | The text to put on the item.| -| `tcl_script` | The tcl script to evaluate when the button is pressed.| -| `name` | (optional) name of the item, used when deleting the item.| -| `menu_path`| (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu".| -| `key_shortcut`| (optional) key shortcut to trigger this item.| -| `echo`| (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. | - +| `-name` | name of the item, used when deleting the item.| ### Save Image @@ -77,11 +97,12 @@ This command can be both be used when the GUI is active and not active to save a screenshot with various options. ```tcl -save_image [-resolution microns_per_pixel] - [-area {x0 y0 x1 y1}] - [-width width] - [-display_option {option value}] - filename +save_image + [-resolution microns_per_pixel] + [-area {x0 y0 x1 y1}] + [-width width] + [-display_option {option value}] + filename ``` #### Options @@ -89,11 +110,10 @@ save_image [-resolution microns_per_pixel] | Switch Name | Description | | ---- | ---- | | `filename` | path to save the image to. | -| `x0, y0` | first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block.| -| `x1, y1` | second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block.| -| `microns_per_pixel`| resolution in microns per pixel to use when saving the image, default will match what the GUI has selected.| -| `width`| width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution``.| -| `option`| specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}``.| +| `-area` | x0, y0 - first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block. x1, y1 - second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block.| +| `-resolution`| resolution in microns per pixel to use when saving the image, default will match what the GUI has selected.| +| `-width`| width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution``.| +| `-display_option`| specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}``.| ### Save Clocktree Image @@ -101,11 +121,12 @@ This command saves the screenshot of clocktree given options to `filename`. ```tcl -save_clocktree_image filename - -clock clock_name - [-width width] - [-height height] - [-corner corner] +save_clocktree_image + filename + -clock clock_name + [-width width] + [-height height] + [-corner corner] ``` #### Options @@ -124,31 +145,33 @@ This command selects object based on options. Returns: number of objects selected. ```tcl -select -type object_type - [-name glob_pattern] - [-filter attribute=value] - [-case_insensitive] - [-highlight group] +select + -type object_type + [-name glob_pattern] + [-filter attribute=value] + [-case_insensitive] + [-highlight group] ``` #### Options | Switch Name | Description | | ---- | ---- | -|`object_type`| name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations.| -|`glob_pattern`| (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive.| -|`attribute=value`| (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins).| -|`group`| (optional) add the selection to the specific highlighting group. Values can be 0 to 7. | +|`-type`| name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations.| +|`-name`| (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive.| +|`-filter`| (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins).| +|`-highlight`| (optional) add the selection to the specific highlighting group. Values can be 0 to 7. | ### Display Timing Cone This command displays timing cones for a pin given options. ```tcl -display_timing_cone pin - [-fanin] - [-fanout] - [-off] +display_timing_cone + pin + [-fanin] + [-fanout] + [-off] ``` #### Options @@ -156,18 +179,19 @@ display_timing_cone pin | Switch Name | Description | | ---- | ---- | |`pin` | name of the instance or block pin. | -|`fanin`| (optional) display the fanin timing cone. | -|`fanout`| (optional) display the fanout timing cone. | -|`off`| (optional) remove the timing cone. | +|`-fanin`| (optional) display the fanin timing cone. | +|`-fanout`| (optional) display the fanout timing cone. | +|`-off`| (optional) remove the timing cone. | ### Focus Net This command limits the drawing to specified net. ```tcl -focus_net net - [-remove] - [-clear] +focus_net + net + [-remove] + [-clear] ``` #### Options @@ -175,19 +199,20 @@ focus_net net | Switch Name | Description | | ---- | ---- | | `pin` | name of the net. | -| `remove` | (optional) removes the net from from the focus. | -| `clear` | (optional) clears all nets from focus. | +| `-remove` | (optional) removes the net from from the focus. | +| `-clear` | (optional) clears all nets from focus. | ## TCL functions -### Enabled +### gui::Enabled Determine is the GUI is active: ```tcl gui::enabled ``` -### Design Created + +### gui::Design Created Announce to the GUI that a design was loaded (note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): @@ -196,22 +221,29 @@ Announce to the GUI that a design was loaded gui::design_created ``` -### Load DRC +### gui::Load DRC To load the results of a DRC report: ```tcl -gui::load_drc filename +gui::load_drc + filename ``` -### Show +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `filename` | Filename for DRC report. | + +### gui::Show To open the GUI from the command-line (this command does not return until the GUI is closed): ```tcl gui::show - [script] - [interactive] + [script] + [interactive] ``` #### Options @@ -219,9 +251,9 @@ gui::show | Switch Name | Description | | ---- | ---- | | `script` | TCL script to evaluate in the GUI. | -| `interactive` | indicates if true the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal.| +| `interactive` | Boolean if true, the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal.| -### Hide +### gui::Hide To close the GUI and return to the command-line: @@ -229,7 +261,7 @@ To close the GUI and return to the command-line: gui::hide ``` -### Fit +### gui::Fit To fit the whole layout in the window: @@ -237,74 +269,73 @@ To fit the whole layout in the window: gui::fit ``` -### Zoom To +### gui::Zoom To To zoom in our out to a specific region: ```tcl gui::zoom_to - [x0 y0 x1 y1] + [x0 y0 x1 y1] ``` #### Options | Switch Name | Description | | ---- | ---- | -| `x0, y0`| first corner of the layout area in microns.| -| `x1, y1`| second corner of the layout area in microns.| +| `x0, y0, x1, y1`| first and second corner of the layout area in microns.| -### Zoom In +### gui::Zoom In To zoom in the layout: ```tcl gui::zoom_in - [x y] + [x y] ``` #### Options | Switch Name | Description | | ---- | ---- | -| `x, y` | new center of layout.| +| `x, y` | new center of layout in microns.| -### Zoom Out +### gui::Zoom Out To zoom out the layout: ```tcl gui::zoom_out - [x y] + [x y] ``` #### Options | Switch Name | Description | | ---- | ---- | -| `x, y` | new center of layout.| +| `x, y` | new center of layout in microns.| -### Center At +### gui::Center At To move the layout to new area: ```tcl gui::center_at - [x y] + [x y] ``` #### Options | Switch Name | Description | | ---- | ---- | -| `x, y` | new center of layout.| +| `x, y` | new center of layout in microns.| -### Set Resolution +### gui::Set Resolution To change the resolution to a specific value: ```tcl gui::set_resolution - [resolution] + [resolution] ``` #### Options @@ -313,13 +344,13 @@ gui::set_resolution | ---- | ---- | | `resolution` | database units per pixel. | -### Selection Add Net +### gui::Selection Add Net To add a single net to the selected items: ```tcl gui::selection_add_net - name + name ``` #### Options @@ -328,13 +359,13 @@ gui::selection_add_net | ---- | ---- | | `name` | name of the net to add.| -### Selection Add Nets +### gui::Selection Add Nets To add several nets to the selected items using a regex: ```tcl gui::selection_add_nets - name_regex + name_regex ``` #### Options @@ -343,13 +374,13 @@ gui::selection_add_nets | ---- | ---- | | `name_regex`| regular expression of the net names to add.| -### Selection Add Instance +### gui::Selection Add Inst To add a single instance to the selected items: ```tcl gui::selection_add_inst - name + name ``` #### Options @@ -358,13 +389,13 @@ gui::selection_add_inst | ---- | ---- | | `name` | name of the instance to add. | -### Selection Add Instances +### gui::Selection Add Insts To add several instances to the selected items using a regex: ```tcl gui::selection_add_insts - name_regex + name_regex ``` #### Options @@ -373,27 +404,39 @@ gui::selection_add_insts | ---- | ---- | | `name_regex` | regular expression of the instance names to add. | -### Select At +### gui::Select At To add items at a specific point or in an area: -```tcl +Example usage: +``` gui::select_at x y gui::select_at x y append gui::select_at x0 y0 x1 y1 gui::select_at x0 y0 x1 y1 append ``` +```tcl +gui::select_at + x0 y0 x1 y1 + [append] + +Or + +gui::select_at + x y + [append] +``` + #### Options | Switch Name | Description | | ---- | ---- | | `x, y` | point in the layout area in microns. | -| `x0, y0`| first corner of the layout area in microns. | -| `x1, y1`| second corner of the layout area in microns. | +| `x0, y0, x1, y1`| first and second corner of the layout area in microns. | | `append`| if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. | -### Select Next +### gui::Select Next To navigate through multiple selected items: Returns: current index of the selected item. @@ -402,7 +445,7 @@ Returns: current index of the selected item. gui::select_next ``` -### Select Previous +### gui::Select Previous To navigate through multiple selected items: Returns: current index of the selected item. @@ -411,7 +454,7 @@ Returns: current index of the selected item. gui::select_previous ``` -### Clear Selections +### gui::Clear Selections To clear the current set of selected items: @@ -419,13 +462,13 @@ To clear the current set of selected items: gui::clear_selections ``` -### Get Selection Property +### gui::Get Selection Property To get the properties for the current selection in the Inspector: ```tcl gui::get_selection_property - name + name ``` #### Options @@ -434,13 +477,13 @@ gui::get_selection_property | ---- | ---- | | `name` | name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. | -### Selection Animate +### gui::Selection Animate To animate the current selection in the Inspector: ```tcl gui::selection_animate - [repeat] + [repeat] ``` #### Options @@ -449,14 +492,14 @@ gui::selection_animate | ---- | ---- | | `repeat` | indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely.| -### Highlight net +### gui::Highlight net To highlight a net: ```tcl gui::highlight_net - name - [highlight_group] + name + [highlight_group] ``` #### Options @@ -466,14 +509,14 @@ gui::highlight_net | `name` | name of the net to highlight.| | `highlight_group` | group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. | -### Highlight Instance +### gui::Highlight Inst To highlight an instance: ```tcl gui::highlight_inst - name - [highlight_group] + name + [highlight_group] ``` #### Options @@ -483,13 +526,13 @@ gui::highlight_inst | `name` | name of the instance to highlight. | | `highlight_group` | group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. | -### Clear Highlights +### gui::Clear Highlights To clear the highlight groups: ```tcl gui::clear_highlights - [highlight_group] + [highlight_group] ``` #### Options @@ -498,7 +541,7 @@ gui::clear_highlights | ---- | ---- | | `highlight_group` | group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. | -### Add Ruler +### gui::Add Ruler To add a ruler to the layout: @@ -511,29 +554,28 @@ Returns: name of the newly created ruler. ```tcl gui::add_ruler - x0 y0 x1 y1 - [label] - [name] - [euclidian] + x0 y0 x1 y1 + [label] + [name] + [euclidian] ``` #### Options | Switch Name | Description | | ---- | ---- | -| `x0, y0` | first end point of the ruler in microns. | -| `x1, y1` | second end point of the ruler in microns. | +| `x0, y0, x1, y1` | first and second end point of the ruler in microns. | | `label` | text label for the ruler. | | `name` | name of the ruler. | | `euclidian` | ``1`` for euclidian ruler, and ``0`` for regular ruler. | -### Delete Ruler +### gui::Delete Ruler To remove a single ruler: ```tcl gui::delete_ruler - name + name ``` #### Options @@ -542,7 +584,7 @@ gui::delete_ruler | ---- | ---- | | `name` | name of the ruler. | -### Clear Rulers +### gui::Clear Rulers To remove all the rulers: @@ -550,7 +592,7 @@ To remove all the rulers: gui::clear_rulers ``` -### Set Heatmap +### gui::Set Heatmap To control the settings in the heat maps: @@ -564,9 +606,9 @@ These options can also be modified in the GUI by double-clicking the underlined ```tcl gui::set_heatmap - name - [option] - [value] + name + [option] + [value] ``` #### Options @@ -577,14 +619,14 @@ gui::set_heatmap | `option` | is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. | | `value` | is the new value for the specified option. This is not used when rebuilding map. | -### Dump Heatmap Name +### gui::Dump Heatmap Name To save the raw data from the heat maps ins a comma separated value (CSV) format: ```tcl gui::dump_heatmap - name - filename + name + filename ``` #### Options @@ -594,15 +636,15 @@ gui::dump_heatmap |`name` | is the name of the heatmap. | |`filename` | path to the file to write the data to. | -### Set Display Controls +### gui::Set Display Controls Control the visible and selected elements in the layout: ```tcl gui::set_display_controls - name - [display_type] - [value] + name + [display_type] + [value] ``` #### Options @@ -613,14 +655,14 @@ gui::set_display_controls | `display_type` | is either ``visible`` or ``selectable`` | | `value` |is either ``true`` or ``false`` | -### Check Display Controls +### gui::Check Display Controls To check the visibility or selectability of elements in the layout: ```tcl gui::check_display_controls - name - display_type + name + display_type ``` #### Options @@ -630,24 +672,32 @@ gui::check_display_controls | `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | | `display_type` | is either ``visible`` or ``selectable`` | -### Save Display Controls +### gui::Save Display Controls -When performing a batch operation changing the display controls settings, the following commands can be used to save the current state of the display controls and restore them at the end. +When performing a batch operation changing the display controls settings, +the following command can be used to save the current state of the display controls. ```tcl gui::save_display_controls +``` + +### gui::Restore Display Controls + +This command restores display controls. + +```tcl gui::restore_display_controls ``` -### Input Dialog +### gui::Input Dialog To request user input via the GUI: Returns: a string with the input, or empty string if canceled. ```tcl gui::input_dialog - title - question + title + question ``` #### Options @@ -657,13 +707,13 @@ gui::input_dialog | `title` | is the title of the input message box. | | `question` | is the text for the message box. | -### Pause +### gui::Pause Pause the execution of the script: ```tcl gui::pause - [timeout] + [timeout] ``` #### Options @@ -672,15 +722,28 @@ gui::pause | ---- | ---- | | `timeout` | is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button.| -### Show widget +### gui::Show widget -To open or close a specific layout widget: +To open a specific layout widget: ```tcl gui::show_widget name +``` + +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | of the widget. For example, the display controls would be "Display Control". | + +### gui::Hide widget + +To close a specific layout widget: + +```tcl gui::hide_widget - name + name ``` #### Options @@ -689,6 +752,7 @@ gui::hide_widget | ---- | ---- | | `name` | of the widget. For example, the display controls would be "Display Control". | + ## License BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/manpages/scripts/md_roff_compat.py index 6a8fd054812..a1ba2264726 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/manpages/scripts/md_roff_compat.py @@ -10,7 +10,6 @@ # list of edited docs SRC_DIR = "./md/man2" -# problematic: gui, rcx # also you need to change the ### FUNCTION_NAME parsing. Sometimes the # function name could be something weird like `diff_spef` or `pdngen` # so it would be better to have a more informative header for the RTD docs. @@ -18,11 +17,11 @@ # parse the func_name from the tcl itself. Then the level3 header can be used to # be the description of the function. E.g. `func_name - Useful Function Description` in the roff. # sta: documentation is hosted elsewhere. (not currently in RTD also.) +# odb: documentation is hosted on doxygen. # tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ "tap", "upf", "drt", "gpl", "grt", "ifp", "mpl2", "pdn", "psm",\ - "rmp", "rcx"] -#tools = ["rcx"] + "rmp", "rcx", "gui"] docs = [f"{SRC_DIR}/{tool}.txt" for tool in tools] # identify key section and stored in ManPage class. @@ -212,9 +211,10 @@ def parse_switch(text): for doc in docs: text = open(doc).read() - # function names + # function names (and convert gui:: to gui_) func_names = extract_headers(text, 3) func_names = ["_".join(s.lower().split()) for s in func_names] + func_names = [s.replace("::", "_") for s in func_names] # function description func_descs = extract_description(text) diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index c350faaab1f..8c8f0513a10 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -56,10 +56,9 @@ proc man { name } { foreach man_section $man_sections { set length [string length $man_section] # Get suffix for man section - #set man_suffix [string range $man_section [expr {$length - 1}] $length] set man_suffix "md" - - set name1 $name + # Replace all "::" with "_" + set name1 [string map { "::" "_" } $name] append name1 ".$man_suffix" set man_file [file join $man_section $name1] if { [file exists $man_file] } { From 8b73656a575ee9aceffb50c224d745044c9b3452 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 16 Jan 2024 18:05:50 +0000 Subject: [PATCH 26/88] added Matt's fixes to allow Utl.tcl to be seen during OR compilation Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/utl/CMakeLists.txt | 24 ++++-------------------- src/utl/src/MakeLogger.cpp | 8 +++++++- src/utl/src/Utl.i | 6 ------ 3 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 src/utl/src/Utl.i diff --git a/src/utl/CMakeLists.txt b/src/utl/CMakeLists.txt index 18106c7cb5f..76a4dd0d7f9 100644 --- a/src/utl/CMakeLists.txt +++ b/src/utl/CMakeLists.txt @@ -40,13 +40,8 @@ find_package(Boost 1.78 REQUIRED) swig_lib(NAME utl NAMESPACE utl I_FILE src/Logger.i - SWIG_INCLUDES ${PROJECT_SOURCE_DIR}/src -) - -swig_lib(NAME utl_funcs - NAMESPACE utl - I_FILE src/Utl.i SCRIPTS src/Utl.tcl + SWIG_INCLUDES ${PROJECT_SOURCE_DIR}/src ) if (Python3_FOUND AND BUILD_PYTHON) @@ -93,18 +88,6 @@ target_link_libraries(utl_lib spdlog::spdlog ) -target_include_directories(utl_funcs - PUBLIC - include - PRIVATE - src -) - -target_link_libraries(utl_funcs - PUBLIC - spdlog::spdlog -) - target_sources(utl PRIVATE src/LoggerCommon.cpp @@ -127,7 +110,8 @@ target_compile_definitions(utl target_link_libraries(utl PUBLIC utl_lib - utl_funcs + PRIVATE + OpenSTA ) ############################################################ @@ -149,4 +133,4 @@ if(ENABLE_TESTS) target_link_libraries(CFileUtilsTest utl ) -endif() +endif() \ No newline at end of file diff --git a/src/utl/src/MakeLogger.cpp b/src/utl/src/MakeLogger.cpp index 942ee7999d9..625fd2fa4ba 100644 --- a/src/utl/src/MakeLogger.cpp +++ b/src/utl/src/MakeLogger.cpp @@ -37,8 +37,13 @@ #include +#include "sta/StaMain.hh" #include "utl/Logger.h" +namespace sta{ + extern const char* utl_tcl_inits[]; +} + extern "C" { extern int Utl_Init(Tcl_Interp* interp); } @@ -56,6 +61,7 @@ void initLogger(Logger* logger, Tcl_Interp* tcl_interp) { // Define swig TCL commands. Utl_Init(tcl_interp); + sta::evalTclInit(tcl_interp, sta::utl_tcl_inits); } -} // namespace ord +} // namespace ord \ No newline at end of file diff --git a/src/utl/src/Utl.i b/src/utl/src/Utl.i deleted file mode 100644 index eb9b8f47831..00000000000 --- a/src/utl/src/Utl.i +++ /dev/null @@ -1,6 +0,0 @@ -%module utl - -%{ - #include -%} - From 3c3a8639f156af9237882806eb7d1226ae02b4bb Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:10:42 +0000 Subject: [PATCH 27/88] Change docs/manpages -> docs/man, and standardise suffixes to md (plus Makefile/md_roff_compat). Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/{manpages => man}/.gitignore | 0 docs/{manpages => man}/README.md | 3 +- docs/{manpages => man}/md/man1/openroad.md | 0 docs/{manpages => man}/md/man3/aaaa.md | 0 .../scripts/link_readmes.sh} | 2 +- docs/{manpages => man}/scripts/main.tcl | 0 .../scripts/md_roff_compat.py | 2 +- docs/{manpages => man}/test/README.md | 0 docs/{manpages => man}/test/func.ok | 0 docs/{manpages => man}/test/func.py | 0 docs/{manpages => man}/test/helpers.py | 0 docs/{manpages => man}/test/helpers.tcl | 0 docs/{manpages => man}/test/main.tcl | 0 docs/{manpages => man}/test/ppl.funcok | 0 docs/{manpages => man}/test/regression | 0 .../test/regression_tests.tcl | 0 .../{manpages => man}/test/test_man_flags.tcl | 0 .../test/test_man_noflags.ok | 0 .../test/test_man_noflags.tcl | 0 docs/manpages/Makefile | 107 --- docs/manpages/md/man2/ant.txt | 80 -- docs/manpages/md/man2/cts.txt | 158 ---- docs/manpages/md/man2/dft.txt | 112 --- docs/manpages/md/man2/dpl.txt | 178 ---- docs/manpages/md/man2/drt.txt | 243 ------ docs/manpages/md/man2/fin.txt | 94 --- docs/manpages/md/man2/gpl.txt | 220 ----- docs/manpages/md/man2/grt.txt | 492 ------------ docs/manpages/md/man2/gui.txt | 758 ------------------ docs/manpages/md/man2/ifp.txt | 140 ---- docs/manpages/md/man2/mpl.txt | 87 -- docs/manpages/md/man2/mpl2.txt | 157 ---- docs/manpages/md/man2/odb.txt | 169 ---- docs/manpages/md/man2/pad.txt | 412 ---------- docs/manpages/md/man2/par.txt | 608 -------------- docs/manpages/md/man2/pdn.txt | 423 ---------- docs/manpages/md/man2/ppl.txt | 321 -------- docs/manpages/md/man2/psm.txt | 157 ---- docs/manpages/md/man2/rcx.txt | 299 ------- docs/manpages/md/man2/rmp.txt | 84 -- docs/manpages/md/man2/rsz.txt | 363 --------- docs/manpages/md/man2/sta.txt | 239 ------ docs/manpages/md/man2/tap.txt | 201 ----- docs/manpages/md/man2/upf.txt | 200 ----- docs/manpages/scripts/Utl.tcl | 111 --- src/OpenRoad.tcl | 3 - src/ant/README.md | 14 +- src/cts/README.md | 11 +- src/dft/README.md | 79 +- src/dpl/README.md | 13 +- src/drt/README.md | 12 +- src/fin/README.md | 2 + src/gpl/README.md | 186 +++-- src/grt/README.md | 127 +-- src/gui/README.md | 758 ++++++++++++------ src/ifp/README.md | 73 +- src/mpl/README.md | 19 +- src/mpl2/README.md | 16 +- src/pad/README.md | 179 +++-- src/par/README.md | 545 ++++++++++++- src/pdn/README.md | 543 ++++++------- src/ppl/README.md | 31 +- src/psm/README.md | 17 +- src/rcx/README.md | 14 +- src/rmp/README.md | 22 +- src/rsz/README.md | 22 +- src/tap/README.md | 37 +- src/upf/README.md | 23 +- 68 files changed, 1790 insertions(+), 7376 deletions(-) rename docs/{manpages => man}/.gitignore (100%) rename docs/{manpages => man}/README.md (94%) rename docs/{manpages => man}/md/man1/openroad.md (100%) rename docs/{manpages => man}/md/man3/aaaa.md (100%) rename docs/{manpages/scripts/copy_raw.sh => man/scripts/link_readmes.sh} (92%) rename docs/{manpages => man}/scripts/main.tcl (100%) rename docs/{manpages => man}/scripts/md_roff_compat.py (99%) rename docs/{manpages => man}/test/README.md (100%) rename docs/{manpages => man}/test/func.ok (100%) rename docs/{manpages => man}/test/func.py (100%) rename docs/{manpages => man}/test/helpers.py (100%) rename docs/{manpages => man}/test/helpers.tcl (100%) rename docs/{manpages => man}/test/main.tcl (100%) rename docs/{manpages => man}/test/ppl.funcok (100%) rename docs/{manpages => man}/test/regression (100%) rename docs/{manpages => man}/test/regression_tests.tcl (100%) rename docs/{manpages => man}/test/test_man_flags.tcl (100%) rename docs/{manpages => man}/test/test_man_noflags.ok (100%) rename docs/{manpages => man}/test/test_man_noflags.tcl (100%) delete mode 100644 docs/manpages/Makefile delete mode 100644 docs/manpages/md/man2/ant.txt delete mode 100644 docs/manpages/md/man2/cts.txt delete mode 100644 docs/manpages/md/man2/dft.txt delete mode 100644 docs/manpages/md/man2/dpl.txt delete mode 100644 docs/manpages/md/man2/drt.txt delete mode 100644 docs/manpages/md/man2/fin.txt delete mode 100644 docs/manpages/md/man2/gpl.txt delete mode 100644 docs/manpages/md/man2/grt.txt delete mode 100644 docs/manpages/md/man2/gui.txt delete mode 100644 docs/manpages/md/man2/ifp.txt delete mode 100644 docs/manpages/md/man2/mpl.txt delete mode 100644 docs/manpages/md/man2/mpl2.txt delete mode 100644 docs/manpages/md/man2/odb.txt delete mode 100644 docs/manpages/md/man2/pad.txt delete mode 100644 docs/manpages/md/man2/par.txt delete mode 100644 docs/manpages/md/man2/pdn.txt delete mode 100644 docs/manpages/md/man2/ppl.txt delete mode 100644 docs/manpages/md/man2/psm.txt delete mode 100644 docs/manpages/md/man2/rcx.txt delete mode 100644 docs/manpages/md/man2/rmp.txt delete mode 100644 docs/manpages/md/man2/rsz.txt delete mode 100644 docs/manpages/md/man2/sta.txt delete mode 100644 docs/manpages/md/man2/tap.txt delete mode 100644 docs/manpages/md/man2/upf.txt delete mode 100644 docs/manpages/scripts/Utl.tcl diff --git a/docs/manpages/.gitignore b/docs/man/.gitignore similarity index 100% rename from docs/manpages/.gitignore rename to docs/man/.gitignore diff --git a/docs/manpages/README.md b/docs/man/README.md similarity index 94% rename from docs/manpages/README.md rename to docs/man/README.md index d48e9fdd8eb..a69032e84aa 100644 --- a/docs/manpages/README.md +++ b/docs/man/README.md @@ -28,9 +28,8 @@ source scripts/main.tcl man openroad ``` -- Or the `Tcl` script that outputs raw text. +- Or just within OpenROAD itself. ```tcl -source scripts/Utl.tcl # you will be prompted to enter the RELATIVE path to cat folders. man openroad ``` diff --git a/docs/manpages/md/man1/openroad.md b/docs/man/md/man1/openroad.md similarity index 100% rename from docs/manpages/md/man1/openroad.md rename to docs/man/md/man1/openroad.md diff --git a/docs/manpages/md/man3/aaaa.md b/docs/man/md/man3/aaaa.md similarity index 100% rename from docs/manpages/md/man3/aaaa.md rename to docs/man/md/man3/aaaa.md diff --git a/docs/manpages/scripts/copy_raw.sh b/docs/man/scripts/link_readmes.sh similarity index 92% rename from docs/manpages/scripts/copy_raw.sh rename to docs/man/scripts/link_readmes.sh index ff7fd5f15e8..9dc42fdf53c 100755 --- a/docs/manpages/scripts/copy_raw.sh +++ b/docs/man/scripts/link_readmes.sh @@ -8,7 +8,7 @@ for MODULE_PATH in "$SRC_BASE_PATH"/*; do if [ -d "$MODULE_PATH" ]; then MODULE=$(basename "$MODULE_PATH") SRC_PATH="$SRC_BASE_PATH/$MODULE/README.md" - DEST_PATH="$DEST_BASE_PATH/$MODULE.txt" + DEST_PATH="$DEST_BASE_PATH/$MODULE.md" # Check if README.md exists before copying if [ -e "$SRC_PATH" ]; then diff --git a/docs/manpages/scripts/main.tcl b/docs/man/scripts/main.tcl similarity index 100% rename from docs/manpages/scripts/main.tcl rename to docs/man/scripts/main.tcl diff --git a/docs/manpages/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py similarity index 99% rename from docs/manpages/scripts/md_roff_compat.py rename to docs/man/scripts/md_roff_compat.py index a1ba2264726..9b9e429ae20 100644 --- a/docs/manpages/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -22,7 +22,7 @@ tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ "tap", "upf", "drt", "gpl", "grt", "ifp", "mpl2", "pdn", "psm",\ "rmp", "rcx", "gui"] -docs = [f"{SRC_DIR}/{tool}.txt" for tool in tools] +docs = [f"{SRC_DIR}/{tool}.md" for tool in tools] # identify key section and stored in ManPage class. class ManPage(): diff --git a/docs/manpages/test/README.md b/docs/man/test/README.md similarity index 100% rename from docs/manpages/test/README.md rename to docs/man/test/README.md diff --git a/docs/manpages/test/func.ok b/docs/man/test/func.ok similarity index 100% rename from docs/manpages/test/func.ok rename to docs/man/test/func.ok diff --git a/docs/manpages/test/func.py b/docs/man/test/func.py similarity index 100% rename from docs/manpages/test/func.py rename to docs/man/test/func.py diff --git a/docs/manpages/test/helpers.py b/docs/man/test/helpers.py similarity index 100% rename from docs/manpages/test/helpers.py rename to docs/man/test/helpers.py diff --git a/docs/manpages/test/helpers.tcl b/docs/man/test/helpers.tcl similarity index 100% rename from docs/manpages/test/helpers.tcl rename to docs/man/test/helpers.tcl diff --git a/docs/manpages/test/main.tcl b/docs/man/test/main.tcl similarity index 100% rename from docs/manpages/test/main.tcl rename to docs/man/test/main.tcl diff --git a/docs/manpages/test/ppl.funcok b/docs/man/test/ppl.funcok similarity index 100% rename from docs/manpages/test/ppl.funcok rename to docs/man/test/ppl.funcok diff --git a/docs/manpages/test/regression b/docs/man/test/regression similarity index 100% rename from docs/manpages/test/regression rename to docs/man/test/regression diff --git a/docs/manpages/test/regression_tests.tcl b/docs/man/test/regression_tests.tcl similarity index 100% rename from docs/manpages/test/regression_tests.tcl rename to docs/man/test/regression_tests.tcl diff --git a/docs/manpages/test/test_man_flags.tcl b/docs/man/test/test_man_flags.tcl similarity index 100% rename from docs/manpages/test/test_man_flags.tcl rename to docs/man/test/test_man_flags.tcl diff --git a/docs/manpages/test/test_man_noflags.ok b/docs/man/test/test_man_noflags.ok similarity index 100% rename from docs/manpages/test/test_man_noflags.ok rename to docs/man/test/test_man_noflags.ok diff --git a/docs/manpages/test/test_man_noflags.tcl b/docs/man/test/test_man_noflags.tcl similarity index 100% rename from docs/manpages/test/test_man_noflags.tcl rename to docs/man/test/test_man_noflags.tcl diff --git a/docs/manpages/Makefile b/docs/manpages/Makefile deleted file mode 100644 index 162e3791985..00000000000 --- a/docs/manpages/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# Makefile for generating man pages using pandoc -# Workflow: -# 1) raw md -> pandoc-compatible md (TODO) -# 2) pandoc md -> roff -> cat, html - -# Define variables -PANDOC = pandoc -SRC_DIR = md -MAN_ROOT_DIR = man -HTML_ROOT_DIR = html -CAT_ROOT_DIR = cat -MAN1 = man1 -MAN2 = man2 -MAN3 = man3 - -MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) -SRC1_DIR = $(SRC_DIR)/$(MAN1) -MAN1_FILES = $(wildcard $(SRC1_DIR)/*.md) -MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) -HTML1_DIR = $(HTML_ROOT_DIR)/html1 -HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) -CAT1_DIR = $(CAT_ROOT_DIR)/cat1 -CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) - -MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) -SRC2_DIR = $(SRC_DIR)/$(MAN2) -MAN2_FILES = $(wildcard $(SRC2_DIR)/*.md) -MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) -HTML2_DIR = $(HTML_ROOT_DIR)/html2 -HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) -CAT2_DIR = $(CAT_ROOT_DIR)/cat2 -CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) - -MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) -SRC3_DIR = $(SRC_DIR)/$(MAN3) -MAN3_FILES = $(wildcard $(SRC3_DIR)/*.md) -MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) -HTML3_DIR = $(HTML_ROOT_DIR)/html3 -HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) -CAT3_DIR = $(CAT_ROOT_DIR)/cat3 -CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) - -# Default target -all: doc html cat - -# Target to generate all man pages -doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) - -# Target to generate all html pages -html: $(HTML1_PAGES) $(HTML2_PAGES) $(HTML3_PAGES) - -# Target to generate all cat pages -cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) - @echo $(CAT1_PAGES) - -# Rule to create the man directory -$(MAN1_DIR): - mkdir -p $(MAN1_DIR) -$(MAN2_DIR): - mkdir -p $(MAN2_DIR) -$(MAN3_DIR): - mkdir -p $(MAN3_DIR) -$(HTML1_DIR): - mkdir -p $(HTML1_DIR) -$(HTML2_DIR): - mkdir -p $(HTML2_DIR) -$(HTML3_DIR): - mkdir -p $(HTML3_DIR) -$(CAT1_DIR): - mkdir -p $(CAT1_DIR) -$(CAT2_DIR): - mkdir -p $(CAT2_DIR) -$(CAT3_DIR): - mkdir -p $(CAT3_DIR) - -# Rule to generate a roff file from a corresponding Markdown file -$(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) - $(PANDOC) -s -t man $< -o $@ -$(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) - $(PANDOC) -s -t man $< -o $@ -$(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) - $(PANDOC) -s -t man $< -o $@ - -# Rule to generate a html file from a corresponding roff file -$(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) - $(PANDOC) -s -o html $< -o $@ -$(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) - $(PANDOC) -s -o html $< -o $@ -$(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) - $(PANDOC) -s -o html $< -o $@ - -# Rule to generate a cat file from a corresponding roff file -$(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) - $(PANDOC) -s -o markdown $< -o $@ -$(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) - $(PANDOC) -s -o markdown $< -o $@ -$(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) - $(PANDOC) -s -o markdown $< -o $@ - -# Clean target to remove all generated man pages -clean: - rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) - rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) - rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) - -# Phony targets -.PHONY: all \ No newline at end of file diff --git a/docs/manpages/md/man2/ant.txt b/docs/manpages/md/man2/ant.txt deleted file mode 100644 index 52a50178563..00000000000 --- a/docs/manpages/md/man2/ant.txt +++ /dev/null @@ -1,80 +0,0 @@ -# Antenna Rule Checker - -This tool checks antenna violations and generates a report to indicate -violated nets. See LEF/DEF 5.8 Language Reference, Appendix C, -"Calculating and Fixing Process Antenna Violations" (p.389) -for a [description](https://coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) of antenna violations. - -This is an example of the detailed and simple reports of the antenna checker: - -| | - -Abbreviations Index: - -- `PAR`: Partial Area Ratio -- `CAR`: Cumulative Area Ratio -- `Area`: Gate Area -- `S. Area`: Side Diffusion Area -- `C. Area`: Cumulative Gate Area -- `C. S. Area`: Cumulative Side (Diffusion) Area - -Antenna violations can be repaired after global routing with the `repair_design` command. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Check Antennas - -The `check_antennas` command will check for antenna violations. - -```tcl -check_antennas - [-net net] - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-verbose` | Report all antenna calculations for violating nets. | -| `-net` | Check antennas on the specified net. | - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+antenna+in%3Atitle) -about this tool. - -## Algorithm - -| | | -| --- | --- | -| Antenna Checker Algorithm: WireGraph Example | Step 1: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. | -| | | -| Step 2: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | Step 3: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. | -| | | -| Step 4: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | Step 5: Repeat Steps 2 and 3 for new-found upper-level wires. | -| | | -| Step 6: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | Step 7: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. | -| | -| Step 8: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. | - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/cts.txt b/docs/manpages/md/man2/cts.txt deleted file mode 100644 index e4fd32ce8ce..00000000000 --- a/docs/manpages/md/man2/cts.txt +++ /dev/null @@ -1,158 +0,0 @@ -# Clock Tree Synthesis - -The clock tree synthesis module in OpenROAD (`cts`) is based on TritonCTS -2.0. It is available from the `clock_tree_synthesis` command. TritonCTS 2.0 -performs on-the-fly characterization. Thus, there is no need to generate -characterization data. The on-the-fly characterization feature can be optionally -controlled by parameters specified by the `configure_cts_characterization` -command. Use `set_wire_rc` command to set the clock routing layer. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Configure CTS Characterization - -Configure key CTS characterization parameters, for example maximum slew and capacitance, -as well as the number of steps they will be divided for characterization. - -```tcl -configure_cts_characterization - [-max_slew max_slew] - [-max_cap max_cap] - [-slew_steps slew_steps] - [-cap_steps cap_steps] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-max_slew` | Max slew value (in the current time unit) that the characterization will test. If this parameter is omitted, the code would use max slew value for specified buffer in `buf_list` from liberty file. | -| `-max_cap` | Max capacitance value (in the current capacitance unit) that the characterization will test. If this parameter is omitted, the code would use max cap value for specified buffer in `buf_list` from liberty file. | -| `-slew_steps` | Number of steps that `max_slew` will be divided into for characterization. The default value is `12`, and the allowed values are integers `[0, MAX_INT]`. | -| `-cap_steps` | Number of steps that `max_cap` will be divided into for characterization. The default value is `34`, and the allowed values are integers `[0, MAX_INT]`. | - -### Clock Tree Synthesis - -Perform clock tree synthesis. - -```tcl -clock_tree_synthesis - -buf_list - [-root_buf root_buf] - [-wire_unit wire_unit] - [-clk_nets ] - [-distance_between_buffers] - [-branching_point_buffers_distance] - [-clustering_exponent] - [-clustering_unbalance_ratio] - [-sink_clustering_enable] - [-sink_clustering_size cluster_size] - [-sink_clustering_max_diameter max_diameter] - [-balance_levels] - [-num_static_layers] - [-sink_clustering_buffer] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-buf_list` | Tcl list of master cells (buffers) that will be considered when making the wire segments (e.g. `{BUFXX, BUFYY}`). | -| `-root_buffer` | The master cell of the buffer that serves as root for the clock tree. If this parameter is omitted, the first master cell from `-buf_list` is taken. | -| `-wire_unit` | Minimum unit distance between buffers for a specific wire. If this parameter is omitted, the code gets the value from ten times the height of `-root_buffer`. | -| `-clk_nets` | String containing the names of the clock roots. If this parameter is omitted, `cts` automatically looks for the clock roots automatically. | -| `-distance_between_buffers` | Distance (in microns) between buffers that `cts` should use when creating the tree. When using this parameter, the clock tree algorithm is simplified and only uses a fraction of the segments from the LUT. | -| `-branching_point_buffers_distance` | Distance (in microns) that a branch has to have in order for a buffer to be inserted on a branch end-point. This requires the `-distance_between_buffers` value to be set. | -| `-clustering_exponent` | Value that determines the power used on the difference between sink and means on the CKMeans clustering algorithm. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. | -| `-clustering_unbalance_ratio` | Value determines each cluster's maximum capacity during CKMeans. A value of `0.5` (i.e., 50%) means that each cluster will have exactly half of all sinks for a specific region (half for each branch). The default value is `0.6`, and the allowed values are floats `[0, 1.0]`. | -| `-sink_clustering_enable` | Enables pre-clustering of sinks to create one level of sub-tree before building H-tree. Each cluster is driven by buffer which becomes end point of H-tree structure. | -| `-sink_clustering_size` | Specifies the maximum number of sinks per cluster. The default value is `20`, and the allowed values are integers `[0, MAX_INT]`. | -| `-sink_clustering_max_diameter` | Specifies maximum diameter (in microns) of sink cluster. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-balance_levels` | Attempt to keep a similar number of levels in the clock tree across non-register cells (e.g., clock-gate or inverter). The default value is `False`, and the allowed values are bool. | -| `-clk_nets` | String containing the names of the clock roots. If this parameter is omitted, `cts` looks for the clock roots automatically. | -| `-num_static_layers` | Set the number of static layers. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-sink_clustering_buffer` | Set the sink clustering buffer(s) to be used. | -| `-obstruction_aware` | Enables obstruction-aware buffering such that clock buffers are not placed on top of blockages or hard macros. This option may reduce legalizer displacement, leading to better latency, skew or timing QoR. The default value is `False`, and the allowed values are bool. | -| `-apply_ndr` | Applies 2X spacing non-default rule to all clock nets except leaf-level nets. The default value is `False`. | -| `-insertion_delay` | Considers insertion delays in macro timing models to improve clustering. The default value is `False`. | - -### Report CTS - -This command is used to extract the following metrics after a successful `clock_tree_synthesis` run. -- Number of Clock Roots -- Number of Buffers Inserted -- Number of Clock Subnets -- Number of Sinks. - -```tcl -report_cts - [-out_file file] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-out_file` | The file to save `cts` reports. If this parameter is omitted, the report is streamed to `stdout` and not saved. | - -### Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonCTS.cpp) or the [swig file](./src/TritonCTS.i). - -| Command Name | Description | -| ----- | ----- | -| `clock_tree_synthesis_debug` | Option to plot the CTS to GUI. | - -## Example scripts - -``` -clock_tree_synthesis -root_buf "BUF_X4" \ - -buf_list "BUF_X4" \ - -wire_unit 20 -report_cts "file.txt" -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out -[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+cts) about this tool. - -## References - -1. [LEMON](https://lemon.cs.elte.hu/trac/lemon) - **L**ibrary for - **E**fficient **M**odeling and **O**ptimization in **N**etworks -1. Kahng, A. B., Li, J., & Wang, L. (2016, November). Improved flop tray-based design implementation for power reduction. In 2016 IEEE/ACM International Conference on Computer-Aided Design (ICCAD) (pp. 1-8). IEEE. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/344/c344.pdf) - -## Authors - -TritonCTS 2.0 is written by Mateus Fogaça, PhD student in the Graduate -Program on Microelectronics from the Federal University of Rio Grande do Sul -(UFRGS), Brazil. Mr. Fogaça's advisor is Prof. Ricardo Reis. - -Many guidance provided by (alphabetic order): -- Andrew B. Kahng -- Jiajia Li -- Kwangsoo Han -- Tom Spyrou - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. - diff --git a/docs/manpages/md/man2/dft.txt b/docs/manpages/md/man2/dft.txt deleted file mode 100644 index badcf3b811c..00000000000 --- a/docs/manpages/md/man2/dft.txt +++ /dev/null @@ -1,112 +0,0 @@ -# DFT: Design for Testing - -The Design for Testing module in OpenROAD (`dft`) is an implementation of Design For Testing. -New nets and logic are added to allow IC designs to be tested for errors in manufacturing. -Physical imperfections can cause hard failures and variability can cause timing errors. - -A simple DFT insertion consist of the following parts: - -* A scan_in pin where the test patterns are shifted in. -* A scan_out pin where the test patterns are read from. -* Scan cells that replace flops with registers that allow for testing. -* One or more scan chains (shift registers created from your scan cells). -* A scan_enable pin to allow your design to enter and leave the test mode. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Set DFT Config - -The command `set_dft_config` sets the DFT configuration variables. - -```tcl -set_dft_config - [-max_length ] - [-clock_mixing ] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-max_length` | The maxinum number of bits that can be in each scan chain. | -| `-clock_mixing` | How architect will mix the scan flops based on the clock driver. `no_mix`: Creates scan chains with only one type of clock and edge. This may create unbalanced chains. `clock_mix`: Craetes scan chains mixing clocks and edges. Falling edge flops are going to be stitched before rising edge. | - -### Report DFT Config - -Prints the current DFT configuration to be used by `preview_dft` and -`insert_dft`. - -```tcl -report_dft_config -``` - -### Preview DFT - -Prints a preview of the scan chains that will be stitched by `insert_dft`. Use -this command to iterate and try different DFT configurations. This command do -not perform any modification to the design. - -```tcl -preview_dft - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-verbose` | Shows more information about each one of the scan chains that will be created. | - -### Insert DFT - -Implements the scan chains into the design by performing the following actions: - -1. Scan Replace. -2. Scan Architect. -3. Scan Stitch. - -The end result will be a design with scan flops connected to form the scan -chains. - - -```tcl -insert_dft -``` - -## Example scripts - -This example will create scan chains with a max length of 10 bits mixing all the -scan flops in the scan chains. - -``` -set_dft_config -max_length 10 -clock_mixing clock_mix -report_dft_config -preview_dft -verbose -insert_dft -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -* There are no optimizations for the scan chains. This is a WIP. -* There is no way to specify existing scan ports to be used by scan insertion. -* There is currently no way to define a user defined scan path. -* We can only work with one bit cells. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/dpl.txt b/docs/manpages/md/man2/dpl.txt deleted file mode 100644 index 0faf66c3cf5..00000000000 --- a/docs/manpages/md/man2/dpl.txt +++ /dev/null @@ -1,178 +0,0 @@ -# Detailed Placement - -The detailed placement module in OpenROAD (`dpl`) is based on OpenDP, or -Open-Source Detailed Placement Engine. Its key features are: - -- Fence region. -- Fragmented ROWs. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Detailed Placement - -The `detailed_placement` command performs detailed placement of instances -to legal locations after global placement. - -```tcl -detailed_placement - [-max_displacement disp|{disp_x disp_y}] - [-disallow_one_site_gaps] - [-report_file_name filename] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-max_displacement` | Max distance that an instance can be moved (in microns) when finding a site where it can be placed. Either set one value for both directions or set `{disp_x disp_y}` for individual directions. The default values are `{500, 100}`, and the allowed values within are integers `[0, MAX_INT]`. | -| `-disallow_one_site_gaps` | Disable one site gap during placement check. | -| `-report_file_name` | File name for saving the report to (e.g. `report.json`.) | - -### Set Placement Padding - -The `set_placement_padding` command sets left and right padding in multiples -of the row site width. Use the `set_placement_padding` command before -legalizing placement to leave room for routing. Use the `-global` flag -for padding that applies to all instances. Use `-instances` -for instance-specific padding. The instances `insts` can be a list of instance -names, or an instance object returned by the SDC `get_cells` command. To -specify padding for all instances of a common master, use the `-filter` -"ref_name == " option to `get_cells`. - -```tcl -set_placement_padding - -global|-masters masters|-instances insts - [-right site_count] - [-left site_count] -``` - -#### Options - -```{warning} -Either one of these flags must be set: `-global | -masters | -instances`. -The order of preference is `global > masters > instances` -``` - -| Switch Name | Description | -| ----- | ----- | -| `-global` | Set padding globally using `left` and `right` values. | -| `-masters` | Set padding only for these masters using `left` and `right` values. | -| `-instances` | For `-instances`, you will set padding only for these insts using `left` and `right` values. | -| `-left` | Left padding (in site count). | -| `-right` | Right padding (in site count). | -| `instances` | Set padding for these list of instances. Not to be confused with the `-instances` switch above. | - -### Filler Placement - -The `filler_placement` command fills gaps between detail-placed instances -to connect the power and ground rails in the rows. `filler_masters` is a -list of master/macro names to use for filling the gaps. Wildcard matching -is supported, so `FILL*` will match, e.g., `FILLCELL_X1 FILLCELL_X16 FILLCELL_X2 -FILLCELL_X32 FILLCELL_X4 FILLCELL_X8`. To specify a different naming prefix -from `FILLER_` use `-prefix `. - -```tcl -filler_placement - [-prefix prefix] - filler_masters -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-prefix` | Prefix to name the filler cells. The default value is `FILLER_`. | -| `filler_masters` | Filler master cells. | - -### Remove Fillers - -This command removes all filler cells. - -```tcl -remove_fillers -``` - -### Check Placement - -The `check_placement` command checks the placement legality. It returns -`0` if the placement is legal. - -```tcl -check_placement - [-verbose] - [-disallow_one_site_gaps] - [-report_filename filename] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-verbose` | Enable verbose logging. | -| `-disallow_one_site_gaps` | Disable one site gap during placement check. | -| `-report_filename` | File name for saving the report to (e.g. `report.json`. | - -### Optimize Mirroring - -The `optimize_mirroring` command mirrors instances about the Y axis in -a weak attempt to reduce the total half-perimeter wirelength (HPWL). - -```tcl -optimize_mirroring -``` - -### Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/Opendp.cpp) or the [swig file](./src/Opendp.i). - -| Command Name | Description | -| ----- | ----- | -| `detailed_placement_debug` | Debug detailed placement. | -| `get_masters_arg` | Get masters from a design. | -| `get_inst_bbox` | Get bounding box of an instance. | -| `get_inst_grid_bbox` | Get grid bounding box of an instance. | -| `format_grid` | Format grid (takes in length `x` and site width `w` as inputs). | -| `get_row_site` | Get row site name. - -## Example scripts - -Examples scripts demonstrating how to run `dpl` on a sample design of `aes` as follows: - -```shell -./test/aes.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. Refer to this [section](../../README.md#regression-tests) for more information. - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+opendp+in%3Atitle) -about this tool. - -## Authors - -- SangGi Do and Mingyu Woo (respective Ph. D. advisors: Seokhyeong Kang, - Andrew B. Kahng). -- Rewrite and port to OpenDB/OpenROAD by James Cherry, Parallax Software - -## References -1. Do, S., Woo, M., & Kang, S. (2019, May). Fence-region-aware mixed-height standard cell legalization. In Proceedings of the 2019 on Great Lakes Symposium on VLSI (pp. 259-262). [(.pdf)](https://dl.acm.org/doi/10.1145/3299874.3318012) - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/drt.txt b/docs/manpages/md/man2/drt.txt deleted file mode 100644 index a3a9f643c20..00000000000 --- a/docs/manpages/md/man2/drt.txt +++ /dev/null @@ -1,243 +0,0 @@ -# Detailed Routing - -The Detailed Routing (`drt`) module in OpenROAD is based on the open-source -detailed router, TritonRoute. TritonRoute consists of several main -building blocks, including pin access analysis, track assignment, -initial detailed routing, search and repair, and a DRC engine. -The initial development of the -[router](https://vlsicad.ucsd.edu/Publications/Conferences/363/c363.pdf) -is inspired by the [ISPD-2018 initial detailed routing -contest](http://www.ispd.cc/contests/18/). However, the current framework -differs and is built from scratch, aiming for an industrial-oriented scalable -and flexible flow. - -TritonRoute provides industry-standard LEF/DEF interface with -support of [ISPD-2018](http://www.ispd.cc/contests/18/) and -[ISPD-2019](http://www.ispd.cc/contests/19/) contest-compatible route -guide format. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Detailed Route - -This command performs detailed routing. - -```tcl -detailed_route - [-output_maze filename] - [-output_drc filename] - [-output_cmap filename] - [-output_guide_coverage filename] - [-drc_report_iter_step step] - [-db_process_node name] - [-disable_via_gen] - [-droute_end_iter iter] - [-via_in_pin_bottom_layer layer] - [-via_in_pin_top_layer layer] - [-or_seed seed] - [-or_k_ k] - [-bottom_routing_layer layer] - [-top_routing_layer layer] - [-verbose level] - [-distributed] - [-remote_host rhost] - [-remote_port rport] - [-shared_volume vol] - [-cloud_size sz] - [-clean_patches] - [-no_pin_access] - [-min_access_points count] - [-save_guide_updates] - [-repair_pdn_vias layer] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-output_maze` | Path to output maze log file (e.g. `output_maze.log`). | -| `-output_drc` | Path to output DRC report file (e.g. `output_drc.rpt`). | -| `-output_cmap` | Path to output congestion map file (e.g. `output.cmap`). | -| `-output_guide_coverage` | Path to output guide coverage file (e.g. `sample_coverage.csv`). | -| `-drc_report_iter_step` | Report DRC on each iteration which is a multiple of this step. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-db_process_node` | Specify the process node. | -| `-disable_via_gen` | Option to diable via generation with bottom and top routing layer. The default value is disabled. | -| `-droute_end_iter` | Number of detailed routing iterations. The default value is `-1`, and the allowed values are integers `[1, 64]`. | -| `-via_in_pin_bottom_layer` | Via-in pin bottom layer name. | -| `-via_in_pin_top_layer` | Via-in pin top layer name. | -| `-or_seed` | Refer to developer arguments [here](#developer-arguments). | -| `-or_k` | Refer to developer arguments [here](#developer-arguments). | -| `-bottom_routing_layer` | Bottommost routing layer name. | -| `-top_routing_layer` | Topmost routing layer name. | -| `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) | -| `-distributed` | Refer to distributed arguments [here](#distributed-arguments). | -| `-clean_patches` | Clean unneeded patches during detailed routing. | -| `-no_pin_access` | Disables pin access for routing. | -| `-min_access_points` | Minimum access points for standard cell and macro cell pins. | -| `-save_guide_updates` | Flag to save guides updates. | -| `-repair_pdn_vias` | This option is used for PDKs where M1 and M2 power rails run in parallel. | - -#### Developer arguments - -Some arguments that are helpful for developers are listed here. - -| Switch Name | Description | -| ----- | ----- | -| `-or_seed` | Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-or_k` | Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | - -### Detailed Route Debug - -The following command and arguments are useful when debugging error -messages from `drt` and to understand its behavior. - -```tcl -detailed_route_debug - [-pa] - [-ta] - [-dr] - [-maze] - [-net name] - [-pin name] - [-worker x y] - [-iter iter] - [-pa_markers] - [-dump_dr] - [-dump_dir dir] - [-pa_edge] - [-pa_commit] - [-write_net_tracks] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-pa` | Enable debug for pin access. | -| `-ta` | Enable debug for track assignment. | -| `-dr` | Enable debug for detailed routing. | -| `-maze` | Enable debug for maze routing. | -| `-net` | Enable debug for net name. | -| `-pin` | Enable debug for pin name. | -| `-worker` | Debugs routes that pass through the point `{x, y}`. | -| `-iter` | Specifies the number of debug iterations. The default value is `0`, and the accepted values are integers `[0, MAX_INT`. | -| `-pa_markers` | Enable pin access markers. | -| `-dump_dr` | Filename for detailed routing dump. | -| `-dump_dir` | Directory for detailed routing dump. | -| `-pa_edge` | Enable visibility of pin access edges. | -| `-pa_commit` | Enable visibility of pin access commits. | -| `-write_net_tracks` | Enable writing of net track assigments. | - -### Pin Access - -This function checks pin access. - -```tcl -pin_access - [-db_process_node name] - [-bottom_routing_layer layer] - [-top_routing_layer layer] - [-min_access_points count] - [-verbose level] - [-distributed] - [-remote_host rhost] - [-remote_port rport] - [-shared_volume vol] - [-cloud_size sz] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-db_process_node` | Specify process node. | -| `-bottom_routing_layer` | Bottommost routing layer. | -| `-top_routing_layer` | Topmost routing layer. | -| `-min_access_points` | Minimum number of access points per pin. | -| `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) | -| `-distributed` | Refer to distributed arguments [here](#distributed-arguments). | - -#### Distributed Arguments - -We have compiled all distributed arguments in this section. - -```{note} -Additional setup is required. Please refer to this [guide](./doc/Distributed.md). -``` - -| Switch Name | Description | -| ----- | ----- | -| `-distributed` | Enable distributed mode with Kubernetes and Google Cloud. | -| `-remote_host` | The host IP. | -| `-remote_port` | The value of the port to access from. | -| `-shared_volume` | The mount path of the nfs shared folder. | -| `-cloud_size` | The number of workers. | - -## Useful developer functions - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonRoute.cpp) or the [swig file](./src/TritonRoute.i). - -| Function Name | Description | -| ----- | ----- | -| `detailed_route_set_default_via` | Set default via. | -| `detailed_route_set_unidirectional_layer` | Set unidirectional layer. | -| `step_dr` | Refer to function `detailed_route_step_drt`. | -| `check_drc` | Refer to function `check_drc_cmd`. | - - - -## Example scripts - -Example script demonstrating how to run TritonRoute on a sample design of `gcd` -in the Nangate45 technology node. - -```shell -# single machine example -./test/gcd_nangate45.tcl - -# distributed example -./test/gcd_nangate45_distributed.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+tritonroute+in%3Atitle) -about this tool. - -## References - -Please cite the following paper(s) for publication: - -1. A. B. Kahng, L. Wang and B. Xu, "TritonRoute: The Open Source Detailed - Router", IEEE Transactions on Computer-Aided Design of Integrated Circuits - and Systems (2020), doi:10.1109/TCAD.2020.3003234. [(.pdf)](https://ieeexplore.ieee.org/ielaam/43/9358030/9120211-aam.pdf) -1. A. B. Kahng, L. Wang and B. Xu, "The Tao of PAO: Anatomy of a Pin Access - Oracle for Detailed Routing", Proc. ACM/IEEE Design Automation Conf., 2020, - pp. 1-6. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/377/c377.pdf) - -## Authors - -TritonRoute was developed by graduate students Lutong Wang and -Bangqi Xu from UC San Diego, and serves as the detailed router in the -[OpenROAD](https://theopenroadproject.org/) project. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/fin.txt b/docs/manpages/md/man2/fin.txt deleted file mode 100644 index 5fe2f66ec42..00000000000 --- a/docs/manpages/md/man2/fin.txt +++ /dev/null @@ -1,94 +0,0 @@ -# Metal fill - -This module inserts floating metal fill shapes to meet metal density -design rules while obeying DRC constraints. It is driven by a `json` -configuration file. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Density Fill - -This command performs density fill to meet metal density DRC rules. - -```tcl -density_fill - [-rules rules_file] - [-area {lx ly ux uy}] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-rules` | Specify `json` rule file. | -| `-area` | Optional. If not specified, the core area will be used. | - -## Example scripts - -The rules `json` file controls fill and you can see an example -[here](https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/platforms/sky130hd/fill.json). - -The schema for the `json` is: - -```json -{ - "layers": { - "": { - "layers": "", - "names": "", - "opc": { - "datatype": "", - "width": "", - "height": "", - "space_to_fill": "", - "space_to_non_fill": "", - "space_line_end": "" - }, - "non-opc": { - "datatype": "", - "width": "", - "height": "", - "space_to_fill": "", - "space_to_non_fill": "" - } - }, ... - } -} -``` - -The `opc` section is optional depending on your process. - -The width/height lists are effectively parallel arrays of shapes to try -in left to right order (generally larger to smaller). - -The layer grouping is for convenience. For example in some technologies many -layers have similar rules so it is convenient to have a `Mx`, `Cx` group. - -This all started out in `klayout` so there are some obsolete fields that the -parser accepts but ignores (e.g., `space_to_outline`). - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+metal%20fill+in%3Atitle) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/gpl.txt b/docs/manpages/md/man2/gpl.txt deleted file mode 100644 index 2667891bbce..00000000000 --- a/docs/manpages/md/man2/gpl.txt +++ /dev/null @@ -1,220 +0,0 @@ -# Global Placement - -The global placement module in OpenROAD (`gpl`) is based on the open-source -RePlAce tool, from the -paper "Advancing Solution Quality and Routability Validation in -Global Placement". - -Features: - -- Analytic and nonlinear placement algorithm. Solves - electrostatic force equations using Nesterov's method. - ([link](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf)) -- Verified with various commercial technologies and research enablements using OpenDB - (7/14/16/28/45/55/65nm). -- Verified deterministic solution generation with various compilers and OS. -- Supports Mixed-size placement mode. - -| | | -|:--:|:--:| -| Visualized examples from ISPD 2006 contest; adaptec2.inf |Real-world Design: Coyote (TSMC16 7.5T) | - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Global Placement - -When using the `-timing_driven` flag, `gpl` does a virtual `repair_design` -to find slacks and -weight nets with low slack. It adjusts the worst slacks (modified with -`-timing_driven_nets_percentage`) using a multiplier (modified with -`-timing_driven_net_weight_max`). The multiplier -is scaled from the full value for the worst slack, to 1.0 at the -`timing_driven_nets_percentage` point. Use the `set_wire_rc` command to set -resistance and capacitance of estimated wires used for timing. - -```tcl -global_placement - [-timing_driven] - [-routability_driven] - [-skip_initial_place] - [-incremental] - [-bin_grid_count grid_count] - [-density target_density] - [-init_density_penalty init_density_penalty] - [-init_wirelength_coef init_wirelength_coef] - [-min_phi_coef min_phi_conef] - [-max_phi_coef max_phi_coef] - [-overflow overflow] - [-initial_place_max_iter initial_place_max_iter] - [-initial_place_max_fanout initial_place_max_fanout] - [-pad_left pad_left] - [-pad_right pad_right] - [-verbose_level level] - [-force_cpu] - [-skip_io] - [-routability_check_overflow routability_check_overflow] - [-routability_max_density routability_max_density] - [-routability_max_bloat_iter routability_max_bloat_iter] - [-routability_max_inflation_iter routability_max_inflation_iter] - [-routability_target_rc_metric routability_target_rc_metric] - [-routability_inflation_ratio_coef routability_inflation_ratio_coef] - [-routability_pitch_scale routability_pitch_scale] - [-routability_max_inflation_ratio routability_max_inflation_ratio] - [-routability_rc_coefficients routability_rc_coefficients] - [-timing_driven_net_reweight_overflow] - [-timing_driven_net_weight_max] - [-timing_driven_nets_percentage] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-timing_driven` | Enable timing-driven mode. See [link](#timing-driven-arguments) for timing-specific arguments. | -| `-routability_driven` | Enable routability-driven mode. See [link](#routability-driven-arguments) for routability-specific arguments. | -| `-skip_initial_place` | Skip the initial placement (Biconjugate gradient stabilized, or BiCGSTAB solving) before Nesterov placement. Initial placement improves HPWL by ~5% on large designs. Equivalent to `-initial_place_max_iter 0`. | -| `-incremental` | Enable the incremental global placement. Users would need to tune other parameters (e.g., `init_density_penalty`) with pre-placed solutions. | -| `-bin_grid_count` | Set bin grid's counts. The internal heuristic defines the default value. Allowed values are integers `[64,128,256,512,...]`. | -| `-density` | Set target density. The default value is `0.7` (i.e., 70%). Allowed values are floats `[0, 1]`. | -| `-init_density_penalty` | Set initial density penalty. The default value is `8e-5`. Allowed values are floats `[1e-6, 1e6]`. | -| `-init_wirelength_coef` | Set initial wirelength coefficient. The default value is `0.25`. Allowed values are floats. | -| `-min_phi_coef` | Set `pcof_min` ($\mu_k$ Lower Bound). The default value is `0.95`. Allowed values are floats `[0.95, 1.05]`. | -| `-max_phi_coef` | Set `pcof_max` ($\mu_k$ Upper Bound). Default value is 1.05. Allowed values are `[1.00-1.20, float]`. | -| `-overflow` | Set target overflow for termination condition. The default value is `0.1`. Allowed values are floats `[0, 1]`. | -| `-initial_place_max_iter` | Set maximum iterations in the initial place. The default value is 20. Allowed values are integers `[0, MAX_INT]`. | -| `-initial_place_max_fanout` | Set net escape condition in initial place when $fanout \geq initial\_place\_max\_fanout$. The default value is 200. Allowed values are integers `[1, MAX_INT]`. | -| `-pad_left` | Set left padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | -| `-pad_right` | Set right padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | -| `-verbose_level` | Set verbose level for `gpl`. The default value is 1. Allowed values are integers `[0, 5]`. | -| `-force_cpu` | Force to use the CPU solver even if the GPU is available. | -| `-skip_io` | Flag to ignore the IO ports when computing wirelength during placement. The default value is False, allowed values are boolean. | - -#### Routability-Driven Arguments - -| Switch Name | Description | -| ----- | ----- | -| `-routability_check_overflow` | Set overflow threshold for routability mode. The default value is `0.2`, and the allowed values are floats `[0, 1]`. | -| `-routability_max_density` | Set density threshold for routability mode. The default value is `0.99`, and the allowed values are floats `[0, 1]`. | -| `-routability_max_bloat_iter` | Set bloat iteration threshold for routability mode. The default value is `1`, and the allowed values are integers `[1, MAX_INT]`.| -| `-routability_max_inflation_iter` | Set inflation iteration threshold for routability mode. The default value is `4`, and the allowed values are integers `[1, MAX_INT]`. | -| `-routability_target_rc_metric` | Set target RC metric for routability mode. The default value is `1.25`, and the allowed values are floats. | -| `-routability_inflation_ratio_coef` | Set inflation ratio coefficient for routability mode. The default value is `2.5`, and the allowed values are floats. | -| `-routability_max_inflation_ratio` | Set inflation ratio threshold for routability mode. The default value is `2.5`, and the allowed values are floats. | -| `-routability_rc_coefficients` | Set routability RC coefficients. It comes in the form of a Tcl List `{k1, k2, k3, k4}`. The default value for each coefficient is `{1.0, 1.0, 0.0, 0.0}` respectively, and the allowed values are floats. | - -#### Timing-Driven Arguments - -| Switch Name | Description | -| ----- | ----- | -| `-timing_driven_net_reweight_overflow` | Set overflow threshold for timing-driven net reweighting. Allowed value is a Tcl list of integers where each number is `[0, 100]`. | -| `-timing_driven_net_weight_max` | Set the multiplier for the most timing-critical nets. The default value is `1.9`, and the allowed values are floats. | -| `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. | - - -### Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i). - -``` -# debugging global placement -global_placement_debug -pause -update -inst -draw_bins -initial - -# adds padding and gets global placement uniform target density -get_global_placement_uniform_density -pad_left -pad_right -``` - -## Example scripts - -Example scripts demonstrating how to run `gpl` on a sample design on `core01` as follows: - -```shell -./test/core01.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## Using the Python interface to gpl - -This API tries to stay close to the API defined in `C++` class `Replace` -that is located [here](include/gpl/Replace.h). - -When initializing a design, a sequence of Python commands might look like -the following: - -```python -from openroad import Design, Tech -tech = Tech() -tech.readLef(...) -design = Design(tech) -design.readDef(...) -gpl = design.getReplace() -``` - -Here is an example of some options / configurations to the global placer. -(See [Replace.h](include/gpl/Replace.h) for a complete list) - -```python -gpl.setInitialPlaceMaxIter(iter) -gpl.setSkipIoMode(skip_io) -gpl.setTimingDrivenMode(timing_driven) -gpl.setTimingNetWeightMax(weight) -``` - -There are some useful Python functions located in the file -[grt_aux.py](test/grt_aux.py) but these are not considered a part of the *final* -API and they may change. - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+replace+in%3Atitle) -about this tool. - -## References - -- C.-K. Cheng, A. B. Kahng, I. Kang and L. Wang, "RePlAce: Advancing - Solution Quality and Routability Validation in Global Placement", IEEE - Transactions on Computer-Aided Design of Integrated Circuits and Systems, - 38(9) (2019), pp. 1717-1730. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Journals/j126.pdf) -- J. Lu, P. Chen, C.-C. Chang, L. Sha, D. J.-H. Huang, C.-C. Teng and - C.-K. Cheng, "ePlace: Electrostatics based Placement using Fast Fourier - Transform and Nesterov's Method", ACM TODAES 20(2) (2015), article 17. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf) -- J. Lu, H. Zhuang, P. Chen, H. Chang, C.-C. Chang, Y.-C. Wong, L. Sha, - D. J.-H. Huang, Y. Luo, C.-C. Teng and C.-K. Cheng, "ePlace-MS: - Electrostatics based Placement for Mixed-Size Circuits", IEEE TCAD 34(5) - (2015), pp. 685-698. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-ms-tcad14/paper.pdf) - -- The timing-driven mode has been implemented by - Mingyu Woo (only available in [legacy repo in standalone - branch](https://github.com/The-OpenROAD-Project/RePlAce/tree/standalone).) -- The routability-driven mode has been implemented by Mingyu Woo. -- Timing-driven mode re-implementation is ongoing with the current - clean-code structure. - - ## Authors - -- Authors/maintainer since Jan 2020: Mingyu Woo (Ph.D. Advisor: - Andrew. B. Kahng) -- Original open-sourcing of RePlAce: August 2018, by Ilgweon Kang - (Ph.D. Advisor: Chung-Kuan Cheng), Lutong Wang (Ph.D. Advisor: Andrew - B. Kahng), and Mingyu Woo (Ph.D. Advisor: Andrew B. Kahng). -- Also thanks to Dr. Jingwei Lu for open-sourcing the previous - ePlace-MS/ePlace project code. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. \ No newline at end of file diff --git a/docs/manpages/md/man2/grt.txt b/docs/manpages/md/man2/grt.txt deleted file mode 100644 index 1e016398ea2..00000000000 --- a/docs/manpages/md/man2/grt.txt +++ /dev/null @@ -1,492 +0,0 @@ -# Global Routing - -The global routing module in OpenROAD (`grt`) is based on FastRoute, an -open-source global router originally derived from Iowa State University's -FastRoute4.1 algorithm. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Global Route - -This command performs global routing with the option to use a `guide_file`. -You may also choose to use incremental global routing using `-start_incremental`. - -```tcl -global_route - [-guide_file out_file] - [-congestion_iterations iterations] - [-congestion_report_file file_name] - [-congestion_report_iter_step steps] - [-grid_origin {x y}] - [-critical_nets_percentage percent] - [-allow_congestion] - [-verbose] - [-start_incremental] - [-end_incremental] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-guide_file` | Set the output guides file name (e.g., `route.guide`). | -| `-congestion_iterations` | Set the number of iterations made to remove the overflow of the routing. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-congestion_report_file` | Set the file name to save the congestion report. The file generated can be read by the DRC viewer in the GUI (e.g., `report_file.rpt`). | -| `-congestion_report_iter_step` | Set the number of iterations to report. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-grid_origin` | Set the (x, y) origin of the routing grid in DBU. For example, `-grid_origin {1 1}` corresponds to the die (0, 0) + 1 DBU in each x--, y- direction. | -| `-critical_nets_percentage` | Set the percentage of nets with the worst slack value that are considered timing critical, having preference over other nets during congestion iterations (e.g. `-critical_nets_percentage 30`). The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-allow_congestion` | Allow global routing results to be generated with remaining congestion. The default is false. | -| `-verbose` | This flag enables the full reporting of the global routing. | -| `-start_incremental` | This flag initializes the GRT listener to get the net modified. The default is false. | -| `-end_incremental` | This flag run incremental GRT with the nets modified. The default is false. | - -### Set Routing Layers - -This command sets the minimum and maximum routing layers for signal and clock nets. -Example: `set_routing_layers -signal Metal2-Metal10 -clock Metal6-Metal9` - -```tcl -set_routing_layers - [-signal min-max] - [-clock min-max] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-signal` | Set the min and max routing signal layer (names) in this format "%s-%s". | -| `-clock` | Set the min and max routing clock layer (names) in this format "%s-%s". | - -### Set Macro Extension - -This command sets the halo (in terms of GCells) along the boundaries of macros. -A `GCell` is typically defined in terms of `Mx` routing tracks. -Example: `set_macro_extension 2` - -```tcl -set_macro_extension extension -``` - -#### Options - -| Argument Name | Description | -| ----- | ----- | -| `extension` | Number of `GCells` added to the blockage boundaries from macros. The default `GCell` size is 15 `M3` pitches. | - -### Set Pin Offset - -This command sets the pin offset distance. - -```tcl -set_pin_offset offset -``` - -#### Options - -| Argument Name | Description | -| ----- | ----- | -| `offset` | Pin offset in microns (must be a positive integer). | - -### Set Global Routing Layer Adjustment - -The `set_global_routing_layer_adjustment` command sets routing resource -adjustments in the routing layers of the design. Such adjustments reduce the number of -routing tracks that the global router assumes to exist. This promotes the spreading of routing -and reduces peak congestion, to reduce challenges for detailed routing. - -You can set adjustment for a -specific layer, e.g., `set_global_routing_layer_adjustment Metal4 0.5` reduces -the routing resources of routing layer `Metal4` by 50%. You can also set adjustment -for all layers at once using `*`, e.g., `set_global_routing_layer_adjustment * 0.3` reduces the routing resources of all routing layers by 30%. And, you can -also set resource adjustment for a layer range, e.g.: `set_global_routing_layer_adjustment -Metal4-Metal8 0.3` reduces the routing resources of routing layers `Metal4`, -`Metal5`, `Metal6`, `Metal7` and `Metal8` by 30%. - -```tcl -set_global_routing_layer_adjustment layer adjustment -``` - -#### Options - -| Argument Name | Description | -| ----- | ----- | -| `layer` | Integer for the layer number (e.g. for M1 you would use 1). | -| `adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | - - -### Set Routing Alpha - -This command sets routing alphas for a given net `net_name`. - -By default the global router uses heuristic rectilinear Steiner minimum -trees (RSMTs) as an initial basis to construct route guides. An RSMT -tries to minimize the total wirelength needed to connect a given set -of pins. The Prim-Dijkstra heuristic is an alternative net topology -algorithm that supports a trade-off between total wirelength and maximum -path depth from the net driver to its loads. The `set_routing_alpha` -command enables the Prim/Dijkstra algorithm and sets the alpha parameter -used to trade-off wirelength and path depth. Alpha is between 0.0 -and 1.0. When alpha is 0.0 the net topology minimizes total wirelength -(i.e. capacitance). When alpha is 1.0 it minimizes longest path between -the driver and loads (i.e., maximum resistance). Typical values are -0.4-0.8. You can call it multiple times for different nets. - -Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. - -```tcl -set_routing_alpha - [-net net_name] - [-min_fanout fanout] - [-min_hpwl hpwl] - alpha -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | Net name. | -| `-min_fanout` | Set the minimum number for fanout. | -| `-min_hpwl` | Set the minimum half-perimetere wirelength (microns). | -| `alpha` | Float between 0 and 1 describing the trade-off between wirelength and path depth. | - -### Set Global Routing Region Adjustment - -Set global routing region adjustment. -Example: `set_global_routing_region_adjustment {1.5 2 20 30.5} -layer Metal4 -adjustment 0.7` - -```tcl -set_global_routing_region_adjustment - {lower_left_x lower_left_y upper_right_x upper_right_y} - -layer layer - -adjustment adjustment -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `lower_left_x`, `lower_left_y`, `upper_right_x` , `upper_right_y` | Bounding box to consider. | -| `-layer` | Integer for the layer number (e.g. for M1 you would use 1). | -| `-adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | - -### Set Global Routing Random - -The command randomizes global routing by shuffling the order of the nets -and randomly subtracts or adds to the capacities of a random set of edges. - -Example: -`set_global_routing_random -seed 42 \ - -capacities_perturbation_percentage 50 \ - -perturbation_amount 2` - -```tcl -set_global_routing_random - [-seed seed] - [-capacities_perturbation_percentage percent] - [-perturbation_amount value] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-seed` | Sets the random seed (must be non-zero for randomization). | -| `-capacities_perturbation_percentage` | Sets the percentage of edges whose capacities are perturbed. By default, the edge capacities are perturbed by adding or subtracting 1 (track) from the original capacity. | -| `-perturbation_amount` | Sets the perturbation value of the edge capacities. This option is only meaningful when `-capacities_perturbation_percentage` is used. | - -### Set Nets to Route - -The `set_nets_to_route` command defines a list of nets to route. Only the nets -defined in this command are routed, leaving the remaining nets without any -global route guides. - -```tcl -set_nets_to_route - net_names -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `net_names` | Tcl list of set of nets (e.g. `{net1, net2}`). | - -### Repair Antennas - -The `repair_antennas` command checks the global routing for antenna -violations and repairs the violations by inserting diodes near the -gates of the violating nets. By default the command runs only one -iteration to repair antennas. Filler instances added by the -`filler_placement` command should NOT be in the database when -`repair_antennas` is called. - -See LEF/DEF 5.8 Language Reference, Appendix C, "Calculating and -Fixing Process Antenna Violations" for a [description](coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) -of antenna violations. - -If no `diode_cell` argument is specified the LEF cell with class CORE, ANTENNACELL will be used. -If any repairs are made the filler instances are remove and must be -placed with the `filler_placement` command. - -If the LEF technology layer `ANTENNADIFFSIDEAREARATIO` properties are constant -instead of PWL, inserting diodes will not improve the antenna ratios, -and thus, no -diodes are inserted. The following warning message will be reported: - -``` -[WARNING GRT-0243] Unable to repair antennas on net with diodes. -``` - -```tcl -repair_antennas - [diode_cell] - [-iterations iterations] - [-ratio_margin margin] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `diode_cell` | Diode cell to fix antenna violations. | -| `-iterations` | Number of iterations. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-ratio_margin` | Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. | - -### Write Guides - -This command writes global routing guides, which can be used as input -for global routing. - -Example: `write_guides route.guide`. - -```tcl -write_guides file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `file_name` | Guide file name. | - - -### Draw Route Guides - -The `draw_route_guides` command plots the route guides for a set of nets. -To erase the route guides from the GUI, pass an empty list to this command: -`draw_route_guides {}`. - -```tcl -draw_route_guides - net_names - [-show_pin_locations] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `net_names` | Tcl list of set of nets (e.g. `{net1, net2}`). | -| `-show_pin_locations` | Draw circles for the pin positions on the routing grid. | - -### Report Wire Length - -The `report_wire_length` command reports the wire length of the nets. Use the `-global_route` -and the `-detailed_route` flags to report the wire length from global and detailed routing, -respectively. If none of these flags are used, the tool will identify the state of the design -and report the wire length accordingly. - -Example: `report_wire_length -net {clk net60} -global_route -detailed_route -verbose -file out.csv` - -```tcl -report_wire_length - [-net net_list] - [-file file] - [-global_route] - [-detailed_route] - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | List of nets to report the wirelength. Use `*` to report the wire length for all nets of the design. | -| `-file` | The name of the file for the wirelength report. | -| `-global_route` | Report the wire length of the global routing. | -| `-detailed_route` | Report the wire length of the detailed routing. | -| `-verbose` | This flag enables the full reporting of the layer-wise wirelength information. | - -### Global Route Debug - -The `global_route_debug` command allows you to start a debug mode to view the status of the Steiner Trees. -It also allows you to dump the input positions for the Steiner tree creation of a net. -This must be used before calling the `global_route` command. -Set the name of the net and the trees that you want to visualize. - -```tcl -global_route_debug - [-st] - [-rst] - [-tree2D] - [-tree3D] - [-saveSttInput file_name] - [-net net_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-st` | Show the Steiner Tree generated by `stt`. | -| `-rst` | Show the Rectilinear Steiner Tree generated by `grt`. | -| `-tree2D` | Show the Rectilinear Steiner Tree generated by `grt` after the overflow iterations. | -| `-tree3D` | Show the 3D Rectilinear Steiner Tree post-layer assignment. | -| `-saveSttInput` | File name to save `stt` input of a net. | -| `-net` | The name of the net name to be displayed. | - -## Example scripts - -Examples scripts demonstrating how to run FastRoute on a sample design of `gcd` as follows: - -```shell -./test/gcd.tcl -``` - -### Read Guides - -This command reads global routing guides. - -```tcl -read_guides file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `file_name` | Path to global routing guide. | - -## Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/GlobalRouter.cpp) or the [swig file](./src/GlobalRouter.i). - -| Function Name | Description | -| ----- | ----- | -| `check_routing_layer` | Check if the layer is within the min/max routing layer specified. | -| `parse_layer_name` | Get routing layer number from layer name | -| `parse_layer_range` | Parses a range from `layer_range` argument of format (%s-%s). `cmd` argument is not used. | -| `check_region` | Checks the defined region if its within the die area. | -| `define_layer_range` | Provide a Tcl list of layers and automatically generate the min and max layers for signal routing. | -| `define_clock_layer_range| Provide a Tcl list of layers and automatically generate the min and max layers for clock routing. | -| `have_detailed_route` | Checks if block has detailed route already. | - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## Using the Python interface to grt - -```{warning} -The `Python` interface is currently in development and is subject to change. -``` - -The `Python` API tries to stay close to the API defined in the `C++` class -`GlobalRouter` that is located [here](./include/grt/GlobalRouter.h) - -When initializing a design, a sequence of `Python` commands might look like -the following: - -```python -from openroad import Design, Tech -tech = Tech() -tech.readLef(...) -design = Design(tech) -design.readDef(...) -gr = design.getGlobalRouter() -``` - -Here are some options to the `global_route` -command. (See `GlobalRouter.h` for a complete list) - -```python -gr.setGridOrigin(x, y) # int, default 0,0 -gr.setCongestionReportFile(file_name) # string -gr.setOverflowIterations(n) # int, default 50 -gr.setAllowCongestion(allowCongestion) # boolean, default False -gr.setCriticalNetsPercentage(percentage) # float -gr.setMinRoutingLayer(minLayer) # int -gr.setMaxRoutingLayer(maxLayer) # int -gr.setMinLayerForClock(minLayer) # int -gr.setMaxLayerForClock(maxLayer) # int -gr.setVerbose(v) # boolean, default False -``` - -and when ready to actually do the global route: - -```python -gr.globalRoute(save_guides) # boolean, default False -``` - -If you have set `save_guides` to True, you can then save the guides in `file_name` with: - -```python -design.getBlock().writeGuides(file_name) -``` - -You can find the index of a named layer with - -```python -lindex = tech.getDB().getTech().findLayer(layer_name) -``` - -or, if you only have the `Python` design object - -```python -lindex = design.getTech().getDB().getTech().findLayer(layer_name) -``` - -Be aware that much of the error checking is done in `Tcl`, so that with -the current `C++` / `Python` API, that might be an issue to deal -with. There are also some useful `Python` functions located in the `grt_aux.py` [file](./test/grt_aux.py) -but these are not considered a part of the *final* API and may be subject to change. - -## FAQs - -Check out -[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+fastroute+in%3Atitle) -about this tool. - -## References - -- Database comes from [OpenDB](https://github.com/The-OpenROAD-Project/OpenDB) -- [FastRoute 4.1 documentation](src/fastroute/README). The FastRoute4.1 - version was received from [Yue Xu](mailto:yuexu@iastate.edu) on June 15, 2019. -- Min Pan, Yue Xu, Yanheng Zhang and Chris Chu. "FastRoute: An Efficient and - High-Quality Global Router. VLSI Design, Article ID 608362, 2012." - Available [here](https://home.engineering.iastate.edu/~cnchu/pubs/j52.pdf). -- C. J. Alpert, T. C. Hu, J. H. Huang, A. B. Kahng and - D. Karger, "Prim-Dijkstra Tradeoffs for Improved Performance-Driven - Global Routing", IEEE Transactions on Computer-Aided Design of - Integrated Circuits and Systems 14(7) (1995), pp. 890-896. Available - [here](https://vlsicad.ucsd.edu/Publications/Journals/j18.pdf). - - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/gui.txt b/docs/manpages/md/man2/gui.txt deleted file mode 100644 index 55ed81b8319..00000000000 --- a/docs/manpages/md/man2/gui.txt +++ /dev/null @@ -1,758 +0,0 @@ -# Graphical User Interface - -The graphical user interface can be access by launching OpenROAD with ``-gui`` or -by opening it from the command-line with ``gui::show``. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Create Toolbar Button - -This command creates toolbar button with name set using the -`-text` flag and accompanying logic in the `-script` flag. - -Returns: name of the new button, either ``name`` or ``buttonX``. - -```tcl -create_toolbar_button - [-name name] - -text button_text - -script tcl_script - [-echo] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-name` | The name of the button, used when deleting the button. | -| `-text` | The text to put on the button. | -| `-script` | The tcl script to evaluate when the button is pressed. | -| `-echo` | This indicate that the commands in the ``tcl_script`` should be echoed in the log. | - -### gui::Remove Toolbar Button - -To remove toolbar button: - -```tcl -gui::remove_toolbar_button - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-name` | The name of the button, used when deleting the button. | - -### Create Menu Item - -This command add items to the menubar. -Returns: name of the new item, either ``name`` or ``actionX``. - - -```tcl -create_menu_item - [-name name] - [-path menu_path] - -text item_text - -script tcl_script - [-shortcut key_shortcut] - [-echo] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-name` | (optional) name of the item, used when deleting the item.| -| `-path`| (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu".| -| `-text` | The text to put on the item.| -| `-script` | The tcl script to evaluate when the button is pressed.| -| `-shortcut`| (optional) key shortcut to trigger this item.| -| `-echo` | (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. | - -### gui::Remove Menu Item - -To remove menu item: - -```tcl -gui::remove_menu_item - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `-name` | name of the item, used when deleting the item.| - -### Save Image - -This command can be both be used when the GUI is active and not active -to save a screenshot with various options. - -```tcl -save_image - [-resolution microns_per_pixel] - [-area {x0 y0 x1 y1}] - [-width width] - [-display_option {option value}] - filename -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `filename` | path to save the image to. | -| `-area` | x0, y0 - first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block. x1, y1 - second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block.| -| `-resolution`| resolution in microns per pixel to use when saving the image, default will match what the GUI has selected.| -| `-width`| width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution``.| -| `-display_option`| specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}``.| - -### Save Clocktree Image - -This command saves the screenshot of clocktree given options -to `filename`. - -```tcl -save_clocktree_image - filename - -clock clock_name - [-width width] - [-height height] - [-corner corner] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -|`filename`| path to save the image to. | -|`-clock`| name of the clock to save the clocktree for. | -|`-corner`| name of the timing corner to save the clocktree for, default to the first corner defined. | -|`-height`| height of the image in pixels, defaults to the height of the GUI widget. | -|`-width`| width of the image in pixels, defaults to the width of the GUI widget. | - -### Select - -This command selects object based on options. -Returns: number of objects selected. - -```tcl -select - -type object_type - [-name glob_pattern] - [-filter attribute=value] - [-case_insensitive] - [-highlight group] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -|`-type`| name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations.| -|`-name`| (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive.| -|`-filter`| (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins).| -|`-highlight`| (optional) add the selection to the specific highlighting group. Values can be 0 to 7. | - -### Display Timing Cone - -This command displays timing cones for a pin given options. - -```tcl -display_timing_cone - pin - [-fanin] - [-fanout] - [-off] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -|`pin` | name of the instance or block pin. | -|`-fanin`| (optional) display the fanin timing cone. | -|`-fanout`| (optional) display the fanout timing cone. | -|`-off`| (optional) remove the timing cone. | - -### Focus Net - -This command limits the drawing to specified net. - -```tcl -focus_net - net - [-remove] - [-clear] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `pin` | name of the net. | -| `-remove` | (optional) removes the net from from the focus. | -| `-clear` | (optional) clears all nets from focus. | - -## TCL functions - -### gui::Enabled - -Determine is the GUI is active: - -```tcl -gui::enabled -``` - -### gui::Design Created - -Announce to the GUI that a design was loaded -(note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): - -```tcl -gui::design_created -``` - -### gui::Load DRC - -To load the results of a DRC report: - -```tcl -gui::load_drc - filename -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `filename` | Filename for DRC report. | - -### gui::Show - -To open the GUI from the command-line (this command does not return until the GUI is closed): - -```tcl -gui::show - [script] - [interactive] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `script` | TCL script to evaluate in the GUI. | -| `interactive` | Boolean if true, the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal.| - -### gui::Hide - -To close the GUI and return to the command-line: - -```tcl -gui::hide -``` - -### gui::Fit - -To fit the whole layout in the window: - -```tcl -gui::fit -``` - -### gui::Zoom To - -To zoom in our out to a specific region: - -```tcl -gui::zoom_to - [x0 y0 x1 y1] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x0, y0, x1, y1`| first and second corner of the layout area in microns.| - -### gui::Zoom In - -To zoom in the layout: - -```tcl -gui::zoom_in - [x y] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x, y` | new center of layout in microns.| - -### gui::Zoom Out - -To zoom out the layout: - -```tcl -gui::zoom_out - [x y] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x, y` | new center of layout in microns.| - -### gui::Center At - -To move the layout to new area: - -```tcl -gui::center_at - [x y] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x, y` | new center of layout in microns.| - -### gui::Set Resolution - -To change the resolution to a specific value: - -```tcl -gui::set_resolution - [resolution] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `resolution` | database units per pixel. | - -### gui::Selection Add Net - -To add a single net to the selected items: - -```tcl -gui::selection_add_net - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the net to add.| - -### gui::Selection Add Nets - -To add several nets to the selected items using a regex: - -```tcl -gui::selection_add_nets - name_regex -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name_regex`| regular expression of the net names to add.| - -### gui::Selection Add Inst - -To add a single instance to the selected items: - -```tcl -gui::selection_add_inst - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the instance to add. | - -### gui::Selection Add Insts - -To add several instances to the selected items using a regex: - -```tcl -gui::selection_add_insts - name_regex -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name_regex` | regular expression of the instance names to add. | - -### gui::Select At - -To add items at a specific point or in an area: - -Example usage: -``` -gui::select_at x y -gui::select_at x y append -gui::select_at x0 y0 x1 y1 -gui::select_at x0 y0 x1 y1 append -``` - -```tcl -gui::select_at - x0 y0 x1 y1 - [append] - -Or - -gui::select_at - x y - [append] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x, y` | point in the layout area in microns. | -| `x0, y0, x1, y1`| first and second corner of the layout area in microns. | -| `append`| if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. | - -### gui::Select Next - -To navigate through multiple selected items: -Returns: current index of the selected item. - -```tcl -gui::select_next -``` - -### gui::Select Previous - -To navigate through multiple selected items: -Returns: current index of the selected item. - -```tcl -gui::select_previous -``` - -### gui::Clear Selections - -To clear the current set of selected items: - -```tcl -gui::clear_selections -``` - -### gui::Get Selection Property - -To get the properties for the current selection in the Inspector: - -```tcl -gui::get_selection_property - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. | - -### gui::Selection Animate - -To animate the current selection in the Inspector: - -```tcl -gui::selection_animate - [repeat] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `repeat` | indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely.| - -### gui::Highlight net - -To highlight a net: - -```tcl -gui::highlight_net - name - [highlight_group] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the net to highlight.| -| `highlight_group` | group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. | - -### gui::Highlight Inst - -To highlight an instance: - -```tcl -gui::highlight_inst - name - [highlight_group] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the instance to highlight. | -| `highlight_group` | group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. | - -### gui::Clear Highlights - -To clear the highlight groups: - -```tcl -gui::clear_highlights - [highlight_group] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `highlight_group` | group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. | - -### gui::Add Ruler - -To add a ruler to the layout: - -1. either press ``k`` and use the mouse to place it visually. -To disable snapping for the ruler when adding, hold the ``Ctrl`` key, and to allow non-horizontal or vertical snapping when completing the ruler hold the ``Shift`` key. - -2. or use the command: - -Returns: name of the newly created ruler. - -```tcl -gui::add_ruler - x0 y0 x1 y1 - [label] - [name] - [euclidian] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `x0, y0, x1, y1` | first and second end point of the ruler in microns. | -| `label` | text label for the ruler. | -| `name` | name of the ruler. | -| `euclidian` | ``1`` for euclidian ruler, and ``0`` for regular ruler. | - -### gui::Delete Ruler - -To remove a single ruler: - -```tcl -gui::delete_ruler - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | name of the ruler. | - -### gui::Clear Rulers - -To remove all the rulers: - -```tcl -gui::clear_rulers -``` - -### gui::Set Heatmap - -To control the settings in the heat maps: - -The currently availble heat maps are: -- ``Power`` -- ``Routing`` -- ``Placement`` -- ``IRDrop`` - -These options can also be modified in the GUI by double-clicking the underlined display control for the heat map. - -```tcl -gui::set_heatmap - name - [option] - [value] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | is the name of the heatmap. | -| `option` | is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. | -| `value` | is the new value for the specified option. This is not used when rebuilding map. | - -### gui::Dump Heatmap Name - -To save the raw data from the heat maps ins a comma separated value (CSV) format: - -```tcl -gui::dump_heatmap - name - filename -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -|`name` | is the name of the heatmap. | -|`filename` | path to the file to write the data to. | - -### gui::Set Display Controls - -Control the visible and selected elements in the layout: - -```tcl -gui::set_display_controls - name - [display_type] - [value] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | -| `display_type` | is either ``visible`` or ``selectable`` | -| `value` |is either ``true`` or ``false`` | - -### gui::Check Display Controls - -To check the visibility or selectability of elements in the layout: - -```tcl -gui::check_display_controls - name - display_type -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | -| `display_type` | is either ``visible`` or ``selectable`` | - -### gui::Save Display Controls - -When performing a batch operation changing the display controls settings, -the following command can be used to save the current state of the display controls. - -```tcl -gui::save_display_controls -``` - -### gui::Restore Display Controls - -This command restores display controls. - -```tcl -gui::restore_display_controls -``` - -### gui::Input Dialog - -To request user input via the GUI: -Returns: a string with the input, or empty string if canceled. - -```tcl -gui::input_dialog - title - question -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `title` | is the title of the input message box. | -| `question` | is the text for the message box. | - -### gui::Pause - -Pause the execution of the script: - -```tcl -gui::pause - [timeout] -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `timeout` | is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button.| - -### gui::Show widget - -To open a specific layout widget: - -```tcl -gui::show_widget - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | of the widget. For example, the display controls would be "Display Control". | - -### gui::Hide widget - -To close a specific layout widget: - -```tcl -gui::hide_widget - name -``` - -#### Options - -| Switch Name | Description | -| ---- | ---- | -| `name` | of the widget. For example, the display controls would be "Display Control". | - - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/ifp.txt b/docs/manpages/md/man2/ifp.txt deleted file mode 100644 index 39eb7950d38..00000000000 --- a/docs/manpages/md/man2/ifp.txt +++ /dev/null @@ -1,140 +0,0 @@ -# Initialize Floorplan - -This tool initializes floorplan constraints, die/core area, and makes tracks. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Initialize Floorplan - -Do note that there are two ways of setting the floorplan dimensions. -The user can either specify manually die/core area, or -specify the utilization/aspect ratio. If you set both, -unexpected behaviour might occur. - -- Method 1: Automatic die size calculation -Example: `initialize_floorplan -utilization 70 -aspect_ratio 1.0 -core_space 0.0 -sites FreePDK45_38x28_10R_NP_162NW_34O` - -- Method 2: Set die/core area -Example: `initialize_floorplan -die_area 0 0 2000 2000 -core_area 100 100 1900 1900` -sites FreePDK45_38x28_10R_NP_162NW_34O` - -The die area and core area used to write ROWs can be specified explicitly -with the `-die_area` and `-core_area` arguments. Alternatively, the die and -core areas can be computed from the design size and utilization as shown below: - -Example computation: - -``` -core_area = design_area / (utilization / 100) -core_width = sqrt(core_area / aspect_ratio) -core_height = core_width * aspect_ratio -core = ( core_space_left, core_space_bottom ) - ( core_space_left + core_width, core_space_bottom + core_height ) -die = ( 0, 0 ) - ( core_width + core_space_left + core_space_right, - core_height + core_space_bottom + core_space_top ) -``` - - -```tcl -initialize_floorplan - [-utilization util] - [-aspect_ratio ratio] - [-core_space space | {bottom top left right}] - [-sites site_name] - [-die_area {llx lly urx ury}] - [-core_area {llx lly urx ury}] - [-sites site_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | -| `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | -| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | - -### Make Tracks - -The `initialize_floorplan` command removes existing tracks. -Use the `make_tracks` command to add routing tracks to a floorplan. - -```tcl -make_tracks - [layer] - [-x_pitch x_pitch] - [-y_pitch y_pitch] - [-x_offset x_offset] - [-y_offset y_offset] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `layer` | Select layer name to make tracks for. Defaults to all layers. | -| `-x_pitch`, `-y_pitch` | If set, overrides the LEF technology x-/y- pitch. Use the same unit as in the LEF file. | -| `-x_offset`, `-y_offset` | If set, overrides the LEF technology x-/y- offset. Use the same unit as in the LEFT file. | - -### Insert tiecells - -This comamnd inserts tiecells. - -```tcl -insert_tiecells - tie_pin - [-prefix inst_prefix] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `tie_pin` | Indicates the master and port to use to tie off nets. For example, `LOGIC0_X1/Z` for the Nangate45 library, where `LOGIC0_X1` is the master and `Z` is the output port on the master. | -| `-prefix` | Used to control the prefix of the new tiecell names. This will default to `TIEOFF_`. | - -## Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/InitFloorplan.cc) or the [swig file](./src/InitFloorPlan.i). - -| Command Name | Description | -| ----- | ----- | -| `microns_to_mfg_grid` | Convert microns to manufacturing grid DBU. | - -## Example scripts - -Example scripts on running `ifp` for a sample design of `mpd_top` are as follows: - -``` -./test/upf_test.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out -[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+ifp+in%3Atitle) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/mpl.txt b/docs/manpages/md/man2/mpl.txt deleted file mode 100644 index b63dcc2564b..00000000000 --- a/docs/manpages/md/man2/mpl.txt +++ /dev/null @@ -1,87 +0,0 @@ -# Macro Placement - -The macro placement module in OpenROAD (`mpl`) is based on -TritonMacroPlacer, an open-source ParquetFP-based macro cell placer. -The macro placer places macros/blocks honoring halos, channels -and cell row "snapping". -Run `global_placement` before macro placement. - -Approximately $\Bigl\lceil [{\frac{numMacros}{3}}]^{1.5} \Bigr\rceil$ quadrisections -of the initial placed mixed-size layout are explored and packed using -ParquetFP-based annealing. The best resulting floorplan according to a -heuristic evaluation function is kept. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Macro Placement - -This command performs macro placement. -For placement style, `corner_max_wl` means that choosing the partitions that maximise the wirelength -of connections between the macros to force them to the corners. Vice versa for `corner_min_wl`. - -Macros will be placed with $max(halo * 2, channel)$ spacing between macros, and between -macros and the fence/die boundary. If no solutions are found, try reducing the -channel/halo. - -```tcl -macro_placement - [-halo {halo_x halo_y}] - [-channel {channel_x channel_y}] - [-fence_region {lx ly ux uy}] - [-snap_layer snap_layer_number] - [-style corner_wax_wl|corner_min_wl] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-halo` | Horizontal and vertical halo around macros (microns). | -| `-channel` | Horizontal and vertical channel width between macros (microns). | -| `-fence_region` | Restrict macro placements to a region (microns). Defaults to the core area. | -| `-snap_layer_number` | Snap macro origins to this routing layer track. | -| `-style` | Placement style, to choose either `corner_max_wl` or `corner_min_wl`. The default value is `corner_max_wl`. | - - -## Useful developer functions - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/MacroPlacer.cpp) or the [swig file](./src/MacroPlacer.i). - -| Command Name | Description | -| ----- | ----- | -| `macro_placement_debug` | Macro placement debugging. Note that GUI must be present for this command, otherwise a segfault will occur. | - -## Example scripts - -Example scripts demonstrating how to run TritonMacroPlace on a sample design of `east_west` as follows: - -``` -./test/east_west.tcl -./test/east_west1.tcl -./test/east_west2.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+mpl) about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/mpl2.txt b/docs/manpages/md/man2/mpl2.txt deleted file mode 100644 index 97a3db6385e..00000000000 --- a/docs/manpages/md/man2/mpl2.txt +++ /dev/null @@ -1,157 +0,0 @@ -# Hierarchical Macro Placement - -A hierarchical automatic macro placer for large-scale complex IP blocks, "Hier-RTLMP". -This tool builds on the existing RTLMP (`mpl`) framework, adopting a multilevel physical -planning approach that exploits the hierarchy and data flow inherent in the design RTL. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### RTL Macro Placer - -This command executes the Hier-RTLMP algorithm for macro placement. - -```tcl -rtl_macro_placer - [-halo_width halo_width] - [-min_num_macro min_num_macro] - [-max_num_inst max_num_inst] - [-min_num_inst min_num_inst] - [-tolerance tolerance] - [-max_num_level max_num_level] - [-coarsening_ratio coarsening_ratio] - [-num_bundled_ios num_bundled_ios] - [-large_net_threshold large_net_threshold] - [-signature_net_threshold signature_net_threshold] - [-halo_width halo_width] - [-fence_lx fence_lx] - [-fence_ly fence_ly] - [-fence_ux fence_ux] - [-fence_uy fence_uy] - [-area_weight area_weight] - [-outline_weight outline_weight] - [-wirelength_weight wirelength_weight] - [-guidance_weight guidance_weight] - [-fence_weight fence_weight] - [-boundary_weight boundary_weight] - [-notch_weight notch_weight] - [-macro_blockage_weight macro_blockage_weight] - [-target_util target_util] - [-target_dead_space target_dead_space] - [-min_ar min_ar] - [-snap_layer snap_layer] - [-bus_planning_flag bus_planning_flag] - [-report_directory report_directory] - [-write_macro_placement file_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-max_num_macro`, `-min_num_macro` | Maximum/minimum number of macros in a cluster. The default value is `0` for both, and the allowed values are integers `[0, MAX_INT]`. | -| `-max_num_inst`, `-min_num_inst` | Maximum/minimum number of standard cells in a cluster. The default value is `0` for both, and the allowed values are integers `[0, MAX_INT]`. | -| `-tolerance` | Add a margin to the minimum and maximum number of macros/std cells in a cluster. For min, we multiply by (1 - `tol`), and for the max (1 + `tol`). This is to improve the robustness of hierarchical clustering. The allowed values are floats `[0, 1)`, and the default value is `0.1`. | -| `-max_num_level` | Maximum depth of physical hierarchical tree. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | -| `-coarsening_ratio` | The larger the coarsening_ratio, the faster the convergence process. The allowed values are floats, and the default value is `10.0`. | -| `-num_bundled_ios` | Specifies the number of bundled pins for the left, right, top, and bottom boundaries. The default value is `3`, and the allowed values are integers `[0, MAX_INT]`. | -| `-large_net_threshold` | Ignore nets with many connections during clustering, such as global nets. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-signature_net_threshold` | Minimum number of connections between two clusters to be identified as connected. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-halo_width` | iHorizontal/vertical halo around macros (microns). The allowed values are floats, and the default value is `0.0`. | -| `-fence_lx`, `-fence_ly`, `-fence_ux`, `-fence_uy` | Defines the global fence bounding box coordinates. The default values are the core area coordinates). | -| `-target_util` | Specifies the target utilization of `MixedCluster` and has higher priority than target_dead_space. The allowed values are floats, and the default value is `0.25`. | -| `-target_dead_space` | Specifies the target dead space percentage, which influences the utilization of `StandardCellCluster`. The allowed values are floats, and the default value is `0.05`. | -| `-min_ar` | Specifies the minimum aspect ratio $a$, or the ratio of its width to height of a `StandardCellCluster` from $[a, \frac{1}{a}]$. The allowed values are floats, and the default value is `0.33`. | -| `-snap_layer` | Snap macro origins to this routing layer track. The default value is 4, and the allowed values are integers `[1, MAX_LAYER]`). | -| `-bus_planning_flag` | Flag to enable bus planning. The recommendation is to turn on bus planning for SKY130 and off for NanGate45/ASAP7. The default value is disabled. | -| `-report_directory` | Save reports to this directory. | -| `-write_macro_placement` | Generates a file with the macro placement in the format of multiple calls for the `place_macro` command. | - -#### Simulated Annealing Weight parameters - -Do note that while action probabilities are normalized to 1.0, the weights are not necessarily normalized. - -| Switch Name | Description | -| ----- | ----- | -| `-area_weight` | Weight for the area of current floorplan. The allowed values are floats, and the default value is `0.1`. | -| `-outline_weight` | Weight for violating the fixed outline constraint, meaning that all clusters should be placed within the shape of their parent cluster. The allowed values are floats, and the default value is `100.0`. | -| `-wirelength_weight` | Weight for half-perimeter wirelength. The allowed values are floats, and the default value is `100.0`. | -| `-guidance_weight` | Weight for guidance cost or clusters being placed near specified regions if users provide such constraints. The allowed values are floats, and the default value is `10.0`. | -| `-fence_weight` | Weight for fence cost, or how far the macro is from zero fence violation. The allowed values are floats, and the default value is `10.0`. | -| `-boundary_weight` | Weight for the boundary, or how far the hard macro clusters are from boundaries. Note that mixed macro clusters are not pushed, thus not considered in this cost. The allowed values are floats, and the default value is `50.0`. | -| `-notch_weight` | Weight for the notch, or the existence of dead space that cannot be used for placement & routing. Note that this cost applies only to hard macro clusters. The allowed values are floats, and the default value is `10.0`. | -| `-macro_blockage_weight` | Weight for macro blockage, or the overlapping instances of the macro. The allowed values are floats, and the default value is `10.0`. | - -### Write Macro Placement - -Command to write a file with the macro placement in the format of -multiple calls for the `place_macro` command: - -```tcl -write_macro_placement file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `filename` | Filename to write the macro placement flow commands to. | - -### Place Macro - -Command for placement of one specific macro. - -```tcl -place_macro - -macro_name macro_name - -location {x y} - [-orientation orientation] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-macro_name` | The name of a macro of the design. | -| `-location` | The lower left corner of the macro in microns. | -| `-orientation` | The orientation according to odb. If nothing is specified, defaults to `R0`. We only allow `R0`, `MY`, `MX` and `R180`. | - -## Example scripts - -Example of a script demonstrating how to run `mpl2` on a sample design of `bp_fe_top` as follows: - -```shell -./test/bp_fe_top.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## References -1. A. B. Kahng, R. Varadarajan and Z. Wang, -"RTL-MP: Toward Practical, Human-Quality Chip Planning and Macro Placement", -[(.pdf)](https://vlsicad.ucsd.edu/Publications/Conferences/389/c389.pdf), Proc. ACM/IEEE Intl. Symp. on Physical Design, 2022, pp. 3-11. -1. A. B. Kahng, R. Varadarajan and Z. Wang, -"Hier-RTLMP: A hierarchical automatic macro placer for large-scale complex IP blocks.", -[(.pdf)](https://arxiv.org/pdf/2304.11761.pdf), arXiv preprint arXiv:2304.11761, 2023. - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+hier-rtlmp+OR+hier+OR+mpl2) about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/odb.txt b/docs/manpages/md/man2/odb.txt deleted file mode 100644 index 17bff93d033..00000000000 --- a/docs/manpages/md/man2/odb.txt +++ /dev/null @@ -1,169 +0,0 @@ -# OpenDB - -OpenDB is a design database to support tools for physical chip design. It -was originally developed by Athena Design Systems. Nefelus, Inc. acquired -the rights to the code and open-sourced it with BSD-3 license in 2019 to support the DARPA -OpenROAD project. - -The structure of OpenDB is based on the text file formats LEF -(library) and DEF (design) formats version 5.6. OpenDB supports a -binary file format to save and load the design much faster than using -LEF and DEF. - -OpenDB is written in C++ 98 with standard library style iterators. -The classes are designed to be fast enough to base an application on without -having to copy them into application-specific structures. - - -## Directory structure - -``` -include/odb/db.h - public header for all database classes -src/db - private/internal database representations -src/lefin - LEF reader -src/lefout - LEF writer -src/defin - DEF reader -src/defout - DEF writer -``` - -## Database API - -We are still working on documenting the APIs. We have over 1,800 objects -and functions that we are still documenting (for both TCL and Python). -**Contributions are very welcome in this effort**. Find starting points below. - -### TCL - -After building successfully, run OpenDB Tcl shell using -`../../build/src/odb/src/swig/tcl/odbtcl`. An example usage: - -``` -set db [dbDatabase_create] -set lef_parser [new_lefin $db true] -set tech [lefin_createTech $lef_parser ./src/odb/test/data/gscl45nm.lef] -``` - -You can find examples on using the API from Tcl under `test/tcl/` directory. - -The full set of the Tcl commands exposed can be found under -`./build/src/swig/tcl/opendb_wrapper.cpp`. Search for `SWIG_prefix`. - - -### Python - -After building successfully, run `openroad -python` to enable the Python -interpreter. You can find examples on using the API from Python under -`test/python/` directory. - -To list the full set of the Python classes exposed run `openroad -python` -then: -``` -import openroad -import odb -print(', '.join(dir(openroad))) -print(', '.join(dir(odb))) -``` - -### C++ - -All public database classes are defined in `db.h`. These class definitions -provide all functions for examining and modifying the database objects. The -database is an object itself, so multiple database objects can exist -simultaneously (no global state). - -`dbTypes.h` defines types returned by database class member functions. - -All database objects are in the `odb` namespace. - -- `dbChip` -- `dbBlock` -- `dbTech` -- `dbLib` - -All database objects have a 32bit object identifier accessed with the -`dbObject::getOID` base class member function that returns a `uint`. This -identifier is preserved across save/restores of the database so it should -be used to reference database object by data structures instead of pointers -if the reference lifetime is across database save/restores. OIDs allow the -database to have exactly the same layout across save/restores. - -The database distance units are **nanometers** and use the type `uint`. - -## Example scripts - -## Regression tests - -There are a set of regression tests in /test. - -``` -./test/regression-tcl.sh -./test/regression-py.sh -``` - -## Database Internals - -The internal description included here is paraphrased from Lukas van Ginneken -by James Cherry. - -The database separates the implementation from the interface, and as a result, -each class becomes two classes, a public one and a private one. For instance, -`dbInst` has the public API functions, while class `_dbInst` has the private -data fields. - -The objects are allocated in dynamically resizable tables, the implementation -of which is in `dbTable.hpp`. Each table consists of a number of pages, -each containing 128 objects. The table contains the body of the `struct`, -not a set of pointers. This eliminates most of the pointer overhead while -iteration is accomplished by stepping through the table. Thus, grouping these -objects does not require a doubly-linked list and saves 16 bytes per object -(at the cost of some table overhead). Each object has an id, which is the -index into the table. The lowest 7 bits are the index in the page, while -the higher bits are the page number. Object id's are persistent when saving -and reading the data model to disk, even as pointer addresses may change. - -Everything in the data model can be stored on disk and restored from disk -exactly the way it was. An extensive set of equality tests and diff functions -make it possible to check for even the smallest deviation. The capability -to save an exact copy of the state of the system makes it possible to create -a checkpoint. This is a necessary capability for debugging complex systems. - -The code follows the definition of LEF and DEF closely and reflects many of -the idiosyncrasies of LEF and DEF. The code defines many types of objects -to reflect LEF and DEF constructs although it sometimes uses different -terminology, for instance, the object to represent a library cell is called -`dbMaster` while the LEF keyword is MACRO. - -The data model supports the EEQ and LEQ keywords (i.e., electrically equivalent -and logically equivalent Masters), which could be useful for sizing. However, -it does not support any logic function representation. In general, there is -very limited support for synthesis-specific information: no way to represent -busses, no way to represent logic function, very limited understanding of -signal flow, limited support of timing information, and no support for high -level synthesis or test insertion. - -The db represents routing as in DEF, representing a trace from point to point -with a given width. The layout for a net is stored in a class named `dbWire` -and it requires a special `dbWireDecoder` (which works like an iterator) -to unpack the data and another `dbWireEncoder` to pack it. The data model -does not support a region query and objects that are in the same layer are -scattered about the data model and are of different classes. - -This means that whatever tool is using the layout information will have to -build its own data structures that are suitable to the layout operations -of that tool. For instance, the router, the extractor, and the DRC engine -would each have to build their unique data structures. This encourages -batch mode operation (route the whole chip, extract the whole chip, run -DRC on the whole chip). - -## Limitations - -## FAQs - -Check out -[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+fastroute+in%3Atitle) -about this tool. - - -## LICENSE - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/pad.txt b/docs/manpages/md/man2/pad.txt deleted file mode 100644 index 929c5ee0295..00000000000 --- a/docs/manpages/md/man2/pad.txt +++ /dev/null @@ -1,412 +0,0 @@ -# Chip-level Connections - -The chip-level connections module in OpenROAD (`pad`) is based on the -open-source tool ICeWall. In this utility, either place an IO ring around the -boundary of the chip and connect with either wirebond pads or a bump array. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Place IO Terminals - -In the case where the bond pads are integrated into the padcell, the IO terminals need to be placed. -This command place terminals on the padring. - -Example usage: -``` -place_io_terminals u_*/PAD -place_io_terminals u_*/VDD -``` - -```tcl -place_io_terminals - inst_pins -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `inst_pins` | Instance pins to place the terminals on. | - -### Make IO Bump Array - -This command defines a bump array. - -Example usage: - -``` -make_io_bump_array -bump BUMP -origin "200 200" -rows 14 -columns 14 -pitch "200 200" -``` - -```tcl -make_io_bump_array - -bump master - -origin {x y} - -rows rows - -columns columns - -pitch {x y} - [-prefix prefix] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-bump` | Name of the bump master. | -| `-origin` | Origin of the array. | -| `-rows` | Number of rows to create. | -| `-columns` | Number of columns to create. | -| `-pitch` | Pitch of the array. | -| `-prefix` | Name prefix for the bump array. The default value is `BUMP_`. | - - -### Remove IO Bump Array - -This command removes the entire bump array. - -Example usage: - -``` -remove_io_bump_array -bump BUMP -``` - -```tcl -remove_io_bump_array - -bump master -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-bump` | Name of the bump master. | - -### Remove IO Bump - -This command removes a single bump instance. - -```tcl -remove_io_bump - instance_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `instance_name` | Name of the bump. | - -### Assign IO Bump - -This command assigns a net to a bump instance. - -Example usage: - -``` -assign_io_bump -net p_ddr_addr_9_o BUMP_6_0 -assign_io_bump -net p_ddr_addr_8_o BUMP_6_2 -assign_io_bump -net DVSS BUMP_6_4 -assign_io_bump -net DVDD BUMP_7_3 -assign_io_bump -net DVDD -terminal u_dvdd/DVDD BUMP_8_3 -assign_io_bump -net p_ddr_addr_7_o BUMP_7_1 -assign_io_bump -net p_ddr_addr_6_o BUMP_7_0 -``` - -```tcl -assign_io_bump - -net net - [-terminal iterm] - [-dont_route] - instance -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | Net to connect to. | -| `-terminal` | Instance terminal to route to. | -| `-dont_route` | Flag to indicate that this bump should not be routed, only perform assignment. | -| `instance` | Name of the bump. | - -### Make IO Sites - -This command defines an IO site for the pads to be placed into. - -Example usage: - -``` -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -rotation_horizontal R180 -``` - -```tcl -make_io_sites - -horizontal_site site - -vertical_site site - -corner_site site - -offset offset - [-rotation_horizontal rotation] - [-rotation_vertical rotation] - [-rotation_corner rotation] - [-ring_index index] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-horizontal_site` | Name of the site for the horizontal pads (east and west). | -| `-vertical_site` | Name of the site for the vertical pads (north and south). | -| `-corner_site` | Name of the site for the corner cells. | -| `-offset` | Offset from the die edge to place the rows. | -| `-rotation_horizontal` | Rotation to apply to the horizontal sites to ensure pads are placed correctly. The default value is `R0`. | -| `-rotation_vertical` | Rotation to apply to the vertical sites to ensure pads are placed correctly. The default value is `R0`. | -| `-rotation_corner` | Rotation to apply to the corner sites to ensure pads are placed correctly. The default value is `R0`. | -| `-ring_index` | Used to specify the index of the ring in case of multiple rings. | - - -### Remove IO Rows - -When the padring is complete, the following command can remove the IO rows to avoid causing confusion with the other tools. - -```tcl -remove_io_rows -``` - -### Place Corners - -This command places the corner cells. - -```tcl -place_corners - master - [-ring_index index] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `master` | Name of the master for the corners. | -| `-ring_index` | Used to specify the index of the ring in case of multiple rings. | - -Example usage: - -``` -place_corners sky130_fd_io__corner_bus_overlay -``` - -### Place Pad - -To place a pad into the pad ring. - -Example usage: - -``` -place_pad -row IO_SOUTH -location 280.0 {u_clk.u_in} -place_pad -row IO_SOUTH -location 360.0 -mirror {u_reset.u_in} -place_pad -master sky130_fd_io__top_ground_hvc_wpad -row IO_SOUTH -location 439.5 {u_vzz_0} -place_pad -master sky130_fd_io__top_power_hvc_wpad -row IO_SOUTH -location 517.5 {u_v18_0} -``` - -```tcl -place_pad - -row row_name - -location offset - -mirror - [-master master] - name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-row` | Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. | -| `-location` | Offset from the bottom left chip edge to place the pad at. | -| `-mirror` | Specifies if the pad should be mirrored. | -| `-master` | Name of the instance master if the instance needs to be created. | -| `name` | Name of the instance. | - - -### Place IO Fill - -To place the IO filler cells. - -Example usage: - -``` -place_io_fill -row IO_NORTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_SOUTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_WEST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_EAST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -``` - -```tcl -place_io_fill - -row row_name - [-permit_overlaps masters] - masters -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-row` | Name of the row to place the pad into, examples include: `IO_NORTH`, `IO_SOUTH`, `IO_WEST`, `IO_EAST`, `IO_NORTH_0`, `IO_NORTH_1`. | -| `-permit_overlaps` | Names of the masters for the IO filler cells that allow for overlapping. | -| `masters` | Names of the masters for the IO filler cells. | - -### Connect By Abutment - -Once the ring is complete, use the following command to connect the ring signals. - -```tcl -connect_by_abutment -``` - -### Place Bondpad - -To place the wirebond pads over the IO cells. - -Example usage: - -``` -place_bondpad -bond PAD IO_* -``` - -```tcl -place_bondpad - -bond master - [-offset {x y}] - [-rotation rotation] - io_instances -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-bond` | Name of the bondpad master. | -| `-offset` | Offset to place the bondpad at with respect to the io instance. | -| `-rotation` | Rotation of the bondpad. | -| `io_instances` | Names of the instances to add bond pads to. | - -### Make False IO Site - -If the library does not contain sites for the IO cells, the following command can be used to add them. -This should not be used unless the sites are not in the library. - -Example usage: - -``` -make_fake_io_site -name IO_HSITE -width 1 -height 204 -make_fake_io_site -name IO_VSITE -width 1 -height 200 -make_fake_io_site -name IO_CSITE -width 200 -height 204 -``` - - -```tcl -make_fake_io_site - -name name - -width width - -height height -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | Name of the site. | -| `-width` | Width of the site (in microns). | -| `-height` | Height of the site (in microns). | - - -### RDL Route - -To route the RDL for the bump arrays. - -```tcl -rdl_route - -layer layer - [-bump_via access_via] - [-pad_via access_via] - [-width width] - [-spacing spacing] - [-turn_penalty penalty] - [-allow45] - nets -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layer` | Layer to route on. | -| `-bump_via` | Via to use to to connect the bump to the routing layer. | -| `-pad_via` | Via to use to to connect the pad cell to the routing layer. | -| `-width` | Width of the routing. Defaults to minimum width for each respective layer. | -| `-spacing` | Spacing of the routing. Defaults to minimum spacing for each respective layer. | -| `-turn_penalty` | Scaling factor to apply to discurage turning to allow for straighter routes. The default value is `2.0`, and the allowed values are floats. | -| `-allow45` | Specifies that 45 degree routing is permitted. | -| `nets` | Nets to route. | - -### Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/ICeWall.cpp) or the [swig file](./src/pad.i). - -| Command Name | Description | -| ----- | ----- | -| `find_site` | Find site given site name. | -| `find_master` | Find master given master name. | -| `find_instance` | Find instance given instance name. | -| `find_net` | Find net given net name. | -| `assert_required` | Assert argument that is required for `cmd` | -| `connect_iterm` | Connect instance terminals. Required inputs are: `inst_name`, `iterm_name`, `net_name`. | -| `convert_tcl` | These functions read from $ICeWall::library parameters to generate a standalone Tcl script. | - -## Example Scripts - -Example scripts for running ICeWall functions can be found in `./test`. - -``` -./test/assign_bumps.tcl -./test/bump_array_make.tcl -./test/bump_array_remove.tcl -./test/bump_array_remove_single.tcl -./test/connect_by_abutment.tcl -./test/make_io_sites.tcl -./test/place_bondpad.tcl -./test/place_bondpad_stagger.tcl -./test/place_pad.tcl -./test/rdl_route.tcl -./test/rdl_route_45.tcl -./test/rdl_route_assignments.tcl -``` - -## Regression Tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+pad) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/par.txt b/docs/manpages/md/man2/par.txt deleted file mode 100644 index 0c55634afa2..00000000000 --- a/docs/manpages/md/man2/par.txt +++ /dev/null @@ -1,608 +0,0 @@ -# Partition Manager - -The paritioning module (`par`) is based on TritonPart, an open-source -constraints-driven partitioner. `par` can be used -to partition a hypergraph or a gate-level netlist. - -## Highlights -- Start of the art multiple-constraints driven partitioning “multi-tool” -- Optimizes cost function based on user requirement -- Permissive open-source license -- Solves multi-way partitioning with following features: - - Multidimensional real-value weights on vertices and hyperedges - - Multilevel coarsening and refinement framework - - Fixed vertices constraint - - Timing-driven partitioning framework - - Group constraint: Groups of vertices need to be in same block - - Embedding-aware partitioning - -## Dependency - -We use Google OR-Tools as our ILP solver. - -Our recommendation is to follow the OpenROAD [DependencyInstaller](../etc/DependencyInstaller.sh) for installation of this requirement. - -Alternatively, you may also install Google OR-Tools -following these [instructions](https://developers.google.com/optimization/install). - -```{warning} -Due to a build issue, TritonPart is not supported for macOS. Stay tuned to this page for updates! -``` - -## Main Algorithm - -An overview of the TritonPart algorithm is shown below. It takes as inputs -- Hypergraph $H(V,E)$ in `.hgr` format. -- Vertex weight $w_v \in \mathcal{R}_+^m$ -- Hyperedge weight $w_e \in \mathcal{R}_+^n$ -- Number of blocks $K$. -- Imbalance factor $\epsilon$. -- User-specified cost function $\phi$. - -There are five main steps in the main algorithm, -mainly 1) constraints-driven coarsening, -2) initial partitioning, 3) refinement, 4) cut-overlay clustering and -partitioning (COCP), and 5) V-cycle refinement. The steps for the -timing-aware algorithm may be found in the next [section](#timing-aware-algorithm). - -1. Constraints-Driven Coarsening - -The first step involves multilevel coarsening. Specifically, at each level, -clusters of vertices are identified, and the merged and represented -as a single vertex in the resulting coarser hypergraph. In this algorithm, -the First-Choice scheme is used, which traverses the vertices in the -hypergraph according to a given ordering and merges pairs of vertices with -high connectivity. The connectivity between a pair of vertices $(u,v)$ -is measured as follows: - -$$r(u, v) = \sum_{e\in \{I(v)\cap I(u)\}} \frac{\langle \alpha, w_e\rangle}{|e|-1}$$ - -To efficiently manage multiple constraints, the following enhancements are -made to the coarsening scheme above: - -- **Fixed Vertex Constraint**: Fixed vertices that belong to the same partitioning block are merged into a single vertex. -- **Grouping Constraint**: Vertices that belong to the same group are merged into a single vertex. -- **Embedding Constraint**: The embedding information is incorporated into the heavy-edge rating function. The new connectivity is updated as follows: - -$$\hat{r}(u, v) = r(u, v) + \rho ||X_u - X_v||_2$$ - -where $\rho$ is a normalization factor, set to the average distance between -two vertex embeddings. When vertices $v_1, ... , v_t$ are merged into a -single vertex $v_{coarse}$, the corresponding vertex embedding -$X_{v_{coarse}}$ is defined as the *center of gravity* of $t$ vertices: - -$$X_{v_{coarse}} = \sum_{j=1}^{t} \frac{||w_{v_j}||}{M} X_{v_j},\ where\ M= \sum_{j=1}^t ||w_{v_j}|| $$ - -- **Community Guidance**: Only vertices within the same community are considered for merging. - -- **Tie-breaking mechanism**: If multiple neighbor pairs have the same rating score, combine the lexicographically first unmatched vertex to break ties. - -2. Initial Partitioning - -After completing the coarsening process, a initial partitioning solution -for the coarsest hypergraph $H_c$ is derived. Two sub-steps are involved in -this: the best partitioning solution from random and VILE partitioning -is chosen from $\eta = 50$ runs as a warm-start to the ILP-based -partitioner. The optimisation is based on only the cutsize rather -than the cost function $\phi$ to keep the runtime reasonable. - -3. Refinement - -After a feasible solution $H_{c_\xi}$ is obtained by initial partitioning, -uncoarsening and move-based refinement is performed to improve the -partitioning solution. Three refinement heuristics are applied in sequence: - -- **$K$-way pairwise FM (PM)**: This addresses multi-way paritioning as -concurrent bipartitioning problems in a restricted version of K-way -Fiduccia–Mattheyses (FM) algorithm. First, $\lfloor K/2\rfloor $ -pairs of blocks are obtained, with refinement specific vertex movements -restricted to associated paired blocks. Next, two-way FM is concurrently -performed on all the block pairs. finally, a new configuration of block -pairs is computed at the end of the PM. - -- **Direct $K$-way FM**: Using $K$ priority queues, for each block $V_i$, -establish a priority queue that stores the vertices that can be potentially -moved from current block to block $V_i$. This queue is ordered according -to the gain of the vertices. Gain is defined as the reduction in cost -function from the movement of the vertex from current block to $V_i$. -Next, after a vertex move, each priority queue is updated independently, -thus enabling parallel updates via multi-threading. Next, early-stop is -implemented by limiting the maximum number of vertices moved to 100 per -pass. Finally, the *corking effect* is mitigated by traversing the priority -queue belonging to the vertex with the highest gain and identifying a -feasible vertex move. - -- **Greedy Hyperedge Refinement (HER)**: First, randomly visit all -hyperedges. For each hyperedge $e$ that crosses the partition boundary, -determine whether a subset of vertices in $e$ can be moved without -violating the multi-dimensional balance constraints. The objective is -to make $e$ entirely constrained in a block. - -4. Cut-Overlay Clustering and Partitioning (COCP) - -Cut-overlay Clustering and Partitioning (COCP) is a mechanism to -combine multiple good-quality partitioning solutions to generate an -improved solution. To begin, the sets of hyperedges cut in the $\theta$ -candidate solutions are denoted as $E_1,..., E_\theta \subset E$. -First, $\cup_{i=1}^\theta E_i$ is removed from the hypergraph $H(V,E)$, -resulting in a number of connected components. Next, all vertices within -each connected component is merged to form a coarser hypergraph -$H_{overlay}$. If the number of vertices in $H_{overlay}$ is less than -$thr_{ilp}$, ILP-based partitioning is performed. If not, a single round of -constraints-driven coarsening is conducted to further reduce the size of -$H_{overlay}$ and generate a coarser hypergraph $H_{overlay}^{'}$. Finally, -multilevel refinement is performed to further improve the partitioning -solution at each level of the hierarchy and return the improved solution -$S^{'}$. - -5. V-Cycle Refinement - -Cut-overlay clustering and partitioning produces a high-quality partitioning -solution $S^{'}$. To improve it, there are three phases similar to *hMETIS*, -namely: multilevel coarsening, ILP-based partitioning, and refinement. -Firstly, in multilevel partitioning, $S^{'}$ is used as a community guidance -for the constraints-driven coarsening. Only vertices within the same block -are permitted to be merged, to ensure that the current solution $S^{'}$ -is preserved in the coarsest hypergraph $H_{c_\xi}$. In the ILP-based -partitioning phase, if the number of vertices in $H_{c_\xi}$ does not -exceed $thr_{ilp}$, run ILP-based partitioning to improve $S^{'}$. Else, -continue with $S^{'}$ in successive iterations of these two steps -(default set to 2). Refinement phase is conducted as per step 3. - -![](./doc/algo.webp) -
TritonPart algorithm at a glance
- -## Timing Aware Algorithm - -`par` can also be used as a timing-aware partitioning framework. A slack -propagation methodology is used that optimizes cuts for both timing-critical -and timing-noncritical paths. - -1. Extraction of Timing Paths and Slack Information - -First, the top $P$ -timing-critical paths and the slack information of each hyperedge using -the wireload model (WLM) is obtained from *OpenSTA*. The timing cost of -each path is then calculated: - -$$t_p = (1- \frac{slack_p - \Delta}{clock\_period})^\mu$$ - -where a fixed extra delay $\Delta$ is introduced for timing guardband, -and $\mu$ (default 2) is the exponent. - -The snaking factor of a path $SF(p)$ is defined as the maximum number of -block reentries along the path $p$. The timing cost of a hyperedge is -computed using the timing weight corresponding to hyperedge slack $slack_e$, -and the accumulated timing cost of all paths traversing the hyperedge. - -$$t_e = (1- \frac{slack_e -\Delta}{clock\_period})^\mu + \sum_{\{p|e\in p\}}t_p$$ - -2. Timing-aware Coarsening - -Timing-aware feature is achieved by adding a timing cost of hyperedge $t_e$ -to the connectivity score earlier mentioned. If vertices $(u,v)$ are -associated with multiple critical paths, then they are more likely to be -merged. This is reflected in the update score function: - -$$r_t(u,v) = \hat{r}(u,v) + \sum_{e\in\{I(v) \cap I(u)\}} \frac{\beta t_e}{|e| - 1}$$ - -3. Timing-aware Refinement - -Timing-aware refinement is based on the similar cost function as the main -algorithm. Instead, an additional slack propagation step is performed at -the end of each PM/FM/HER pass. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Triton Part Hypergraph - -This command performs hypergraph netlist partitioning. - -```tcl -triton_part_hypergraph - -hypergraph_file hypergraph_file - -num_parts num_parts - -balance_constraint balance_constraint - [-base_balance base_balance] - [-seed seed] - [-vertex_dimension vertex_dimension] - [-hyperedge_dimension hyperedge_dimension] - [-placement_dimension placement_dimension] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-placement_file placement_file] - [-e_wt_factors e_wt_factors] - [-v_wt_factors ] - [-placement_wt_factors ] - [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] - [-thr_coarsen_vertices thr_coarsen_vertices] - [-thr_coarsen_hyperedges thr_coarsen_hyperedges] - [-coarsening_ratio coarsening_ratio] - [-max_coarsen_iters max_coarsen_iters] - [-adj_diff_ratio adj_diff_ratio] - [-min_num_vertices_each_part min_num_vertices_each_part] - [-num_initial_solutions num_initial_solutions] - [-num_best_initial_solutions num_best_initial_solutions] - [-refiner_iters refiner_iters] - [-max_moves max_moves] - [-early_stop_ratio early_stop_ratio] - [-total_corking_passes total_corking_passes] - [-v_cycle_flag v_cycle_flag ] - [-max_num_vcycle max_num_vcycle] - [-num_coarsen_solutions num_coarsen_solutions] - [-num_vertices_threshold_ilp num_vertices_threshold_ilp] - [-global_net_threshold global_net_threshold] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | -| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | -| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | -| `-seed` | Random seed. The default value is `0`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | -| `-vertex_dimension` | Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-hyperedge_dimension` | Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-placement_dimension` | Number of dimensions for canvas, if placement information is provided. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-hypergraph_file` | Path to hypergraph file. | -| `-fixed_file` | Path to fixed vertices constraint file. | -| `-community_file` | Path to `community` attributes file to guide the partitioning process. | -| `-group_file` | Path to `stay together` attributes file. | -| `-placement_file` | Placement information file, each line corresponds to a group fixed vertices, community and placement attributes following the [hMETIS](https://course.ece.cmu.edu/~ee760/760docs/hMetisManual.pdf) format. | -| `-e_wt_factors` | Hyperedge weight factor. | -| `-v_wt_factors` | Vertex weight factors. | -| `-placement_wt_factors` | Placement weight factors. | -| `-thr_coarsen_hyperedge_size_skip` | Threshold for ignoring large hyperedge (default 200, integer). | -| `-thr_coarsen_vertices` | Number of vertices of coarsest hypergraph (default 10, integer). | -| `-thr_coarsen_hyperedges` | Number of vertices of coarsest hypergraph (default 50, integer). | -| `-coarsening_ratio` | Coarsening ratio of two adjacent hypergraphs (default 1.6, float). | -| `-max_coarsen_iters` | Number of iterations (default 30, integer). | -| `-adj_diff_ratio` | Minimum difference of two adjacent hypergraphs (default 0.0001, float). | -| `-min_num_vertices_each_part` | Minimum number of vertices in each partition (default 4, integer). | -| `-num_initial_solutions` | Number of initial solutions (default 50, integer). | -| `-num_best_initial_solutions` | Number of top initial solutions to filter out (default 10, integer). | -| `-refiner_iters` | Refinement iterations (default 10, integer). | -| `-max_moves` | The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement (default 60, integer). | -| `-early_stop_ratio` | Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exits the current FM pass. The intention behind this is that most of the gains are achieved by the first few FM moves. (default 0.5, float). | -| `-total_corking_passes` | Maximum level of traversing the buckets to solve the "corking effect" (default 25, integer). | -| `-v_cycle_flag` | Disables v-cycle is used to refine partitions (default true, bool). | -| `-max_num_vcycle` | Maximum number of `vcycles` (default 1, integer). | -| `-num_coarsen_solutions` | Number of coarsening solutions with different randoms seed (default 3, integer). | -| `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning.(default 50, integer). | -| `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart (default 1000, integer). | - -### Evaluate Hypergraph Partition - -This command evaluates hypergraph partition. - -```tcl -evaluate_hypergraph_solution - -num_parts num_parts - -balance_constraint balance_constraint - -hypergraph_file hypergraph_file - -solution_file solution_file - [-base_balance base_balance] - [-vertex_dimension vertex_dimension] - [-hyperedge_dimension hyperedge_dimension] - [-fixed_file fixed_file] - [-group_file group_file] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | -| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | -| `-vertex_dimension` | Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-hyperedge_dimension` | Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-hypergraph_file` | Path to hypergraph file. | -| `-solution_file` | Path to solution file. | -| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | -| `-fixed_file` | Path to fixed vertices constraint file. | -| `-group_file` | Path to `stay together` attributes file. | -| `-e_wt_factors` | Hyperedge weight factor. | -| `-v_wt_factors` | Vertex weight factor. | - - -### Triton Part Design - -This command partitions the design netlist. Note that design must be loaded in memory. - -```tcl -triton_part_design - [-num_parts num_parts] - [-balance_constraint balance_constraint] - [-base_balance base_balance] - [-seed seed] - [-timing_aware_flag timing_aware_flag] - [-top_n top_n] - [-placement_flag placement_flag] - [-fence_flag fence_flag] - [-fence_lx fence_lx] - [-fence_ly fence_ly] - [-fence_ux fence_ux] - [-fence_uy fence_uy] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-solution_file solution_file] - [-net_timing_factor net_timing_factor] - [-path_timing_factor path_timing_factor] - [-path_snaking_factor path_snaking_factor] - [-timing_exp_factor timing_exp_factor] - [-extra_delay extra_delay] - [-guardband_flag guardband_flag] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] - [-placement_wt_factors placement_wt_factors] - [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] - [-thr_coarsen_vertices thr_coarsen_vertices] - [-thr_coarsen_hyperedges thr_coarsen_hyperedges] - [-coarsening_ratio coarsening_ratio] - [-max_coarsen_iters max_coarsen_iters] - [-adj_diff_ratio adj_diff_ratio] - [-min_num_vertices_each_part min_num_vertices_each_part] - [-num_initial_solutions num_initial_solutions] - [-num_best_initial_solutions num_best_initial_solutions] - [-refiner_iters refiner_iters] - [-max_moves max_moves] - [-early_stop_ratio early_stop_ratio] - [-total_corking_passes total_corking_passes] - [-v_cycle_flag v_cycle_flag ] - [-max_num_vcycle max_num_vcycle] - [-num_coarsen_solutions num_coarsen_solutions] - [-num_vertices_threshold_ilp num_vertices_threshold_ilp] - [-global_net_threshold global_net_threshold] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | -| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | -| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | -| `-seed` | Random seed. The default value is `1`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | -| `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | -| `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT`. | -| `-placement_flag` | Enable placement driven partitioning. The default value is `false`, and the allowed values are booleans. | -| `-fence_flag ` | Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. | -| `-fence_lx ` | Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_ly ` | Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_ux ` | Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_uy ` | Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fixed_file` | Path to fixed vertices constraint file | -| `-community_file` | Path to `community` attributes file to guide the partitioning process. | -| `-group_file` | Path to `stay together` attributes file. | -| `-solution_file` | Path to solution file. | -| `-net_timing_factor` | Hyperedge timing weight factor (default 1.0, float). | -| `-path_timing_factor` | Cutting critical timing path weight factor (default 1.0, float). | -| `-path_snaking_factor` | Snaking a critical path weight factor (default 1.0, float). | -| `-timing_exp_factor` | Timing exponential factor for normalized slack (default 1.0, float). | -| `-extra_delay` | Extra delay introduced by a cut (default 1e-9, float). | -| `-guardband_flag` | Enable timing guardband option (default false, bool). | -| `-e_wt_factors` | Hyperedge weight factor. | -| `-v_wt_factors` | Vertex weight factor. | -| `-placement_wt_factors` | Placement weight factor. | -| `-thr_coarsen_hyperedge_size_skip` | Threshold for ignoring large hyperedge. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | -| `-thr_coarsen_vertices` | Number of vertices of coarsest hypergraph. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | -| `-thr_coarsen_hyperedges` | Number of vertices of coarsest hypergraph. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-coarsening_ratio` | Coarsening ratio of two adjacent hypergraphs. The default value is `1.5`, and the allowed values are floats. | -| `-max_coarsen_iters` | Number of iterations. The default value is `30`, and the allowed values are integers `[0, MAX_INT]`. | -| `-adj_diff_ratio` | Minimum ratio difference of two adjacent hypergraphs. The default value is `0.0001`, and the allowed values are floats. | -| `-min_num_vertices_each_part` | Minimum number of vertices in each partition. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. | -| `-num_initial_solutions` | Number of initial solutions. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. | -| `-num_best_initial_solutions` | Number of top initial solutions to filter out. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | -| `-refiner_iters` | Refinement iterations. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | -| `-max_moves` | The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. | -| `-early_stop_ratio` | Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exists the current FM pass. The intention behind this being that most of the gains are achieved by the first few FM moves. The default value is `0.5`, and the allowed values are floats. | -| `-total_corking_passes` | Maximum level of traversing the buckets to solve the "corking effect". The default value is `25`, and the allowed values are integers `[0, MAX_INT]`. | -| `-v_cycle_flag` | Disables v-cycle is used to refine partitions. The default value is `true`, and the allowed values are booleans. | -| `-max_num_vcycle` | Maximum number of vcycles. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-num_coarsen_solutions` | Number of coarsening solutions with different randoms seed. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. | -| `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | -| `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | - -### Evaluate Part Design Solution - -This command evaluates partition design solution. - -```tcl -evaluate_part_design_solution - [-num_parts num_parts] - [-balance_constraint balance_constraint] - [-base_balance base_balance] - [-timing_aware_flag timing_aware_flag] - [-top_n top_n] - [-fence_flag fence_flag] - [-fence_lx fence_lx] - [-fence_ly fence_ly] - [-fence_ux fence_ux] - [-fence_uy fence_uy] - [-fixed_file fixed_file] - [-community_file community_file] - [-group_file group_file] - [-hypergraph_file hypergraph_file] - [-hypergraph_int_weight_file hypergraph_int_weight_file] - [-solution_file solution_file] - [-net_timing_factor net_timing_factor] - [-path_timing_factor path_timing_factor] - [-path_snaking_factor path_snaking_factor] - [-timing_exp_factor timing_exp_factor] - [-extra_delay extra_delay] - [-guardband_flag guardband_flag] - [-e_wt_factors e_wt_factors] - [-v_wt_factors v_wt_factors] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | -| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | -| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | -| `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | -| `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | -| `-fence_flag ` | Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. | -| `-fence_lx ` | Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_ly ` | Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_ux ` | Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fence_uy ` | Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. | -| `-fixed_file` | Path to fixed vertices constraint file. | -| `-community_file` | Path to `community` attributes file to guide the partitioning process. | -| `-group_file` | Path to `stay together` attributes file. | -| `-hypergraph_file` | Path to hypergraph file. | -| `-hypergraph_int_weight_file` | Path to `hMETIS` format integer weight file. | -| `-solution_file` | Path to solution file. | -| `-net_timing_factor` | Hyperedge timing weight factor. The default value is `1.0`, and the allowed values are floats. | -| `-path_timing_factor` | Cutting critical timing path weight factor. The default value is `1.0`, and the allowed values are floats. | -| `-path_snaking_factor` | Snaking a critical path weight factor. The default value is `1.0`, and the allowed values are floats. | -| `-timing_exp_factor` | Timing exponential factor for normalized slack. Thedefault value is `1.0`, and the allowed values are floats. | -| `-extra_delay` | Extra delay introduced by a cut. The default value is `1e-9`, and the allowed values are floats. | -| `-guardband_flag` | Enable timing guardband option. The default value is 1`false`, and the allowed values are booleans. | -| `-e_wt_factors` | Hyperedge weight factors. | -| `-v_wt_factors` | Vertex weight factors. | - -### Write Partition Verilog - -This command writes the partition result to verilog. - -```tcl -write_partition_verilog - [-port_prefix prefix] - [-module_suffix suffix] - [file] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-port_prefix` | Port name prefix. | -| `-module_suffix` | Module name suffix. | -| `file` | Filename to write parition verilog to. | - -### Read Partitioning - -This command reads the partition file into design. - -```tcl -read_partitioning - -read_file name - [-instance_map_file file_path] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-read_file` | Read partitioning file (usually with the extension `.part`). The file format must match the same format as the output of `write_partition_verilog`. | -| `-instance_map_file` | Instance mapping file. | - - -## Example Scripts - -#### How to partition a hypergraph in the way you would using hMETIS (min-cut partitioning) - -``` -triton_part_hypergraph -hypergraph_file des90.hgr -num_parts 5 -balance_constraint 2 -seed 2 -``` -You can also check the provided example [here](./examples/min-cut-partitioning/run_openroad.tcl). - -#### How to perform the embedding-aware partitioning - -``` -set num_parts 2 -set balance_constraint 2 -set seed 0 -set design sparcT1_chip2 -set hypergraph_file "${design}.hgr" -set placement_file "${design}.hgr.ubfactor.2.numparts.2.embedding.dat" -set solution_file "${design}.hgr.part.${num_parts}" - -triton_part_hypergraph -hypergraph_file $hypergraph_file -num_parts $num_parts \ - -balance_constraint $balance_constraint \ - -seed $seed \ - -placement_file ${placement_file} -placement_wt_factors { 0.00005 0.00005 } \ - -placement_dimension 2 - -``` - -You can find the provided example [here](./examples/embedding-aware-partitioning/run_placement_aware_flow.tcl). - - -#### How to partition a netlist - -``` -# set technology information -set ALL_LEFS “list_of_lefs” -set ALL_LIBS “list_of_libs” -# set design information -set design “design_name” -set top_design “top_design” -set netlist “netlist.v” -set sdc “timing.sdc” -foreach lef_file ${ALL_LEFS} { - read_lef $lef_file -} -foreach lib_file ${ALL_LIBS} { - read_lib $lib_file -} -read_verilog $netlist -link_design $top_design -read_sdc $sdc - -set num_parts 5 -set balance_constraint 2 -set seed 0 -set top_n 100000 -# set the extra_delay_cut to 20% of the clock period -# the extra_delay_cut is introduced for each cut hyperedge -set extra_delay_cut 9.2e-10 -set timing_aware_flag true -set timing_guardband true -set part_design_solution_file "${design}_part_design.hgr.part.${num_parts}" - -############################################################################################## -## TritonPart with slack progagation -############################################################################################## -puts "Start TritonPart with slack propagation" -# call triton_part to partition the netlist -triton_part_design -num_parts $num_parts -balance_constraint $balance_constraint \ - -seed $seed -top_n $top_n \ - -timing_aware_flag $timing_aware_flag -extra_delay $extra_delay_cut \ - -guardband_flag $timing_guardband \ - -solution_file $part_design_solution_file -``` - -You can find the provided example [here](./examples/timing-aware-partitioning/run_timing_aware_flow.tcl). - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## References -1. Bustany, I., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). K-SpecPart: A Supervised Spectral Framework for Multi-Way Hypergraph Partitioning Solution Improvement. arXiv preprint arXiv:2305.06167. [(.pdf)](https://arxiv.org/pdf/2305.06167) -1. Bustany, I., Gasparyan, G., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). "An Open-Source Constraints-Driven General Partitioning Multi-Tool for VLSI Physical Design", Proc. ACM/IEEE International Conference of Computer-Aided Design 2023, to appear. - - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/docs/manpages/md/man2/pdn.txt b/docs/manpages/md/man2/pdn.txt deleted file mode 100644 index 3f567be054d..00000000000 --- a/docs/manpages/md/man2/pdn.txt +++ /dev/null @@ -1,423 +0,0 @@ -# Power Distribution Network Generator - -The power distribution network (PDN) generator module in OpenROAD (`pdn`) -is based on the PDNGEN tool. -This utility aims to simplify the process of adding a power grid into a -floorplan. The aim is to specify a small set of power grid policies to be -applied to the design, such as layers to use, stripe width and spacing, -then have the utility generate the actual metal straps. Grid policies can -be defined over the stdcell area, and over areas occupied by macros. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### PDNGen - -Build a power grid in accordance with the information specified. - -```tcl -pdngen - [-skip_trim] - [-dont_add_pins] - [-reset] - [-ripup] - [-report_only] - [-failed_via_report file] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-skip_trim` | Skip the metal trim step, which attempts to remove metal stubs. | -| `-dont_add_pins` | Prevent the creation of block pins. | -| `-reset` | Reset the grid and domain specifications. | -| `-ripup` | Ripup the existing power grid, as specified by the voltage domains. | -| `-report_only` | Print the current specifications. | -| `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | - -### Set Voltage Domain - -Defines a named voltage domain with the names of the power and ground nets for a region. - -This region must already exist in the floorplan before referencing it with the `set_voltage_domain` command. If the `-region` argument is not supplied then region is the entire core area of the design. - -Example usage: - -``` -set_voltage_domain -power VDD -ground VSS -set_voltage_domain -name TEMP_ANALOG -region TEMP_ANALOG -power VIN -ground VSS -set_voltage_domain -region test_domain -power VDD -ground VSS -secondary_power VREG -``` - -```tcl -set_voltage_domain - -name domain_name - -power power_net_name - -ground ground_net_name - [-region region_name] - [-secondary_power secondary_power_net] - [-switched_power switched_power_net] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | Defines the name of the voltage domain, default is "Core" or region name if provided. | -| `-power` | Specifies the name of the power net for this voltage domain. | -| `-ground` | Specifies the name of the ground net for this voltage domain. | -| `-region` | Specifies a region of the design occupied by this voltage domain. | -| `-secondary_power` | Specifies the name of the secondary power net for this voltage domain. | -| `-switched_power` | Specifies the name of the switched power net for switched power domains. | - -### Define PDN Grid - -```{warning} -`define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! -``` - -- Method 1: General Usage -Define the rules to describe a power grid pattern to be placed in the design. - -Example usage: - -``` -define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} -``` - -- Method 2: Macros -Define the rules for one or more macros. - -Example usage: - -``` -define_pdn_grid -macro -name ram -orient {R0 R180 MX MY} -grid_over_pg_pins -starts_with POWER -pin_direction vertical -define_pdn_grid -macro -name rotated_rams -orient {E FE W FW} -grid_over_boundary -starts_with POWER -pin_direction horizontal -``` - -- Method 3: Modify existing power domain -Modify pre-existing power domain. - -Example usage: - -``` -define_pdn_grid -name main_grid -existing -``` - -```tcl -define_pdn_grid - [-name name] - [-voltage_domain list_of_domain_names] - [-pins list_of_pin_layers] - [-starts_with POWER|GROUND] - [-obstructions list_of_layers] - [-macro] - [-grid_over_pg_pins|-grid_over_boundary] - [-orient list_of_valid_orientations] - [-instances list_of_instances] - [-cells list_of_cells] - [-default] - [-halo list_of_halo_values] - [-power_switch_cell name] - [-power_control signal_name] - [-power_control_network STAR|DAISY] - [-existing] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | -| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | -| `-macro` | Defines the type of grid being added as a macro. | -| `-grid_over_pg_pins`, `-grid_over_boundary` | Place the power grid over the power ground pins of the macro. (Default True), or Place the power grid over the entire macro. | -| `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | -| `-instances` | For a macro, defines a set of valid instances. Macros with a matching instance name will use this grid specification. | -| `-cells` | For a macro, defines a set of valid cells. Macros which are instances of one of these cells will use this grid specification. | -| `-default` | For a macro, specifies this is a default grid that can be overwritten. | -| `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively (Default: 0). | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | -| `-power_switch_cell` | Defines the name of the coarse grain power switch cell to be used wherever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. | -| `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | -| `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. | -| `-existing` | Flag to enable defining for existing routing solution. | - - -### Define Power Switch Cell - -Define a power switch cell that will be inserted into a power grid - -Example usage: - -``` -define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS -``` - -```tcl -define_power_switch_cell - -name name - -control control_pin - -power_switchable power_switchable_pin - -power unswitched_power_pin - -ground ground_pin - [-acknowledge acknowledge_pin_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | The name of the power switch cell. | -| `-control` | The name of the power control port of the power switch cell. | -| `-switched_power` | Defines the name of the pin that outputs the switched power net. | -| `-power` | Defines the name of the pin that connects to the unswitched power net. | -| `-ground` | Defines the name of the pin that connects to the ground net. | -| `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | - -### Add PDN Stripe - -Defines a pattern of power and ground stripes in a single layer to be added to a power grid. - -Example usage: - -``` -add_pdn_stripe -grid main_grid -layer metal1 -followpins -add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins -add_pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND -``` - -```tcl -add_pdn_stripe - -layer layer_name - [-grid grid_name] - [-width width_value] - [-followpins] - [-extend_to_core_ring] - [-pitch pitch_value] - [-spacing spacing_value] - [-offset offset_value] - [-starts_with POWER|GROUND] - [-extend_to_boundary] - [-snap_to_grid] - [-number_of_straps count] - [-nets list_of_nets] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layer` | Specifies the name of the layer for these stripes. | -| `-grid` | Specifies the grid to which this stripe definition will be added. (Default: Last grid defined by `define_pdn_grid`). | -| `-width` | Value for the width of stripe. | -| `-followpins` | Indicates that the stripe forms part of the stdcell rails, pitch and spacing are dictated by the stdcell rows, the `-width` is not needed if it can be determined from the cells. | -| `-extend_to_core_ring` | Extend the stripes to the core PG ring. | -| `-pitch` | Value for the distance between each power/ground pair. | -| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch (Default: pitch / 2). | -| `-offset` | Value for the offset of the stripe from the lower left corner of the design core area. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | -| `-extend_to_boundary` | Extend the stripes to the boundary of the grid. | -| `-snap_to_grid` | Snap the stripes to the defined routing grid. | -| `-number_of_straps` | Number of power/ground pairs to add. | -| `-nets` | Limit straps to just this list of nets. | - - -### Add PDN Ring - -The `add_pdn_ring` command is used to define power/ground rings around a grid region. -The ring structure is built using two layers that are orthogonal to each other. -A power/ground pair will be added above and below the grid using the horizontal -layer, with another power/ground pair to the left and right using the vertical layer. -Together these 4 pairs of power/ground stripes form a ring around the specified grid. -Power straps on these layers that are inside the enclosed region are extend to -connect to the ring. - -Example usage: - -``` -add_pdn_ring -grid main_grid -layer {metal6 metal7} -widths 5.0 -spacings 3.0 -core_offset 5 -``` - -```tcl -add_pdn_ring - -layers layer_name - -widths width_value|list_of_2_values - -spacings spacing_value|list_of_2_values - [-grid grid_name] - [-core_offsets offset_value] - [-pad_offsets offset_value] - [-add_connect] - [-extend_to_boundary] - [-connect_to_pads] - [-connect_to_pad_layers layers] - [-starts_with POWER|GROUND] - [-nets list_of_nets] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layers` | Specifies the name of the layer for these stripes. | -| `-widths` | Value for the width of the stdcell rail. | -| `-spacings` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2). | -| `-grid` | Specifies the name of the grid to which this ring defintion will be added. (Default: Last grid created by `define_pdn_grid`). | -| `-core_offsets` | Value for the offset of the ring from the grid region. | -| `-pad_offsets` | When defining a power grid for the top level of an SoC, can be used to define the offset of ring from the pad cells. | -| `-add_connect` | Automatically add a connection between the two layers. | -| `-extend_to_boundary` | Extend the rings to the grid boundary. | -| `-connect_to_pads` | The core side of the pad pins will be connected to the ring. | -| `-connect_to_pad_layers` | Restrict the pad pins layers to this list. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | -| `-nets` | Limit straps to just this list of nets. | - -### Add PDN Connect - -The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. - -Example usage: - -``` -add_pdn_connect -grid main_grid -layers {metal1 metal2} -cut_pitch 0.16 -add_pdn_connect -grid main_grid -layers {metal2 metal4} -add_pdn_connect -grid main_grid -layers {metal4 metal7} - -add_pdn_connect -grid ram -layers {metal4 metal5} -add_pdn_connect -grid ram -layers {metal5 metal6} -add_pdn_connect -grid ram -layers {metal6 metal7} - -add_pdn_connect -grid rotated_rams -layers {metal4 metal6} -add_pdn_connect -grid rotated_rams -layers {metal6 metal7} -``` - -```tcl -add_pdn_connect - -layers list_of_two_layers - [-grid grid_name] - [-cut_pitch pitch_value] - [-fixed_vias list_of_fixed_vias] - [-dont_use_vias list_of_vias] - [-max_rows rows] - [-max_columns columns] - [-ongrid ongrid_layers] - [-split_cuts split_cuts_mapping] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layers` | Layers to be connected where there are overlapping power or overlapping ground nets. | -| `-grid` | Specifies the name of the grid definition to which this connection will be added (Default: Last grid created by `define_pdn_grid`). | -| `-cut_pitch` | When the two layers are parallel e.g. overlapping stdcell rails, specify the distance between via cuts. | -| `-fixed_vias` | List of fixed vias to be used to form the via stack. | -| `-dont_use_vias` | List or pattern of vias to not use to form the via stack. | -| `-max_rows` | Maximum number of rows when adding arrays of vias. | -| `-max_columns` | Maximum number of columns when adding arrays of vias. | -| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | -| `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | - -### Repair PDN Vias - -To remove vias which generate DRC violations after detailed placement -and routing use `repair_pdn_vias`. - -```tcl -repair_pdn_vias - [-all] - [-net net_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-all` | Repair vias on all supply nets. | -| `-net` | Repair only vias on the specified net. | - -## Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](../src/PdnGen.cc) or the [swig file](PdnGen.i). - -| Command Name | Description | -| ----- | ----- | -| `name_cmp` | Compare 2 input strings `obj1` and `obj2` if they are equal. | -| `check_design_state` | Check if design is loaded. | -| `get_layer` | Get the layer reference of layer name. | -| `get_voltage_domains` | Gets a Tcl list of power domains in design. | -| `match_orientation` | Checks if a given orientation `orient` is within a list of orientations `orients`. | -| `get_insts` | Get Tcl list of instances. | -| `get_masters` | Get Tcl list of masters. | -| `get_one_to_two` | If a Tcl list has one element `{x}`, Tcl list `{x x}` is returned. If a Tcl list of two elements `{y y}`, list as is returned. Otherwise, for any other list lengths, error is triggered. | -| `get_one_to_four` | Similar logic for above function, except the logic only works for lists of length one, two and four respectively. All other list lengths triggers error. | -| `get_obstructions` | Get Tcl list of layers. | -| `get_starts_with` | If value starts with `POWER`, return 1; else if value starts with `GROUND` return 0; else return error. | -| `get_mterm` | Find master terminal. | -| `get_orientations` | Get list of valid orientations. | - -## Example scripts - -## Defining a SoC power grid with pads - -``` -add_global_connection -net VDD -pin_pattern {^VDD$} -power -add_global_connection -net VDD -pin_pattern {^VDDPE$} -add_global_connection -net VDD -pin_pattern {^VDDCE$} -add_global_connection -net VSS -pin_pattern {^VSS$} -ground -add_global_connection -net VSS -pin_pattern {^VSSE$} - -set_voltage_domain -power VDD -ground VSS - -define_pdn_grid -name "Core" -add_pdn_ring -grid "Core" -layers {metal8 metal9} -widths 5.0 -spacings 2.0 -core_offsets 4.5 -connect_to_pads - -add_pdn_stripe -followpins -layer metal1 -extend_to_core_ring - -add_pdn_stripe -layer metal4 -width 0.48 -pitch 56.0 -offset 2.0 -extend_to_core_ring -add_pdn_stripe -layer metal7 -width 1.40 -pitch 40.0 -offset 2.0 -extend_to_core_ring -add_pdn_stripe -layer metal8 -width 1.40 -pitch 40.0 -offset 2.0 -extend_to_core_ring -add_pdn_stripe -layer metal9 -width 1.40 -pitch 40.0 -offset 2.0 -extend_to_core_ring - -add_pdn_connect -layers {metal1 metal4} -add_pdn_connect -layers {metal4 metal7} -add_pdn_connect -layers {metal7 metal8} -add_pdn_connect -layers {metal8 metal9} -add_pdn_connect -layers {metal9 metal10} - -pdngen -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -Currently the following assumptions are made: - -1. The design is rectangular -1. The input floorplan includes the stdcell rows, placement of all macro blocks and IO pins. -1. The stdcells rows will be cut around macro placements - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+pdn) about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/docs/manpages/md/man2/ppl.txt b/docs/manpages/md/man2/ppl.txt deleted file mode 100644 index c0310246e1f..00000000000 --- a/docs/manpages/md/man2/ppl.txt +++ /dev/null @@ -1,321 +0,0 @@ -# Pin Placer - -Place pins on the boundary of the die on the track grid to minimize net -wirelengths. Pin placement also creates a metal shape for each pin using -min-area rules. - -For designs with unplaced cells, the net wirelength is computed considering -the center of the die area as the unplaced cells' position. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Define Pin Shape Pattern - -The `define_pin_shape_pattern` command defines a pin placement grid on the -specified layer. This grid has positions inside the die area, not only at -the edges of the die boundary. - -```tcl -define_pin_shape_pattern - -layer layer - -x_step x_step - -y_step y_step - -region {llx lly urx ury} - -size {width height} - [-pin_keepout dist] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layer` | The single top-most routing layer of the placement grid. | -| `-x_step`, `-y_step` | The distance (in microns) between each valid position on the grid in the x- and y-directions, respectively. | -| `-region` | The `{llx, lly, urx, ury}` region of the placement grid (in microns). | -| `-size` | The width and height (in microns) of the pins assigned to this grid. The centers of the pins are placed on the grid positions. Pins may have half of their shapes outside the defined region. | -| `-pin_keepout` | The boundary (in microns) around existing routing obstructions that the pins should avoid; this defaults to the `layer` minimum spacing. | - -#### Face-to-Face direct-bonding IOs - -The `define_pin_shape_pattern` command can be used to place pins in any metal -layer with the minimum allowed spacing to facilitate 3DIC integration of -chips using face-to-face packaging technologies. These technologies include -[micro bumps](https://semiengineering.com/bumps-vs-hybrid-bonding-for-advanced-packaging/) -and -[hybrid bonding](https://www.3dincites.com/2018/04/hybrid-bonding-from-concept-to-commercialization/) -for high density face-to-face interconnect. - -### Set IO Pin Constraint - -The `set_io_pin_constraint` command sets region constraints for pins according -to the pin direction or the pin name. This command can be called multiple -times with different constraints. - -You can use the `set_io_pin_constraint` command to restrict pins to the -pin placement grid created with the `define_pin_shape_pattern` command. - -It is possible to use the `-region`, `-group` and `-order` arguments together -per `set_io_pin_constraint` call, but the `-mirrored_pins` argument should be -called alone. - -```tcl -set_io_pin_constraint - [-direction direction] - [-pin_names names] - [-region edge:interval] - [-mirrored_pins names] - [-group] - [-order] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-direction` | Pin direction (`input`, `output`, `inout`, or `feedthrough`). | -| `-pin_names` | List of names. Only one of (`-direction`, `-pin_names`) should be used in a single call for the `set_io_pin_constraint` command. | -| `-region` | Syntax is `-region edge:interval`. The `edge` values are (`top|bottom|left|right`). The `interval` can be the whole edge with the wildcard `*` value or a range of values. | -| `-mirrored_pins` | List of pins that sets pairs of pins that will be symmetrically placed in the vertical or the horizontal edges. The number of pins in this list **must be even**. For example, in `set_io_pin_constraint -mirrored_pins {pin1 pin2 pin3 pin4 pin5 pin6}`, the pins `pin1` and `pin2` will be placed symmetrically to each other. Same for `pin3` and `pin4`, and for `pin5` and `pin6`. | -| `-group` | Flag places together on the die boundary the pin list defined in `-pin_names,` similar to the `-group_pins` option on the `place_pins` command. | -| `-order` | Flag places the pins ordered in ascending x/y position and must be used only when `-group` is also used. | - -The `edge` values are (up, top, bottom, left, right), where `up` is -the grid created by `define_pin_shape_pattern`. To restrict pins to the -pin placement grid defined with `define_pin_shape_pattern` use: - -- `-region up:{llx lly urx ury}` to restrict the pins into a specific - region in the grid. The region is defined in microns. -- `-region up:*` to restrict the pins into the entire region of the grid. - -The `up` option is only available when the pin placement grid is created with -the `define_pin_shape_pattern` command. - -### Clear IO Pin Constraints - -The `clear_io_pin_constraints` command clears all the previously-defined -constraints and pin shape patterns created with `set_io_pin_constraint` or -`define_pin_shape_pattern`. - -```tcl -clear_io_pin_constraints -``` - -### Set Pin Length - -The `set_pin_length` command defines the length of all vertical and horizontal -pins. - -```tcl -set_pin_length - [-hor_length h_length] - [-ver_length v_length] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-hor_length` | The length (in microns) of the horizontal pins. | -| `-ver_length` | The length (in microns) of the vertical pins. | - -### Set Pin Length Extension - -The `set_pin_length_extension` command defines the an extension of the length -of all vertical and horizontal pins. Note that this command may generate pins -partially outside the die area. - -```tcl -set_pin_length_extension - [-hor_extension h_extension] - [-ver_extension v_extension] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-hor_extension` | The length (in microns) for the horizontal pins. | -| `-ver_extension` | The length (in microns) for the vertical pins. | - -### Set Pin Thick Multiplier - -The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all -vertical and horizontal pins. - -```tcl -set_pin_thick_multiplier - [-hor_multiplier h_mult] - [-ver_multiplier v_mult] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-hor_multiplier` | The thickness multiplier for the horizontal pins. | -| `-ver_multiplier` | The thickness multiplier for the vertical pins. | - -### Set Simulated Annealing Parameters - -The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. - -```tcl -set_simulated_annealing - [-temperature temperature] - [-max_iterations iter] - [-perturb_per_iter perturbs] - [-alpha alpha] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-temperature` | Temperature parameter. The default value is `1.0`, and the allowed values are floats `[0, MAX_FLOAT]`. | -| `-max_iterations` | The maximum number of iterations. The default value is `2000`, and the allowed values are integers `[0, MAX_INT]`. | -| `-perturb_per_iter` | The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -| `-alpha` | The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. | - -### Place Pin - -The `place_pin` command places a specific pin in the specified location with the specified size. -It is recommended that individual pins be placed before the `place_pins` command, -as the routing tracks occupied by these individual pins will be blocked, preventing overlaps. - -To place an individual pin: - -```tcl -place_pin - -pin_name pin_name - -layer layer - -location {x y} - [-pin_size {width height}] - [-force_to_die_boundary] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-pin_name` | The name of a pin of the design. | -| `-layer` | The routing layer where the pin is placed. | -| `-location` | The center of the pin (in microns). | -| `-pin_size` | Tthe width and height of the pin (in microns). | -| `-force_to_die_boundary` | When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. | - -### Place Pins - -The `place_pins` command places all pins together. Use the following command to perform pin placement: - -```tcl -place_pins - -hor_layers h_layers - -ver_layers v_layers - [-random_seed seed] - [-random] - [-corner_avoidance length] - [-min_distance distance] - [-min_distance_in_tracks] - [-exclude region] - [-group_pins pin_list] - [-annealing] - [-write_pin_placement file_name] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-hor_layers` | The layers to create the metal shapes of pins placed in horizontal tracks. It can be a single layer or a list of layer names. | -| `-ver_layers` | The layers to create the metal shapes of pins placed in vertical tracks. It can be a single layer or a list of layer names. | -| `-corner_avoidance` | The distance (in microns) from each corner within which pin placement should be avoided. | -| `-min_distance` | The minimum distance between pins on the die boundary. This distance can be in microns (default) or in number of tracks between each pin. | -| `-min_distance_in_tracks` | Flag that allows setting the min distance in number of tracks instead of microns. | -| `-exclude` | A region where pins cannot be placed. Either `top|bottom|left|right:edge_interval`, which is the edge interval from the selected edge; `begin:end` for begin-end of all edges. | -| `-group_pins` | A list of pins to be placed together on the die boundary. | -| `-annealing` | Flag to enable simulated annealing pin placement. | -| `-write_pin_placement` | A file with the pin placement generated in the format of multiple calls for the `place_pin` command. | - -The `exclude` option syntax is `-exclude edge:interval`. The `edge` values are -(top|bottom|left|right). The `interval` can be the whole edge, with the `*` -value, or a range of values. For example, in `place_pins -hor_layers metal2 --ver_layers metal3 -exclude top:* -exclude right:15-60.5 -exclude left:*-50` -three intervals are excluded: the whole top edge, the right edge from 15 -microns to 60.5 microns, and the left edge from its beginning to 50 microns. - -#### Developer Arguments - -| Switch Name | Description | -| ----- | ----- | -| `-random_seed` | Specify the seed for random operations. | -| `-random` | When this flag is enabled, the pin placement is random. | - -### Write Pin Placement - -The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: - -```tcl -write_pin_placement - file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `file_name` | The name of the file with the pin placement. | - -### Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/IOPlacer.cpp) or the [swig file](./src/IOPlacer.i). - -| Command Name | Description | -| ----- | ----- | -| `parse_edge` | Parse edge (top/bottom/left/right). | -| `parse_direction` | Parse direction. | -| `parse_excludes_arg` | Parse excluded arguments. | -| `parse_group_pins_arg` | Parse group pins arguments. | -| `parse_layer_name` | Parse layer name. | -| `parse_pin_names` | Parse pin names. | -| `get_edge_extreme` | Get extremes of edge. | -| `exclude_intervals` | Set exclude interval. | -| `add_pins_to_constraint` | Add pins to constrained region. | -| `add_pins_to_top_layer` | Add pins to top layer. | - -## Example scripts - -Example scripts of `ppl` running on a sample design of `gcd` as follows: - -```tcl -./test/gcd.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## References - -- This code depends on [Munkres](src/munkres/README.txt). - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+ioplacer+in%3Atitle) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/psm.txt b/docs/manpages/md/man2/psm.txt deleted file mode 100644 index 92491d87c0c..00000000000 --- a/docs/manpages/md/man2/psm.txt +++ /dev/null @@ -1,157 +0,0 @@ -# IR Drop Analysis - -The IR Drop Analysis module in OpenROAD (`psm`) is based on PDNSim, -an open-source static IR analyzer. - -Features: - -- Report worst IR drop. -- Report worst current density over all nodes and wire segments in the - power distribution network, given a placed and PDN-synthesized design. -- Check for floating PDN stripes on the power and ground nets. -- Spice netlist writer for power distribution network wire segments. - -| | | -| - | - | -| ![Image 1](doc/current_map.jpg) | ![Image 2](doc/IR_map.jpg) | -

(Left): Current Map, (Right): IR drop map

- -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Analyze Power Grid - -This command analyzes power grid. - -```tcl -analyze_power_grid - [-vsrc vsrc_file] - [-outfile out_file] - [-error_file err_file] - [-enable_em] - [-em_outfile em_out_file] - [-net net_name] - [-dx bump_pitch_x] - [-dy bump_pitch_y] - [-node_density val_node_density] - [-node_density_factor val_node_density_factor] - [-corner corner] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-vsrc` | File to set the location of the power C4 bumps/IO pins. [Vsrc_aes.loc file](test/Vsrc_aes_vdd.loc) for an example with a description specified [here](doc/Vsrc_description.md). | -| `-dx`,`-dy` | These arguments set the bump pitch to decide the voltage source location in the absence of a vsrc file. Default bump pitch of 140um used in absence of these arguments and vsrc. | -| `-net` | Name of the net to analyze, power or ground net name. | -| `-enable_em` | Report current per power grid segment. | -| `-outfile` | Write per-instance voltage into the file. | -| `-em_outfile` | Write the per-segment current values into a file. This option is only available if used in combination with `-enable_em`. | -| `-voltage` | Sets the voltage on a specific net. If this option is not set, the Liberty file's voltage value is obtained from operating conditions. | -| `-node_density` | Node density (in microns) on the standard cell rails. It cannot be used together with `-node_density_factor`. | -| `-node_density_factor` | Factor which is multiplied by standard cell height to determine the node density on the std cell rails. It cannot be used together with `-node_density`. The default value is `5`, and the allowed values are integers `[0, MAX_INT]`. | -| `-corner` | Corner to use for analysis. | - -### Check Power Grid - -This command checks power grid. - -```tcl -check_power_grid - -net net_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | Name of the net to analyze. Must be a power or ground net name. | - -### Write PG Spice - -This command writes the `spice` file for power grid. - -```tcl -write_pg_spice - [-vsrc vsrc_file] - [-outfile out_file] - [-net net_name] - [-dx bump_pitch_x] - [-dy bump_pitch_y] - [-corner corner] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-vsrc` | File to set the location of the power C4 bumps/IO pins. See [Vsrc_aes.loc file](test/Vsrc_aes_vdd.loc) for an example and its [description](doc/Vsrc_description.md). | -| `-dx`,`-dy` | Set the bump pitch to decide the voltage source location in the absence of a `vsrc` file. The default bump pitch is 140um if neither these arguments nor a `vsrc` file are given. | -| `-net` | Name of the net to analyze. Must be a power or ground net name. | -| `-outfile` | Write per-instance voltage written into the file. | -| `-corner` | Corner to use for analysis. | - -### Set PDNSim Net voltage - -This command sets PDNSim net voltage. - -```tcl -set_pdnsim_net_voltage - [-net net_name] - [-voltage volt] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | Name of the net to analyze. It must be a power or ground net name. | -| `-voltage` | Sets the voltage on a specific net. If this option is not given, the Liberty file's voltage value is obtained from operating conditions. | - -## Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/pdnsim.cpp) or the [swig file](./src/pdnsim.i). - -| Command Name | Description | -| ----- | ----- | -| `find_net` | Get a reference to net name. | - -## Example scripts - -Example scripts demonstrating how to run PDNSim on a sample design on `aes` as follows: - -``` -./test/aes_test_vdd.tcl -./test/aes_test_vss.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+psm+in%3Atitle) -about this tool. - -## References - -1. PDNSIM [documentation](doc/PDNSim-documentation.pdf) -1. Chhabria, V.A. and Sapatnekar, S.S. (no date) The-openroad-project/pdnsim: Power Grid Analysis, GitHub. Available at: https://github.com/The-OpenROAD-Project/PDNSim (Accessed: 24 July 2023). [(link)](https://github.com/The-OpenROAD-Project/PDNSim) - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/rcx.txt b/docs/manpages/md/man2/rcx.txt deleted file mode 100644 index 5cbea0d4b55..00000000000 --- a/docs/manpages/md/man2/rcx.txt +++ /dev/null @@ -1,299 +0,0 @@ -# Parasitics Extraction - -The parasitics extraction module in OpenROAD (`rcx`) is based on the -open-source OpenRCX, a Parasitic Extraction (PEX, or RCX) tool that -works on OpenDB design APIs. -It extracts routed designs based on the LEF/DEF layout model. - -OpenRCX extracts both Resistance and Capacitance for wires, based on coupling -distance to the nearest wire and the track density context over and/or under the -wire of interest, as well as cell -abstracts. The capacitance and resistance measurements are based on equations -of coupling distance interpolated on exact measurements from a calibration -file, called the Extraction Rules file. The Extraction Rules file (RC technology -file) is generated once for every process node and corner, using -a provided utility for DEF wire pattern generation and regression modeling. - -OpenRCX stores resistance, coupling capacitance and ground (i.e., grounded) capacitance -on OpenDB objects with direct pointers to the associated wire and via db -objects. Optionally, OpenRCX can generate a `.spef` file. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Define Process Corner - -This command defines proccess corner. - -```tcl -define_process_corner - [-ext_model_index index] - filename -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-ext_model_index` | Extraction model index. Expects 2 inputs (an index, and corner name). | -| `filename` | Path to process corner file `rcx_patterns.rules`. | - -### Extract Parasitics - -The `extract_parasitics` command performs parasitic extraction based on the -routed design. If there are no information on routed design, no parasitics are -returned. - -```tcl -extract_parasitics - [-ext_model_file filename] - [-corner_cnt count] - [-max_res ohms] - [-coupling_threshold fF] - [-debug_net_id id] - [-lef_res] - [-cc_model track] - [-context_depth depth] - [-no_merge_via_res] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-ext_model_file` | Specify the Extraction Rules file used for the extraction. | -| `-corner_cnt` | Defines the number of corners used during the parasitic extraction. | -| `-max_res` | Combines resistors in series up to the threshold value. | -| `-coupling_threshold` | Coupling below this threshold is grounded. The default value is `0.1`, units are in `fF`, accepted values are floats. | -| `-debug_net_id` | *Developer Option*: Net ID to evaluate. | -| `-lef_res` | Override LEF resistance per unit. | -| `-cc_model` | Specify the maximum number of tracks of lateral context that the tool considers on the same routing level. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | -| `-context_depth` | Specify the number of levels of vertical context that OpenRCX needs to consider for the over/under context overlap for capacitance calculation. The default value is `5`, and the allowed values are integers `[0, MAX_INT]`. | -| `-no_merge_via_res` | Separates the via resistance from the wire resistance. | - -### Write SPEF - -The `write_spef` command writes the `.spef` output of the parasitics stored -in the database. - -```tcl -write_spef - [-net_id net_id] - [-nets nets] - filename -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net_id` | Output the parasitics info for specific net IDs. | -| `-nets` | Net name. | -| `filename` | Output filename. | - -### Adjust RC - -Use the `adjust_rc` command to scale the resistance, ground, and coupling -capacitance. - -```tcl -adjust_rc - [-res_factor res] - [-cc_factor cc] - [-gndc_factor gndc] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-res_factor` | Scale factor for resistance. | -| `-cc_factor` | Scale factor for coupling capacitance. | -| `-gndc_factor` | Scale factor for ground capacitance. | - -### Diff SPEF - -The `diff_spef` command compares the parasitics in the reference database `.spef`. -The output of this command is `diff_spef.out` -and contains the RC numbers from the parasitics in the database and the -`.spef`, and the percentage RC difference of the two data. - -```tcl -diff_spef - [-file filename] - [-r_res] - [-r_cap] - [-r_cc_cap] - [-r_conn] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-file` | Path to the input `.spef` filename. | -| `-r_res` | Read resistance. | -| `-r_cap` | Read capacitance. | -| `-r_cc_cap` | Read coupled capacitance. | -| `r_conn` | Read connections. | - -### Bench Wires - -The `bench_wires` command produces a layout which contains various patterns -that are used to characterize per-unit length R and C values. The generated patterns model -the lateral, vertical, and diagonal coupling capacitances, as well as ground -capacitance effects. This command generates a .def file that contains a number of wire patterns. - -This command is specifically intended for the Extraction Rules file generation only. - -```tcl -bench_wires - [-met_cnt mcnt] - [-cnt count] - [-len wire_len] - [-over] - [-diag] - [-all] - [-db_only] - [-under_met layer] - [-w_list width] - [-s_list space] - [-over_dist dist] - [-under_dist dist] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-met_cnt` | Number of layers used in each pattern. The default value is `-1`, meaning it is not set, and the allowed values are integers `[0, MAX_INT]`. | -| `-cnt` | Number of wires in each pattern. The default value is `5`, and the default values are integers `[0, MAX_INT]`. | -| `-len` | Wirelength in microns in the pattern. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. | -| `-all` | Consider all different pattern geometries (`over`, `under`, `over_under`, and `diagonal`). | -| `-db_only` | Run with db values only. All parameters in `bench_wires` are ignored. | -| `-under_met` | Consider under metal layer. | -| `-w_list` | Lists of wire width multipliers from the minimum spacing defined in the LEF. | -| `-s_list` | Lists of wire spacing multipliers from the minimum spacing defined in the LEF. The list will be the input index on the OpenRCX RC table (Extraction Rules file). | -| `-over_dist`, `-under_dist` | Consider over and under metal distance respectively. | - -### Bench Verilog - -`bench_verilog` is used after the `bench_wires` command. This command -generates a Verilog netlist of the generated pattern layout by the `bench_wires` -command. - -This command is optional when running the Extraction Rules generation -flow. This step is required if the favorite extraction tool (i.e., reference -extractor) requires a Verilog netlist to extract parasitics of the pattern layout. - - -```tcl -bench_verilog - [filename] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `filename` | Name for the Verilog output file (e.g., `output.v`). | - -### Bench Read SPEF - -The `bench_read_spef` command reads a `.spef` file and stores the -parasitics into the database. - -```tcl -bench_read_spef - [filename] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `filename` | Path to the input `.spef` file. | - -### Write Rules - -The `write_rules` command writes the Extraction Rules file (RC technology file) -for OpenRCX. It processes the parasitics data from the layout patterns that are -generated using the `bench_wires` command, and writes the Extraction Rules file -with `` as the output file. - -This command is specifically intended for the purpose of Extraction Rules file -generation. - -```tcl -write_rules - [-file filename] - [-dir dir] - [-name name] - [-pattern pattern] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-file` | Output file name. | -| `-dir` | Output file directory. | -| `-name` | Name of rule. | -| `-pattern` | Flag to write the pattern to rulefile (0/1). | - -## Example scripts - -Example scripts demonstrating how to run OpenRCX in the OpenROAD environment -on sample designs can be found in /test. An example flow test taking a sample design -from synthesizable RTL Verilog to final-routed layout in an open-source SKY130 technology -is shown below. - -``` -./test/gcd.tcl -``` - -Example scripts demonstrating how to run the -Extraction Rules file generation can be found in this -[directory](https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/src/rcx/calibration/script). - -``` -./calibration/script/generate_patterns.tcl # generate patterns -./calibration/script/generate_rules.tcl # generate the Extraction Rules file -./calibration/script/ext_patterns.tcl # check the accuracy of OpenRCX -``` - -## Regression tests - -There are a set of regression tests in `/test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Extraction Rules File Generation - -This flow generates an Extraction Rules file (RC tech file, or RC table) for -OpenRCX. This file provides resistance and capacitance tables used for RC -extraction for a specific process corner. - -The Extraction Rules file (RC technology file) is generated once for every -process node and corner automatically. - -The detailed documentation can be found [here](doc/calibration.md). - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+rcx) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/docs/manpages/md/man2/rmp.txt b/docs/manpages/md/man2/rmp.txt deleted file mode 100644 index 244827be12f..00000000000 --- a/docs/manpages/md/man2/rmp.txt +++ /dev/null @@ -1,84 +0,0 @@ -# Restructure - -The restructure module in OpenROAD (`rmp`) is based on -an interface to ABC for local resynthesis. The package allows -logic restructuring that targets area or timing. It extracts a cloud of logic -using the OpenSTA timing engine, and passes it to ABC through `blif` interface. -Multiple recipes for area or timing are run to obtain multiple structures from ABC; -the most desirable among these is used to improve the netlist. -The ABC output is read back by a `blif` reader which is integrated to OpenDB. -`blif` writer and reader also support constants from and to OpenDB. Reading -back of constants requires insertion of tie cells which should be provided -by the user as per the interface described below. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Restructure - -Restructuring can be done in two modes: area or delay. - -- Method 1: Area Mode -Example: `restructure -liberty_file ckt.lib -target area -tielo_pin ABC -tiehi_pin DEF` - -- Method 2: Timing Mode -Example: `restructure -liberty_file ckt.lib -target delay -tielo_pin ABC -tiehi_pin DEF -slack_threshold 1 -depth_threshold 2` - -```tcl -restructure - -liberty_file liberty_file - -target area|delay - -tielo_pin tielo_pin_name - -tiehi_pin tiehi_pin_name - -slack_threshold slack_val - -depth_threshold depth_threshold -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-liberty_file` | Liberty file with description of cells used in design. This is passed to ABC. | -| `-target` | Either `area` or `delay`. In area mode, the focus is area reduction, and timing may degrade. In delay mode, delay is likely reduced, but the area may increase. | -| `-slack_threshold` | Specifies a (setup) timing slack value below which timing paths need to be analyzed for restructuring. | -| `-depth_threshold` | Specifies the path depth above which a timing path would be considered for restructuring. | -| `-tielo_pin` | Tie cell pin that can drive constant zero. The format is `lib/cell/pin`. | -| `-tiehi_pin` | Tie cell pin that can drive constant one. The format is `lib/cell/pin`. | - -## Example scripts - -Example scripts on running `rmp` for a sample design of `gcd` as follows: - -``` -./test/gcd_restructure.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+restructure) -about this tool. - -## Authors - -- Sanjiv Mathur -- Ahmad El Rouby - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/rsz.txt b/docs/manpages/md/man2/rsz.txt deleted file mode 100644 index 05c148cd92f..00000000000 --- a/docs/manpages/md/man2/rsz.txt +++ /dev/null @@ -1,363 +0,0 @@ -# Gate Resizer - -Gate Resizer commands are described below. The `resizer` commands stop when -the design area is `-max_utilization util` percent of the core area. `util` -is between 0 and 100. The `resizer` stops and reports an error if the max -utilization is exceeded. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Set Wire RC - -The `set_wire_rc` command sets the resistance and capacitance used to estimate -delay of routing wires. Separate values can be specified for clock and data -nets with the `-signal` and `-clock` flags. Without either `-signal` or -`-clock` the resistance and capacitance for clocks and data nets are set. - -```tcl -set_wire_rc - [-clock] - [-signal] - [-layer layer_name] - -or -set_wire_rc - [-resistance res] - [-capacitance cap] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-clock` | Enable setting of RC for clock nets. | -| `-signal` | Enable setting of RC for signal nets. | -| `-layer` | Use the LEF technology resistance and area/edge capacitance values for the layer. This is used for a default width wire on the layer. | -| `-resistance` | Resistance per unit length, units are from the first Liberty file read, usually in the form of $\frac{resistanceUnit}{distanceUnit}$. Usually kΩ/µm. | -| `-capacitance` | Capacitance per unit length, units are from the first Liberty file read, usually in the form of $\frac{capacitanceUnit}{distanceUnit}$. Usually pF/µm. | - - -### Set Layer RC - -The `set_layer_rc` command can be used to set the resistance and capacitance -for a layer or via. This is useful if these values are missing from the LEF file, -or to override the values in the LEF. - -```tcl -set_layer_rc - [-layer layer] - [-via via_layer] - [-resistance res] - [-capacitance cap] - [-corner corner] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-layer` | Set layer name to modify. Note that the layer must be a routing layer. | -| `-via` | Select via layer name. Note that via resistance is per cut/via, not area-based. | -| `-resistance` | Resistance per unit length, same convention as `set_wire_rc`. | -| `-capacitance` | Capacitance per unit length, same convention as `set_wire_rc`. | -| `-corner` | Process corner to use. | - -### Estimate Parasitics - -Estimate RC parasitics based on placed component pin locations. If there are -no component locations, then no parasitics are added. The resistance and capacitance -values are per distance unit of a routing wire. Use the `set_units` command to check -units or `set_cmd_units` to change units. The goal is to represent "average" -routing layer resistance and capacitance. If the set_wire_rc command is not -called before resizing, then the default_wireload model specified in the first -Liberty file read or with the SDC set_wire_load command is used to make parasitics. - -After the `global_route` command has been called, the global routing topology -and layers can be used to estimate parasitics with the `-global_routing` -flag. - -```tcl -estimate_parasitics - -placement|-global_routing -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-placement` or `-global_routing` | Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. | - -### Set Dont Use - -The `set_dont_use` command removes library cells from consideration by -the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` -or a list of cell names (`wildcards` allowed). For example, `DLY*` says do -not use cells with names that begin with `DLY` in all libraries. - -```tcl -set_dont_use lib_cells # unset_dont_use lib_cells -``` - -### Set Dont Touch - -The `set_dont_touch` command prevents the resizer commands from -modifying instances or nets. - -```tcl -set_dont_touch instances_nets # unset_dont_touch instances_nets -``` - -### Buffer Ports - -The `buffer_ports -inputs` command adds a buffer between the input and its -loads. The `buffer_ports -outputs` adds a buffer between the port driver -and the output port. Inserting buffers on input and output ports makes -the block input capacitances and output drives independent of the block -internals. - -```tcl -buffer_ports - [-inputs] - [-outputs] - [-max_utilization util] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-inputs`, `-outputs` | Insert a buffer between the input and load, output and load respectively. The default behavior is `-inputs` and `-outputs` set if neither is specified. | -| `-max_utilization` | Defines the percentage of core area used. | - -### Remove Buffers - -Use the `remove_buffers` command to remove buffers inserted by synthesis. This -step is recommended before using `repair_design` so that there is more flexibility -in buffering nets. - -```tcl -remove_buffers -``` - -### Repair Design - -The `repair_design` command inserts buffers on nets to repair max slew, max -capacitance and max fanout violations, and on long wires to reduce RC delay in -the wire. It also resizes gates to normalize slews. Use `estimate_parasitics --placement` before `repair_design` to estimate parasitics considered -during repair. Placement-based parasitics cannot accurately predict -routed parasitics, so a margin can be used to "over-repair" the design -to compensate. - -```tcl -repair_design - [-max_wire_length max_length] - [-slew_margin slew_margin] - [-cap_margin cap_margin] - [-max_utilization util] - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-max_wire_length` | Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. | -| `-slew_margin` | Add a slew margin. The default value is `0`, the allowed values are integers `[0, 100]`. | -| `-cap_margin` | Add a capactitance margin. The default value is `0`, the allowed values are integers `[0, 100]`. | -| `-max_utilization` | Defines the percentage of core area used. | -| `-verbose` | Enable verbose logging on progress of the repair. | - -### Repair Tie Fanout - -The `repair_tie_fanout` command connects each tie high/low load to a copy -of the tie high/low cell. - -```tcl -repair_tie_fanout - [-separation dist] - [-verbose] - lib_port -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-separation` | Tie high/low insts are separated from the load by this value (Liberty units, usually microns). | -| `-verbose` | Enable verbose logging of repair progress. | -| `lib_port` | Tie high/low port, which can be a library/cell/port name or object returned by `get_lib_pins`. | - -### Repair Timing - -The `repair_timing` command repairs setup and hold violations. It -should be run after clock tree synthesis with propagated clocks. -Setup repair is done before hold repair so that hold repair does not -cause setup checks to fail. - -The worst setup path is always repaired. Next, violating paths to -endpoints are repaired to reduced the total negative slack. - -```tcl -repair_timing - [-setup] - [-hold] - [-setup_margin setup_margin] - [-hold_margin hold_margin] - [-allow_setup_violations] - [-repair_tns tns_end_percent] - [-max_utilization util] - [-max_buffer_percent buffer_percent] - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-setup` | Repair setup timing. | -| `-hold` | Repair hold timing. | -| `-setup_margin` | Add additional setup slack margin. | -| `-hold_margin` | Add additional hold slack margin. | -| `-allow_setup_violations` | While repairing hold violations, buffers are not inserted that will cause setup violations unless `-allow_setup_violations` is specified. | -| `-repair_tns` | Percentage of violating endpoints to repair (0-100). When `tns_end_percent` is zero (the default), only the worst endpoint is repaired. When `tns_end_percent` is 100, all violating endpoints are repaired. | -| `-max_utilization` | Defines the percentage of core area used. | -| `-max_buffer_percent` | Specify a maximum number of buffers to insert to repair hold violations as a percentage of the number of instances in the design. The default value is `20`, and the allowed values are integers `[0, 100]`. | -| `-verbose` | Enable verbose logging of the repair progress. | - -Use`-recover_power` to specify the percent of paths with positive slack which -will be considered for gate resizing to save power. It is recommended that -this option be used with global routing based parasitics. - -### Repair Clock Nets - -The `clock_tree_synthesis` command inserts a clock tree in the design -but may leave a long wire from the clock input pin to the clock tree -root buffer. - -The `repair_clock_nets` command inserts buffers in the -wire from the clock input pin to the clock root buffer. - -```tcl -repair_clock_nets - [-max_wire_length max_wire_length] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-max_wire_length` | Maximum length of wires (in microns), defaults to a value that minimizes the wire delay for the wire RC values specified by `set_wire_rc`. | - -### Repair Clock Inverters - -This command repairs clock inverters. - -```tcl -repair_clock_inverters -``` - -### Report Design Area - -The `report_design_area` command reports the area of the design's components -and the utilization. - -```tcl -report_design_area -``` - -### Report Floating Nets - -The `report_floating_nets` command reports nets with only one pin connection. - -```tcl -report_floating_nets - [-verbose] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-verbose` | Print the net names. | - -## Useful Developer Commands - -If you are a developer, you might find these useful. More details can be found in the [source file](./src/Resizer.cc) or the [swig file](./src/Resizer.i). - -| Command Name | Description | -| ----- | ----- | -| `repair_setup_pin` | Repair setup pin violation. | -| `check_parasitics` | Check if the `estimate_parasitics` command has been called. | -| `parse_time_margin_arg` | Get the raw value for timing margin (e.g. `slack_margin`, `setup_margin`, `hold_margin`) | -| `parse_percent_margin_arg` | Get the above margin in perentage format. | -| `parse_margin_arg` | Same as `parse_percent_margin_arg`. | -| `parse_max_util` | Check maximum utilization. | -| `parse_max_wire_length` | Get maximum wirelength. | -| `check_corner_wire_caps` | Check wire capacitance for corner. | -| `check_max_wire_length` | Check if wirelength is allowed by rsz for minimum delay. | -| `dblayer_wire_rc` | Get layer RC values. | -| `set_dblayer_wire_rc` | Set layer RC values. | - -## Example scripts - -A typical `resizer` command file (after a design and Liberty libraries have -been read) is shown below. - -``` -read_sdc gcd.sdc - -set_wire_rc -layer metal2 - -set_dont_use {CLKBUF_* AOI211_X1 OAI211_X1} - -buffer_ports -repair_design -max_wire_length 100 -repair_tie_fanout LOGIC0_X1/Z -repair_tie_fanout LOGIC1_X1/Z -# clock tree synthesis... -repair_timing -``` - -Note that OpenSTA commands can be used to report timing metrics before -or after resizing the design. - -``` -set_wire_rc -layer metal2 -report_checks -report_tns -report_wns -report_checks - -repair_design - -report_checks -report_tns -report_wns -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+resizer) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/sta.txt b/docs/manpages/md/man2/sta.txt deleted file mode 100644 index 3c6bd4b0b88..00000000000 --- a/docs/manpages/md/man2/sta.txt +++ /dev/null @@ -1,239 +0,0 @@ -# Parallax Static Timing Analyzer - -OpenSTA is a gate level static timing verifier. As a stand-alone -executable it can be used to verify the timing of a design using -standard file formats. - -* Verilog netlist -* Liberty library -* SDC timing constraints -* SDF delay annotation -* SPEF parasitics - -OpenSTA uses a TCL command interpreter to read the design, specify -timing constraints and print timing reports. - -##### Clocks -* Generated -* Latency -* Source latency (insertion delay) -* Uncertainty -* Propagated/Ideal -* Gated clock checks -* Multiple frequency clocks - -##### Exception paths -* False path -* Multicycle path -* Min/Max path delay -* Exception points -* -from clock/pin/instance -through pin/net -to clock/pin/instance -* Edge specific exception points -* -rise_from/-fall_from, -rise_through/-fall_through, -rise_to/-fall_to - -##### Delay calculation -* Integrated Dartu/Menezes/Pileggi RC effective capacitance algorithm -* External delay calculator API - -##### Analysis -* Report timing checks -from, -through, -to, multiple paths to endpoint -* Report delay calculation -* Check timing setup - -##### Timing Engine -OpenSTA is architected to be easily bolted on to other tools as a -timing engine. By using a network adapter, OpenSTA can access the host -netlist data structures without duplicating them. - -* Query based incremental update of delays, arrival and required times -* Simulator to propagate constants from constraints and netlist tie high/low - -See doc/OpenSTA.pdf for command documentation. -See doc/StaApi.txt for timing engine API documentation. -See doc/ChangeLog.txt for changes to commands. - -OpenSTA is dual licensed. It is released under GPL v3 as OpenSTA and -is also licensed for commerical applications by Parallax Software without -the GPL's requirements. - -OpenSTA is open source, meaning the sources are published and can be -compiled locally. Derivative works are supported as long as they -adhere to the GPL license requirements. However, OpenSTA is not -supported by a public community of developers as many other open -source projects are. The copyright and develpment are exclusive to -Parallax Software. OpenSTA does not solicit or accept external code -contributions. - -Removing copyright and license notices from OpenSTA sources (or any -other open source project for that matter) is illegal. This should be -obvious, but the author of OpenSTA has discovered two different cases -where the copyright and license were removed from source files that -were copied. - -The official git repository is located at -https://github.com/parallaxsw/OpenSTA.git. Any forks from this code -base have not passed extensive regression testing which is not -publicly available. - -## Build - -OpenSTA is built with CMake. - -### Prerequisites - -The build dependency versions are show below. Other versions may -work, but these are the versions used for development. - -``` - from Ubuntu Xcode - 22.04.2 11.3 -cmake 3.10.2 3.24.2 3.16.2 -clang 9.1.0 14.0.3 -gcc 3.3.2 11.3.0 -tcl 8.4 8.6 8.6.6 -swig 1.3.28 4.1.0 4.0.1 -bison 1.35 3.0.2 3.8.2 -flex 2.5.4 2.6.4 2.6.4 -``` - -Note that flex versions before 2.6.4 contain 'register' declarations that -are illegal in c++17. - -These packages are **optional**: - -``` -tclreadline 2.3.8 -libz 1.1.4 1.2.5 1.2.8 -cudd 2.4.1 3.0.0 -``` - -The [TCL readline library](https://tclreadline.sourceforge.net/tclreadline.html) -links the GNU readline library to the TCL interpreter for command line editing -On OSX, Homebrew does not support tclreadline, but the macports system does -(see https://www.macports.org). To enable TCL readline support use the following -Cmake option: - -``` -cmake .. -DUSE_TCL_READLINE=ON -``` - -The Zlib library is an optional. If CMake finds libz, OpenSTA can -read Verilog, SDF, SPF, and SPEF files compressed with gzip. - -CUDD is a binary decision diageram (BDD) package that is used to -improve conditional timing arc handling. OpenSTA does not require it -to be installed. It is available -[here](https://www.davidkebo.com/source/cudd_versions/cudd-3.0.0.tar.gz) -or [here](https://sourceforge.net/projects/cudd-mirror/). - -Note that the file hierarchy of the CUDD installation changed with version 3.0. -Some changes to CMakeLists.txt are required to support older versions. - -Use the USE_CUDD option to look for the cudd library. -Use the CUDD_DIR option to set the install directory if it is not in -one of the normal install directories. - -When building CUDD you may use the `--prefix ` option to `configure` to -install in a location other than the default (`/usr/local/lib`). -``` -cd $HOME/cudd-3.0.0 -mkdir $HOME/cudd -./configure --prefix $HOME/cudd -make -make install - -cd /build -cmake .. -DUSE_CUDD=ON -DCUDD_DIR=$HOME/cudd -``` - -### Installing with CMake - -Use the following commands to checkout the git repository and build the -OpenSTA library and excutable. - -``` -git clone https://github.com/The-OpenROAD-Project/OpenSTA.git -cd OpenSTA -mkdir build -cd build -cmake .. -make -``` -The default build type is release to compile optimized code. -The resulting executable is in `app/sta`. -The library without a `main()` procedure is `app/libSTA.a`. - -Optional CMake variables passed as -D= arguments to CMake are show below. - -``` -CMAKE_BUILD_TYPE DEBUG|RELEASE -CMAKE_CXX_FLAGS - additional compiler flags -TCL_LIBRARY - path to tcl library -TCL_HEADER - path to tcl.h -CUDD - path to cudd installation -ZLIB_ROOT - path to zlib -CMAKE_INSTALL_PREFIX -``` - -If `TCL_LIBRARY` is specified the CMake script will attempt to locate -the header from the library path. - -The default install directory is `/usr/local`. -To install in a different directory with CMake use: - -``` -cmake .. -DCMAKE_INSTALL_PREFIX= -``` - -If you make changes to `CMakeLists.txt` you may need to clean out -existing CMake cached variable values by deleting all of the -files in the build directory. - -## Bug Reports - -Use the Issues tab on the github repository to report bugs. - -Each issue/bug should be a separate issue. The subject of the issue -should be a short description of the problem. Attach a test case to -reproduce the issue as described below. Issues without test cases are -unlikely to get a response. - -The files in the test case should be collected into a directory named -YYYYMMDD where YYYY is the year, MM is the month, and DD is the -day (this format allows "ls" to report them in chronological order). -The contents of the directory should be collected into a compressed -tarfile named YYYYMMDD.tgz. - -The test case should have a tcl command file recreates the issue named -run.tcl. If there are more than one command file using the same data -files, there should be separate command files, run1.tcl, run2.tcl -etc. The bug report can refer to these command files by name. - -Command files should not have absolute filenames like -"/home/cho/OpenSTA_Request/write_path_spice/dump_spice" in them. -These obviously are not portable. Use filenames relative to the test -case directory. - -## Authors - -* James Cherry - -* William Scott authored the arnoldi delay calculator at Blaze, Inc which was subsequently licensed to Nefelus, Inc that has graciously contributed it to OpenSTA. - -## License - -OpenSTA, Static Timing Analyzer -Copyright (c) 2023, Parallax Software, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . diff --git a/docs/manpages/md/man2/tap.txt b/docs/manpages/md/man2/tap.txt deleted file mode 100644 index dddfbd8c74a..00000000000 --- a/docs/manpages/md/man2/tap.txt +++ /dev/null @@ -1,201 +0,0 @@ -# Tapcell - -Tapcell and endcap insertion. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Tapcell - -This command inserts tapcells or endcaps. - -The figures below show two examples of tapcell insertion. When only the -`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement -is similar to Figure 1. When the remaining masters are give, the tapcell -placement is similar to Figure 2. - -| | | -|:--:|:--:| -| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | - - -```tcl -tapcell - [-tapcell_master tapcell_master] - [-endcap_master endcap_master] - [-distance dist] - [-halo_width_x halo_x] - [-halo_width_y halo_y] - [-tap_nwin2_master tap_nwin2_master] - [-tap_nwin3_master tap_nwin3_master] - [-tap_nwout2_master tap_nwout2_master] - [-tap_nwout3_master tap_nwout3_master] - [-tap_nwintie_master tap_nwintie_master] - [-tap_nwouttie_master tap_nwouttie_master] - [-cnrcap_nwin_master cnrcap_nwin_master] - [-cnrcap_nwout_master cnrcap_nwout_master] - [-incnrcap_nwin_master incnrcap_nwin_master] - [-incnrcap_nwout_master incnrcap_nwout_master] - [-tap_prefix tap_prefix] - [-endcap_prefix endcap_prefix] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-tapcell_master` | Master used as a tapcell. | -| `-endcap_master` | Master used as an endcap. | -| `-distance` | Distance (in microns) between each tapcell in the checkerboard. | -| `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | -| `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | -| `-tap_nwintie_master` | Master cell placed at the top and bottom of|macros and the core area according the row orientation. | -| `-tap_nwin2_master` | Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwintie_master` | -| `-tap_nwin3_master` | Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwin2_master`. | -| `-tap_nwouttie_master` | Master cell placed at the top and bottom of macros and the core area according the row orientation. | -| `-tap_nwout2_master` | Master cell placed at the top and bottom of macros and the core area according the row orientation. This master should be smaller than `tap_nwouttie_master`. | -| `-tap_nwout3_master` | Master cell placed at the top and bottom of macros and the core area according the row orientation | This master should be smaller than `tap_nwout2_master`. | -| `-incnrcap_nwin_master` | Master cell placed at the corners of macros, according the row orientation. | -| `-incnrcap_nwout_master` | Master cell placed at the corners of macros, according the row orientation. | -| `-cnrcap_nwin_master` | Macro cell placed at the corners the core area according the row orientation. | -| `-cnrcap_nwout_master` | Macro cell placed at the corners the core area according the row orientation. | -| `-tap_prefix` | Prefix for the tapcell instances. The default value is `TAP_`. | -| `-endcap_prefix` | Prefix for the endcaps instances. The default value is `PHY_`. | - -### Cut Rows - -This command cuts rows. - -```tcl -cut_rows - [-endcap_master endcap_master] - [-halo_width_x halo_x] - [-halo_width_y halo_y] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-endcap_master` | Master used as an endcap. | -| `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | -| `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | - -### Place Endcaps - -Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the -LEF58 `CLASS` specification foe endcaps. - -```tcl -place_endcaps - [-corner master] - [-edge_corner master] - [-endcap masters] - [-endcap_horizontal masters] - [-endcap_vertical master] - [-prefix prefix] - [-left_top_corner master] - [-right_top_corner master] - [-left_bottom_corner master] - [-right_bottom_corner master] - [-left_top_edge master] - [-right_top_edge master] - [-left_bottom_edge master] - [-right_bottom_edge master] - [-left_edge master] - [-right_edge master] - [-top_edge masters] - [-bottom_edge masters] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-prefix` | Prefix to use for the boundary cells. Defaults to "PHY_". | -| `-corner` | Master for the corner cells on the outer corners. | -| `-edge_corner` | Master for the corner cells on the inner corners. | -| `-endcap` | Master used as an endcap. | -| `-endcap_horizontal` | List of masters for the top and bottom row endcaps. (overrides `-endcap`). | -| `-endcap_vertical` | Master for the left and right row endcaps. (overrides `-endcap`). | -| `-left_top_corner` | Master for the corner cells on the outer top left corner. (overrides `-corner`). | -| `-right_top_corner` | Master for the corner cells on the outer top right corner. (overrides `-corner`). | -| `-left_bottom_corner` | Master for the corner cells on the outer bottom left corner. (overrides `-corner`). | -| `-right_bottom_corner` | Master for the corner cells on the outer bottom right corner. (overrides `-corner`). | -| `-left_top_edge` | Master for the corner cells on the inner top left corner. (overrides `-edge_corner`). | -| `-right_top_edge` | Master for the corner cells on the inner top right corner. (overrides `-edge_corner`). | -| `-left_bottom_edge` | Master for the corner cells on the inner bottom left corner. (overrides `-edge_corner`). | -| `-right_bottom_edge` | Master for the corner cells on the inner bottom right corner. (overrides `-edge_corner`). | -| `-left_edge` | Master for the left row endcaps. (overrides `-endcap_vertical`). | -| `-right_edge` | Master for the right row endcaps. (overrides `-endcap_vertical`). | -| `-top_edge` | List of masters for the top row endcaps. (overrides `-endcap_horizontal`). | -| `-bottom_edge` | List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). | - -### Place Tapcells - -This command is used for tapcell placement only. - -```tcl -place_tapcells - -master tapcell_master - -distance dist -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-master` | Master to use for the tapcells. | -| `-distance` | Distance between tapcells. | - - -### Tapcell Ripup - -This command is used for removing tapcells or endcaps based on their prefix. - -```tcl -tapcell_ripup - -tap_prefix tap_prefix - -endcap_prefix endcap_prefix -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-tap_prefix` | Remove tapcells with said prefix. | -| `-endcap_prefix` | Remove endcaps with said prefix. | - -## Example scripts - -You can find script examples for both 45nm and 14nm in `./etc/scripts` - -``` -./etc/scripts/example_14nm.tcl -./etc/scripts/example_45nm.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+tap+in%3Atitle) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/md/man2/upf.txt b/docs/manpages/md/man2/upf.txt deleted file mode 100644 index edc3800941a..00000000000 --- a/docs/manpages/md/man2/upf.txt +++ /dev/null @@ -1,200 +0,0 @@ -# Read UPF Utility - -This module contains functionality to read, and modify information -from Unified Power Format (UPF) files. - -## Commands - -```{note} -- Parameters in square brackets `[-param param]` are optional. -- Parameters without square brackets `-param2 param2` are required. -``` - -### Read UPF - -Sources the UPF file. - -```tcl -read_upf - -file file -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-file` | Path to `.upf` file. | - -### Create Power Domain - -This command creates power domain for a group of modules. - -```tcl -create_power_domain - [-elements elements] - name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-elements` | List of module paths that belong this this domain OR `*` for top domain. | -| `name` | Domain name. | - -### Create Logic Port - -This command creates logic port. Direction must be specified from: -`in`, `out`, `inout`. - -```tcl -create_logic_port - [-direction direction] - port_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-direction` | Direction of the port (`in`, `out`, `inout`). | -| `port_name` | Port name. | - -### Create Power Switch - -This command creates power switch. - -```tcl -create_power_switch - [-domain domain] - [-output_supply_port output_supply_port] - [-input_supply_port input_supply_port] - [-control_port control_port] - [-on_state on_state] - name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-domain` | Power domain name. | -| `-output_supply_port` | Output supply port of the switch. | -| `-input_supply_port` | Input supply port of the switch. | -| `-control_port` | Control port on the switch. | -| `-on_state` | One of {`state_name`, `input_supply_port`, `boolean_expression`}. | -| `name` | Power switch name. | - -### Set Isolation - -This command creates or update isolation strategy. - -```tcl -set_isolation - [-domain domain] - [-applies_to applies_to] - [-clamp_value clamp_value] - [-isolation_signal isolation_signal] - [-isolation_sense isolation_sense] - [-location location] - [-update] - name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-domain` | Power domain | -| `-applies_to` | Restricts the strategy to apply one of these (`inputs`, `outputs`, `both`). | -| `-clamp_value` | Value the isolation can drive (`0`, `1`). | -| `-isolation_signal` | The control signal for this strategy. | -| `-isolation_sense` | The active level of isolation control signal. | -| `-location` | Domain in which isolation cells are placed (`parent`, `self`, `fanout`). | -| `-update` | Only available if using existing strategy, will error if the strategy doesn't exist. | -| `name` | Isolation strategy name. | - -### Use Interface cell - -This command sets the interface cell. - -```tcl -use_interface_cell - [-domain domain] - [-strategy strategy] - [-lib_cells lib_cells] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-domain` | Power domain name. | -| `-strategy` | Isolation strategy name. | -| `-lib_cells` | List of lib cells that could be used. | - -### Set Domain Area - -This command sets the power domain area. - -```tcl -set_domain_area - domain_name - -area {llx lly urx ury} -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `domain_name` | Power domain name. | -| `-area` | x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. | - - -### Map Power Switch - -This command maps existing power switch. - -```tcl -map_power_switch - [-switch_name_list switch_name_list] - [-lib_cells lib_cells] - [-port_map port_map] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-switch_name_list` | A list of switches (as defined by create_power_switch) to map. | -| `-lib_cells` | A list of library cells that could be mapped to the power switch | -| `-port_map` | A map that associates model ports defined by create_power_switch to logical ports | - -## Example scripts - -Example script demonstrating how to run `upf` related commands can be found here: - -``` -./test/upf_test.tcl -``` - -## Regression tests - -There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). - -Simply run the following script: - -```shell -./test/regression -``` - -## Limitations - -## FAQs - -Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+upf) -about this tool. - -## License - -BSD 3-Clause License. See [LICENSE](LICENSE) file. diff --git a/docs/manpages/scripts/Utl.tcl b/docs/manpages/scripts/Utl.tcl deleted file mode 100644 index 32c714fec3b..00000000000 --- a/docs/manpages/scripts/Utl.tcl +++ /dev/null @@ -1,111 +0,0 @@ -global MAN_PATH -set MAN_PATH "" - -proc get_input { } { - # Get the relative path from the user - puts "Please enter the relative path to the cat folders:" - flush stdout - gets stdin relative_path - - # Convert the relative path to an absolute path - set absolute_path [file join [pwd] $relative_path] - - # Display the absolute path - puts "Absolute Path: $absolute_path" - if { [check_valid_path $absolute_path] } { - return $absolute_path - } - return "" -} - -proc check_valid_path { path } { - if {[file isdirectory $path]} { - return true - } else { - puts "Invalid path, please retry." - return false - } -} - -proc check_valid_man_path { path } { - if {[file isdirectory "$path/man1"]} { - return true - } else { - puts "Invalid man path, please retry." - return false - } -} - -proc man { name } { - global MAN_PATH - if { [string length $MAN_PATH] == 0 } { - set MAN_PATH [get_input] - if { $MAN_PATH == 0 } { return } - } - - if { [check_valid_man_path $MAN_PATH] == 0 } { - set $MAN_PATH "" - puts "" - } - - set man_path $MAN_PATH - set man_sections {} - foreach man_section {cat1 cat2 cat3} { - lappend man_sections "$man_path/$man_section" - } - set man_found false - foreach man_section $man_sections { - set length [string length $man_section] - # Get suffix for man section - #set man_suffix [string range $man_section [expr {$length - 1}] $length] - set man_suffix "cat" - - set name1 $name - append name1 ".$man_suffix" - set man_file [file join $man_section $name1] - if { [file exists $man_file] } { - set man_found true - set file_handle [open $man_file r] - set content [read $file_handle] - close $file_handle - - # Display content - set lines [split $content "\n"] - set num_lines [llength $lines] - set page_size 10 - - for {set i 0} {$i < $num_lines} {incr i $page_size} { - set page [lrange $lines $i [expr {$i + $page_size - 1}]] - puts [join $page "\n"] - - # Ask user to continue or quit - if {[llength $lines] > $page_size} { - puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" - flush stdout; - set input [gets stdin] - if {$input == "q"} { - break - } - } - } - } - } - - if { $man_found == false } { - utl::error UTL 100 "Man page for $name is not found." - } -} - -proc clear {} { - exec clear -} - -proc test { } { - puts -nonewline "This is a line of text\r" - flush stdout ;# Flush the output to ensure the line is printed immediately - ; - - puts " " ;# Print a space to clear the line - flush stdout ;# Flush the output to ensure the space is printed immediately - -} diff --git a/src/OpenRoad.tcl b/src/OpenRoad.tcl index 8e634864fa7..b9d6ca3818b 100644 --- a/src/OpenRoad.tcl +++ b/src/OpenRoad.tcl @@ -33,9 +33,6 @@ ## ############################################################################ -# source Utl.tcl -source ../src/utl/src/Utl.tcl - # -library is the default sta::define_cmd_args "read_lef" {[-tech] [-library] [-tech_name name] filename} diff --git a/src/ant/README.md b/src/ant/README.md index 5c3afde6583..52a50178563 100644 --- a/src/ant/README.md +++ b/src/ant/README.md @@ -29,6 +29,8 @@ Antenna violations can be repaired after global routing with the `repair_design` ### Check Antennas +The `check_antennas` command will check for antenna violations. + ```tcl check_antennas [-net net] @@ -62,16 +64,16 @@ about this tool. ## Algorithm | | | -|:--:|:--:| -| Antenna Checker Algorithm: WireGraph Example | Step 1: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. | +| --- | --- | +| Antenna Checker Algorithm: WireGraph Example | Step 1: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. | | | | -| Step 2: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | Step 3: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. | +| Step 2: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | Step 3: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. | | | | -| Step 4: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | Step 5: Repeat Steps 2 and 3 for new-found upper-level wires. | +| Step 4: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | Step 5: Repeat Steps 2 and 3 for new-found upper-level wires. | | | | -| Step 6: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | Step 7: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. | +| Step 6: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | Step 7: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. | | | -| Step 8: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. | +| Step 8: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. | ## License diff --git a/src/cts/README.md b/src/cts/README.md index 8620585dc34..e4fd32ce8ce 100644 --- a/src/cts/README.md +++ b/src/cts/README.md @@ -16,6 +16,9 @@ command. Use `set_wire_rc` command to set the clock routing layer. ### Configure CTS Characterization +Configure key CTS characterization parameters, for example maximum slew and capacitance, +as well as the number of steps they will be divided for characterization. + ```tcl configure_cts_characterization [-max_slew max_slew] @@ -35,6 +38,8 @@ configure_cts_characterization ### Clock Tree Synthesis +Perform clock tree synthesis. + ```tcl clock_tree_synthesis -buf_list @@ -78,9 +83,7 @@ clock_tree_synthesis ### Report CTS -Another command available from `cts` is `report_cts`. It is used to -extract metrics after a successful `clock_tree_synthesis` run. These are: - +This command is used to extract the following metrics after a successful `clock_tree_synthesis` run. - Number of Clock Roots - Number of Buffers Inserted - Number of Clock Subnets @@ -107,7 +110,7 @@ If you are a developer, you might find these useful. More details can be found i ## Example scripts -```tcl +``` clock_tree_synthesis -root_buf "BUF_X4" \ -buf_list "BUF_X4" \ -wire_unit 20 diff --git a/src/dft/README.md b/src/dft/README.md index 084c9a9a406..badcf3b811c 100644 --- a/src/dft/README.md +++ b/src/dft/README.md @@ -1,7 +1,8 @@ # DFT: Design for Testing -This tool is an implementation of Design For Testing. New nets and logic are added to allow IC designs to -be tested for errors in manufacturing. Physical imperfections can cause hard failures and variability can cause timing errors. +The Design for Testing module in OpenROAD (`dft`) is an implementation of Design For Testing. +New nets and logic are added to allow IC designs to be tested for errors in manufacturing. +Physical imperfections can cause hard failures and variability can cause timing errors. A simple DFT insertion consist of the following parts: @@ -11,52 +12,57 @@ A simple DFT insertion consist of the following parts: * One or more scan chains (shift registers created from your scan cells). * A scan_enable pin to allow your design to enter and leave the test mode. +## Commands -# TCL Commands +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` -## set_dft_config +### Set DFT Config +The command `set_dft_config` sets the DFT configuration variables. -``` -set_dft_config [-max_length ] - [-clock_mixing ] +```tcl +set_dft_config + [-max_length ] + [-clock_mixing ] ``` -* `-max_length`: The maxinum number of bits that can be in each scan chain. -* `-clock_mixing`: How architect will mix the scan flops based on the clock driver. - * `no_mix`: Creates scan chains with only one type of clock and edge. This - may create unbalanced chains. - * `clock_mix`: Craetes scan chains mixing clocks and edges. Falling edge - flops are going to be stitched before rising edge. +#### Options -## report_dft_config +| Switch Name | Description | +| ---- | ---- | +| `-max_length` | The maxinum number of bits that can be in each scan chain. | +| `-clock_mixing` | How architect will mix the scan flops based on the clock driver. `no_mix`: Creates scan chains with only one type of clock and edge. This may create unbalanced chains. `clock_mix`: Craetes scan chains mixing clocks and edges. Falling edge flops are going to be stitched before rising edge. | -``` -report_dft_config -``` +### Report DFT Config Prints the current DFT configuration to be used by `preview_dft` and `insert_dft`. -## preview_dft - -``` -preview_dft [-verbose] +```tcl +report_dft_config ``` +### Preview DFT + Prints a preview of the scan chains that will be stitched by `insert_dft`. Use this command to iterate and try different DFT configurations. This command do not perform any modification to the design. -* `-verbose`: Shows more information about each one of the scan chains that will - be created. +```tcl +preview_dft + [-verbose] +``` +#### Options -## insert_dft +| Switch Name | Description | +| ---- | ---- | +| `-verbose` | Shows more information about each one of the scan chains that will be created. | -``` -insert_dft -``` +### Insert DFT Implements the scan chains into the design by performing the following actions: @@ -67,7 +73,12 @@ Implements the scan chains into the design by performing the following actions: The end result will be a design with scan flops connected to form the scan chains. -# Example + +```tcl +insert_dft +``` + +## Example scripts This example will create scan chains with a max length of 10 bits mixing all the scan flops in the scan chains. @@ -79,7 +90,17 @@ preview_dft -verbose insert_dft ``` -# Limitations +## Regression tests + +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations * There are no optimizations for the scan chains. This is a WIP. * There is no way to specify existing scan ports to be used by scan insertion. diff --git a/src/dpl/README.md b/src/dpl/README.md index 18283b62867..0faf66c3cf5 100644 --- a/src/dpl/README.md +++ b/src/dpl/README.md @@ -8,6 +8,11 @@ Open-Source Detailed Placement Engine. Its key features are: ## Commands +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + ### Detailed Placement The `detailed_placement` command performs detailed placement of instances @@ -26,7 +31,7 @@ detailed_placement | ----- | ----- | | `-max_displacement` | Max distance that an instance can be moved (in microns) when finding a site where it can be placed. Either set one value for both directions or set `{disp_x disp_y}` for individual directions. The default values are `{500, 100}`, and the allowed values within are integers `[0, MAX_INT]`. | | `-disallow_one_site_gaps` | Disable one site gap during placement check. | -| `-report_file_name` | File name for saving the report to (e.g. `report.json`. | +| `-report_file_name` | File name for saving the report to (e.g. `report.json`.) | ### Set Placement Padding @@ -92,8 +97,6 @@ This command removes all filler cells. remove_fillers ``` -No arguments are needed for this function. - ### Check Placement The `check_placement` command checks the placement legality. It returns @@ -112,7 +115,7 @@ check_placement | ----- | ----- | | `-verbose` | Enable verbose logging. | | `-disallow_one_site_gaps` | Disable one site gap during placement check. | -| `-report_file_name` | File name for saving the report to (e.g. `report.json`. | +| `-report_filename` | File name for saving the report to (e.g. `report.json`. | ### Optimize Mirroring @@ -123,8 +126,6 @@ a weak attempt to reduce the total half-perimeter wirelength (HPWL). optimize_mirroring ``` -No arguments are needed for this function. - ### Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/Opendp.cpp) or the [swig file](./src/Opendp.i). diff --git a/src/drt/README.md b/src/drt/README.md index a64c5d30175..a3a9f643c20 100644 --- a/src/drt/README.md +++ b/src/drt/README.md @@ -25,6 +25,8 @@ guide format. ### Detailed Route +This command performs detailed routing. + ```tcl detailed_route [-output_maze filename] @@ -89,7 +91,7 @@ Some arguments that are helpful for developers are listed here. | `-or_seed` | Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. | | `-or_k` | Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -### Detailed Route Debugging +### Detailed Route Debug The following command and arguments are useful when debugging error messages from `drt` and to understand its behavior. @@ -131,7 +133,9 @@ detailed_route_debug | `-pa_commit` | Enable visibility of pin access commits. | | `-write_net_tracks` | Enable writing of net track assigments. | -### Check Pin Access +### Pin Access + +This function checks pin access. ```tcl pin_access @@ -158,7 +162,7 @@ pin_access | `-verbose` | Sets verbose mode if the value is greater than 1, else non-verbose mode (must be integer, or error will be triggered.) | | `-distributed` | Refer to distributed arguments [here](#distributed-arguments). | -### Distributed arguments +#### Distributed Arguments We have compiled all distributed arguments in this section. @@ -174,7 +178,7 @@ Additional setup is required. Please refer to this [guide](./doc/Distributed.md) | `-shared_volume` | The mount path of the nfs shared folder. | | `-cloud_size` | The number of workers. | -### Useful developer functions +## Useful developer functions If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonRoute.cpp) or the [swig file](./src/TritonRoute.i). diff --git a/src/fin/README.md b/src/fin/README.md index 4f6455e22cd..5fe2f66ec42 100644 --- a/src/fin/README.md +++ b/src/fin/README.md @@ -13,6 +13,8 @@ configuration file. ### Density Fill +This command performs density fill to meet metal density DRC rules. + ```tcl density_fill [-rules rules_file] diff --git a/src/gpl/README.md b/src/gpl/README.md index 28d40b2f6c6..2667891bbce 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -1,6 +1,9 @@ -# RePlAce +# Global Placement -RePlAce: Advancing Solution Quality and Routability Validation in Global Placement +The global placement module in OpenROAD (`gpl`) is based on the open-source +RePlAce tool, from the +paper "Advancing Solution Quality and Routability Validation in +Global Placement". Features: @@ -18,7 +21,23 @@ Features: ## Commands +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. ``` + +### Global Placement + +When using the `-timing_driven` flag, `gpl` does a virtual `repair_design` +to find slacks and +weight nets with low slack. It adjusts the worst slacks (modified with +`-timing_driven_nets_percentage`) using a multiplier (modified with +`-timing_driven_net_weight_max`). The multiplier +is scaled from the full value for the worst slack, to 1.0 at the +`timing_driven_nets_percentage` point. Use the `set_wire_rc` command to set +resistance and capacitance of estimated wires used for timing. + +```tcl global_placement [-timing_driven] [-routability_driven] @@ -33,6 +52,11 @@ global_placement [-overflow overflow] [-initial_place_max_iter initial_place_max_iter] [-initial_place_max_fanout initial_place_max_fanout] + [-pad_left pad_left] + [-pad_right pad_right] + [-verbose_level level] + [-force_cpu] + [-skip_io] [-routability_check_overflow routability_check_overflow] [-routability_max_density routability_max_density] [-routability_max_bloat_iter routability_max_bloat_iter] @@ -45,106 +69,134 @@ global_placement [-timing_driven_net_reweight_overflow] [-timing_driven_net_weight_max] [-timing_driven_nets_percentage] - [-pad_left pad_left] - [-pad_right pad_right] - [-verbose_level level] - [-force_cpu] ``` +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-timing_driven` | Enable timing-driven mode. See [link](#timing-driven-arguments) for timing-specific arguments. | +| `-routability_driven` | Enable routability-driven mode. See [link](#routability-driven-arguments) for routability-specific arguments. | +| `-skip_initial_place` | Skip the initial placement (Biconjugate gradient stabilized, or BiCGSTAB solving) before Nesterov placement. Initial placement improves HPWL by ~5% on large designs. Equivalent to `-initial_place_max_iter 0`. | +| `-incremental` | Enable the incremental global placement. Users would need to tune other parameters (e.g., `init_density_penalty`) with pre-placed solutions. | +| `-bin_grid_count` | Set bin grid's counts. The internal heuristic defines the default value. Allowed values are integers `[64,128,256,512,...]`. | +| `-density` | Set target density. The default value is `0.7` (i.e., 70%). Allowed values are floats `[0, 1]`. | +| `-init_density_penalty` | Set initial density penalty. The default value is `8e-5`. Allowed values are floats `[1e-6, 1e6]`. | +| `-init_wirelength_coef` | Set initial wirelength coefficient. The default value is `0.25`. Allowed values are floats. | +| `-min_phi_coef` | Set `pcof_min` ($\mu_k$ Lower Bound). The default value is `0.95`. Allowed values are floats `[0.95, 1.05]`. | +| `-max_phi_coef` | Set `pcof_max` ($\mu_k$ Upper Bound). Default value is 1.05. Allowed values are `[1.00-1.20, float]`. | +| `-overflow` | Set target overflow for termination condition. The default value is `0.1`. Allowed values are floats `[0, 1]`. | +| `-initial_place_max_iter` | Set maximum iterations in the initial place. The default value is 20. Allowed values are integers `[0, MAX_INT]`. | +| `-initial_place_max_fanout` | Set net escape condition in initial place when $fanout \geq initial\_place\_max\_fanout$. The default value is 200. Allowed values are integers `[1, MAX_INT]`. | +| `-pad_left` | Set left padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | +| `-pad_right` | Set right padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | +| `-verbose_level` | Set verbose level for `gpl`. The default value is 1. Allowed values are integers `[0, 5]`. | +| `-force_cpu` | Force to use the CPU solver even if the GPU is available. | +| `-skip_io` | Flag to ignore the IO ports when computing wirelength during placement. The default value is False, allowed values are boolean. | + +#### Routability-Driven Arguments + +| Switch Name | Description | +| ----- | ----- | +| `-routability_check_overflow` | Set overflow threshold for routability mode. The default value is `0.2`, and the allowed values are floats `[0, 1]`. | +| `-routability_max_density` | Set density threshold for routability mode. The default value is `0.99`, and the allowed values are floats `[0, 1]`. | +| `-routability_max_bloat_iter` | Set bloat iteration threshold for routability mode. The default value is `1`, and the allowed values are integers `[1, MAX_INT]`.| +| `-routability_max_inflation_iter` | Set inflation iteration threshold for routability mode. The default value is `4`, and the allowed values are integers `[1, MAX_INT]`. | +| `-routability_target_rc_metric` | Set target RC metric for routability mode. The default value is `1.25`, and the allowed values are floats. | +| `-routability_inflation_ratio_coef` | Set inflation ratio coefficient for routability mode. The default value is `2.5`, and the allowed values are floats. | +| `-routability_max_inflation_ratio` | Set inflation ratio threshold for routability mode. The default value is `2.5`, and the allowed values are floats. | +| `-routability_rc_coefficients` | Set routability RC coefficients. It comes in the form of a Tcl List `{k1, k2, k3, k4}`. The default value for each coefficient is `{1.0, 1.0, 0.0, 0.0}` respectively, and the allowed values are floats. | + +#### Timing-Driven Arguments + +| Switch Name | Description | +| ----- | ----- | +| `-timing_driven_net_reweight_overflow` | Set overflow threshold for timing-driven net reweighting. Allowed value is a Tcl list of integers where each number is `[0, 100]`. | +| `-timing_driven_net_weight_max` | Set the multiplier for the most timing-critical nets. The default value is `1.9`, and the allowed values are floats. | +| `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. | + + +### Useful Developer Commands + +If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i). + ``` -cluster_flops - [-tray_weight tray_weight] - [-timing_weight timing_weight] - [-max_split_size max_split_size] -``` +# debugging global placement +global_placement_debug -pause -update -inst -draw_bins -initial -### Tuning Parameters - -- `-timing_driven`: Enable timing-driven mode -- `-routability_driven`: Enable routability-driven mode -- `-skip_initial_place` : Skip the initial placement (BiCGSTAB solving) before Nesterov placement. IP improves HPWL by ~5% on large designs. Equal to '-initial_place_max_iter 0' -- `-incremental` : Enable the incremental global placement. Users would need to tune other parameters (e.g., init_density_penalty) with pre-placed solutions. -- `-bin_grid_count`: set bin grid's counts. Default value is defined by internal heuristic. Allowed values are `[64,128,256,512,..., int]`. -- `-density`: set target density. Default value is 0.70. Allowed values are `[0-1, float]`. -- `-init_density_penalty`: set initial density penalty. Default value is 8e-5. Allowed values are `[1e-6 - 1e6, float]`. -- `-init_wirelength_coef`: set initial wirelength coefficient. Default value is 0.25. Allowed values are `[unlimited, float]`. -- `-min_phi_coef`: set `pcof_min(µ_k Lower Bound)`. Default value is 0.95. Allowed values are `[0.95-1.05, float]`. -- `-max_phi_coef`: set `pcof_max(µ_k Upper Bound)`. Default value is 1.05. Allowed values are `[1.00-1.20, float]`. -- `-overflow`: set target overflow for termination condition. Default value is 0.1. Allowed values are `[0-1, float]`. -- `-initial_place_max_iter`: set maximum iterations in initial place. Default value is 20. Allowed values are `[0-MAX_INT, int]`. -- `-initial_place_max_fanout`: set net escape condition in initial place when 'fanout >= initial_place_max_fanout'. Default value is 200. Allowed values are `[1-MAX_INT, int]`. -- `-timing_driven_net_reweight_overflow`: set overflow threshold for timing-driven net reweighting. Allowed values are `tcl list of [0-100, int]`. -- `-timing_driven_net_weight_max`: Set the multiplier for the most timing critical nets. Default value is 1.9. -- `-timing_driven_nets_percentage`: Set the percentage of nets that are reweighted in timing-driven mode. Default value is 10. Allowed values are `[0-100, float]` -- `-verbose_level`: set verbose level for RePlAce. Default value is 1. Allowed values are `[0-5, int]`. -- `-force_cpu`: Force to use the CPU solver even if the GPU is available. -- `tray_weight`: Set the weighting factor for tray cost in flip-flop clustering (recommended to be `[20.0, float]`). -- `timing_weight`: Set the weighting factor for timing-critical paths in flip-flop clusering (recommended to be `[1.0. float]`). -- `max_split_size`: The maximum size of a single pointset after running the pointset decomposition algorithm for runtime improvement in flop clustering (to not run pointset decomposition, set as `-1`). - - -`-timing_driven` does a virtual `repair_design` to find slacks and -weight nets with low slack. It adjusts the worst slacks (10% by default, -modified with -timing_driven_nets_percentage) using a multiplier (1.9 by -default, modified with `-timing_driven_net_weight_max`). The multiplier -is scaled from the full value for the worst slack, to 1.0 at the -timing_driven_nets_percentage point. Use the `set_wire_rc` command to set -resistance and capacitance of estimated wires used for timing. +# adds padding and gets global placement uniform target density +get_global_placement_uniform_density -pad_left -pad_right +``` ## Example scripts +Example scripts demonstrating how to run `gpl` on a sample design on `core01` as follows: + +```shell +./test/core01.tcl +``` + ## Regression tests +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + ## Limitations ## Using the Python interface to gpl -This api tries to stay close to the api defined in C++ class `Replace` -that is located in gpl/include/gpl/Replace.h +This API tries to stay close to the API defined in `C++` class `Replace` +that is located [here](include/gpl/Replace.h). When initializing a design, a sequence of Python commands might look like the following: - from openroad import Design, Tech - tech = Tech() - tech.readLef(...) - design = Design(tech) - design.readDef(...) - gpl = design.getReplace() - +```python +from openroad import Design, Tech +tech = Tech() +tech.readLef(...) +design = Design(tech) +design.readDef(...) +gpl = design.getReplace() +``` + Here is an example of some options / configurations to the global placer. -(See Replace.h for a complete list) +(See [Replace.h](include/gpl/Replace.h) for a complete list) - gpl.setInitialPlaceMaxIter(iter) - gpl.setSkipIoMode(skip_io) - gpl.setTimingDrivenMode(timing_driven) - gpl.setTimingNetWeightMax(weight) +```python +gpl.setInitialPlaceMaxIter(iter) +gpl.setSkipIoMode(skip_io) +gpl.setTimingDrivenMode(timing_driven) +gpl.setTimingNetWeightMax(weight) +``` There are some useful Python functions located in the file -grt/test/grt_aux.py but these are not considered a part of the (final) -api and they may change. +[grt_aux.py](test/grt_aux.py) but these are not considered a part of the *final* +API and they may change. ## FAQs Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+replace+in%3Atitle) about this tool. -## External references +## References - C.-K. Cheng, A. B. Kahng, I. Kang and L. Wang, "RePlAce: Advancing Solution Quality and Routability Validation in Global Placement", IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, - 38(9) (2019), pp. 1717-1730. + 38(9) (2019), pp. 1717-1730. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Journals/j126.pdf) - J. Lu, P. Chen, C.-C. Chang, L. Sha, D. J.-H. Huang, C.-C. Teng and C.-K. Cheng, "ePlace: Electrostatics based Placement using Fast Fourier - Transform and Nesterov's Method", ACM TODAES 20(2) (2015), article 17. + Transform and Nesterov's Method", ACM TODAES 20(2) (2015), article 17. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf) - J. Lu, H. Zhuang, P. Chen, H. Chang, C.-C. Chang, Y.-C. Wong, L. Sha, D. J.-H. Huang, Y. Luo, C.-C. Teng and C.-K. Cheng, "ePlace-MS: Electrostatics based Placement for Mixed-Size Circuits", IEEE TCAD 34(5) - (2015), pp. 685-698. -- A. B. Kahng, J. Li and L. Wang, - "Improved Flop Tray-Based Design Implementation for Power Reduction", - IEEE/ACM ICCAD, 2016, pp. 20:1-20:8. + (2015), pp. 685-698. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-ms-tcad14/paper.pdf) - The timing-driven mode has been implemented by Mingyu Woo (only available in [legacy repo in standalone @@ -165,4 +217,4 @@ about this tool. ## License -BSD 3-Clause License. See [LICENSE](LICENSE) file. +BSD 3-Clause License. See [LICENSE](LICENSE) file. \ No newline at end of file diff --git a/src/grt/README.md b/src/grt/README.md index 821de7122eb..1e016398ea2 100644 --- a/src/grt/README.md +++ b/src/grt/README.md @@ -13,6 +13,9 @@ FastRoute4.1 algorithm. ### Global Route +This command performs global routing with the option to use a `guide_file`. +You may also choose to use incremental global routing using `-start_incremental`. + ```tcl global_route [-guide_file out_file] @@ -44,6 +47,9 @@ global_route ### Set Routing Layers +This command sets the minimum and maximum routing layers for signal and clock nets. +Example: `set_routing_layers -signal Metal2-Metal10 -clock Metal6-Metal9` + ```tcl set_routing_layers [-signal min-max] @@ -57,10 +63,12 @@ set_routing_layers | `-signal` | Set the min and max routing signal layer (names) in this format "%s-%s". | | `-clock` | Set the min and max routing clock layer (names) in this format "%s-%s". | -Example: `set_routing_layers -signal Metal2-Metal10 -clock Metal6-Metal9` - ### Set Macro Extension +This command sets the halo (in terms of GCells) along the boundaries of macros. +A `GCell` is typically defined in terms of `Mx` routing tracks. +Example: `set_macro_extension 2` + ```tcl set_macro_extension extension ``` @@ -69,12 +77,12 @@ set_macro_extension extension | Argument Name | Description | | ----- | ----- | -| `extension` | Number of `GCells` added to the blockage boundaries from macros. A `GCell` is typically defined in terms of `Mx` routing tracks. The default `GCell` size is 15 `M3` pitches. | - -Example: `set_macro_extension 2` +| `extension` | Number of `GCells` added to the blockage boundaries from macros. The default `GCell` size is 15 `M3` pitches. | ### Set Pin Offset +This command sets the pin offset distance. + ```tcl set_pin_offset offset ``` @@ -92,6 +100,14 @@ adjustments in the routing layers of the design. Such adjustments reduce the nu routing tracks that the global router assumes to exist. This promotes the spreading of routing and reduces peak congestion, to reduce challenges for detailed routing. +You can set adjustment for a +specific layer, e.g., `set_global_routing_layer_adjustment Metal4 0.5` reduces +the routing resources of routing layer `Metal4` by 50%. You can also set adjustment +for all layers at once using `*`, e.g., `set_global_routing_layer_adjustment * 0.3` reduces the routing resources of all routing layers by 30%. And, you can +also set resource adjustment for a layer range, e.g.: `set_global_routing_layer_adjustment +Metal4-Metal8 0.3` reduces the routing resources of routing layers `Metal4`, +`Metal5`, `Metal6`, `Metal7` and `Metal8` by 30%. + ```tcl set_global_routing_layer_adjustment layer adjustment ``` @@ -103,16 +119,11 @@ set_global_routing_layer_adjustment layer adjustment | `layer` | Integer for the layer number (e.g. for M1 you would use 1). | | `adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | -You can set adjustment for a -specific layer, e.g., `set_global_routing_layer_adjustment Metal4 0.5` reduces -the routing resources of routing layer `Metal4` by 50%. You can also set adjustment -for all layers at once using `*`, e.g., `set_global_routing_layer_adjustment * 0.3` reduces the routing resources of all routing layers by 30%. And, you can -also set resource adjustment for a layer range, e.g.: `set_global_routing_layer_adjustment -Metal4-Metal8 0.3` reduces the routing resources of routing layers `Metal4`, -`Metal5`, `Metal6`, `Metal7` and `Metal8` by 30%. ### Set Routing Alpha +This command sets routing alphas for a given net `net_name`. + By default the global router uses heuristic rectilinear Steiner minimum trees (RSMTs) as an initial basis to construct route guides. An RSMT tries to minimize the total wirelength needed to connect a given set @@ -126,6 +137,8 @@ and 1.0. When alpha is 0.0 the net topology minimizes total wirelength the driver and loads (i.e., maximum resistance). Typical values are 0.4-0.8. You can call it multiple times for different nets. +Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. + ```tcl set_routing_alpha [-net net_name] @@ -143,10 +156,11 @@ set_routing_alpha | `-min_hpwl` | Set the minimum half-perimetere wirelength (microns). | | `alpha` | Float between 0 and 1 describing the trade-off between wirelength and path depth. | -Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. - ### Set Global Routing Region Adjustment +Set global routing region adjustment. +Example: `set_global_routing_region_adjustment {1.5 2 20 30.5} -layer Metal4 -adjustment 0.7` + ```tcl set_global_routing_region_adjustment {lower_left_x lower_left_y upper_right_x upper_right_y} @@ -162,13 +176,15 @@ set_global_routing_region_adjustment | `-layer` | Integer for the layer number (e.g. for M1 you would use 1). | | `-adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | -Example: `set_global_routing_region_adjustment {1.5 2 20 30.5} -layer Metal4 -adjustment 0.7` +### Set Global Routing Random -### Set Global Routing Randomness +The command randomizes global routing by shuffling the order of the nets +and randomly subtracts or adds to the capacities of a random set of edges. -The randomized global routing shuffles the -order of the nets and randomly subtracts or adds to the capacities of -a random set of edges. +Example: +`set_global_routing_random -seed 42 \ + -capacities_perturbation_percentage 50 \ + -perturbation_amount 2` ```tcl set_global_routing_random @@ -185,12 +201,7 @@ set_global_routing_random | `-capacities_perturbation_percentage` | Sets the percentage of edges whose capacities are perturbed. By default, the edge capacities are perturbed by adding or subtracting 1 (track) from the original capacity. | | `-perturbation_amount` | Sets the perturbation value of the edge capacities. This option is only meaningful when `-capacities_perturbation_percentage` is used. | -Example: -`set_global_routing_random -seed 42 \ - -capacities_perturbation_percentage 50 \ - -perturbation_amount 2` - -### Set Specific Nets to Route +### Set Nets to Route The `set_nets_to_route` command defines a list of nets to route. Only the nets defined in this command are routed, leaving the remaining nets without any @@ -216,21 +227,6 @@ iteration to repair antennas. Filler instances added by the `filler_placement` command should NOT be in the database when `repair_antennas` is called. -```tcl -repair_antennas - [diode_cell] - [-iterations iterations] - [-ratio_margin margin] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `diode_cell` | Diode cell to fix antenna violations. | -| `-iterations` | Number of iterations. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | -| `-ratio_margin` | Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. | - See LEF/DEF 5.8 Language Reference, Appendix C, "Calculating and Fixing Process Antenna Violations" for a [description](coriolis.lip6.fr/doc/lefdef/lefdefref/lefdefref.pdf) of antenna violations. @@ -248,33 +244,40 @@ diodes are inserted. The following warning message will be reported: [WARNING GRT-0243] Unable to repair antennas on net with diodes. ``` -### Write Global Routing Guides - ```tcl -write_guides file_name +repair_antennas + [diode_cell] + [-iterations iterations] + [-ratio_margin margin] ``` +#### Options + | Switch Name | Description | | ----- | ----- | -| `file_name` | Guide file name. | - -Example: `write_guides route.guide`. +| `diode_cell` | Diode cell to fix antenna violations. | +| `-iterations` | Number of iterations. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-ratio_margin` | Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. | -### Estimate Global Routing Parasitics +### Write Guides -To estimate RC parasitics based on global route results, use the `-global_routing` -option of the `estimate_parasitics` command. +This command writes global routing guides, which can be used as input +for global routing. -```{note} -To see the function definition for `estimate_parasitics`, refer to -[Resizer docs](../rsz/README.md#estimate-parasitics). -``` +Example: `write_guides route.guide`. ```tcl -estimate_parasitics -global_routing +write_guides file_name ``` -### Plot Global Routing Guides +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `file_name` | Guide file name. | + + +### Draw Route Guides The `draw_route_guides` command plots the route guides for a set of nets. To erase the route guides from the GUI, pass an empty list to this command: @@ -293,13 +296,15 @@ draw_route_guides | `net_names` | Tcl list of set of nets (e.g. `{net1, net2}`). | | `-show_pin_locations` | Draw circles for the pin positions on the routing grid. | -### Report Wirelength +### Report Wire Length The `report_wire_length` command reports the wire length of the nets. Use the `-global_route` and the `-detailed_route` flags to report the wire length from global and detailed routing, respectively. If none of these flags are used, the tool will identify the state of the design and report the wire length accordingly. +Example: `report_wire_length -net {clk net60} -global_route -detailed_route -verbose -file out.csv` + ```tcl report_wire_length [-net net_list] @@ -319,9 +324,7 @@ report_wire_length | `-detailed_route` | Report the wire length of the detailed routing. | | `-verbose` | This flag enables the full reporting of the layer-wise wirelength information. | -Example: `report_wire_length -net {clk net60} -global_route -detailed_route -verbose -file out.csv` - -### Debug Mode +### Global Route Debug The `global_route_debug` command allows you to start a debug mode to view the status of the Steiner Trees. It also allows you to dump the input positions for the Steiner tree creation of a net. @@ -357,7 +360,9 @@ Examples scripts demonstrating how to run FastRoute on a sample design of `gcd` ./test/gcd.tcl ``` -### Read Global Routing Guides +### Read Guides + +This command reads global routing guides. ```tcl read_guides file_name @@ -369,7 +374,7 @@ read_guides file_name | ----- | ----- | | `file_name` | Path to global routing guide. | -### Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/GlobalRouter.cpp) or the [swig file](./src/GlobalRouter.i). diff --git a/src/gui/README.md b/src/gui/README.md index 63652a7f791..55ed81b8319 100644 --- a/src/gui/README.md +++ b/src/gui/README.md @@ -1,282 +1,414 @@ # Graphical User Interface -The graphical user interface can be access by launching OpenROAD with ``-gui`` or by opening it from the command-line with ``gui::show``. +The graphical user interface can be access by launching OpenROAD with ``-gui`` or +by opening it from the command-line with ``gui::show``. ## Commands -### Add buttons to the toolbar - -``` -create_toolbar_button [-name name] - -text button_text - -script tcl_script - [-echo] +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. ``` -Returns: name of the new button, either ``name`` or ``buttonX``. +### Create Toolbar Button -Options description: -- ``button_text``: The text to put on the button. -- ``tcl_script``: The tcl script to evaluate when the button is pressed. -- ``name``: (optional) name of the button, used when deleting the button. -- ``echo``: (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. +This command creates toolbar button with name set using the +`-text` flag and accompanying logic in the `-script` flag. -To remove the button: +Returns: name of the new button, either ``name`` or ``buttonX``. -``` -gui::remove_toolbar_button name +```tcl +create_toolbar_button + [-name name] + -text button_text + -script tcl_script + [-echo] ``` -### Add items to the menubar +#### Options -``` -create_menu_item [-name name] - [-path menu_path] - -text item_text - -script tcl_script - [-shortcut key_shortcut] - [-echo] +| Switch Name | Description | +| ---- | ---- | +| `-name` | The name of the button, used when deleting the button. | +| `-text` | The text to put on the button. | +| `-script` | The tcl script to evaluate when the button is pressed. | +| `-echo` | This indicate that the commands in the ``tcl_script`` should be echoed in the log. | + +### gui::Remove Toolbar Button + +To remove toolbar button: + +```tcl +gui::remove_toolbar_button + name ``` -Returns: name of the new item, either ``name`` or ``actionX``. +#### Options -Options description: -- ``item_text``: The text to put on the item. -- ``tcl_script``: The tcl script to evaluate when the button is pressed. -- ``name``: (optional) name of the item, used when deleting the item. -- ``menu_path``: (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu". -- ``key_shortcut``: (optional) key shortcut to trigger this item. -- ``echo``: (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. +| Switch Name | Description | +| ---- | ---- | +| `-name` | The name of the button, used when deleting the button. | -To remove the item: +### Create Menu Item -``` -gui::remove_menu_item name +This command add items to the menubar. +Returns: name of the new item, either ``name`` or ``actionX``. + + +```tcl +create_menu_item + [-name name] + [-path menu_path] + -text item_text + -script tcl_script + [-shortcut key_shortcut] + [-echo] ``` +#### Options -### Save screenshot of layout +| Switch Name | Description | +| ---- | ---- | +| `-name` | (optional) name of the item, used when deleting the item.| +| `-path`| (optional) Menu path to place the new item in (hierarchy is separated by /), defaults to "Custom Scripts", but this can also be "Tools" or "New menu/New submenu".| +| `-text` | The text to put on the item.| +| `-script` | The tcl script to evaluate when the button is pressed.| +| `-shortcut`| (optional) key shortcut to trigger this item.| +| `-echo` | (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. | -This command can be both be used when the GUI is active and not active. +### gui::Remove Menu Item -``` -save_image [-resolution microns_per_pixel] - [-area {x0 y0 x1 y1}] - [-width width] - [-display_option {option value}] - filename +To remove menu item: + +```tcl +gui::remove_menu_item + name ``` -Options description: -- ``filename`` path to save the image to. -- ``x0, y0`` first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block. -- ``x1, y1`` second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block. -- ``microns_per_pixel`` resolution in microns per pixel to use when saving the image, default will match what the GUI has selected. -- ``width`` width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution``. -- ``option`` specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}``. +#### Options -### Save screenshot of clock trees +| Switch Name | Description | +| ---- | ---- | +| `-name` | name of the item, used when deleting the item.| -``` -save_clocktree_image filename - -clock clock_name - [-width width] - [-height height] - [-corner corner] +### Save Image + +This command can be both be used when the GUI is active and not active +to save a screenshot with various options. + +```tcl +save_image + [-resolution microns_per_pixel] + [-area {x0 y0 x1 y1}] + [-width width] + [-display_option {option value}] + filename ``` -Options description: -- ``filename`` path to save the image to. -- ``-clock`` name of the clock to save the clocktree for. -- ``-corner`` name of the timing corner to save the clocktree for, default to the first corner defined. -- ``-height`` height of the image in pixels, defaults to the height of the GUI widget. -- ``-width`` width of the image in pixels, defaults to the width of the GUI widget. +#### Options -### Selecting objects +| Switch Name | Description | +| ---- | ---- | +| `filename` | path to save the image to. | +| `-area` | x0, y0 - first corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block. x1, y1 - second corner of the layout area (in microns) to be saved, default is to save what is visible on the screen unless called when gui is not active and then it selected the whole block.| +| `-resolution`| resolution in microns per pixel to use when saving the image, default will match what the GUI has selected.| +| `-width`| width of the output image in pixels, default will be computed from the resolution. Cannot be used with ``-resolution``.| +| `-display_option`| specific setting for a display option to show or hide specific elements. For example, to hide metal1 ``-display_option {Layers/metal1 false}``, to show routing tracks ``-display_option {Tracks/Pref true}``, or to show everthing ``-display_option {* true}``.| -``` -select -type object_type - [-name glob_pattern] - [-filter attribute=value] - [-case_insensitive] - [-highlight group] +### Save Clocktree Image + +This command saves the screenshot of clocktree given options +to `filename`. + +```tcl +save_clocktree_image + filename + -clock clock_name + [-width width] + [-height height] + [-corner corner] ``` -Returns: number of objects selected. +#### Options -Options description: -- ``object_type``: name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations. -- ``glob_pattern``: (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive. -- ``attribute=value``: (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins). -- ``group``: (optional) add the selection to the specific highlighting group. Values can be 0 to 7. +| Switch Name | Description | +| ---- | ---- | +|`filename`| path to save the image to. | +|`-clock`| name of the clock to save the clocktree for. | +|`-corner`| name of the timing corner to save the clocktree for, default to the first corner defined. | +|`-height`| height of the image in pixels, defaults to the height of the GUI widget. | +|`-width`| width of the image in pixels, defaults to the width of the GUI widget. | -### Displaying timing cones +### Select +This command selects object based on options. +Returns: number of objects selected. + +```tcl +select + -type object_type + [-name glob_pattern] + [-filter attribute=value] + [-case_insensitive] + [-highlight group] ``` -display_timing_cone pin - [-fanin] - [-fanout] - [-off] -``` -Options description: -- ``pin``: name of the instance or block pin. -- ``fanin``: (optional) display the fanin timing cone. -- ``fanout``: (optional) display the fanout timing cone. -- ``off``: (optional) remove the timing cone. +#### Options + +| Switch Name | Description | +| ---- | ---- | +|`-type`| name of the object type. For example, ``Inst`` for instances, ``Net`` for nets, and ``DRC`` for DRC violations.| +|`-name`| (optional) filter selection by the specified name. For example, to only select clk nets ``*clk*``. Use ``-case_insensitive`` to filter based on case insensitive instead of case sensitive.| +|`-filter`| (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins).| +|`-highlight`| (optional) add the selection to the specific highlighting group. Values can be 0 to 7. | -### Limit drawing to specific nets +### Display Timing Cone +This command displays timing cones for a pin given options. + +```tcl +display_timing_cone + pin + [-fanin] + [-fanout] + [-off] ``` -focus_net net - [-remove] - [-clear] + +#### Options + +| Switch Name | Description | +| ---- | ---- | +|`pin` | name of the instance or block pin. | +|`-fanin`| (optional) display the fanin timing cone. | +|`-fanout`| (optional) display the fanout timing cone. | +|`-off`| (optional) remove the timing cone. | + +### Focus Net + +This command limits the drawing to specified net. + +```tcl +focus_net + net + [-remove] + [-clear] ``` -Options description: -- ``pin``: name of the net. -- ``remove``: (optional) removes the net from from the focus. -- ``clear``: (optional) clears all nets from focus. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `pin` | name of the net. | +| `-remove` | (optional) removes the net from from the focus. | +| `-clear` | (optional) clears all nets from focus. | ## TCL functions -### Support +### gui::Enabled Determine is the GUI is active: -``` +```tcl gui::enabled ``` +### gui::Design Created + Announce to the GUI that a design was loaded (note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): -``` +```tcl gui::design_created ``` +### gui::Load DRC + To load the results of a DRC report: +```tcl +gui::load_drc + filename ``` -gui::load_drc filename -``` -### Opening and closing +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `filename` | Filename for DRC report. | + +### gui::Show To open the GUI from the command-line (this command does not return until the GUI is closed): +```tcl +gui::show + [script] + [interactive] ``` -gui::show -gui::show script -gui::show script interactive -``` -Options description: -- ``script`` TCL script to evaluate in the GUI. -- ``interactive`` indicates if true the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `script` | TCL script to evaluate in the GUI. | +| `interactive` | Boolean if true, the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal.| + +### gui::Hide To close the GUI and return to the command-line: -``` +```tcl gui::hide ``` -### Layout navigation +### gui::Fit To fit the whole layout in the window: -``` +```tcl gui::fit ``` +### gui::Zoom To + To zoom in our out to a specific region: +```tcl +gui::zoom_to + [x0 y0 x1 y1] ``` -gui::zoom_to x0 y0 x1 y1 -``` -Options description: -- ``x0, y0`` first corner of the layout area in microns. -- ``x1, y1`` second corner of the layout area in microns. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x0, y0, x1, y1`| first and second corner of the layout area in microns.| + +### gui::Zoom In To zoom in the layout: -``` +```tcl gui::zoom_in -gui::zoom_in x y + [x y] ``` -Options description: -- ``x, y`` new center of layout. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x, y` | new center of layout in microns.| + +### gui::Zoom Out To zoom out the layout: -``` -gui::zoom_out -gui::zoom_out x y +```tcl +gui::zoom_out + [x y] ``` -Options description: -- ``x, y`` new center of layout. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x, y` | new center of layout in microns.| + +### gui::Center At To move the layout to new area: +```tcl +gui::center_at + [x y] ``` -gui::center_at x y -``` -Options description: -- ``x, y`` new center of layout. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x, y` | new center of layout in microns.| + +### gui::Set Resolution To change the resolution to a specific value: +```tcl +gui::set_resolution + [resolution] ``` -gui::set_resolution resolution -``` -Options description: -- ``resolution`` database units per pixel. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `resolution` | database units per pixel. | -### Selections +### gui::Selection Add Net To add a single net to the selected items: -``` -gui::selection_add_net name +```tcl +gui::selection_add_net + name ``` -Options description: -- ``name`` name of the net to add. +#### Options -To add several nets to the selected items: +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the net to add.| +### gui::Selection Add Nets + +To add several nets to the selected items using a regex: + +```tcl +gui::selection_add_nets + name_regex ``` -gui::selection_add_nets name_regex -``` -Options description: -- ``name_regex`` regular expression of the net names to add. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name_regex`| regular expression of the net names to add.| + +### gui::Selection Add Inst To add a single instance to the selected items: -``` -gui::selection_add_inst name +```tcl +gui::selection_add_inst + name ``` -Options description: -- ``name`` name of the instance to add. +#### Options -To add several instances to the selected items: +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the instance to add. | +### gui::Selection Add Insts + +To add several instances to the selected items using a regex: + +```tcl +gui::selection_add_insts + name_regex ``` -gui::selection_add_insts name_regex -``` -Options description: -- ``name_regex`` regular expression of the instance names to add. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name_regex` | regular expression of the instance names to add. | + +### gui::Select At To add items at a specific point or in an area: +Example usage: ``` gui::select_at x y gui::select_at x y append @@ -284,81 +416,132 @@ gui::select_at x0 y0 x1 y1 gui::select_at x0 y0 x1 y1 append ``` -Options description: -- ``x, y`` point in the layout area in microns. -- ``x0, y0`` first corner of the layout area in microns. -- ``x1, y1`` second corner of the layout area in microns. -- ``append`` if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. +```tcl +gui::select_at + x0 y0 x1 y1 + [append] -To navigate through multiple selected items: +Or +gui::select_at + x y + [append] ``` + +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x, y` | point in the layout area in microns. | +| `x0, y0, x1, y1`| first and second corner of the layout area in microns. | +| `append`| if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. | + +### gui::Select Next + +To navigate through multiple selected items: +Returns: current index of the selected item. + +```tcl gui::select_next -gui::select_previous ``` +### gui::Select Previous + +To navigate through multiple selected items: Returns: current index of the selected item. +```tcl +gui::select_previous +``` + +### gui::Clear Selections + To clear the current set of selected items: -``` +```tcl gui::clear_selections ``` +### gui::Get Selection Property + To get the properties for the current selection in the Inspector: +```tcl +gui::get_selection_property + name ``` -gui::get_selection_property name -``` -Options description: -- ``name`` name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. | + +### gui::Selection Animate To animate the current selection in the Inspector: +```tcl +gui::selection_animate + [repeat] ``` -gui::selection_animate -gui::selection_animate repeat -``` -Options description: -- ``repeat``: indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `repeat` | indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely.| -### Highlighting +### gui::Highlight net To highlight a net: +```tcl +gui::highlight_net + name + [highlight_group] ``` -gui::highlight_net name -gui::highlight_net name highlight_group -``` -Options description: -- ``name`` name of the net to highlight. -- ``highlight_group`` group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the net to highlight.| +| `highlight_group` | group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. | + +### gui::Highlight Inst To highlight an instance: +```tcl +gui::highlight_inst + name + [highlight_group] ``` -gui::highlight_inst name -gui::highlight_inst name highlight_group -``` -Options description: -- ``name`` name of the instance to highlight. -- ``highlight_group`` group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the instance to highlight. | +| `highlight_group` | group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. | + +### gui::Clear Highlights To clear the highlight groups: -``` +```tcl gui::clear_highlights -gui::clear_highlights highlight_group + [highlight_group] ``` -Options description: -- ``highlight_group`` group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `highlight_group` | group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. | -### Rulers +### gui::Add Ruler To add a ruler to the layout: @@ -367,135 +550,208 @@ To disable snapping for the ruler when adding, hold the ``Ctrl`` key, and to all 2. or use the command: -``` -gui::add_ruler x0 y0 x1 y1 -gui::add_ruler x0 y0 x1 y1 label -gui::add_ruler x0 y0 x1 y1 label name -gui::add_ruler x0 y0 x1 y1 label name euclidian +Returns: name of the newly created ruler. + +```tcl +gui::add_ruler + x0 y0 x1 y1 + [label] + [name] + [euclidian] ``` -Returns: name of the newly created ruler. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `x0, y0, x1, y1` | first and second end point of the ruler in microns. | +| `label` | text label for the ruler. | +| `name` | name of the ruler. | +| `euclidian` | ``1`` for euclidian ruler, and ``0`` for regular ruler. | -Options description: -- ``x0, y0`` first end point of the ruler in microns. -- ``x1, y1`` second end point of the ruler in microns. -- ``label`` text label for the ruler. -- ``name`` name of the ruler. -- ``euclidian`` ``1`` for euclidian ruler, and ``0`` for regular ruler. +### gui::Delete Ruler To remove a single ruler: +```tcl +gui::delete_ruler + name ``` -gui::delete_ruler name -``` -Options description: -- ``name`` name of the ruler. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | name of the ruler. | + +### gui::Clear Rulers To remove all the rulers: -``` +```tcl gui::clear_rulers ``` -### Heat Maps +### gui::Set Heatmap -The currently availble heat maps are: +To control the settings in the heat maps: +The currently availble heat maps are: - ``Power`` - ``Routing`` - ``Placement`` - ``IRDrop`` -To control the settings in the heat maps: +These options can also be modified in the GUI by double-clicking the underlined display control for the heat map. -``` -gui::set_heatmap name option -gui::set_heatmap name option value +```tcl +gui::set_heatmap + name + [option] + [value] ``` -Options description: -- ``name`` is the name of the heatmap. -- ``option`` is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. -- ``value`` is the new value for the specified option. This is not used when rebuilding map. +#### Options -These options can also be modified in the GUI by double-clicking the underlined display control for the heat map. +| Switch Name | Description | +| ---- | ---- | +| `name` | is the name of the heatmap. | +| `option` | is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. | +| `value` | is the new value for the specified option. This is not used when rebuilding map. | +### gui::Dump Heatmap Name To save the raw data from the heat maps ins a comma separated value (CSV) format: +```tcl +gui::dump_heatmap + name + filename ``` -gui::dump_heatmap name filename -``` -Options description: -- ``name`` is the name of the heatmap. -- ``filename`` path to the file to write the data to. +#### Options + +| Switch Name | Description | +| ---- | ---- | +|`name` | is the name of the heatmap. | +|`filename` | path to the file to write the data to. | -### GUI Display Controls +### gui::Set Display Controls Control the visible and selected elements in the layout: +```tcl +gui::set_display_controls + name + [display_type] + [value] ``` -gui::set_display_controls name display_type value -``` -Options description: -- ``name`` is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. -- ``display_type`` is either ``visible`` or ``selectable`` -- ``value`` is either ``true`` or ``false`` +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | +| `display_type` | is either ``visible`` or ``selectable`` | +| `value` |is either ``true`` or ``false`` | + +### gui::Check Display Controls To check the visibility or selectability of elements in the layout: -``` -gui::check_display_controls name display_type +```tcl +gui::check_display_controls + name + display_type ``` -Options description: -- ``name`` is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. -- ``display_type`` is either ``visible`` or ``selectable`` +#### Options +| Switch Name | Description | +| ---- | ---- | +| `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | +| `display_type` | is either ``visible`` or ``selectable`` | -When performing a batch operation changing the display controls settings, the following commands can be used to save the current state of the display controls and restore them at the end. +### gui::Save Display Controls -``` +When performing a batch operation changing the display controls settings, +the following command can be used to save the current state of the display controls. + +```tcl gui::save_display_controls +``` + +### gui::Restore Display Controls + +This command restores display controls. + +```tcl gui::restore_display_controls ``` -### GUI Controls +### gui::Input Dialog To request user input via the GUI: +Returns: a string with the input, or empty string if canceled. -``` -gui::input_dialog title question +```tcl +gui::input_dialog + title + question ``` -Returns: a string with the input, or empty string if canceled. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `title` | is the title of the input message box. | +| `question` | is the text for the message box. | -Options description: -- ``title`` is the title of the input message box. -- ``question`` is the text for the message box. +### gui::Pause Pause the execution of the script: -``` +```tcl gui::pause -gui::pause timeout + [timeout] ``` -Options description: -- ``timeout`` is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button. +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `timeout` | is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button.| -To open or close a specific layout widget: +### gui::Show widget +To open a specific layout widget: + +```tcl +gui::show_widget + name ``` -gui::show_widget name -gui::hide_widget name + +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | of the widget. For example, the display controls would be "Display Control". | + +### gui::Hide widget + +To close a specific layout widget: + +```tcl +gui::hide_widget + name ``` -Options description: -- ``name`` of the widget. For example, the display controls would be "Display Control". +#### Options + +| Switch Name | Description | +| ---- | ---- | +| `name` | of the widget. For example, the display controls would be "Display Control". | + ## License diff --git a/src/ifp/README.md b/src/ifp/README.md index 39df418aaf3..39eb7950d38 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -13,43 +13,14 @@ This tool initializes floorplan constraints, die/core area, and makes tracks. Do note that there are two ways of setting the floorplan dimensions. The user can either specify manually die/core area, or -specify the utilization/aspect ratio. +specify the utilization/aspect ratio. If you set both, +unexpected behaviour might occur. -#### Method 1: Automatic die size calculation +- Method 1: Automatic die size calculation +Example: `initialize_floorplan -utilization 70 -aspect_ratio 1.0 -core_space 0.0 -sites FreePDK45_38x28_10R_NP_162NW_34O` -```tcl -initialize_floorplan - [-utilization util] - [-aspect_ratio ratio] - [-core_space space | {bottom top left right}] - [-sites site_name] -``` -##### Options - -| Switch Name | Description | -| ----- | ----- | -| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | -| `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | - - -#### Method 2: Set die/core area - -```tcl -initialize_floorplan - [-die_area {llx lly urx ury}] - [-core_area {llx lly urx ury}] - [-sites site_name] -``` - -##### Options - -| Switch Name | Description | -| ----- | ----- | -| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, ...}`) | +- Method 2: Set die/core area +Example: `initialize_floorplan -die_area 0 0 2000 2000 -core_area 100 100 1900 1900` -sites FreePDK45_38x28_10R_NP_162NW_34O` The die area and core area used to write ROWs can be specified explicitly with the `-die_area` and `-core_area` arguments. Alternatively, the die and @@ -68,10 +39,32 @@ die = ( 0, 0 ) core_height + core_space_bottom + core_space_top ) ``` + +```tcl +initialize_floorplan + [-utilization util] + [-aspect_ratio ratio] + [-core_space space | {bottom top left right}] + [-sites site_name] + [-die_area {llx lly urx ury}] + [-core_area {llx lly urx ury}] + [-sites site_name] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | +| `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | +| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | +| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | +| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | + ### Make Tracks The `initialize_floorplan` command removes existing tracks. - Use the `make_tracks` command to add routing tracks to a floorplan. ```tcl @@ -91,9 +84,9 @@ make_tracks | `-x_pitch`, `-y_pitch` | If set, overrides the LEF technology x-/y- pitch. Use the same unit as in the LEF file. | | `-x_offset`, `-y_offset` | If set, overrides the LEF technology x-/y- offset. Use the same unit as in the LEFT file. | -### Inserting tieoff cells +### Insert tiecells -To insert tiecells: +This comamnd inserts tiecells. ```tcl insert_tiecells @@ -108,7 +101,7 @@ insert_tiecells | `tie_pin` | Indicates the master and port to use to tie off nets. For example, `LOGIC0_X1/Z` for the Nangate45 library, where `LOGIC0_X1` is the master and `Z` is the output port on the master. | | `-prefix` | Used to control the prefix of the new tiecell names. This will default to `TIEOFF_`. | -### Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/InitFloorplan.cc) or the [swig file](./src/InitFloorPlan.i). @@ -120,7 +113,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts on running `ifp` for a sample design of `mpd_top` are as follows: -```tcl +``` ./test/upf_test.tcl ``` diff --git a/src/mpl/README.md b/src/mpl/README.md index 4052e508bbb..b63dcc2564b 100644 --- a/src/mpl/README.md +++ b/src/mpl/README.md @@ -20,6 +20,14 @@ heuristic evaluation function is kept. ### Macro Placement +This command performs macro placement. +For placement style, `corner_max_wl` means that choosing the partitions that maximise the wirelength +of connections between the macros to force them to the corners. Vice versa for `corner_min_wl`. + +Macros will be placed with $max(halo * 2, channel)$ spacing between macros, and between +macros and the fence/die boundary. If no solutions are found, try reducing the +channel/halo. + ```tcl macro_placement [-halo {halo_x halo_y}] @@ -39,15 +47,8 @@ macro_placement | `-snap_layer_number` | Snap macro origins to this routing layer track. | | `-style` | Placement style, to choose either `corner_max_wl` or `corner_min_wl`. The default value is `corner_max_wl`. | -For placement style, `corner_max_wl` means that choosing the partitions that maximise the wirelength -of connections between the macros to force them to the corners. Vice versa for `corner_min_wl`. - -Macros will be placed with $max(halo * 2, channel)$ spacing between macros, and between -macros and the fence/die boundary. If no solutions are found, try reducing the -channel/halo. - -### Useful developer functions +## Useful developer functions If you are a developer, you might find these useful. More details can be found in the [source file](./src/MacroPlacer.cpp) or the [swig file](./src/MacroPlacer.i). @@ -59,7 +60,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts demonstrating how to run TritonMacroPlace on a sample design of `east_west` as follows: -```tcl +``` ./test/east_west.tcl ./test/east_west1.tcl ./test/east_west2.tcl diff --git a/src/mpl2/README.md b/src/mpl2/README.md index 78a04e2711d..97a3db6385e 100644 --- a/src/mpl2/README.md +++ b/src/mpl2/README.md @@ -11,7 +11,9 @@ planning approach that exploits the hierarchy and data flow inherent in the desi - Parameters without square brackets `-param2 param2` are required. ``` -### Hier-RTLMP algorithm +### RTL Macro Placer + +This command executes the Hier-RTLMP algorithm for macro placement. ```tcl rtl_macro_placer @@ -47,7 +49,7 @@ rtl_macro_placer [-write_macro_placement file_name] ``` -#### Generic Parameters +#### Options | Switch Name | Description | | ----- | ----- | @@ -69,7 +71,6 @@ rtl_macro_placer | `-report_directory` | Save reports to this directory. | | `-write_macro_placement` | Generates a file with the macro placement in the format of multiple calls for the `place_macro` command. | - #### Simulated Annealing Weight parameters Do note that while action probabilities are normalized to 1.0, the weights are not necessarily normalized. @@ -87,12 +88,19 @@ Do note that while action probabilities are normalized to 1.0, the weights are n ### Write Macro Placement -Command to write a file with the macro placement in the format of multiple calls for the `place_macro` command: +Command to write a file with the macro placement in the format of +multiple calls for the `place_macro` command: ```tcl write_macro_placement file_name ``` +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `filename` | Filename to write the macro placement flow commands to. | + ### Place Macro Command for placement of one specific macro. diff --git a/src/pad/README.md b/src/pad/README.md index 35d84ae4fd2..929c5ee0295 100644 --- a/src/pad/README.md +++ b/src/pad/README.md @@ -11,13 +11,20 @@ boundary of the chip and connect with either wirebond pads or a bump array. - Parameters without square brackets `-param2 param2` are required. ``` -### Placing Terminals +### Place IO Terminals In the case where the bond pads are integrated into the padcell, the IO terminals need to be placed. -To place a terminals on the padring +This command place terminals on the padring. + +Example usage: +``` +place_io_terminals u_*/PAD +place_io_terminals u_*/VDD +``` ```tcl -place_io_terminals inst_pins +place_io_terminals + inst_pins ``` #### Options @@ -26,15 +33,15 @@ place_io_terminals inst_pins | ----- | ----- | | `inst_pins` | Instance pins to place the terminals on. | -#### Examples -``` -place_io_terminals u_*/PAD -place_io_terminals u_*/VDD -``` +### Make IO Bump Array + +This command defines a bump array. -### Defining a Bump Array +Example usage: -To define a bump array. +``` +make_io_bump_array -bump BUMP -origin "200 200" -rows 14 -columns 14 -pitch "200 200" +``` ```tcl make_io_bump_array @@ -56,18 +63,21 @@ make_io_bump_array | `-columns` | Number of columns to create. | | `-pitch` | Pitch of the array. | | `-prefix` | Name prefix for the bump array. The default value is `BUMP_`. | -Example usage: -```tcl -make_io_bump_array -bump BUMP -origin "200 200" -rows 14 -columns 14 -pitch "200 200" -``` -### Removing Entire Bump Array +### Remove IO Bump Array + +This command removes the entire bump array. + +Example usage: -To remove a bump array. +``` +remove_io_bump_array -bump BUMP +``` ```tcl -remove_io_bump_array -bump master +remove_io_bump_array + -bump master ``` #### Options @@ -76,18 +86,13 @@ remove_io_bump_array -bump master | ----- | ----- | | `-bump` | Name of the bump master. | -Example usage: - -```tcl -remove_io_bump_array -bump BUMP -``` - -### Removing a Single Bump Instance +### Remove IO Bump -To remove a single bump instance. +This command removes a single bump instance. ```tcl -remove_io_bump instance_name +remove_io_bump + instance_name ``` #### Options @@ -96,9 +101,21 @@ remove_io_bump instance_name | ----- | ----- | | `instance_name` | Name of the bump. | -### Assigning a Net to a Bump +### Assign IO Bump -To assign a net to a bump. +This command assigns a net to a bump instance. + +Example usage: + +``` +assign_io_bump -net p_ddr_addr_9_o BUMP_6_0 +assign_io_bump -net p_ddr_addr_8_o BUMP_6_2 +assign_io_bump -net DVSS BUMP_6_4 +assign_io_bump -net DVDD BUMP_7_3 +assign_io_bump -net DVDD -terminal u_dvdd/DVDD BUMP_8_3 +assign_io_bump -net p_ddr_addr_7_o BUMP_7_1 +assign_io_bump -net p_ddr_addr_6_o BUMP_7_0 +``` ```tcl assign_io_bump @@ -117,21 +134,16 @@ assign_io_bump | `-dont_route` | Flag to indicate that this bump should not be routed, only perform assignment. | | `instance` | Name of the bump. | -Example usage: +### Make IO Sites -```tcl -assign_io_bump -net p_ddr_addr_9_o BUMP_6_0 -assign_io_bump -net p_ddr_addr_8_o BUMP_6_2 -assign_io_bump -net DVSS BUMP_6_4 -assign_io_bump -net DVDD BUMP_7_3 -assign_io_bump -net DVDD -terminal u_dvdd/DVDD BUMP_8_3 -assign_io_bump -net p_ddr_addr_7_o BUMP_7_1 -assign_io_bump -net p_ddr_addr_6_o BUMP_7_0 -``` +This command defines an IO site for the pads to be placed into. -### Define IO Rows +Example usage: -Define an IO site for the pads to be placed into. +``` +make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 +make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -rotation_horizontal R180 +``` ```tcl make_io_sites @@ -158,12 +170,6 @@ make_io_sites | `-rotation_corner` | Rotation to apply to the corner sites to ensure pads are placed correctly. The default value is `R0`. | | `-ring_index` | Used to specify the index of the ring in case of multiple rings. | -Example usage: - -```tcl -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -make_io_sites -horizontal_site IOSITE_H -vertical_site IOSITE_V -corner_site IOSITE_C -offset 35 -rotation_horizontal R180 -``` ### Remove IO Rows @@ -173,9 +179,9 @@ When the padring is complete, the following command can remove the IO rows to av remove_io_rows ``` -### Placing Corners +### Place Corners -To place the corner cells +This command places the corner cells. ```tcl place_corners @@ -192,14 +198,23 @@ place_corners Example usage: -```tcl +``` place_corners sky130_fd_io__corner_bus_overlay ``` -### Placing Pads +### Place Pad To place a pad into the pad ring. +Example usage: + +``` +place_pad -row IO_SOUTH -location 280.0 {u_clk.u_in} +place_pad -row IO_SOUTH -location 360.0 -mirror {u_reset.u_in} +place_pad -master sky130_fd_io__top_ground_hvc_wpad -row IO_SOUTH -location 439.5 {u_vzz_0} +place_pad -master sky130_fd_io__top_power_hvc_wpad -row IO_SOUTH -location 517.5 {u_v18_0} +``` + ```tcl place_pad -row row_name @@ -219,19 +234,20 @@ place_pad | `-master` | Name of the instance master if the instance needs to be created. | | `name` | Name of the instance. | -Example usage: -```tcl -place_pad -row IO_SOUTH -location 280.0 {u_clk.u_in} -place_pad -row IO_SOUTH -location 360.0 -mirror {u_reset.u_in} -place_pad -master sky130_fd_io__top_ground_hvc_wpad -row IO_SOUTH -location 439.5 {u_vzz_0} -place_pad -master sky130_fd_io__top_power_hvc_wpad -row IO_SOUTH -location 517.5 {u_v18_0} -``` - -### Placing IO Filler Cells +### Place IO Fill To place the IO filler cells. +Example usage: + +``` +place_io_fill -row IO_NORTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um +place_io_fill -row IO_SOUTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um +place_io_fill -row IO_WEST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um +place_io_fill -row IO_EAST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um +``` + ```tcl place_io_fill -row row_name @@ -247,16 +263,7 @@ place_io_fill | `-permit_overlaps` | Names of the masters for the IO filler cells that allow for overlapping. | | `masters` | Names of the masters for the IO filler cells. | -Example usage: - -```tcl -place_io_fill -row IO_NORTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_SOUTH s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_WEST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -place_io_fill -row IO_EAST s8iom0s8_com_bus_slice_10um s8iom0s8_com_bus_slice_5um s8iom0s8_com_bus_slice_1um -``` - -### Connecting Ring Signals +### Connect By Abutment Once the ring is complete, use the following command to connect the ring signals. @@ -264,10 +271,16 @@ Once the ring is complete, use the following command to connect the ring signals connect_by_abutment ``` -### Placing Wirebond Pads +### Place Bondpad To place the wirebond pads over the IO cells. +Example usage: + +``` +place_bondpad -bond PAD IO_* +``` + ```tcl place_bondpad -bond master @@ -285,16 +298,19 @@ place_bondpad | `-rotation` | Rotation of the bondpad. | | `io_instances` | Names of the instances to add bond pads to. | +### Make False IO Site + +If the library does not contain sites for the IO cells, the following command can be used to add them. +This should not be used unless the sites are not in the library. + Example usage: -```tcl -place_bondpad -bond PAD IO_* +``` +make_fake_io_site -name IO_HSITE -width 1 -height 204 +make_fake_io_site -name IO_VSITE -width 1 -height 200 +make_fake_io_site -name IO_CSITE -width 200 -height 204 ``` -### Creating False IO Sites - -If the library does not contain sites for the IO cells, the following command can be used to add them. -This should not be used unless the sites are not in the library. ```tcl make_fake_io_site @@ -311,15 +327,8 @@ make_fake_io_site | `-width` | Width of the site (in microns). | | `-height` | Height of the site (in microns). | -Example usage: - -```tcl -make_fake_io_site -name IO_HSITE -width 1 -height 204 -make_fake_io_site -name IO_VSITE -width 1 -height 200 -make_fake_io_site -name IO_CSITE -width 200 -height 204 -``` -### Redistribution Layer Routing +### RDL Route To route the RDL for the bump arrays. @@ -366,7 +375,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts for running ICeWall functions can be found in `./test`. -```tcl +``` ./test/assign_bumps.tcl ./test/bump_array_make.tcl ./test/bump_array_remove.tcl diff --git a/src/par/README.md b/src/par/README.md index 3c395e49a20..0c55634afa2 100644 --- a/src/par/README.md +++ b/src/par/README.md @@ -1,8 +1,10 @@ -# TritonPart : An Open-Source Constraints-Driven Partitioner +# Partition Manager -TritonPart is an open-source constraints-driven partitioner. It can be used to partition a hypergraph or a gate-level netlist. +The paritioning module (`par`) is based on TritonPart, an open-source +constraints-driven partitioner. `par` can be used +to partition a hypergraph or a gate-level netlist. -## Features +## Highlights - Start of the art multiple-constraints driven partitioning “multi-tool” - Optimizes cost function based on user requirement - Permissive open-source license @@ -15,16 +17,512 @@ TritonPart is an open-source constraints-driven partitioner. It can be used to - Embedding-aware partitioning ## Dependency -We use Google OR-Tools as our ILP solver. Please install Google OR-Tools following the [instructions](https://developers.google.com/optimization/install). -## How to partition a hypergraph in the way you would using hMETIS (min-cut partitioning) -``` shell +We use Google OR-Tools as our ILP solver. + +Our recommendation is to follow the OpenROAD [DependencyInstaller](../etc/DependencyInstaller.sh) for installation of this requirement. + +Alternatively, you may also install Google OR-Tools +following these [instructions](https://developers.google.com/optimization/install). + +```{warning} +Due to a build issue, TritonPart is not supported for macOS. Stay tuned to this page for updates! +``` + +## Main Algorithm + +An overview of the TritonPart algorithm is shown below. It takes as inputs +- Hypergraph $H(V,E)$ in `.hgr` format. +- Vertex weight $w_v \in \mathcal{R}_+^m$ +- Hyperedge weight $w_e \in \mathcal{R}_+^n$ +- Number of blocks $K$. +- Imbalance factor $\epsilon$. +- User-specified cost function $\phi$. + +There are five main steps in the main algorithm, +mainly 1) constraints-driven coarsening, +2) initial partitioning, 3) refinement, 4) cut-overlay clustering and +partitioning (COCP), and 5) V-cycle refinement. The steps for the +timing-aware algorithm may be found in the next [section](#timing-aware-algorithm). + +1. Constraints-Driven Coarsening + +The first step involves multilevel coarsening. Specifically, at each level, +clusters of vertices are identified, and the merged and represented +as a single vertex in the resulting coarser hypergraph. In this algorithm, +the First-Choice scheme is used, which traverses the vertices in the +hypergraph according to a given ordering and merges pairs of vertices with +high connectivity. The connectivity between a pair of vertices $(u,v)$ +is measured as follows: + +$$r(u, v) = \sum_{e\in \{I(v)\cap I(u)\}} \frac{\langle \alpha, w_e\rangle}{|e|-1}$$ + +To efficiently manage multiple constraints, the following enhancements are +made to the coarsening scheme above: + +- **Fixed Vertex Constraint**: Fixed vertices that belong to the same partitioning block are merged into a single vertex. +- **Grouping Constraint**: Vertices that belong to the same group are merged into a single vertex. +- **Embedding Constraint**: The embedding information is incorporated into the heavy-edge rating function. The new connectivity is updated as follows: + +$$\hat{r}(u, v) = r(u, v) + \rho ||X_u - X_v||_2$$ + +where $\rho$ is a normalization factor, set to the average distance between +two vertex embeddings. When vertices $v_1, ... , v_t$ are merged into a +single vertex $v_{coarse}$, the corresponding vertex embedding +$X_{v_{coarse}}$ is defined as the *center of gravity* of $t$ vertices: + +$$X_{v_{coarse}} = \sum_{j=1}^{t} \frac{||w_{v_j}||}{M} X_{v_j},\ where\ M= \sum_{j=1}^t ||w_{v_j}|| $$ + +- **Community Guidance**: Only vertices within the same community are considered for merging. + +- **Tie-breaking mechanism**: If multiple neighbor pairs have the same rating score, combine the lexicographically first unmatched vertex to break ties. + +2. Initial Partitioning + +After completing the coarsening process, a initial partitioning solution +for the coarsest hypergraph $H_c$ is derived. Two sub-steps are involved in +this: the best partitioning solution from random and VILE partitioning +is chosen from $\eta = 50$ runs as a warm-start to the ILP-based +partitioner. The optimisation is based on only the cutsize rather +than the cost function $\phi$ to keep the runtime reasonable. + +3. Refinement + +After a feasible solution $H_{c_\xi}$ is obtained by initial partitioning, +uncoarsening and move-based refinement is performed to improve the +partitioning solution. Three refinement heuristics are applied in sequence: + +- **$K$-way pairwise FM (PM)**: This addresses multi-way paritioning as +concurrent bipartitioning problems in a restricted version of K-way +Fiduccia–Mattheyses (FM) algorithm. First, $\lfloor K/2\rfloor $ +pairs of blocks are obtained, with refinement specific vertex movements +restricted to associated paired blocks. Next, two-way FM is concurrently +performed on all the block pairs. finally, a new configuration of block +pairs is computed at the end of the PM. + +- **Direct $K$-way FM**: Using $K$ priority queues, for each block $V_i$, +establish a priority queue that stores the vertices that can be potentially +moved from current block to block $V_i$. This queue is ordered according +to the gain of the vertices. Gain is defined as the reduction in cost +function from the movement of the vertex from current block to $V_i$. +Next, after a vertex move, each priority queue is updated independently, +thus enabling parallel updates via multi-threading. Next, early-stop is +implemented by limiting the maximum number of vertices moved to 100 per +pass. Finally, the *corking effect* is mitigated by traversing the priority +queue belonging to the vertex with the highest gain and identifying a +feasible vertex move. + +- **Greedy Hyperedge Refinement (HER)**: First, randomly visit all +hyperedges. For each hyperedge $e$ that crosses the partition boundary, +determine whether a subset of vertices in $e$ can be moved without +violating the multi-dimensional balance constraints. The objective is +to make $e$ entirely constrained in a block. + +4. Cut-Overlay Clustering and Partitioning (COCP) + +Cut-overlay Clustering and Partitioning (COCP) is a mechanism to +combine multiple good-quality partitioning solutions to generate an +improved solution. To begin, the sets of hyperedges cut in the $\theta$ +candidate solutions are denoted as $E_1,..., E_\theta \subset E$. +First, $\cup_{i=1}^\theta E_i$ is removed from the hypergraph $H(V,E)$, +resulting in a number of connected components. Next, all vertices within +each connected component is merged to form a coarser hypergraph +$H_{overlay}$. If the number of vertices in $H_{overlay}$ is less than +$thr_{ilp}$, ILP-based partitioning is performed. If not, a single round of +constraints-driven coarsening is conducted to further reduce the size of +$H_{overlay}$ and generate a coarser hypergraph $H_{overlay}^{'}$. Finally, +multilevel refinement is performed to further improve the partitioning +solution at each level of the hierarchy and return the improved solution +$S^{'}$. + +5. V-Cycle Refinement + +Cut-overlay clustering and partitioning produces a high-quality partitioning +solution $S^{'}$. To improve it, there are three phases similar to *hMETIS*, +namely: multilevel coarsening, ILP-based partitioning, and refinement. +Firstly, in multilevel partitioning, $S^{'}$ is used as a community guidance +for the constraints-driven coarsening. Only vertices within the same block +are permitted to be merged, to ensure that the current solution $S^{'}$ +is preserved in the coarsest hypergraph $H_{c_\xi}$. In the ILP-based +partitioning phase, if the number of vertices in $H_{c_\xi}$ does not +exceed $thr_{ilp}$, run ILP-based partitioning to improve $S^{'}$. Else, +continue with $S^{'}$ in successive iterations of these two steps +(default set to 2). Refinement phase is conducted as per step 3. + +![](./doc/algo.webp) +
TritonPart algorithm at a glance
+ +## Timing Aware Algorithm + +`par` can also be used as a timing-aware partitioning framework. A slack +propagation methodology is used that optimizes cuts for both timing-critical +and timing-noncritical paths. + +1. Extraction of Timing Paths and Slack Information + +First, the top $P$ +timing-critical paths and the slack information of each hyperedge using +the wireload model (WLM) is obtained from *OpenSTA*. The timing cost of +each path is then calculated: + +$$t_p = (1- \frac{slack_p - \Delta}{clock\_period})^\mu$$ + +where a fixed extra delay $\Delta$ is introduced for timing guardband, +and $\mu$ (default 2) is the exponent. + +The snaking factor of a path $SF(p)$ is defined as the maximum number of +block reentries along the path $p$. The timing cost of a hyperedge is +computed using the timing weight corresponding to hyperedge slack $slack_e$, +and the accumulated timing cost of all paths traversing the hyperedge. + +$$t_e = (1- \frac{slack_e -\Delta}{clock\_period})^\mu + \sum_{\{p|e\in p\}}t_p$$ + +2. Timing-aware Coarsening + +Timing-aware feature is achieved by adding a timing cost of hyperedge $t_e$ +to the connectivity score earlier mentioned. If vertices $(u,v)$ are +associated with multiple critical paths, then they are more likely to be +merged. This is reflected in the update score function: + +$$r_t(u,v) = \hat{r}(u,v) + \sum_{e\in\{I(v) \cap I(u)\}} \frac{\beta t_e}{|e| - 1}$$ + +3. Timing-aware Refinement + +Timing-aware refinement is based on the similar cost function as the main +algorithm. Instead, an additional slack propagation step is performed at +the end of each PM/FM/HER pass. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Triton Part Hypergraph + +This command performs hypergraph netlist partitioning. + +```tcl +triton_part_hypergraph + -hypergraph_file hypergraph_file + -num_parts num_parts + -balance_constraint balance_constraint + [-base_balance base_balance] + [-seed seed] + [-vertex_dimension vertex_dimension] + [-hyperedge_dimension hyperedge_dimension] + [-placement_dimension placement_dimension] + [-fixed_file fixed_file] + [-community_file community_file] + [-group_file group_file] + [-placement_file placement_file] + [-e_wt_factors e_wt_factors] + [-v_wt_factors ] + [-placement_wt_factors ] + [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] + [-thr_coarsen_vertices thr_coarsen_vertices] + [-thr_coarsen_hyperedges thr_coarsen_hyperedges] + [-coarsening_ratio coarsening_ratio] + [-max_coarsen_iters max_coarsen_iters] + [-adj_diff_ratio adj_diff_ratio] + [-min_num_vertices_each_part min_num_vertices_each_part] + [-num_initial_solutions num_initial_solutions] + [-num_best_initial_solutions num_best_initial_solutions] + [-refiner_iters refiner_iters] + [-max_moves max_moves] + [-early_stop_ratio early_stop_ratio] + [-total_corking_passes total_corking_passes] + [-v_cycle_flag v_cycle_flag ] + [-max_num_vcycle max_num_vcycle] + [-num_coarsen_solutions num_coarsen_solutions] + [-num_vertices_threshold_ilp num_vertices_threshold_ilp] + [-global_net_threshold global_net_threshold] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | +| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | +| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | +| `-seed` | Random seed. The default value is `0`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | +| `-vertex_dimension` | Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-hyperedge_dimension` | Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-placement_dimension` | Number of dimensions for canvas, if placement information is provided. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | +| `-hypergraph_file` | Path to hypergraph file. | +| `-fixed_file` | Path to fixed vertices constraint file. | +| `-community_file` | Path to `community` attributes file to guide the partitioning process. | +| `-group_file` | Path to `stay together` attributes file. | +| `-placement_file` | Placement information file, each line corresponds to a group fixed vertices, community and placement attributes following the [hMETIS](https://course.ece.cmu.edu/~ee760/760docs/hMetisManual.pdf) format. | +| `-e_wt_factors` | Hyperedge weight factor. | +| `-v_wt_factors` | Vertex weight factors. | +| `-placement_wt_factors` | Placement weight factors. | +| `-thr_coarsen_hyperedge_size_skip` | Threshold for ignoring large hyperedge (default 200, integer). | +| `-thr_coarsen_vertices` | Number of vertices of coarsest hypergraph (default 10, integer). | +| `-thr_coarsen_hyperedges` | Number of vertices of coarsest hypergraph (default 50, integer). | +| `-coarsening_ratio` | Coarsening ratio of two adjacent hypergraphs (default 1.6, float). | +| `-max_coarsen_iters` | Number of iterations (default 30, integer). | +| `-adj_diff_ratio` | Minimum difference of two adjacent hypergraphs (default 0.0001, float). | +| `-min_num_vertices_each_part` | Minimum number of vertices in each partition (default 4, integer). | +| `-num_initial_solutions` | Number of initial solutions (default 50, integer). | +| `-num_best_initial_solutions` | Number of top initial solutions to filter out (default 10, integer). | +| `-refiner_iters` | Refinement iterations (default 10, integer). | +| `-max_moves` | The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement (default 60, integer). | +| `-early_stop_ratio` | Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exits the current FM pass. The intention behind this is that most of the gains are achieved by the first few FM moves. (default 0.5, float). | +| `-total_corking_passes` | Maximum level of traversing the buckets to solve the "corking effect" (default 25, integer). | +| `-v_cycle_flag` | Disables v-cycle is used to refine partitions (default true, bool). | +| `-max_num_vcycle` | Maximum number of `vcycles` (default 1, integer). | +| `-num_coarsen_solutions` | Number of coarsening solutions with different randoms seed (default 3, integer). | +| `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning.(default 50, integer). | +| `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart (default 1000, integer). | + +### Evaluate Hypergraph Partition + +This command evaluates hypergraph partition. + +```tcl +evaluate_hypergraph_solution + -num_parts num_parts + -balance_constraint balance_constraint + -hypergraph_file hypergraph_file + -solution_file solution_file + [-base_balance base_balance] + [-vertex_dimension vertex_dimension] + [-hyperedge_dimension hyperedge_dimension] + [-fixed_file fixed_file] + [-group_file group_file] + [-e_wt_factors e_wt_factors] + [-v_wt_factors v_wt_factors] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | +| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | +| `-vertex_dimension` | Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-hyperedge_dimension` | Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-hypergraph_file` | Path to hypergraph file. | +| `-solution_file` | Path to solution file. | +| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | +| `-fixed_file` | Path to fixed vertices constraint file. | +| `-group_file` | Path to `stay together` attributes file. | +| `-e_wt_factors` | Hyperedge weight factor. | +| `-v_wt_factors` | Vertex weight factor. | + + +### Triton Part Design + +This command partitions the design netlist. Note that design must be loaded in memory. + +```tcl +triton_part_design + [-num_parts num_parts] + [-balance_constraint balance_constraint] + [-base_balance base_balance] + [-seed seed] + [-timing_aware_flag timing_aware_flag] + [-top_n top_n] + [-placement_flag placement_flag] + [-fence_flag fence_flag] + [-fence_lx fence_lx] + [-fence_ly fence_ly] + [-fence_ux fence_ux] + [-fence_uy fence_uy] + [-fixed_file fixed_file] + [-community_file community_file] + [-group_file group_file] + [-solution_file solution_file] + [-net_timing_factor net_timing_factor] + [-path_timing_factor path_timing_factor] + [-path_snaking_factor path_snaking_factor] + [-timing_exp_factor timing_exp_factor] + [-extra_delay extra_delay] + [-guardband_flag guardband_flag] + [-e_wt_factors e_wt_factors] + [-v_wt_factors v_wt_factors] + [-placement_wt_factors placement_wt_factors] + [-thr_coarsen_hyperedge_size_skip thr_coarsen_hyperedge_size_skip] + [-thr_coarsen_vertices thr_coarsen_vertices] + [-thr_coarsen_hyperedges thr_coarsen_hyperedges] + [-coarsening_ratio coarsening_ratio] + [-max_coarsen_iters max_coarsen_iters] + [-adj_diff_ratio adj_diff_ratio] + [-min_num_vertices_each_part min_num_vertices_each_part] + [-num_initial_solutions num_initial_solutions] + [-num_best_initial_solutions num_best_initial_solutions] + [-refiner_iters refiner_iters] + [-max_moves max_moves] + [-early_stop_ratio early_stop_ratio] + [-total_corking_passes total_corking_passes] + [-v_cycle_flag v_cycle_flag ] + [-max_num_vcycle max_num_vcycle] + [-num_coarsen_solutions num_coarsen_solutions] + [-num_vertices_threshold_ilp num_vertices_threshold_ilp] + [-global_net_threshold global_net_threshold] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | +| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | +| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | +| `-seed` | Random seed. The default value is `1`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | +| `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | +| `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT`. | +| `-placement_flag` | Enable placement driven partitioning. The default value is `false`, and the allowed values are booleans. | +| `-fence_flag ` | Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. | +| `-fence_lx ` | Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_ly ` | Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_ux ` | Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_uy ` | Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fixed_file` | Path to fixed vertices constraint file | +| `-community_file` | Path to `community` attributes file to guide the partitioning process. | +| `-group_file` | Path to `stay together` attributes file. | +| `-solution_file` | Path to solution file. | +| `-net_timing_factor` | Hyperedge timing weight factor (default 1.0, float). | +| `-path_timing_factor` | Cutting critical timing path weight factor (default 1.0, float). | +| `-path_snaking_factor` | Snaking a critical path weight factor (default 1.0, float). | +| `-timing_exp_factor` | Timing exponential factor for normalized slack (default 1.0, float). | +| `-extra_delay` | Extra delay introduced by a cut (default 1e-9, float). | +| `-guardband_flag` | Enable timing guardband option (default false, bool). | +| `-e_wt_factors` | Hyperedge weight factor. | +| `-v_wt_factors` | Vertex weight factor. | +| `-placement_wt_factors` | Placement weight factor. | +| `-thr_coarsen_hyperedge_size_skip` | Threshold for ignoring large hyperedge. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | +| `-thr_coarsen_vertices` | Number of vertices of coarsest hypergraph. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | +| `-thr_coarsen_hyperedges` | Number of vertices of coarsest hypergraph. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | +| `-coarsening_ratio` | Coarsening ratio of two adjacent hypergraphs. The default value is `1.5`, and the allowed values are floats. | +| `-max_coarsen_iters` | Number of iterations. The default value is `30`, and the allowed values are integers `[0, MAX_INT]`. | +| `-adj_diff_ratio` | Minimum ratio difference of two adjacent hypergraphs. The default value is `0.0001`, and the allowed values are floats. | +| `-min_num_vertices_each_part` | Minimum number of vertices in each partition. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. | +| `-num_initial_solutions` | Number of initial solutions. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. | +| `-num_best_initial_solutions` | Number of top initial solutions to filter out. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | +| `-refiner_iters` | Refinement iterations. The default value is `10`, and the allowed values are integers `[0, MAX_INT]`. | +| `-max_moves` | The allowed moves for each Fiduccia-Mattheyes (FM) algorithm pass or greedy refinement. The default value is `100`, and the allowed values are integers `[0, MAX_INT]`. | +| `-early_stop_ratio` | Describes the ratio $e$ where if the $n_{moved vertices} > n_{vertices} * e$, the tool exists the current FM pass. The intention behind this being that most of the gains are achieved by the first few FM moves. The default value is `0.5`, and the allowed values are floats. | +| `-total_corking_passes` | Maximum level of traversing the buckets to solve the "corking effect". The default value is `25`, and the allowed values are integers `[0, MAX_INT]`. | +| `-v_cycle_flag` | Disables v-cycle is used to refine partitions. The default value is `true`, and the allowed values are booleans. | +| `-max_num_vcycle` | Maximum number of vcycles. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | +| `-num_coarsen_solutions` | Number of coarsening solutions with different randoms seed. The default value is `4`, and the allowed values are integers `[0, MAX_INT]`. | +| `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | +| `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | + +### Evaluate Part Design Solution + +This command evaluates partition design solution. + +```tcl +evaluate_part_design_solution + [-num_parts num_parts] + [-balance_constraint balance_constraint] + [-base_balance base_balance] + [-timing_aware_flag timing_aware_flag] + [-top_n top_n] + [-fence_flag fence_flag] + [-fence_lx fence_lx] + [-fence_ly fence_ly] + [-fence_ux fence_ux] + [-fence_uy fence_uy] + [-fixed_file fixed_file] + [-community_file community_file] + [-group_file group_file] + [-hypergraph_file hypergraph_file] + [-hypergraph_int_weight_file hypergraph_int_weight_file] + [-solution_file solution_file] + [-net_timing_factor net_timing_factor] + [-path_timing_factor path_timing_factor] + [-path_snaking_factor path_snaking_factor] + [-timing_exp_factor timing_exp_factor] + [-extra_delay extra_delay] + [-guardband_flag guardband_flag] + [-e_wt_factors e_wt_factors] + [-v_wt_factors v_wt_factors] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | +| `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | +| `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, the allowed values are floats that sum up to `1.0`. | +| `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | +| `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | +| `-fence_flag ` | Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. | +| `-fence_lx ` | Fence lower left x in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_ly ` | Fence lower left y in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_ux ` | Fence upper right x in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fence_uy ` | Fence upper right y in microns. The default value is `0.0`, and the allowed values are floats. | +| `-fixed_file` | Path to fixed vertices constraint file. | +| `-community_file` | Path to `community` attributes file to guide the partitioning process. | +| `-group_file` | Path to `stay together` attributes file. | +| `-hypergraph_file` | Path to hypergraph file. | +| `-hypergraph_int_weight_file` | Path to `hMETIS` format integer weight file. | +| `-solution_file` | Path to solution file. | +| `-net_timing_factor` | Hyperedge timing weight factor. The default value is `1.0`, and the allowed values are floats. | +| `-path_timing_factor` | Cutting critical timing path weight factor. The default value is `1.0`, and the allowed values are floats. | +| `-path_snaking_factor` | Snaking a critical path weight factor. The default value is `1.0`, and the allowed values are floats. | +| `-timing_exp_factor` | Timing exponential factor for normalized slack. Thedefault value is `1.0`, and the allowed values are floats. | +| `-extra_delay` | Extra delay introduced by a cut. The default value is `1e-9`, and the allowed values are floats. | +| `-guardband_flag` | Enable timing guardband option. The default value is 1`false`, and the allowed values are booleans. | +| `-e_wt_factors` | Hyperedge weight factors. | +| `-v_wt_factors` | Vertex weight factors. | + +### Write Partition Verilog + +This command writes the partition result to verilog. + +```tcl +write_partition_verilog + [-port_prefix prefix] + [-module_suffix suffix] + [file] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-port_prefix` | Port name prefix. | +| `-module_suffix` | Module name suffix. | +| `file` | Filename to write parition verilog to. | + +### Read Partitioning + +This command reads the partition file into design. + +```tcl +read_partitioning + -read_file name + [-instance_map_file file_path] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-read_file` | Read partitioning file (usually with the extension `.part`). The file format must match the same format as the output of `write_partition_verilog`. | +| `-instance_map_file` | Instance mapping file. | + + +## Example Scripts + +#### How to partition a hypergraph in the way you would using hMETIS (min-cut partitioning) + +``` triton_part_hypergraph -hypergraph_file des90.hgr -num_parts 5 -balance_constraint 2 -seed 2 ``` -You can also check the provided example [here](./examples/min-cut-partitioning). +You can also check the provided example [here](./examples/min-cut-partitioning/run_openroad.tcl). -## How to perform the embedding-aware partitioning -``` shell +#### How to perform the embedding-aware partitioning + +``` set num_parts 2 set balance_constraint 2 set seed 0 @@ -40,11 +538,13 @@ triton_part_hypergraph -hypergraph_file $hypergraph_file -num_parts $num_parts -placement_dimension 2 ``` -You can find the provided example [here](./examples/embedding-aware-partitioning). + +You can find the provided example [here](./examples/embedding-aware-partitioning/run_placement_aware_flow.tcl). -## How to partition a netlist -``` shell +#### How to partition a netlist + +``` # set technology information set ALL_LEFS “list_of_lefs” set ALL_LIBS “list_of_libs” @@ -75,7 +575,7 @@ set timing_guardband true set part_design_solution_file "${design}_part_design.hgr.part.${num_parts}" ############################################################################################## -### TritonPart with slack progagation +## TritonPart with slack progagation ############################################################################################## puts "Start TritonPart with slack propagation" # call triton_part to partition the netlist @@ -86,10 +586,23 @@ triton_part_design -num_parts $num_parts -balance_constraint $balance_constraint -solution_file $part_design_solution_file ``` -You can find the provided example [here](./examples/timing-aware-partitioning). +You can find the provided example [here](./examples/timing-aware-partitioning/run_timing_aware_flow.tcl). +## Regression tests -## License +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. +Simply run the following script: + +```shell +./test/regression +``` + +## References +1. Bustany, I., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). K-SpecPart: A Supervised Spectral Framework for Multi-Way Hypergraph Partitioning Solution Improvement. arXiv preprint arXiv:2305.06167. [(.pdf)](https://arxiv.org/pdf/2305.06167) +1. Bustany, I., Gasparyan, G., Kahng, A. B., Koutis, I., Pramanik, B., & Wang, Z. (2023). "An Open-Source Constraints-Driven General Partitioning Multi-Tool for VLSI Physical Design", Proc. ACM/IEEE International Conference of Computer-Aided Design 2023, to appear. + + +## License +BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/src/pdn/README.md b/src/pdn/README.md index dbd2c4c1d6e..3f567be054d 100644 --- a/src/pdn/README.md +++ b/src/pdn/README.md @@ -1,317 +1,290 @@ -# PDNGEN +# Power Distribution Network Generator +The power distribution network (PDN) generator module in OpenROAD (`pdn`) +is based on the PDNGEN tool. This utility aims to simplify the process of adding a power grid into a floorplan. The aim is to specify a small set of power grid policies to be applied to the design, such as layers to use, stripe width and spacing, then have the utility generate the actual metal straps. Grid policies can be defined over the stdcell area, and over areas occupied by macros. -```{seealso} -To work with UPF files, refer to [Read UPF Utility](../upf/README.md). +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. ``` -## Commands +### PDNGen -### Define Power Switch Cell +Build a power grid in accordance with the information specified. -Define a power switch cell that will be inserted into a power grid -``` -define_power_switch_cell -name \ - -control \ - [-acknowledge ] \ - -switched_power \ - -power \ - -ground +```tcl +pdngen + [-skip_trim] + [-dont_add_pins] + [-reset] + [-ripup] + [-report_only] + [-failed_via_report file] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | The name of the power switch cell. | -| `-control` | The name of the power control port of the power switch cell. | -| `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -| `-switched_power` | Defines the name of the pin that outputs the switched power net | -| `-power` | Defines the name of the pin that connects to the unswitched power net. | -| `-ground` | Defines the name of the pin that connects to the ground net. | - -#### Examples -``` -define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS - -``` +| `-skip_trim` | Skip the metal trim step, which attempts to remove metal stubs. | +| `-dont_add_pins` | Prevent the creation of block pins. | +| `-reset` | Reset the grid and domain specifications. | +| `-ripup` | Ripup the existing power grid, as specified by the voltage domains. | +| `-report_only` | Print the current specifications. | +| `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | -### Define voltage domains +### Set Voltage Domain Defines a named voltage domain with the names of the power and ground nets for a region. -The -region argument specifies the name of a region of the design. This region must already exist in the floorplan before referencing it with the set_voltage_domain command. If the -region argument is not supplied then region is the entire extent of the design. +This region must already exist in the floorplan before referencing it with the `set_voltage_domain` command. If the `-region` argument is not supplied then region is the entire core area of the design. -The -name argument is used to define a name for the voltage domain that can be used in the `define_pdn_grid` command -The -power and -ground arguments are used to define the names of the nets to be use for power and ground respectively within this voltage domain. +Example usage: -If the voltage domain is a switched power domain, then the name of the swiched power net must be specified with the -switched_power option. -``` -set_voltage_domain [-name name] \ - -power power_net \ - -ground ground_net \ - [-region region_name] \ - [-secondary_power secondary_power_net] \ - [-switched_power ] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-name` | Defines the name of the voltage domain, default is "Core" or region name if provided | -| `-power` | Specifies the name of the power net for this voltage domain | -| `-ground` | Specifies the name of the ground net for this voltage domain | -| `-region` | Specifies a region of the design occupied by this voltage domain | -| `-secondary_power` | Specifies the name of the secondary power net for this voltage domain | -| `-switched_power` | Specifies the name of the switched power net for switched power domains, | - -#### Examples ``` set_voltage_domain -power VDD -ground VSS set_voltage_domain -name TEMP_ANALOG -region TEMP_ANALOG -power VIN -ground VSS set_voltage_domain -region test_domain -power VDD -ground VSS -secondary_power VREG ``` -### Define power grids - -Define the rules to describe a power grid pattern to be placed in the design. - -``` -define_pdn_grid [-name ] \ - [-pins ] \ - [-starts_with (POWER|GROUND)] \ - [-voltage_domain ] \ - [-starts_with (POWER|GROUND)] \ - [-obstructions ] +```tcl +set_voltage_domain + -name domain_name + -power power_net_name + -ground ground_net_name + [-region region_name] + [-secondary_power secondary_power_net] + [-switched_power switched_power_net] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created) | -| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND) | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | - +| `-name` | Defines the name of the voltage domain, default is "Core" or region name if provided. | +| `-power` | Specifies the name of the power net for this voltage domain. | +| `-ground` | Specifies the name of the ground net for this voltage domain. | +| `-region` | Specifies a region of the design occupied by this voltage domain. | +| `-secondary_power` | Specifies the name of the secondary power net for this voltage domain. | +| `-switched_power` | Specifies the name of the switched power net for switched power domains. | -#### Examples +### Define PDN Grid -``` -define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} +```{warning} +`define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! ``` +- Method 1: General Usage +Define the rules to describe a power grid pattern to be placed in the design. -### Define a macro power grid +Example usage: ``` -define_pdn_grid -macro \ - [-name name] \ - [-grid_over_pg_pins|-grid_over_boundary] \ - [-orient ] \ - [-instances ] \ - [-default] \ - [-halo ] \ - [-voltage_domain ] \ - [-starts_with (POWER|GROUND)] \ - [-obstructions ] \ - [-bump] +define_pdn_grid -name main_grid -pins {metal7} -voltage_domain {CORE TEMP_ANALOG} ``` -#### Options +- Method 2: Macros +Define the rules for one or more macros. -| Switch Name | Description | -| ----- | ----- | -| `-macro` | Defines the type of grid being added as a macro. | -| `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid. (Default: Last domain created) | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND) | -| `-grid_over_boundary` | Place the power grid over the entire macro. | -| `-grid_over_pg_pins` | Place the power grid over the power ground pins of the macro. (Default) | -| `-instances` | For a macro, defines a set of valid instances. Macros with a matching instance name will use this grid specification. | -| `-cells` | For a macro, defines a set of valid cells. Macros which are instances of one of these cells will use this grid specification. | -| `-default` | For a macro, specifies this is a default grid that can be overwritten. | -| `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | -| `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively. (Default: 0) | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | -| `-bump` | Flag to indicate this is a grid for a cover cell | - -#### Examples +Example usage: ``` define_pdn_grid -macro -name ram -orient {R0 R180 MX MY} -grid_over_pg_pins -starts_with POWER -pin_direction vertical define_pdn_grid -macro -name rotated_rams -orient {E FE W FW} -grid_over_boundary -starts_with POWER -pin_direction horizontal ``` -### Define a grid for an existing routing +- Method 3: Modify existing power domain +Modify pre-existing power domain. + +Example usage: ``` -define_pdn_grid [-name ] \ - -existing \ - [-obstructions ] +define_pdn_grid -name main_grid -existing +``` + +```tcl +define_pdn_grid + [-name name] + [-voltage_domain list_of_domain_names] + [-pins list_of_pin_layers] + [-starts_with POWER|GROUND] + [-obstructions list_of_layers] + [-macro] + [-grid_over_pg_pins|-grid_over_boundary] + [-orient list_of_valid_orientations] + [-instances list_of_instances] + [-cells list_of_cells] + [-default] + [-halo list_of_halo_values] + [-power_switch_cell name] + [-power_control signal_name] + [-power_control_network STAR|DAISY] + [-existing] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-name` | Defines a name to use when referring to this grid definition. Defaults to `existing_grid` | -| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations | +| `-name` | Defines a name to use when referring to this grid definition. | +| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | +| `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +| `-macro` | Defines the type of grid being added as a macro. | +| `-grid_over_pg_pins`, `-grid_over_boundary` | Place the power grid over the power ground pins of the macro. (Default True), or Place the power grid over the entire macro. | +| `-orient` | For a macro, defines a set of valid orientations. LEF orientations (N, FN, S, FS, E, FE, W and FW) can be used as well as standard geometry orientations (R0, R90, R180, R270, MX, MY, MXR90 and MYR90). Macros with one of the valid orientations will use this grid specification. | +| `-instances` | For a macro, defines a set of valid instances. Macros with a matching instance name will use this grid specification. | +| `-cells` | For a macro, defines a set of valid cells. Macros which are instances of one of these cells will use this grid specification. | +| `-default` | For a macro, specifies this is a default grid that can be overwritten. | +| `-halo` | Specifies the default minimum separation of selected macros from other cells in the design. This is only used if the macro does not define halo values in the LEF description. If 1 value is specified it will be used on all 4 sides, if two values are specified, the first will be applied to left/right sides and the second will be applied to top/bottom sides, if 4 values are specified, then they are applied to left, bottom, right and top sides respectively (Default: 0). | +| `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | +| `-power_switch_cell` | Defines the name of the coarse grain power switch cell to be used wherever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. | +| `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | +| `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. | +| `-existing` | Flag to enable defining for existing routing solution. | -#### Examples -``` -define_pdn_grid -name main_grid -existing -``` +### Define Power Switch Cell + +Define a power switch cell that will be inserted into a power grid -### Power switch insertion +Example usage: ``` -define_pdn_grid [-name ] \ - [-switch_cell ] \ - [-power_control ] \ - [-power_control_network (STAR|DAISY)] +define_power_switch_cell -name POWER_SWITCH -control SLEEP -switched_power VDD -power VDDG -ground VSS +``` + +```tcl +define_power_switch_cell + -name name + -control control_pin + -power_switchable power_switchable_pin + -power unswitched_power_pin + -ground ground_pin + [-acknowledge acknowledge_pin_name] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-switch_cell` | Defines the name of the coarse grain power switch cell to be used for this grid. | -| `-power_control` | Defines the name of the power control signal used to control the switching of the inserted power switches. | -| `-power_control_network` | Defines the structure of the power control signal network. Choose from STAR, or DAISY | - - -The `-switch_cell` argument is used to specify the name of a coarse-grain power switch cell that is to be inserted whereever the stdcell rail connects to the rest of the power grid. The mesh layers are associated with the unswitched power net of the voltage domain, whereas the stdcell rail is associated with the switched power net of the voltage domain. The placement of a power switch cell connects the unswitched power mesh to the switched power rail through a power switch defined by the `define_power_switch_cell` command. - -The `-power_control` argument specifies the name of the power control signal that must be connected to the inserted power control cells. - -The `-power_control_network` argument specifies how the power control signal is to be connected to the power switches. If STAR is specified, then the network is wired as a high-fanout net with the power control signal driving the power control pin on every power switch. If DAISY is specified then the power switches are connected in a daisy-chain configuration - note, this requires that the power swich defined by the `define_power_switch_cell` command defines an acknowledge pin for the switch. +| `-name` | The name of the power switch cell. | +| `-control` | The name of the power control port of the power switch cell. | +| `-switched_power` | Defines the name of the pin that outputs the switched power net. | +| `-power` | Defines the name of the pin that connects to the unswitched power net. | +| `-ground` | Defines the name of the pin that connects to the ground net. | +| `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -### Add straps / stripes +### Add PDN Stripe Defines a pattern of power and ground stripes in a single layer to be added to a power grid. +Example usage: + ``` -add_pdn_stripe [-grid grid_name] \ - -layer layer_name \ - -width width_value \ - [-pitch pitch_value] \ - [-spacing spacing_value] \ - [-offset offset_value] \ - [-starts_with (POWER|GROUND)] \ - [-followpins] \ - [-extend_to_boundary] \ - [-extend_to_core_ring] \ - [-snap_to_grid] \ - [-number_of_straps count] \ - [-nets list_of_nets] +add_pdn_stripe -grid main_grid -layer metal1 -followpins +add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins +add_pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND +``` + +```tcl +add_pdn_stripe + -layer layer_name + [-grid grid_name] + [-width width_value] + [-followpins] + [-extend_to_core_ring] + [-pitch pitch_value] + [-spacing spacing_value] + [-offset offset_value] + [-starts_with POWER|GROUND] + [-extend_to_boundary] + [-snap_to_grid] + [-number_of_straps count] + [-nets list_of_nets] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-grid` | Specifies the grid to which this stripe definition will be added. (Default: Last grid defined by `define_pdn_grid`) | -| `-layer` | Specifies the name of the layer for these stripes | -| `-width` | Value for the width of stripe | -| `-pitch` | Value for the distance between each power/ground pair | -| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2) | +| `-layer` | Specifies the name of the layer for these stripes. | +| `-grid` | Specifies the grid to which this stripe definition will be added. (Default: Last grid defined by `define_pdn_grid`). | +| `-width` | Value for the width of stripe. | +| `-followpins` | Indicates that the stripe forms part of the stdcell rails, pitch and spacing are dictated by the stdcell rows, the `-width` is not needed if it can be determined from the cells. | +| `-extend_to_core_ring` | Extend the stripes to the core PG ring. | +| `-pitch` | Value for the distance between each power/ground pair. | +| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch (Default: pitch / 2). | | `-offset` | Value for the offset of the stripe from the lower left corner of the design core area. | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting) | -| `-followpins` | Indicates that the stripe forms part of the stdcell rails, pitch and spacing are dictated by the stdcell rows, the `-width` is not needed if it can be determined from the cells | -| `-extend_to_boundary` | Extend the stripes to the boundary of the grid | -| `-snap_to_grid` | Snap the stripes to the defined routing grid | -| `-number_of_straps` | Number of power/ground pairs to add | -| `-nets` | Limit straps to just this list of nets | - -#### Examples -``` -add_pdn_stripe -grid main_grid -layer metal1 -followpins -add_pdn_stripe -grid main_grid -layer metal2 -width 0.17 -followpins -add pdn_stripe -grid main_grid -layer metal4 -width 0.48 -pitch 56.0 -offset 2 -starts_with GROUND -``` +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | +| `-extend_to_boundary` | Extend the stripes to the boundary of the grid. | +| `-snap_to_grid` | Snap the stripes to the defined routing grid. | +| `-number_of_straps` | Number of power/ground pairs to add. | +| `-nets` | Limit straps to just this list of nets. | -### Add rings -The `add_pnd_ring` command is used to define power/ground rings around a grid region. The ring structure is built using two layers that are orthogonal to each other. A power/ground pair will be added above and below the grid using the horizontal layer, with another power/ground pair to the left and right using the vertical layer. Together these 4 pairs of power/ground stripes form a ring around the specified grid. Power straps on these layers that are inside the enclosed region are extend to connect to the ring. +### Add PDN Ring -``` -add_pdn_ring [-grid grid_name] \ - -layers layer_name \ - -widths (width_value|list_of_2_values) \ - -spacings (spacing_value|list_of_2_values) \ - [-core_offset offset_value] \ - [-pad_offset offset_value] \ - [-add_connect] \ - [-extend_to_boundary] \ - [-connect_to_pads] \ - [-connect_to_pad_layers layers] \ - [-starts_with (POWER|GROUND)] \ - [-nets list_of_nets] -``` +The `add_pdn_ring` command is used to define power/ground rings around a grid region. +The ring structure is built using two layers that are orthogonal to each other. +A power/ground pair will be added above and below the grid using the horizontal +layer, with another power/ground pair to the left and right using the vertical layer. +Together these 4 pairs of power/ground stripes form a ring around the specified grid. +Power straps on these layers that are inside the enclosed region are extend to +connect to the ring. -#### Options +Example usage: -| Switch Name | Description | -| ----- | ----- | -| `-grid` | Specifies the name of the grid to which this ring defintion will be added. (Default: Last grid created by defin_pdn_grid)| -| `-layer` | Specifies the name of the layer for these stripes | -| `-width` | Value for the width of the stdcell rail | -| `-spacing` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2) | -| `-core_offset` | Value for the offset of the ring from the grid region | -| `-pad_offset` | When defining a power grid for the top level of an SoC, can be used to define the offset of ring from the pad cells | -| `-add_connect` | Automatically add a connection between the two layers | -| `-extend_to_boundary` | Extend the rings to the grid boundary | -| `-connect_to_pads` | The core side of the pad pins will be connected to the ring | -| `-connect_to_pad_layers` | Restrict the pad pins layers to this list | -| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting) | -| `-nets` | Limit straps to just this list of nets | - -#### Examples ``` add_pdn_ring -grid main_grid -layer {metal6 metal7} -widths 5.0 -spacings 3.0 -core_offset 5 ``` -### Add connections - -The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. - -``` -add_pdn_connect [-grid grid_name] \ - [-layers list_of_two_layers] \ - [-cut_pitch pitch_value] \ - [-fixed_vias list_of_fixed_vias] \ - [-dont_use_vias list_of_vias] \ - [-max_rows rows] \ - [-max_columns columns] \ - [-ongrid ongrid_layers] \ - [-split_cuts split_cuts_mapping] +```tcl +add_pdn_ring + -layers layer_name + -widths width_value|list_of_2_values + -spacings spacing_value|list_of_2_values + [-grid grid_name] + [-core_offsets offset_value] + [-pad_offsets offset_value] + [-add_connect] + [-extend_to_boundary] + [-connect_to_pads] + [-connect_to_pad_layers layers] + [-starts_with POWER|GROUND] + [-nets list_of_nets] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-grid` | Specifies the name of the grid definition to which this connection will be added. (Default: Last grid created by `define_pdn_grid`) | -| `-layers` | Layers to be connected where there are overlapping power or overlapping ground nets | -| `-cut_pitch` | When the two layers are parallel e.g. overlapping stdcell rails, specify the distance between via cuts | -| `-fixed_vias` | List of fixed vias to be used to form the via stack | -| `-dont_use_vias` | List or pattern of vias to not use to form the via stack | -| `-max_rows` | Maximum number of rows when adding arrays of vias | -| `-max_columns` | Maximum number of columns when adding arrays of vias | -| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid | -| `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | +| `-layers` | Specifies the name of the layer for these stripes. | +| `-widths` | Value for the width of the stdcell rail. | +| `-spacings` | Optional specification of the spacing between power/ground pairs within a single pitch. (Default: pitch / 2). | +| `-grid` | Specifies the name of the grid to which this ring defintion will be added. (Default: Last grid created by `define_pdn_grid`). | +| `-core_offsets` | Value for the offset of the ring from the grid region. | +| `-pad_offsets` | When defining a power grid for the top level of an SoC, can be used to define the offset of ring from the pad cells. | +| `-add_connect` | Automatically add a connection between the two layers. | +| `-extend_to_boundary` | Extend the rings to the grid boundary. | +| `-connect_to_pads` | The core side of the pad pins will be connected to the ring. | +| `-connect_to_pad_layers` | Restrict the pad pins layers to this list. | +| `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: grid setting). | +| `-nets` | Limit straps to just this list of nets. | + +### Add PDN Connect + +The `add_pdn_connect` command is used to define which layers in the power grid are to be connected together. During power grid generation, vias will be added for overlapping power nets and overlapping ground nets. The use of fixed vias from the technology file can be specified or else via stacks will be constructed using VIARULEs. If VIARULEs are not available in the technology, then fixed vias must be used. -#### Examples +Example usage: ``` add_pdn_connect -grid main_grid -layers {metal1 metal2} -cut_pitch 0.16 @@ -326,66 +299,74 @@ add_pdn_connect -grid rotated_rams -layers {metal4 metal6} add_pdn_connect -grid rotated_rams -layers {metal6 metal7} ``` -### Build power grid - -Build a power grid in accordance with the information specified. - -``` -pdngen [-skip_trim] \ - [-dont_add_pins] \ - [-reset] \ - [-ripup] \ - [-report_only] \ - [-failed_via_report file] +```tcl +add_pdn_connect + -layers list_of_two_layers + [-grid grid_name] + [-cut_pitch pitch_value] + [-fixed_vias list_of_fixed_vias] + [-dont_use_vias list_of_vias] + [-max_rows rows] + [-max_columns columns] + [-ongrid ongrid_layers] + [-split_cuts split_cuts_mapping] ``` #### Options | Switch Name | Description | | ----- | ----- | -| `-skip_trim` | Skip the metal trim step, which attempts to remove metal stubs | -| `-dont_add_pins` | Prevent the creation of block pins during | -| `-reset` | Reset the grid and domain specifications | -| `-ripup` | Ripup the existing power grid, as specified by the voltage domains | -| `-report_only` | Print the current specifications | -| `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | +| `-layers` | Layers to be connected where there are overlapping power or overlapping ground nets. | +| `-grid` | Specifies the name of the grid definition to which this connection will be added (Default: Last grid created by `define_pdn_grid`). | +| `-cut_pitch` | When the two layers are parallel e.g. overlapping stdcell rails, specify the distance between via cuts. | +| `-fixed_vias` | List of fixed vias to be used to form the via stack. | +| `-dont_use_vias` | List or pattern of vias to not use to form the via stack. | +| `-max_rows` | Maximum number of rows when adding arrays of vias. | +| `-max_columns` | Maximum number of columns when adding arrays of vias. | +| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | +| `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | -### Repairing power grid vias after detailed routing +### Repair PDN Vias -To remove vias which generate DRC violations after detailed placement and routing use `repair_pdn_vias`. +To remove vias which generate DRC violations after detailed placement +and routing use `repair_pdn_vias`. -``` -repair_pdn_vias [-all] \ - [-net net_name] +```tcl +repair_pdn_vias + [-all] + [-net net_name] ``` #### Options -| Name | Description | +| Switch Name | Description | | ----- | ----- | -| `-all` | Repair vias on all supply nets | -| `-net` | Repair only vias on the specified net | +| `-all` | Repair vias on all supply nets. | +| `-net` | Repair only vias on the specified net. | -### Converting former PDNGEN configuration file to tcl commands +## Useful Developer Commands -To get an initial conversion from the former PDNGEN configuration file to the current tcl commands use `convert_pdn_config`. -This command will provide an initial set of commands based on the provided file, it is recommended that the user double-check -the conversion to ensure nothing was missed. +If you are a developer, you might find these useful. More details can be found in the [source file](../src/PdnGen.cc) or the [swig file](PdnGen.i). -``` -convert_pdn_config config_file -``` - -#### Options - -| Name | Description | +| Command Name | Description | | ----- | ----- | -| `config_file` | Path to the old configuration file | - +| `name_cmp` | Compare 2 input strings `obj1` and `obj2` if they are equal. | +| `check_design_state` | Check if design is loaded. | +| `get_layer` | Get the layer reference of layer name. | +| `get_voltage_domains` | Gets a Tcl list of power domains in design. | +| `match_orientation` | Checks if a given orientation `orient` is within a list of orientations `orients`. | +| `get_insts` | Get Tcl list of instances. | +| `get_masters` | Get Tcl list of masters. | +| `get_one_to_two` | If a Tcl list has one element `{x}`, Tcl list `{x x}` is returned. If a Tcl list of two elements `{y y}`, list as is returned. Otherwise, for any other list lengths, error is triggered. | +| `get_one_to_four` | Similar logic for above function, except the logic only works for lists of length one, two and four respectively. All other list lengths triggers error. | +| `get_obstructions` | Get Tcl list of layers. | +| `get_starts_with` | If value starts with `POWER`, return 1; else if value starts with `GROUND` return 0; else return error. | +| `get_mterm` | Find master terminal. | +| `get_orientations` | Get list of valid orientations. | ## Example scripts -### Defining a SoC power grid with pads +## Defining a SoC power grid with pads ``` add_global_connection -net VDD -pin_pattern {^VDD$} -power @@ -415,53 +396,15 @@ add_pdn_connect -layers {metal9 metal10} pdngen ``` -### Sroute - -The `add_sroute_connect` command is employed for connecting pins located -outside of a specific power domain to the power ring, especially in cases where -multiple power domains are present. During `sroute`, multi-cut vias will be added -for new connections. The use of fixed vias from the technology file should be -specified for the connection using the `add_sroute_connect` command. The use -of max_rows and max_columns defines the row and column limit for the via stack. - -``` -add_sroute_connect - -layers list_of_2_layers - -cut_pitch pitch_value - [-net net] - [-outerNet outerNet] - [-fixed_vias list_of_vias] - [-max_rows rows] - [-max_columns columns] - [-metalwidths metalwidths] - [-metalspaces metalspaces] - [-ongrid ongrid_layers] - [-insts inst] -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | The inner net where the power ring exists. | -| `-outerNet` | The outer net where instances/pins that need to get connected exist. | -| `-layers` | The metal layers for vertical stripes within inner power ring. | -| `-cut_pitch` | Distance between via cuts when the two layers are parallel, e.g., overlapping stdcell rails. (Default:200 200) | -| `-fixed_vias` | List of fixed vias to be used to form the via stack. | -| `-max_rows` | Maximum number of rows when adding arrays of vias. (Default:10) | -| `-max_columns` | Maximum number of columns when adding arrays of vias. (Default:10) | -| `-metalwidths` | Width for each metal layer. | -| `-metalspaces` | Spacing of each metal layer. | -| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | -| `-insts` | List of all the instances that contain the pin that needs to get connected with power ring. (Default:nothing) | +## Regression tests -#### Examples +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). -``` -add_sroute_connect -net "VIN" -outerNet "VDD" -layers {met1 met4} -cut_pitch {200 200} -fixed_vias {M3M4_PR_M} -metalwidths {1000 1000} -metalspaces {800} -ongrid {met3 met4} -insts "temp_analog_1.a_header_0" +Simply run the following script: +```shell +./test/regression ``` -## Regression tests ## Limitations @@ -473,6 +416,8 @@ Currently the following assumptions are made: ## FAQs +Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+pdn) about this tool. + ## License -BSD 3-Clause License. See [LICENSE](../../LICENSE) file. +BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/src/ppl/README.md b/src/ppl/README.md index add88aa5c6b..c0310246e1f 100644 --- a/src/ppl/README.md +++ b/src/ppl/README.md @@ -123,7 +123,7 @@ set_pin_length | `-hor_length` | The length (in microns) of the horizontal pins. | | `-ver_length` | The length (in microns) of the vertical pins. | -### Set Pin Extension +### Set Pin Length Extension The `set_pin_length_extension` command defines the an extension of the length of all vertical and horizontal pins. Note that this command may generate pins @@ -181,7 +181,7 @@ set_simulated_annealing | `-perturb_per_iter` | The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | | `-alpha` | The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. | -### Place Individual Pin +### Place Pin The `place_pin` command places a specific pin in the specified location with the specified size. It is recommended that individual pins be placed before the `place_pins` command, @@ -208,9 +208,9 @@ place_pin | `-pin_size` | Tthe width and height of the pin (in microns). | | `-force_to_die_boundary` | When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. | -### Place All Pins +### Place Pins -Use the following command to perform pin placement: +The `place_pins` command places all pins together. Use the following command to perform pin placement: ```tcl place_pins @@ -257,10 +257,11 @@ microns to 60.5 microns, and the left edge from its beginning to 50 microns. ### Write Pin Placement -Use the following command to write a file with the pin placement in the format of multiple calls for the `place_pin` command: +The `write_pin_placement` command writes a file with the pin placement in the format of multiple calls for the `place_pin` command: ```tcl -write_pin_placement file_name +write_pin_placement + file_name ``` #### Options @@ -286,24 +287,6 @@ If you are a developer, you might find these useful. More details can be found i | `add_pins_to_constraint` | Add pins to constrained region. | | `add_pins_to_top_layer` | Add pins to top layer. | - -#### Configure Simulated Annealing Solver - -The `set_simulated_annealing` command defines the parameters of the Simulated Annealing -solver. - -``` -set_simulated_annealing [-temperature temperature] - [-max_iterations iters] - [-perturb_per_iter perturbs] - [-alpha alpha] -``` - -- The `-temperature` sets the initial temperature of the Simulated Annealing solver. -- The `-max_iterations` sets the number of iterations performed by the Simulated Annealing solver. -- The `-perturb_per_iter` sets the number of perturbations performed at each iteration. -- The `-alpha` sets the reduction factor of the temperature at each iteration. - ## Example scripts Example scripts of `ppl` running on a sample design of `gcd` as follows: diff --git a/src/psm/README.md b/src/psm/README.md index 792cdbf6ca7..92491d87c0c 100644 --- a/src/psm/README.md +++ b/src/psm/README.md @@ -25,6 +25,8 @@ Features: ### Analyze Power Grid +This command analyzes power grid. + ```tcl analyze_power_grid [-vsrc vsrc_file] @@ -57,8 +59,11 @@ analyze_power_grid ### Check Power Grid +This command checks power grid. + ```tcl -check_power_grid -net net_name +check_power_grid + -net net_name ``` #### Options @@ -67,7 +72,9 @@ check_power_grid -net net_name | ----- | ----- | | `-net` | Name of the net to analyze. Must be a power or ground net name. | -### Write Spice Power Grid +### Write PG Spice + +This command writes the `spice` file for power grid. ```tcl write_pg_spice @@ -91,6 +98,8 @@ write_pg_spice ### Set PDNSim Net voltage +This command sets PDNSim net voltage. + ```tcl set_pdnsim_net_voltage [-net net_name] @@ -104,7 +113,7 @@ set_pdnsim_net_voltage | `-net` | Name of the net to analyze. It must be a power or ground net name. | | `-voltage` | Sets the voltage on a specific net. If this option is not given, the Liberty file's voltage value is obtained from operating conditions. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/pdnsim.cpp) or the [swig file](./src/pdnsim.i). @@ -116,7 +125,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts demonstrating how to run PDNSim on a sample design on `aes` as follows: -```tcl +``` ./test/aes_test_vdd.tcl ./test/aes_test_vss.tcl ``` diff --git a/src/rcx/README.md b/src/rcx/README.md index 05d3e4752d7..5cbea0d4b55 100644 --- a/src/rcx/README.md +++ b/src/rcx/README.md @@ -27,6 +27,8 @@ objects. Optionally, OpenRCX can generate a `.spef` file. ### Define Process Corner +This command defines proccess corner. + ```tcl define_process_corner [-ext_model_index index] @@ -93,7 +95,7 @@ write_spef | `-nets` | Net name. | | `filename` | Output filename. | -### Scale RC +### Adjust RC Use the `adjust_rc` command to scale the resistance, ground, and coupling capacitance. @@ -113,7 +115,7 @@ adjust_rc | `-cc_factor` | Scale factor for coupling capacitance. | | `-gndc_factor` | Scale factor for ground capacitance. | -### Comparing SPEF files +### Diff SPEF The `diff_spef` command compares the parasitics in the reference database `.spef`. The output of this command is `diff_spef.out` @@ -139,7 +141,7 @@ diff_spef | `-r_cc_cap` | Read coupled capacitance. | | `r_conn` | Read connections. | -### Extraction Rules File Generation +### Bench Wires The `bench_wires` command produces a layout which contains various patterns that are used to characterize per-unit length R and C values. The generated patterns model @@ -178,7 +180,7 @@ bench_wires | `-s_list` | Lists of wire spacing multipliers from the minimum spacing defined in the LEF. The list will be the input index on the OpenRCX RC table (Extraction Rules file). | | `-over_dist`, `-under_dist` | Consider over and under metal distance respectively. | -### Generate verilog netlist +### Bench Verilog `bench_verilog` is used after the `bench_wires` command. This command generates a Verilog netlist of the generated pattern layout by the `bench_wires` @@ -200,7 +202,7 @@ bench_verilog | ----- | ----- | | `filename` | Name for the Verilog output file (e.g., `output.v`). | -### Read SPEF +### Bench Read SPEF The `bench_read_spef` command reads a `.spef` file and stores the parasitics into the database. @@ -216,7 +218,7 @@ bench_read_spef | ----- | ----- | | `filename` | Path to the input `.spef` file. | -### Write Rule File +### Write Rules The `write_rules` command writes the Extraction Rules file (RC technology file) for OpenRCX. It processes the parasitics data from the layout patterns that are diff --git a/src/rmp/README.md b/src/rmp/README.md index 79c8efa38c4..244827be12f 100644 --- a/src/rmp/README.md +++ b/src/rmp/README.md @@ -18,28 +18,24 @@ by the user as per the interface described below. - Parameters without square brackets `-param2 param2` are required. ``` +### Restructure + Restructuring can be done in two modes: area or delay. -### Area Mode +- Method 1: Area Mode +Example: `restructure -liberty_file ckt.lib -target area -tielo_pin ABC -tiehi_pin DEF` + +- Method 2: Timing Mode +Example: `restructure -liberty_file ckt.lib -target delay -tielo_pin ABC -tiehi_pin DEF -slack_threshold 1 -depth_threshold 2` ```tcl restructure -liberty_file liberty_file - -target area + -target area|delay -tielo_pin tielo_pin_name -tiehi_pin tiehi_pin_name -``` - -### Timing Mode - -```tcl -restructure - -liberty_file liberty_file - -target delay -slack_threshold slack_val -depth_threshold depth_threshold - -tielo_pin tielo_pin_name - -tiehi_pin tiehi_pin_name ``` #### Options @@ -57,7 +53,7 @@ restructure Example scripts on running `rmp` for a sample design of `gcd` as follows: -```tcl +``` ./test/gcd_restructure.tcl ``` diff --git a/src/rsz/README.md b/src/rsz/README.md index 7388f7bf0ee..05c148cd92f 100644 --- a/src/rsz/README.md +++ b/src/rsz/README.md @@ -92,7 +92,7 @@ estimate_parasitics | ----- | ----- | | `-placement` or `-global_routing` | Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. | -### Set Don't Use +### Set Dont Use The `set_dont_use` command removes library cells from consideration by the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` @@ -100,18 +100,16 @@ or a list of cell names (`wildcards` allowed). For example, `DLY*` says do not use cells with names that begin with `DLY` in all libraries. ```tcl -set_dont_use lib_cells -unset_dont_use lib_cells +set_dont_use lib_cells # unset_dont_use lib_cells ``` -### Set Don't Touch +### Set Dont Touch The `set_dont_touch` command prevents the resizer commands from modifying instances or nets. ```tcl -set_dont_touch instances_nets -unset_dont_touch instances_nets +set_dont_touch instances_nets # unset_dont_touch instances_nets ``` ### Buffer Ports @@ -240,7 +238,9 @@ this option be used with global routing based parasitics. The `clock_tree_synthesis` command inserts a clock tree in the design but may leave a long wire from the clock input pin to the clock tree -root buffer. The `repair_clock_nets` command inserts buffers in the +root buffer. + +The `repair_clock_nets` command inserts buffers in the wire from the clock input pin to the clock root buffer. ```tcl @@ -256,6 +256,8 @@ repair_clock_nets ### Repair Clock Inverters +This command repairs clock inverters. + ```tcl repair_clock_inverters ``` @@ -284,7 +286,7 @@ report_floating_nets | ----- | ----- | | `-verbose` | Print the net names. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/Resizer.cc) or the [swig file](./src/Resizer.i). @@ -307,7 +309,7 @@ If you are a developer, you might find these useful. More details can be found i A typical `resizer` command file (after a design and Liberty libraries have been read) is shown below. -```tcl +``` read_sdc gcd.sdc set_wire_rc -layer metal2 @@ -325,7 +327,7 @@ repair_timing Note that OpenSTA commands can be used to report timing metrics before or after resizing the design. -```tcl +``` set_wire_rc -layer metal2 report_checks report_tns diff --git a/src/tap/README.md b/src/tap/README.md index 8aac734a389..dddfbd8c74a 100644 --- a/src/tap/README.md +++ b/src/tap/README.md @@ -9,7 +9,19 @@ Tapcell and endcap insertion. - Parameters without square brackets `-param2 param2` are required. ``` -### Add Tapcell/Endcap +### Tapcell + +This command inserts tapcells or endcaps. + +The figures below show two examples of tapcell insertion. When only the +`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement +is similar to Figure 1. When the remaining masters are give, the tapcell +placement is similar to Figure 2. + +| | | +|:--:|:--:| +| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | + ```tcl tapcell @@ -54,16 +66,9 @@ tapcell | `-tap_prefix` | Prefix for the tapcell instances. The default value is `TAP_`. | | `-endcap_prefix` | Prefix for the endcaps instances. The default value is `PHY_`. | -The figures below show two examples of tapcell insertion. When only the -`-tapcell_master` and `-endcap_master` masters are given, the tapcell placement -is similar to Figure 1. When the remaining masters are give, the tapcell -placement is similar to Figure 2. +### Cut Rows -| | | -|:--:|:--:| -| Figure 1: Tapcell insertion representation | Figure 2: Tapcell insertion around macro representation | - -### Only cutting rows +This command cuts rows. ```tcl cut_rows @@ -80,7 +85,7 @@ cut_rows | `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | | `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | -### Only adding boundary/endcap cells +### Place Endcaps Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the LEF58 `CLASS` specification foe endcaps. @@ -130,7 +135,9 @@ place_endcaps | `-top_edge` | List of masters for the top row endcaps. (overrides `-endcap_horizontal`). | | `-bottom_edge` | List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). | -### Only adding tapcells cells +### Place Tapcells + +This command is used for tapcell placement only. ```tcl place_tapcells @@ -146,7 +153,9 @@ place_tapcells | `-distance` | Distance between tapcells. | -### Remove Tapcells/Endcaps +### Tapcell Ripup + +This command is used for removing tapcells or endcaps based on their prefix. ```tcl tapcell_ripup @@ -165,7 +174,7 @@ tapcell_ripup You can find script examples for both 45nm and 14nm in `./etc/scripts` -```tcl +``` ./etc/scripts/example_14nm.tcl ./etc/scripts/example_45nm.tcl ``` diff --git a/src/upf/README.md b/src/upf/README.md index ba1d6b25897..edc3800941a 100644 --- a/src/upf/README.md +++ b/src/upf/README.md @@ -27,6 +27,8 @@ read_upf ### Create Power Domain +This command creates power domain for a group of modules. + ```tcl create_power_domain [-elements elements] @@ -42,6 +44,9 @@ create_power_domain ### Create Logic Port +This command creates logic port. Direction must be specified from: +`in`, `out`, `inout`. + ```tcl create_logic_port [-direction direction] @@ -57,6 +62,8 @@ create_logic_port ### Create Power Switch +This command creates power switch. + ```tcl create_power_switch [-domain domain] @@ -78,7 +85,9 @@ create_power_switch | `-on_state` | One of {`state_name`, `input_supply_port`, `boolean_expression`}. | | `name` | Power switch name. | -### Create or Update Isolation Strategy +### Set Isolation + +This command creates or update isolation strategy. ```tcl set_isolation @@ -105,7 +114,9 @@ set_isolation | `-update` | Only available if using existing strategy, will error if the strategy doesn't exist. | | `name` | Isolation strategy name. | -### Set Interface cell +### Use Interface cell + +This command sets the interface cell. ```tcl use_interface_cell @@ -124,6 +135,8 @@ use_interface_cell ### Set Domain Area +This command sets the power domain area. + ```tcl set_domain_area domain_name @@ -138,7 +151,9 @@ set_domain_area | `-area` | x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. | -### Map existing power switch +### Map Power Switch + +This command maps existing power switch. ```tcl map_power_switch @@ -159,7 +174,7 @@ map_power_switch Example script demonstrating how to run `upf` related commands can be found here: -```tcl +``` ./test/upf_test.tcl ``` From 255ffef61c15c3f452ea9951a3253f22b0b1b5bc Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 17 Jan 2024 18:56:23 +0000 Subject: [PATCH 28/88] cleanup bugs in makefile and Utl.tcl Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .gitignore | 3 +- docs/man/Makefile | 119 +++++++++++++++++++++++++++++++ docs/man/README.md | 5 +- docs/man/md/man2/.gitignore | 0 docs/man/scripts/link_readmes.sh | 1 + src/utl/src/Utl.tcl | 4 +- 6 files changed, 128 insertions(+), 4 deletions(-) create mode 100644 docs/man/Makefile create mode 100644 docs/man/md/man2/.gitignore diff --git a/.gitignore b/.gitignore index 8c66dd331b7..7dabea10942 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,8 @@ docs/main messages.txt Messages.md MessagesFinal.md -!docs/manpages +!docs/man +!docs/man/Makefile .idea/ cmake-build-debug/ diff --git a/docs/man/Makefile b/docs/man/Makefile new file mode 100644 index 00000000000..731aee69819 --- /dev/null +++ b/docs/man/Makefile @@ -0,0 +1,119 @@ +# Makefile for generating man pages using pandoc +# Workflow: +# - preprocess: symlink READMEs +# - raw md -> pandoc-compatible md +# - pandoc md -> roff -> cat, html + +# Define variables +PANDOC = pandoc +SRC_DIR = md +MAN_ROOT_DIR = man +HTML_ROOT_DIR = html +CAT_ROOT_DIR = cat +MAN1 = man1 +MAN2 = man2 +MAN3 = man3 + +# Exclude these set of keywords +EXCLUDE_KEYWORDS = ant cts dft dpl drt fin gpl grt gui ifp mpl \ + mpl2 odb pad par pdn ppl psm rcx rmp rsz sta tap upf +EXCLUDE_FILES := $(addsuffix .md,$(EXCLUDE_KEYWORDS)) + +MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) +SRC1_DIR = $(SRC_DIR)/$(MAN1) +MAN1_FILES = $(wildcard $(SRC1_DIR)/*.md) +MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) +HTML1_DIR = $(HTML_ROOT_DIR)/html1 +HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) +CAT1_DIR = $(CAT_ROOT_DIR)/cat1 +CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) + +MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) +SRC2_DIR = $(SRC_DIR)/$(MAN2) +MAN2_FILES = $(wildcard $(SRC2_DIR)/*.md) +MAN2_FILES := $(filter-out $(foreach keyword, $(EXCLUDE_FILES), %$(keyword)), $(MAN2_FILES)) +MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) +HTML2_DIR = $(HTML_ROOT_DIR)/html2 +HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) +CAT2_DIR = $(CAT_ROOT_DIR)/cat2 +CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) + +MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) +SRC3_DIR = $(SRC_DIR)/$(MAN3) +MAN3_FILES = $(wildcard $(SRC3_DIR)/*.md) +MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) +HTML3_DIR = $(HTML_ROOT_DIR)/html3 +HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) +CAT3_DIR = $(CAT_ROOT_DIR)/cat3 +CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) + +# Default target +all: doc html cat + +# Target to do symlinks and pandoc-compatible conversion +preprocess: + ./scripts/link_readmes.sh && python3 scripts/md_roff_compat.py + +# Target to generate all man pages +doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) + +# Target to generate all html pages +html: $(HTML1_PAGES) $(HTML2_PAGES) $(HTML3_PAGES) + +# Target to generate all cat pages +cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) + @echo $(CAT1_PAGES) + +# Rule to create the man directory +$(MAN1_DIR): + mkdir -p $(MAN1_DIR) +$(MAN2_DIR): + mkdir -p $(MAN2_DIR) +$(MAN3_DIR): + mkdir -p $(MAN3_DIR) +$(HTML1_DIR): + mkdir -p $(HTML1_DIR) +$(HTML2_DIR): + mkdir -p $(HTML2_DIR) +$(HTML3_DIR): + mkdir -p $(HTML3_DIR) +$(CAT1_DIR): + mkdir -p $(CAT1_DIR) +$(CAT2_DIR): + mkdir -p $(CAT2_DIR) +$(CAT3_DIR): + mkdir -p $(CAT3_DIR) + +# Rule to generate a roff file from a corresponding Markdown file +$(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) + $(PANDOC) -s -t man $< -o $@ + +# Rule to generate a html file from a corresponding roff file +$(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) + $(PANDOC) -s -o html $< -o $@ +$(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) + $(PANDOC) -s -o html $< -o $@ +$(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) + $(PANDOC) -s -o html $< -o $@ + +# Rule to generate a cat file from a corresponding roff file +$(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) + $(PANDOC) -s -o markdown $< -o $@ +$(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) + $(PANDOC) -s -o markdown $< -o $@ +$(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) + $(PANDOC) -s -o markdown $< -o $@ + +# Clean target to remove all generated man pages +clean: + rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) + rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) + rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) + rm -rf ./md/man2/*md + +# Phony targets +.PHONY: all \ No newline at end of file diff --git a/docs/man/README.md b/docs/man/README.md index a69032e84aa..978f52a4574 100644 --- a/docs/man/README.md +++ b/docs/man/README.md @@ -6,7 +6,10 @@ - Use pandoc to convert markdown to roff format. - Ensure that all the source files are in `src` folder before runnig. ``` -make clean && make all +make clean + +# Note this step is important as it regenerates the documentation using latest sources. +make preprocess && make all ``` - Setup environment variables as follows. This is to avoid overwriting the system default for `MANPATH`. diff --git a/docs/man/md/man2/.gitignore b/docs/man/md/man2/.gitignore new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/man/scripts/link_readmes.sh b/docs/man/scripts/link_readmes.sh index 9dc42fdf53c..3237c5f43b6 100755 --- a/docs/man/scripts/link_readmes.sh +++ b/docs/man/scripts/link_readmes.sh @@ -2,6 +2,7 @@ SRC_BASE_PATH="../../src" DEST_BASE_PATH="./md/man2" +mkdir -p $DEST_BASE_PATH # Loop through all folders inside "../src" for MODULE_PATH in "$SRC_BASE_PATH"/*; do diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index 8c8f0513a10..16a7c6cebff 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -37,7 +37,7 @@ proc check_valid_man_path { path } { } proc man { name } { - set DEFAULT_MAN_PATH "../docs/manpages/cat" + set DEFAULT_MAN_PATH "../docs/man/cat" global MAN_PATH set MAN_PATH [get_input] if { [check_valid_man_path $MAN_PATH] == false } { @@ -96,4 +96,4 @@ proc man { name } { proc clear {} { exec clear -} \ No newline at end of file +} From b395d351f15d89b948a8578b6ba71c565cbc8bb0 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:10:08 +0000 Subject: [PATCH 29/88] populate all man3 messages Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/.gitignore | 1 + docs/man/Makefile | 1 + docs/man/README.md | 2 +- docs/man/md/man3/.gitignore | 0 docs/man/md/man3/aaaa.md | 25 --- docs/man/scripts/extract_utils.py | 90 +++++++++++ docs/man/scripts/manpage.py | 106 +++++++++++++ docs/man/scripts/md_roff_compat.py | 241 ++++++----------------------- etc/find_messages.py | 3 +- 9 files changed, 248 insertions(+), 221 deletions(-) create mode 100644 docs/man/md/man3/.gitignore delete mode 100644 docs/man/md/man3/aaaa.md create mode 100644 docs/man/scripts/extract_utils.py create mode 100644 docs/man/scripts/manpage.py diff --git a/docs/man/.gitignore b/docs/man/.gitignore index 39777356896..3b2b9d19a8a 100644 --- a/docs/man/.gitignore +++ b/docs/man/.gitignore @@ -2,6 +2,7 @@ test/results # dont save intermediate results md/man2/*md +md/man3/*md html man cat diff --git a/docs/man/Makefile b/docs/man/Makefile index 731aee69819..50a354042d2 100644 --- a/docs/man/Makefile +++ b/docs/man/Makefile @@ -114,6 +114,7 @@ clean: rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) rm -rf ./md/man2/*md + rm -rf ./md/man3/*md # Phony targets .PHONY: all \ No newline at end of file diff --git a/docs/man/README.md b/docs/man/README.md index 978f52a4574..ba8b3ccb05b 100644 --- a/docs/man/README.md +++ b/docs/man/README.md @@ -9,7 +9,7 @@ make clean # Note this step is important as it regenerates the documentation using latest sources. -make preprocess && make all +make preprocess && make all #-j16 ``` - Setup environment variables as follows. This is to avoid overwriting the system default for `MANPATH`. diff --git a/docs/man/md/man3/.gitignore b/docs/man/md/man3/.gitignore new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/man/md/man3/aaaa.md b/docs/man/md/man3/aaaa.md deleted file mode 100644 index 3c8c7e9d038..00000000000 --- a/docs/man/md/man3/aaaa.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Using NiX to develop pandoc -author: John MacFarlane ---- - -The source directory contains `shell.nix` and `flake.nix`, -so if you have NiX installed, you can use either `nix shell` -or `nix develop` can be used to obtain a shell with pandoc -dependencies installed. - -To set up `direnv` so that the NiX shell is automatically -activated whenever the directory is entered, add the following -`.envrc` in the pandoc source directory: - -``` -if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs=" -fi -use flake -``` - -This uses [nix-direnv] for caching. See its web page for -further help. - -[nix-direnv]: https://github.com/nix-community/nix-direnv diff --git a/docs/man/scripts/extract_utils.py b/docs/man/scripts/extract_utils.py new file mode 100644 index 00000000000..4e58dcc28cd --- /dev/null +++ b/docs/man/scripts/extract_utils.py @@ -0,0 +1,90 @@ +import re + +def extract_headers(text, level = 1): + assert isinstance(level, int) and level >= 1 + pattern = r'^#{%d}\s+(.*)$' % level + headers = re.findall(pattern, text, flags=re.MULTILINE) + # TODO: Handle developer commands + #if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") + return headers + +def extract_description(text): + # this is so that it always tries to match the longer headers first, to disambiguate + sorted_headers = sorted(extract_headers(text,3), key=len, reverse=True) + headers = "|".join(re.escape(x) for x in sorted_headers) + pattern = rf'### ({headers})(.*?)```tcl' + custom_strings = re.findall(pattern, text, flags=re.DOTALL) + return [custom_string[1].strip() for custom_string in custom_strings] + +def extract_tcl_code(text): + pattern = r'```tcl\s+(.*?)```' + tcl_code_matches = re.findall(pattern, text, flags=re.DOTALL) + # remove the last tcl match + tcl_code_matches = [x for x in tcl_code_matches if "./test/gcd.tcl" not in x] + return tcl_code_matches + +def extract_arguments(text): + # Goal is to extract all the text from the end of tcl code to the next ### header. + # Returns options and arguments. + level2 = extract_headers(text, 2) + level3 = extract_headers(text, 3) + + # form these 2 regex styles. + # ### Header 1 {text} ### Header2; ### Header n-2 {text} ### Header n-1 + # ### Header n {text} ## closest_level2_header + first = [rf'### ({level3[i]})(.*?)### ({level3[i+1]})' for i in range(len(level3) - 1)] + + # find the next closest level2 header to the last level3 header. + closest_level2 = [text.find(f"## {x}") - text.find(f"### {level3[-1]}") for x in level2] + closest_level2_idx = [idx for idx, x in enumerate(closest_level2) if x > 0][0] + + # This will disambiguate cases where different level headers share the same name. + second = [rf"### ({level3[-1]})(.*?)## ({level2[closest_level2_idx]})"] + final_options, final_args = [], [] + for idx, regex in enumerate(first + second): + match = re.findall(regex, text, flags = re.DOTALL) + #print(regex) + # get text until the next header + a = match[0][1] + a = a[a.find("#"):] + options = a.split("####")[1:] + if not options: + final_options.append([]) + final_args.append([]) + continue + options, args = options[0], options[1:] + final_options.append(extract_tables(options)) + tmp_arg = [] + for arg in args: + tmp_arg.extend(extract_tables(arg)) + final_args.append(tmp_arg) + return final_options, final_args + +def extract_tables(text): + # Find all lines that start with "|" + table_pattern = r'^\s*\|.*$' + table_matches = re.findall(table_pattern, text, flags=re.MULTILINE) + + # Exclude matches containing HTML tags + table_matches = [table for table in table_matches if not re.search(r'<.*?>', table)] + + # Remove text containing switch + table_matches = [table for table in table_matches if "Switch Name" not in table] + + # Remove text containing "---" + table_matches = [table for table in table_matches if "---" not in table] + + return table_matches + +def parse_switch(text): + # Find the index of the 1nd and last occurrence of "|". Since some content might contain "|" + switch_name = text.split("|")[1] + switch_name = switch_name.replace("`", "").strip() + second_pipe_index = text.find("|", text.find("|") + 1) + last_pipe_index = text.rfind("|") + switch_description = text[second_pipe_index+1: last_pipe_index-1] + return switch_name, switch_description + + +if __name__ == "__main__": + pass \ No newline at end of file diff --git a/docs/man/scripts/manpage.py b/docs/man/scripts/manpage.py new file mode 100644 index 00000000000..3f411c63f44 --- /dev/null +++ b/docs/man/scripts/manpage.py @@ -0,0 +1,106 @@ +import io +import datetime + +# identify key section and stored in ManPage class. +class ManPage(): + def __init__(self): + self.name = "" + self.desc = "" + self.synopsis = "" + self.switches = {} + self.args = {} + self.datetime = datetime.datetime.now().strftime("%y/%m/%d") + + def write_roff_file(self, dst_dir = './md/man2'): + assert self.name, print("func name not set") + assert self.desc, print("func desc not set") + assert self.synopsis, print("func synopsis not set") + # it is okay for a function to have no switches. + #assert self.switches, print("func switches not set") + filepath = f"{dst_dir}/{self.name}.md" + man_level = dst_dir.split("/")[-1] + with open(filepath, "w") as f: + self.write_header(f, man_level) + self.write_name(f) + self.write_synopsis(f) + self.write_description(f) + self.write_options(f) + self.write_arguments(f) + self.write_placeholder(f) #TODO. + self.write_copyright(f) + + def write_header(self, f, man_level): + print(man_level) + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + assert man_level == "man1" or man_level == "man2" or\ + man_level == "man3", print("must be either man1|man2|man3") + + f.write(f"---\n") + f.write(f"title: {self.name}({man_level[-1]})\n") + f.write(f"author: Jack Luar (TODO@TODO.com)\n") + f.write(f"date: {self.datetime}\n") + f.write(f"---\n") + + def write_name(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# NAME\n\n") + f.write(f"{self.name} - {' '.join(self.name.split('_'))}\n") + + def write_synopsis(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# SYNOPSIS\n\n") + f.write(f"{self.synopsis}\n") + + + def write_description(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# DESCRIPTION\n\n") + f.write(f"{self.desc}\n") + + def write_options(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# OPTIONS\n") + if not self.switches: + f.write(f"\nThis command has no switches.\n") + for key, val in self.switches.items(): + f.write(f"\n`{key}`: {val}\n") + + def write_arguments(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# ARGUMENTS\n") + if not self.args: + f.write(f"\nThis command has no arguments.\n") + for key, val in self.args.items(): + f.write(f"\n`{key}`: {val}\n") + + + def write_placeholder(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + # TODO: these are all not populated currently, not parseable from docs. + # TODO: Arguments can actually be parsed, but you need to preprocess the synopsis further. + sections = ["EXAMPLES", "SEE ALSO"] + for s in sections: + f.write(f"\n# {s}\n") + + def write_copyright(self, f): + assert isinstance(f, io.TextIOBase) and\ + f.writable(), "File pointer is not open for writing." + + f.write(f"\n# COPYRIGHT\n\n") + f.write(f"Copyright (c) 2024, The Regents of the University of California. All rights reserved.\n") + +if __name__ == "__main__": + pass \ No newline at end of file diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index 9b9e429ae20..3c1bcffb526 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -4,12 +4,10 @@ python md_roff_compat.py """ -import re -import io -import datetime +import os +from manpage import ManPage +from extract_utils import extract_headers, extract_description, extract_tcl_code, extract_arguments, extract_tables, parse_switch -# list of edited docs -SRC_DIR = "./md/man2" # also you need to change the ### FUNCTION_NAME parsing. Sometimes the # function name could be something weird like `diff_spef` or `pdngen` # so it would be better to have a more informative header for the RTD docs. @@ -19,196 +17,27 @@ # sta: documentation is hosted elsewhere. (not currently in RTD also.) # odb: documentation is hosted on doxygen. # -tools = ["ant", "cts", "dft", "dpl", "fin", "pad", "par", "ppl", "rsz",\ - "tap", "upf", "drt", "gpl", "grt", "ifp", "mpl2", "pdn", "psm",\ - "rmp", "rcx", "gui"] -docs = [f"{SRC_DIR}/{tool}.md" for tool in tools] - -# identify key section and stored in ManPage class. -class ManPage(): - def __init__(self): - self.name = "" - self.desc = "" - self.synopsis = "" - self.switches = {} - self.args = {} - self.datetime = datetime.datetime.now().strftime("%y/%m/%d") - - def write_roff_file(self): - assert self.name, print("func name not set") - assert self.desc, print("func desc not set") - assert self.synopsis, print("func synopsis not set") - # it is okay for a function to have no switches. - #assert self.switches, print("func switches not set") - filepath = f"{SRC_DIR}/{self.name}.md" - with open(filepath, "w") as f: - self.write_header(f) - self.write_name(f) - self.write_synopsis(f) - self.write_description(f) - self.write_options(f) - self.write_arguments(f) - self.write_placeholder(f) #TODO. - self.write_copyright(f) - - def write_header(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"---\n") - f.write(f"title: {self.name}(2)\n") - f.write(f"author: Jack Luar (TODO@TODO.com)\n") - f.write(f"date: {self.datetime}\n") - f.write(f"---\n") - - def write_name(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# NAME\n\n") - f.write(f"{self.name} - {' '.join(self.name.split('_'))}\n") - - def write_synopsis(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# SYNOPSIS\n\n") - f.write(f"{self.synopsis}\n") - - - def write_description(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# DESCRIPTION\n\n") - f.write(f"{self.desc}\n") - - def write_options(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# OPTIONS\n") - if not self.switches: - f.write(f"\nThis command has no switches.\n") - for key, val in self.switches.items(): - f.write(f"\n`{key}`: {val}\n") - - def write_arguments(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# ARGUMENTS\n") - if not self.args: - f.write(f"\nThis command has no arguments.\n") - for key, val in self.args.items(): - f.write(f"\n`{key}`: {val}\n") - - - def write_placeholder(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - # TODO: these are all not populated currently, not parseable from docs. - # TODO: Arguments can actually be parsed, but you need to preprocess the synopsis further. - sections = ["EXAMPLES", "SEE ALSO"] - for s in sections: - f.write(f"\n# {s}\n") - - def write_copyright(self, f): - assert isinstance(f, io.TextIOBase) and\ - f.writable(), "File pointer is not open for writing." - - f.write(f"\n# COPYRIGHT\n\n") - f.write(f"Copyright (c) 2024, The Regents of the University of California. All rights reserved.\n") - -def extract_headers(text, level = 1): - assert isinstance(level, int) and level >= 1 - pattern = r'^#{%d}\s+(.*)$' % level - headers = re.findall(pattern, text, flags=re.MULTILINE) - # TODO: Handle developer commands - #if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") - return headers - -def extract_description(text): - # this is so that it always tries to match the longer headers first, to disambiguate - sorted_headers = sorted(extract_headers(text,3), key=len, reverse=True) - headers = "|".join(re.escape(x) for x in sorted_headers) - pattern = rf'### ({headers})(.*?)```tcl' - custom_strings = re.findall(pattern, text, flags=re.DOTALL) - return [custom_string[1].strip() for custom_string in custom_strings] - -def extract_tcl_code(text): - pattern = r'```tcl\s+(.*?)```' - tcl_code_matches = re.findall(pattern, text, flags=re.DOTALL) - # remove the last tcl match - tcl_code_matches = [x for x in tcl_code_matches if "./test/gcd.tcl" not in x] - return tcl_code_matches - -def extract_arguments(text): - # Goal is to extract all the text from the end of tcl code to the next ### header. - # Returns options and arguments. - level2 = extract_headers(text, 2) - level3 = extract_headers(text, 3) - - # form these 2 regex styles. - # ### Header 1 {text} ### Header2; ### Header n-2 {text} ### Header n-1 - # ### Header n {text} ## closest_level2_header - first = [rf'### ({level3[i]})(.*?)### ({level3[i+1]})' for i in range(len(level3) - 1)] - - # find the next closest level2 header to the last level3 header. - closest_level2 = [text.find(f"## {x}") - text.find(f"### {level3[-1]}") for x in level2] - closest_level2_idx = [idx for idx, x in enumerate(closest_level2) if x > 0][0] - - # This will disambiguate cases where different level headers share the same name. - second = [rf"### ({level3[-1]})(.*?)## ({level2[closest_level2_idx]})"] - final_options, final_args = [], [] - for idx, regex in enumerate(first + second): - match = re.findall(regex, text, flags = re.DOTALL) - #print(regex) - # get text until the next header - a = match[0][1] - a = a[a.find("#"):] - options = a.split("####")[1:] - if not options: - final_options.append([]) - final_args.append([]) - continue - options, args = options[0], options[1:] - final_options.append(extract_tables(options)) - tmp_arg = [] - for arg in args: - tmp_arg.extend(extract_tables(arg)) - final_args.append(tmp_arg) - return final_options, final_args - -def extract_tables(text): - # Find all lines that start with "|" - table_pattern = r'^\s*\|.*$' - table_matches = re.findall(table_pattern, text, flags=re.MULTILINE) - - # Exclude matches containing HTML tags - table_matches = [table for table in table_matches if not re.search(r'<.*?>', table)] - - # Remove text containing switch - table_matches = [table for table in table_matches if "Switch Name" not in table] - - # Remove text containing "---" - table_matches = [table for table in table_matches if "---" not in table] - - return table_matches - -def parse_switch(text): - # Find the index of the 1nd and last occurrence of "|". Since some content might contain "|" - switch_name = text.split("|")[1] - switch_name = switch_name.replace("`", "").strip() - second_pipe_index = text.find("|", text.find("|") + 1) - last_pipe_index = text.rfind("|") - switch_description = text[second_pipe_index+1: last_pipe_index-1] - return switch_name, switch_description - +tools = ["ant", "cts", "dbSta", "dft", "dpl", "dpo", "drt",\ + "dst", "fin", "gpl", "grt", "gui", "ifp", "mpl",\ + "mpl2", "odb", "pad", "par", "pdn", "ppl", "psm",\ + "rcx", "rmp", "rsz", "sta", "stt", "tap", "upf", "utl"] +# Process man2 (except odb and sta) +DEST_DIR2 = SRC_DIR = "./md/man2" +exclude = ["odb", "sta"] +docs2 = [f"{SRC_DIR}/{tool}.md" for tool in tools if tool not in exclude] + +# Process man3 (add extra path for ORD messages) +SRC_DIR = "../../src" +DEST_DIR3 = "./md/man3" +exclude = ["sta"] #sta excluded because its format is different, and no severity level. +docs3 = [f"{SRC_DIR}/{tool}/messages.txt" for tool in tools if tool not in exclude] +docs3.append("../../messages.txt") if __name__ == "__main__": - for doc in docs: + for doc in docs2: + if not os.path.exists(doc): + print(f"{doc} doesn't exist. Continuing") + continue text = open(doc).read() # function names (and convert gui:: to gui_) @@ -253,4 +82,28 @@ def parse_switch(text): args_dict[key] = val manpage.args = args_dict - manpage.write_roff_file() \ No newline at end of file + manpage.write_roff_file(DEST_DIR2) + count = 0 + for doc in docs3: + if not os.path.exists(doc): + print(f"{doc} doesn't exist. Continuing") + continue + print(f"Processing {doc}") + with open(doc, 'r') as f: + for line in f: + count += 1 + parts = line.split() + module, num, message, level = parts[0], parts[1],\ + " ".join(parts[4:-2]), parts[-2] + manpage = ManPage() + manpage.name = f"{module}-{num}" + if "with-total" in manpage.name: print(parts); exit() + manpage.synopsis = "N/A." + manpage.desc = f"Severity: {level}\n\n{message}" + manpage.write_roff_file(DEST_DIR3) + + # For individual module folders. + #module_path = os.path.join(DEST_DIR3, module) + #os.makedirs(module_path, exist_ok = True) + #manpage.write_roff_file(module_path) + print(count) \ No newline at end of file diff --git a/etc/find_messages.py b/etc/find_messages.py index e833c52fc6a..7ab703107a8 100755 --- a/etc/find_messages.py +++ b/etc/find_messages.py @@ -80,9 +80,10 @@ def parse_args(): \s*,\s* # , (?P\d+) # id \s*,\s* # , - (?P("(?:[^"\\]|\\.)+?"\s*)+) # message + (?P("(?:[^"\\]|\\.)+?"(?:\s*\\n\s*"(?:[^"\\]|\\.)+?")*\s*)) # message ''', re.VERBOSE | re.MULTILINE) + warn_regexp_tcl = \ re.compile(r''' (?Pinfo|warn|error|critical) # type From e03a0fda93eb21c7d6fe1af0075a2b1bfcb447b1 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Fri, 19 Jan 2024 01:32:22 +0800 Subject: [PATCH 30/88] Fix OR messages glossary Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/getMessages.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/getMessages.py b/docs/getMessages.py index 0b37694c4e7..2bb9e921851 100644 --- a/docs/getMessages.py +++ b/docs/getMessages.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import re command = "python ../etc/find_messages.py -d ../src" output = os.popen(command).read() @@ -22,7 +23,17 @@ msgType = columns[-2] tool = columns[0].lower() try: - message = open(f"../src/{tool}/doc/messages/{num}.md").read().strip() + # aim is to match all level1 header and their corresponding text. + message = open(f"../src/{tool}/doc/messages/{num}.md").read() + pattern = re.compile(r'#\s*(?P[^\n]+)\n*(?P.*?)(?=\n#|$)', re.DOTALL) + matches = pattern.finditer(message) + m = [] + for match in matches: + header1 = match.group('header1') + body_text = match.group('body_text').strip() + m.append(f"{header1}-{body_text}") + message = " ".join(x for x in m) + except OSError as e: message = "-" if not message: message = "-" From 882ecec477c1f8d2de7d786352fc4f2ce5faf438 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 20 Jan 2024 04:03:43 +0000 Subject: [PATCH 31/88] fix pandoc backslash bug Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/man/Makefile b/docs/man/Makefile index 50a354042d2..5d9b8033f1c 100644 --- a/docs/man/Makefile +++ b/docs/man/Makefile @@ -103,10 +103,13 @@ $(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) # Rule to generate a cat file from a corresponding roff file $(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ $(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ $(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ # Clean target to remove all generated man pages clean: From 42c1784037024d6ef851cb156d39f0394ae37ec8 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 20 Jan 2024 04:26:12 +0000 Subject: [PATCH 32/88] move helper to private namespace and helpargs for man Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/utl/src/Utl.tcl | 80 +++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index 16a7c6cebff..d947b020420 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -1,46 +1,12 @@ global MAN_PATH set MAN_PATH "" -proc get_input { } { - # Get the relative path from the user - puts "Please enter an optional relative path to the cat folders:" - flush stdout - gets stdin relative_path - - # Convert the relative path to an absolute path - set absolute_path [file join [pwd] $relative_path] - - # Display the absolute path - puts "Absolute Path: $absolute_path" - if { [check_valid_path $absolute_path] } { - return $absolute_path - } - return "" -} - -proc check_valid_path { path } { - if {[file isdirectory $path]} { - return true - } else { - puts "Invalid path, please retry." - return false - } -} - -proc check_valid_man_path { path } { - if {[file isdirectory "$path/man1"]} { - return true - } else { - puts "Invalid man path, please retry." - return false - } -} - +sta::define_cmd_args "man" {name} proc man { name } { set DEFAULT_MAN_PATH "../docs/man/cat" global MAN_PATH - set MAN_PATH [get_input] - if { [check_valid_man_path $MAN_PATH] == false } { + set MAN_PATH [utl::get_input] + if { [utl::check_valid_man_path $MAN_PATH] == false } { puts "Using default manpath." set MAN_PATH $DEFAULT_MAN_PATH } @@ -94,6 +60,42 @@ proc man { name } { } } -proc clear {} { - exec clear +namespace eval utl { + +proc get_input { } { + # Get the relative path from the user + puts "Please enter an optional relative path to the cat folders:" + flush stdout + gets stdin relative_path + + # Convert the relative path to an absolute path + set absolute_path [file join [pwd] $relative_path] + + # Display the absolute path + puts "Absolute Path: $absolute_path" + if { [utl::check_valid_path $absolute_path] } { + return $absolute_path + } + return "" +} + +proc check_valid_path { path } { + if {[file isdirectory $path]} { + return true + } else { + puts "Invalid path, please retry." + return false + } } + +proc check_valid_man_path { path } { + if {[file isdirectory "$path/man1"]} { + return true + } else { + puts "Invalid man path, please retry." + return false + } +} + +# utl namespace end +} \ No newline at end of file From c856ab1bf7dc5b0334ee3a384e544a977bfa9255 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:29:42 +0000 Subject: [PATCH 33/88] change copy to symlinks and description change to describe what different arguments are Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/scripts/link_readmes.sh | 8 ++++---- src/drt/README.md | 6 ++++++ src/gpl/README.md | 8 ++++++++ src/ppl/README.md | 3 +++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/man/scripts/link_readmes.sh b/docs/man/scripts/link_readmes.sh index 3237c5f43b6..77a1fb3cf01 100755 --- a/docs/man/scripts/link_readmes.sh +++ b/docs/man/scripts/link_readmes.sh @@ -8,13 +8,13 @@ mkdir -p $DEST_BASE_PATH for MODULE_PATH in "$SRC_BASE_PATH"/*; do if [ -d "$MODULE_PATH" ]; then MODULE=$(basename "$MODULE_PATH") - SRC_PATH="$SRC_BASE_PATH/$MODULE/README.md" - DEST_PATH="$DEST_BASE_PATH/$MODULE.md" + SRC_PATH=$(realpath $SRC_BASE_PATH/$MODULE/README.md) + DEST_PATH="$(realpath $DEST_BASE_PATH/$MODULE).md" # Check if README.md exists before copying if [ -e "$SRC_PATH" ]; then - cp "$SRC_PATH" "$DEST_PATH" - echo "File copied from $SRC_PATH to $DEST_PATH" + ln -s -f "$SRC_PATH" "$DEST_PATH" + echo "File linked from $SRC_PATH to $DEST_PATH" else echo "ERROR: README.md not found in $MODULE_PATH" fi diff --git a/src/drt/README.md b/src/drt/README.md index a3a9f643c20..cd54c59b1a0 100644 --- a/src/drt/README.md +++ b/src/drt/README.md @@ -27,6 +27,12 @@ guide format. This command performs detailed routing. +Developer arguments +- `-or_seed`, `-or_k` + +Distributed arguments +- `-distributed` , `-remote_host`, `-remote_port`, `-shared_volume`, `-cloud_size` + ```tcl detailed_route [-output_maze filename] diff --git a/src/gpl/README.md b/src/gpl/README.md index 2667891bbce..7084ec4f781 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -37,6 +37,14 @@ is scaled from the full value for the worst slack, to 1.0 at the `timing_driven_nets_percentage` point. Use the `set_wire_rc` command to set resistance and capacitance of estimated wires used for timing. +Routability-driven arguments +- They begin with `-routability`. +- `-routability_check_overflow`, `-routability_max_density`, `-routability_max_bloat_iter`, `-routability_max_inflation_iter`, `-routability_target_rc_metric`, `-routability_inflation_ratio_coef`, `-routability_max_inflation_ratio`, `-routability_rc_coefficients` + +Timing-driven arguments +- They begin with `-timing_driven`. +- `-timing_driven_net_reweight_overflow`, `-timing_driven_net_weight_max`, `-timing_driven_nets_percentage` + ```tcl global_placement [-timing_driven] diff --git a/src/ppl/README.md b/src/ppl/README.md index c0310246e1f..5b5735fc239 100644 --- a/src/ppl/README.md +++ b/src/ppl/README.md @@ -212,6 +212,9 @@ place_pin The `place_pins` command places all pins together. Use the following command to perform pin placement: +Developer arguments: +- `-random`, `-random_seed` + ```tcl place_pins -hor_layers h_layers From bf95a8090338d24d551c14db985637541a7a280c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 21 Jan 2024 13:31:24 +0000 Subject: [PATCH 34/88] Flattened hierarchy for manpages, merge both Makefiles Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/.gitignore | 8 ++ docs/Makefile | 151 ++++++++++++++++++++++++++--- docs/conf.py | 3 + docs/man/.gitignore | 8 -- docs/man/Makefile | 123 ----------------------- docs/man/scripts/link_readmes.sh | 4 +- docs/man/scripts/md_roff_compat.py | 8 +- 7 files changed, 156 insertions(+), 149 deletions(-) create mode 100644 docs/.gitignore delete mode 100644 docs/man/.gitignore delete mode 100644 docs/man/Makefile diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000000..b88274660f2 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,8 @@ +# dont save intermediate results +man/md/man2/*md +man/md/man3/*md +html +man/man1 +man/man2 +man/man3 +cat diff --git a/docs/Makefile b/docs/Makefile index 465256aec3f..96e2a20055f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,29 +1,156 @@ -# Minimal makefile for Sphinx documentation -# +# Makefile is divided into two parts: +# Pandoc compilation - Manpages +# Sphinx compilation - ReadTheDocs + +# _____ _ _ _____ ____ _____ +# | __ \ /\ | \ | | __ \ / __ \ / ____| +# | |__) / \ | \| | | | | | | | | +# | ___/ /\ \ | . ` | | | | | | | | +# | | / ____ \| |\ | |__| | |__| | |____ +# |_| /_/ \_\_| \_|_____/ \____/ \_____| + +# Define variables +PANDOC = pandoc +SRC_DIR = man/md +MAN_ROOT_DIR = man +HTML_ROOT_DIR = html +CAT_ROOT_DIR = cat +MAN1 = man1 +MAN2 = man2 +MAN3 = man3 + +# Exclude these set of keywords +EXCLUDE_KEYWORDS = ant cts dft dpl drt fin gpl grt gui ifp mpl \ + mpl2 odb pad par pdn ppl psm rcx rmp rsz sta tap upf +EXCLUDE_FILES := $(addsuffix .md,$(EXCLUDE_KEYWORDS)) + +MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) +SRC1_DIR = $(SRC_DIR)/$(MAN1) +MAN1_FILES = $(wildcard $(SRC1_DIR)/*.md) +MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) +HTML1_DIR = $(HTML_ROOT_DIR)/html1 +HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) +CAT1_DIR = $(CAT_ROOT_DIR)/cat1 +CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) + +MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) +SRC2_DIR = $(SRC_DIR)/$(MAN2) +MAN2_FILES = $(wildcard $(SRC2_DIR)/*.md) +MAN2_FILES := $(filter-out $(foreach keyword, $(EXCLUDE_FILES), %$(keyword)), $(MAN2_FILES)) +MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) +HTML2_DIR = $(HTML_ROOT_DIR)/html2 +HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) +CAT2_DIR = $(CAT_ROOT_DIR)/cat2 +CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) + +MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) +SRC3_DIR = $(SRC_DIR)/$(MAN3) +MAN3_FILES = $(wildcard $(SRC3_DIR)/*.md) +MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) +HTML3_DIR = $(HTML_ROOT_DIR)/html3 +HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) +CAT3_DIR = $(CAT_ROOT_DIR)/cat3 +CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) + +# Default target +all: doc web cat + +# Target to do symlinks and pandoc-compatible conversion +preprocess: + ./man/scripts/link_readmes.sh && python3 man/scripts/md_roff_compat.py + +# Target to generate all man pages +doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) + +# Target to generate all web pages (changed name to disambiguate from sphinx) +web: $(HTML1_PAGES) $(HTML2_PAGES) $(HTML3_PAGES) + +# Target to generate all cat pages +cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) + @echo $(CAT1_PAGES) + +# Rule to create the man directory +$(MAN1_DIR): + mkdir -p $(MAN1_DIR) +$(MAN2_DIR): + mkdir -p $(MAN2_DIR) +$(MAN3_DIR): + mkdir -p $(MAN3_DIR) +$(HTML1_DIR): + mkdir -p $(HTML1_DIR) +$(HTML2_DIR): + mkdir -p $(HTML2_DIR) +$(HTML3_DIR): + mkdir -p $(HTML3_DIR) +$(CAT1_DIR): + mkdir -p $(CAT1_DIR) +$(CAT2_DIR): + mkdir -p $(CAT2_DIR) +$(CAT3_DIR): + mkdir -p $(CAT3_DIR) + +# Rule to generate a roff file from a corresponding Markdown file +$(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) + $(PANDOC) -s -t man $< -o $@ +$(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) + $(PANDOC) -s -t man $< -o $@ + +# Rule to generate a html file from a corresponding roff file +$(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) + $(PANDOC) -s -o html $< -o $@ +$(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) + $(PANDOC) -s -o html $< -o $@ +$(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) + $(PANDOC) -s -o html $< -o $@ + +# Rule to generate a cat file from a corresponding roff file +$(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) + $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ +$(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) + $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ +$(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) + $(PANDOC) -s -o markdown $< -o $@ + sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ + +# Phony targets +.PHONY: all + +# _____ _____ _ _ _____ _ ___ __ +# / ____| __ \| | | |_ _| \ | \ \ / / +# | (___ | |__) | |__| | | | | \| |\ V / +# \___ \| ___/| __ | | | | . ` | > < +# ____) | | | | | |_| |_| |\ |/ . \ +# |_____/|_| |_| |_|_____|_| \_/_/ \_\ -# You can set these variables from the command line, and also -# from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = BUILDDIR = build -# Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) +html: Makefile + @$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) rm -f main ./revert-links.py - + checklinks: $(SPHINXBUILD) -b linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) || echo @echo @echo "Check finished. Report is in $(BUILDDIR)." rm -f main ./revert-links.py + +# Clean target to remove all man pages/Sphinx docs +clean: + rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) + rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) + rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) + rm -rf ./man/md/man2/*md + rm -rf ./man/md/man3/*md + rm -rf $(BUILDDIR) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 87252e0f859..112689a09c7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,6 +80,9 @@ 'main/src/odb/src/def/doc/README.md', 'main/src/odb/src/lef/README.md', 'main/docs', + 'man', + 'cat', + 'html' ] # The name of the Pygments (syntax highlighting) style to use. diff --git a/docs/man/.gitignore b/docs/man/.gitignore deleted file mode 100644 index 3b2b9d19a8a..00000000000 --- a/docs/man/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -test/results - -# dont save intermediate results -md/man2/*md -md/man3/*md -html -man -cat diff --git a/docs/man/Makefile b/docs/man/Makefile deleted file mode 100644 index 5d9b8033f1c..00000000000 --- a/docs/man/Makefile +++ /dev/null @@ -1,123 +0,0 @@ -# Makefile for generating man pages using pandoc -# Workflow: -# - preprocess: symlink READMEs -# - raw md -> pandoc-compatible md -# - pandoc md -> roff -> cat, html - -# Define variables -PANDOC = pandoc -SRC_DIR = md -MAN_ROOT_DIR = man -HTML_ROOT_DIR = html -CAT_ROOT_DIR = cat -MAN1 = man1 -MAN2 = man2 -MAN3 = man3 - -# Exclude these set of keywords -EXCLUDE_KEYWORDS = ant cts dft dpl drt fin gpl grt gui ifp mpl \ - mpl2 odb pad par pdn ppl psm rcx rmp rsz sta tap upf -EXCLUDE_FILES := $(addsuffix .md,$(EXCLUDE_KEYWORDS)) - -MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) -SRC1_DIR = $(SRC_DIR)/$(MAN1) -MAN1_FILES = $(wildcard $(SRC1_DIR)/*.md) -MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) -HTML1_DIR = $(HTML_ROOT_DIR)/html1 -HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) -CAT1_DIR = $(CAT_ROOT_DIR)/cat1 -CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) - -MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) -SRC2_DIR = $(SRC_DIR)/$(MAN2) -MAN2_FILES = $(wildcard $(SRC2_DIR)/*.md) -MAN2_FILES := $(filter-out $(foreach keyword, $(EXCLUDE_FILES), %$(keyword)), $(MAN2_FILES)) -MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) -HTML2_DIR = $(HTML_ROOT_DIR)/html2 -HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) -CAT2_DIR = $(CAT_ROOT_DIR)/cat2 -CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) - -MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) -SRC3_DIR = $(SRC_DIR)/$(MAN3) -MAN3_FILES = $(wildcard $(SRC3_DIR)/*.md) -MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) -HTML3_DIR = $(HTML_ROOT_DIR)/html3 -HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) -CAT3_DIR = $(CAT_ROOT_DIR)/cat3 -CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) - -# Default target -all: doc html cat - -# Target to do symlinks and pandoc-compatible conversion -preprocess: - ./scripts/link_readmes.sh && python3 scripts/md_roff_compat.py - -# Target to generate all man pages -doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) - -# Target to generate all html pages -html: $(HTML1_PAGES) $(HTML2_PAGES) $(HTML3_PAGES) - -# Target to generate all cat pages -cat: $(CAT1_PAGES) $(CAT2_PAGES) $(CAT3_PAGES) - @echo $(CAT1_PAGES) - -# Rule to create the man directory -$(MAN1_DIR): - mkdir -p $(MAN1_DIR) -$(MAN2_DIR): - mkdir -p $(MAN2_DIR) -$(MAN3_DIR): - mkdir -p $(MAN3_DIR) -$(HTML1_DIR): - mkdir -p $(HTML1_DIR) -$(HTML2_DIR): - mkdir -p $(HTML2_DIR) -$(HTML3_DIR): - mkdir -p $(HTML3_DIR) -$(CAT1_DIR): - mkdir -p $(CAT1_DIR) -$(CAT2_DIR): - mkdir -p $(CAT2_DIR) -$(CAT3_DIR): - mkdir -p $(CAT3_DIR) - -# Rule to generate a roff file from a corresponding Markdown file -$(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) - $(PANDOC) -s -t man $< -o $@ -$(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) - $(PANDOC) -s -t man $< -o $@ -$(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) - $(PANDOC) -s -t man $< -o $@ - -# Rule to generate a html file from a corresponding roff file -$(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) - $(PANDOC) -s -o html $< -o $@ -$(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) - $(PANDOC) -s -o html $< -o $@ -$(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) - $(PANDOC) -s -o html $< -o $@ - -# Rule to generate a cat file from a corresponding roff file -$(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ -$(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ -$(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ - -# Clean target to remove all generated man pages -clean: - rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) - rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) - rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) - rm -rf ./md/man2/*md - rm -rf ./md/man3/*md - -# Phony targets -.PHONY: all \ No newline at end of file diff --git a/docs/man/scripts/link_readmes.sh b/docs/man/scripts/link_readmes.sh index 77a1fb3cf01..cb66a7c9bc7 100755 --- a/docs/man/scripts/link_readmes.sh +++ b/docs/man/scripts/link_readmes.sh @@ -1,7 +1,7 @@ #!/bin/bash -SRC_BASE_PATH="../../src" -DEST_BASE_PATH="./md/man2" +SRC_BASE_PATH="../src" +DEST_BASE_PATH="./man/md/man2" mkdir -p $DEST_BASE_PATH # Loop through all folders inside "../src" diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index 3c1bcffb526..13befb1cd73 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -22,16 +22,16 @@ "mpl2", "odb", "pad", "par", "pdn", "ppl", "psm",\ "rcx", "rmp", "rsz", "sta", "stt", "tap", "upf", "utl"] # Process man2 (except odb and sta) -DEST_DIR2 = SRC_DIR = "./md/man2" +DEST_DIR2 = SRC_DIR = "./man/md/man2" exclude = ["odb", "sta"] docs2 = [f"{SRC_DIR}/{tool}.md" for tool in tools if tool not in exclude] # Process man3 (add extra path for ORD messages) -SRC_DIR = "../../src" -DEST_DIR3 = "./md/man3" +SRC_DIR = "../src" +DEST_DIR3 = "./man/md/man3" exclude = ["sta"] #sta excluded because its format is different, and no severity level. docs3 = [f"{SRC_DIR}/{tool}/messages.txt" for tool in tools if tool not in exclude] -docs3.append("../../messages.txt") +docs3.append("../messages.txt") if __name__ == "__main__": for doc in docs2: From bacc60da59c2fc0749d3ff1c78a04d211a96fa8d Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 21 Jan 2024 13:53:41 +0000 Subject: [PATCH 35/88] update docs root readme and changed the cat file addressing to .1, .2, .3 Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/Makefile | 13 ++++++++++--- docs/README.md | 47 +++++++++++++++++++++++++++++++-------------- src/utl/src/Utl.tcl | 4 ++-- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 96e2a20055f..a85fe09fabf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -31,7 +31,7 @@ MAN1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(MAN1_DIR)/%.1,$(MAN1_FILES)) HTML1_DIR = $(HTML_ROOT_DIR)/html1 HTML1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(HTML1_DIR)/%.html,$(MAN1_FILES)) CAT1_DIR = $(CAT_ROOT_DIR)/cat1 -CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.md,$(MAN1_FILES)) +CAT1_PAGES = $(patsubst $(SRC1_DIR)/%.md,$(CAT1_DIR)/%.1,$(MAN1_FILES)) MAN2_DIR = $(MAN_ROOT_DIR)/$(MAN2) SRC2_DIR = $(SRC_DIR)/$(MAN2) @@ -41,7 +41,7 @@ MAN2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(MAN2_DIR)/%.2,$(MAN2_FILES)) HTML2_DIR = $(HTML_ROOT_DIR)/html2 HTML2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(HTML2_DIR)/%.html,$(MAN2_FILES)) CAT2_DIR = $(CAT_ROOT_DIR)/cat2 -CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.md,$(MAN2_FILES)) +CAT2_PAGES = $(patsubst $(SRC2_DIR)/%.md,$(CAT2_DIR)/%.2,$(MAN2_FILES)) MAN3_DIR = $(MAN_ROOT_DIR)/$(MAN3) SRC3_DIR = $(SRC_DIR)/$(MAN3) @@ -50,7 +50,7 @@ MAN3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(MAN3_DIR)/%.3,$(MAN3_FILES)) HTML3_DIR = $(HTML_ROOT_DIR)/html3 HTML3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(HTML3_DIR)/%.html,$(MAN3_FILES)) CAT3_DIR = $(CAT_ROOT_DIR)/cat3 -CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.md,$(MAN3_FILES)) +CAT3_PAGES = $(patsubst $(SRC3_DIR)/%.md,$(CAT3_DIR)/%.3,$(MAN3_FILES)) # Default target all: doc web cat @@ -116,6 +116,13 @@ $(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) $(PANDOC) -s -o markdown $< -o $@ sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ +$(CAT1_DIR)/%.1: $(CAT1_DIR)/%.md + mv $< $@ +$(CAT2_DIR)/%.2: $(CAT2_DIR)/%.md + mv $< $@ +$(CAT3_DIR)/%.3: $(CAT3_DIR)/%.md + mv $< $@ + # Phony targets .PHONY: all diff --git a/docs/README.md b/docs/README.md index 4a4d4ae1bd2..f5a3badc388 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,30 +1,49 @@ # OpenROAD Documentation -This documentation is available at [https://openroad.readthedocs.io/en/latest/](https://openroad.readthedocs.io/en/latest/) +This repo houses code and raw files to build the on-line documentation (using Sphinx) +and manual pages using (using Pandoc) -## Build locally +This on-line documentation is available at [https://openroad.readthedocs.io/en/latest/](https://openroad.readthedocs.io/en/latest/). -### Requires: -- Python 3.x -- Pip -- `virtualenv` +## Prerequisites -### Install prerequisites: +- To install pandoc, refer to this [link](https://github.com/jgm/pandoc/blob/main/INSTALL.md). `apt-get` *should* just work for Ubuntu. +- To install sphinx requirements, **create a virtual environment (e.g. conda/virtualenv)** and then run `pip install -r requirements.txt`. -``` shell -virtualenv .venv -source .venv/bin/activate -pip install -r requirements.txt +### Build instructions for Pandoc manpages + +```shell +make clean + +# Note this step is important as it regenerates the documentation using latest sources. +make preprocess && make all #-j16 +``` + +#### To view manpages + +- To run `man` commands inside OpenROAD, you can either use the Linux `man` binary: +```tcl +# create a man wrapper +source man/scripts/main.tcl +man openroad +``` + +- Or just within OpenROAD itself. +```tcl +# you will be prompted to enter the RELATIVE path to cat folders which is optional. +man openroad ``` -### Build: +### Build instructions for Sphinx docs + +#### HTML docs ``` shell make html ``` -### Check for broken links: +#### Check for broken links ``` shell make checklinks -``` +``` \ No newline at end of file diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index d947b020420..9a69b47d997 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -3,7 +3,7 @@ set MAN_PATH "" sta::define_cmd_args "man" {name} proc man { name } { - set DEFAULT_MAN_PATH "../docs/man/cat" + set DEFAULT_MAN_PATH "../docs/cat" global MAN_PATH set MAN_PATH [utl::get_input] if { [utl::check_valid_man_path $MAN_PATH] == false } { @@ -22,7 +22,7 @@ proc man { name } { foreach man_section $man_sections { set length [string length $man_section] # Get suffix for man section - set man_suffix "md" + set man_suffix [string range $man_section [expr {$length - 1}] $length] # Replace all "::" with "_" set name1 [string map { "::" "_" } $name] append name1 ".$man_suffix" From 3490a9ac37a29ea86550e3591cfecc80e15c5fcb Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:28:25 +0000 Subject: [PATCH 36/88] Static test: translator (man2 only, incomplete) Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/.gitignore | 4 +++ docs/man/scripts/manpage.py | 1 - docs/man/scripts/md_roff_compat.py | 30 ++++++++++-------- docs/man/test/README.md | 9 +++--- docs/man/test/main.tcl | 1 - docs/man/test/regression_tests.tcl | 2 +- docs/man/test/save_ok | 1 + docs/man/test/translator.ok | 49 ++++++++++++++++++++++++++++++ docs/man/test/translator.py | 29 ++++++++++++++++++ test/regression.tcl | 2 +- 10 files changed, 107 insertions(+), 21 deletions(-) delete mode 120000 docs/man/test/main.tcl create mode 120000 docs/man/test/save_ok create mode 100644 docs/man/test/translator.ok create mode 100644 docs/man/test/translator.py diff --git a/docs/.gitignore b/docs/.gitignore index b88274660f2..18f8e4d4391 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -6,3 +6,7 @@ man/man1 man/man2 man/man3 cat + + +# for doc tests +man/test/results diff --git a/docs/man/scripts/manpage.py b/docs/man/scripts/manpage.py index 3f411c63f44..a3c3ed4008d 100644 --- a/docs/man/scripts/manpage.py +++ b/docs/man/scripts/manpage.py @@ -30,7 +30,6 @@ def write_roff_file(self, dst_dir = './md/man2'): self.write_copyright(f) def write_header(self, f, man_level): - print(man_level) assert isinstance(f, io.TextIOBase) and\ f.writable(), "File pointer is not open for writing." assert man_level == "man1" or man_level == "man2" or\ diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index 13befb1cd73..d333ae33f67 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -16,7 +16,7 @@ # be the description of the function. E.g. `func_name - Useful Function Description` in the roff. # sta: documentation is hosted elsewhere. (not currently in RTD also.) # odb: documentation is hosted on doxygen. -# + tools = ["ant", "cts", "dbSta", "dft", "dpl", "dpo", "drt",\ "dst", "fin", "gpl", "grt", "gui", "ifp", "mpl",\ "mpl2", "odb", "pad", "par", "pdn", "ppl", "psm",\ @@ -33,7 +33,7 @@ docs3 = [f"{SRC_DIR}/{tool}/messages.txt" for tool in tools if tool not in exclude] docs3.append("../messages.txt") -if __name__ == "__main__": +def man2(path=DEST_DIR2): for doc in docs2: if not os.path.exists(doc): print(f"{doc} doesn't exist. Continuing") @@ -54,11 +54,12 @@ # arguments func_options, func_args = extract_arguments(text) - #print(f"Names: {len(func_names)}") - #print(f"Desc: {len(func_descs)}") - #print(f"Syn: {len(func_synopsis)}") - #print(f"Options: {len(func_options)}") - #print(f"Args: {len(func_args)}") + print(f'{os.path.basename(doc)}') + print(f'''Names: {len(func_names)},\ + Desc: {len(func_descs)},\ + Syn: {len(func_synopsis)},\ + Options: {len(func_options)},\ + Args: {len(func_args)}''') for func_id in range(len(func_synopsis)): manpage = ManPage() @@ -82,8 +83,9 @@ args_dict[key] = val manpage.args = args_dict - manpage.write_roff_file(DEST_DIR2) - count = 0 + manpage.write_roff_file(path) + +def man3(path=DEST_DIR3): for doc in docs3: if not os.path.exists(doc): print(f"{doc} doesn't exist. Continuing") @@ -91,7 +93,6 @@ print(f"Processing {doc}") with open(doc, 'r') as f: for line in f: - count += 1 parts = line.split() module, num, message, level = parts[0], parts[1],\ " ".join(parts[4:-2]), parts[-2] @@ -100,10 +101,15 @@ if "with-total" in manpage.name: print(parts); exit() manpage.synopsis = "N/A." manpage.desc = f"Severity: {level}\n\n{message}" - manpage.write_roff_file(DEST_DIR3) + manpage.write_roff_file(path) # For individual module folders. #module_path = os.path.join(DEST_DIR3, module) #os.makedirs(module_path, exist_ok = True) #manpage.write_roff_file(module_path) - print(count) \ No newline at end of file + + + +if __name__ == "__main__": + man2() + man3() \ No newline at end of file diff --git a/docs/man/test/README.md b/docs/man/test/README.md index c20096e8554..8e53bbd85b4 100644 --- a/docs/man/test/README.md +++ b/docs/man/test/README.md @@ -15,14 +15,13 @@ Adding a new test called `func`, you must create/update the following: ``` # Please replace with your path to OR. -cd ~/OpenROAD/docs/manpages - -# if you installed OR via prebuilt binaries, you might need to symlink as the following script only works with OR in a particular directory. -# mkdir -p ~/OpenROAD/build/src && cd ~/OpenROAD/build/src -# ln -s /usr/bin/openroad . +cd ~/OpenROAD/docs/man # run the tests ./test/regression + +# save the ok files +./test/save_ok ``` ## TODO diff --git a/docs/man/test/main.tcl b/docs/man/test/main.tcl deleted file mode 120000 index 07d8c0d0ccf..00000000000 --- a/docs/man/test/main.tcl +++ /dev/null @@ -1 +0,0 @@ -../scripts/main.tcl \ No newline at end of file diff --git a/docs/man/test/regression_tests.tcl b/docs/man/test/regression_tests.tcl index f1aa6573b76..38ae62ec283 100644 --- a/docs/man/test/regression_tests.tcl +++ b/docs/man/test/regression_tests.tcl @@ -1,3 +1,3 @@ record_tests { - func + translator } diff --git a/docs/man/test/save_ok b/docs/man/test/save_ok new file mode 120000 index 00000000000..4f5b707628d --- /dev/null +++ b/docs/man/test/save_ok @@ -0,0 +1 @@ +../../../test/save_ok \ No newline at end of file diff --git a/docs/man/test/translator.ok b/docs/man/test/translator.ok new file mode 100644 index 00000000000..ba6ad1d0544 --- /dev/null +++ b/docs/man/test/translator.ok @@ -0,0 +1,49 @@ +ant.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +cts.md +Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 +./man/md/man2/dbSta.md doesn't exist. Continuing +dft.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +dpl.md +Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 +./man/md/man2/dpo.md doesn't exist. Continuing +drt.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +./man/md/man2/dst.md doesn't exist. Continuing +fin.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +gpl.md +Names: 2, Desc: 1, Syn: 1, Options: 2, Args: 2 +grt.md +Names: 15, Desc: 15, Syn: 15, Options: 15, Args: 15 +gui.md +Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 +ifp.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +mpl.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +mpl2.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +pad.md +Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 +par.md +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 +pdn.md +Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +ppl.md +Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 +psm.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +rcx.md +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 +rmp.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +rsz.md +Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 +./man/md/man2/stt.md doesn't exist. Continuing +tap.md +Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 +upf.md +Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +./man/md/man2/utl.md doesn't exist. Continuing diff --git a/docs/man/test/translator.py b/docs/man/test/translator.py new file mode 100644 index 00000000000..7e3eab122e6 --- /dev/null +++ b/docs/man/test/translator.py @@ -0,0 +1,29 @@ +import helpers +import os +import sys +import glob +sys.path.append('../scripts/') + +from md_roff_compat import man2, man3 +from md_roff_compat import docs2, docs3 + +# Test objective: if the translator script can run without errors for all the docs. +# goal is to return an error if the header cannot be extracted. + +# TODO: run link_readmes to get the files INSIDE docker. +## thereafter remove the files by running `make clean` + +# check man2 +os.chdir('../../') +man2() + +# check man3 +# for d in all_docs: +# text = open(d).read() +# tool_name, _ = os.path.splitext(os.path.basename(d)) +# func_file = helpers.make_result_file(f"{tool_name}.func") +# write_funcs(funcs, func_file) + +# # write_funcs(funcs, f"{tool_name}.funcok") + +# output = helpers.diff_files(func_file, f"{tool_name}.funcok") \ No newline at end of file diff --git a/test/regression.tcl b/test/regression.tcl index 888574f42e3..33d7b2f9d3e 100755 --- a/test/regression.tcl +++ b/test/regression.tcl @@ -567,7 +567,7 @@ proc save_defok { test } { proc result_lang { test } { global test_langs - if {[lsearch $test_langs($test) tcl]} { + if {[lsearch $test_langs($test) tcl] != -1} { return tcl } return [lindex $test_langs($test) 0] From 8917f5b8f45b29eb921670ea1bbda354ea518512 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:44:57 +0000 Subject: [PATCH 37/88] 3/3 Static tests: count outfiles, man functionality check and translator Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/scripts/link_readmes.sh | 4 +- docs/man/scripts/md_roff_compat.py | 13 +-- docs/man/test/count_outfiles.ok | 159 +++++++++++++++++++++++++++++ docs/man/test/count_outfiles.py | 35 +++++++ docs/man/test/func.ok | 1 - docs/man/test/func.py | 28 ----- docs/man/test/man_func.ok | 136 ++++++++++++++++++++++++ docs/man/test/man_func.tcl | 11 ++ docs/man/test/ppl.funcok | 10 -- docs/man/test/regression_tests.tcl | 2 + docs/man/test/translator.ok | 88 ++++++++++++++++ docs/man/test/translator.py | 18 +--- src/utl/src/Utl.tcl | 37 +++++-- 13 files changed, 471 insertions(+), 71 deletions(-) create mode 100644 docs/man/test/count_outfiles.ok create mode 100644 docs/man/test/count_outfiles.py delete mode 100644 docs/man/test/func.ok delete mode 100644 docs/man/test/func.py create mode 100644 docs/man/test/man_func.ok create mode 100644 docs/man/test/man_func.tcl delete mode 100644 docs/man/test/ppl.funcok diff --git a/docs/man/scripts/link_readmes.sh b/docs/man/scripts/link_readmes.sh index cb66a7c9bc7..c0f4214503d 100755 --- a/docs/man/scripts/link_readmes.sh +++ b/docs/man/scripts/link_readmes.sh @@ -8,8 +8,8 @@ mkdir -p $DEST_BASE_PATH for MODULE_PATH in "$SRC_BASE_PATH"/*; do if [ -d "$MODULE_PATH" ]; then MODULE=$(basename "$MODULE_PATH") - SRC_PATH=$(realpath $SRC_BASE_PATH/$MODULE/README.md) - DEST_PATH="$(realpath $DEST_BASE_PATH/$MODULE).md" + SRC_PATH=$(realpath $SRC_BASE_PATH/$MODULE/README.md) + DEST_PATH="$(realpath $DEST_BASE_PATH/$MODULE).md" # Check if README.md exists before copying if [ -e "$SRC_PATH" ]; then diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index d333ae33f67..529a9053e7d 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -87,10 +87,11 @@ def man2(path=DEST_DIR2): def man3(path=DEST_DIR3): for doc in docs3: + _info, _warn, _error = 0, 0, 0 + print(f"Processing {doc}") if not os.path.exists(doc): print(f"{doc} doesn't exist. Continuing") continue - print(f"Processing {doc}") with open(doc, 'r') as f: for line in f: parts = line.split() @@ -103,11 +104,11 @@ def man3(path=DEST_DIR3): manpage.desc = f"Severity: {level}\n\n{message}" manpage.write_roff_file(path) - # For individual module folders. - #module_path = os.path.join(DEST_DIR3, module) - #os.makedirs(module_path, exist_ok = True) - #manpage.write_roff_file(module_path) - + # tabulate counts + if level == 'INFO': _info += 1 + elif level == 'WARN': _warn += 1 + elif level == 'ERROR': _error += 1 + print(f"Info: {_info}, Warn: {_warn}, Error: {_error}") if __name__ == "__main__": diff --git a/docs/man/test/count_outfiles.ok b/docs/man/test/count_outfiles.ok new file mode 100644 index 00000000000..73098212bad --- /dev/null +++ b/docs/man/test/count_outfiles.ok @@ -0,0 +1,159 @@ +File linked from /workspace/src/ant/README.md to /workspace/docs/man/md/man2/ant.md +ERROR: README.md not found in ../src/cmake +File linked from /workspace/src/cts/README.md to /workspace/docs/man/md/man2/cts.md +ERROR: README.md not found in ../src/dbSta +File linked from /workspace/src/dft/README.md to /workspace/docs/man/md/man2/dft.md +File linked from /workspace/src/dpl/README.md to /workspace/docs/man/md/man2/dpl.md +ERROR: README.md not found in ../src/dpo +File linked from /workspace/src/drt/README.md to /workspace/docs/man/md/man2/drt.md +ERROR: README.md not found in ../src/dst +File linked from /workspace/src/fin/README.md to /workspace/docs/man/md/man2/fin.md +File linked from /workspace/src/gpl/README.md to /workspace/docs/man/md/man2/gpl.md +File linked from /workspace/src/grt/README.md to /workspace/docs/man/md/man2/grt.md +File linked from /workspace/src/gui/README.md to /workspace/docs/man/md/man2/gui.md +File linked from /workspace/src/ifp/README.md to /workspace/docs/man/md/man2/ifp.md +File linked from /workspace/src/mpl/README.md to /workspace/docs/man/md/man2/mpl.md +File linked from /workspace/src/mpl2/README.md to /workspace/docs/man/md/man2/mpl2.md +File linked from /workspace/src/odb/README.md to /workspace/docs/man/md/man2/odb.md +File linked from /workspace/src/pad/README.md to /workspace/docs/man/md/man2/pad.md +File linked from /workspace/src/par/README.md to /workspace/docs/man/md/man2/par.md +File linked from /workspace/src/pdn/README.md to /workspace/docs/man/md/man2/pdn.md +File linked from /workspace/src/ppl/README.md to /workspace/docs/man/md/man2/ppl.md +File linked from /workspace/src/psm/README.md to /workspace/docs/man/md/man2/psm.md +File linked from /workspace/src/rcx/README.md to /workspace/docs/man/md/man2/rcx.md +File linked from /workspace/src/rmp/README.md to /workspace/docs/man/md/man2/rmp.md +File linked from /workspace/src/rsz/README.md to /workspace/docs/man/md/man2/rsz.md +File linked from /workspace/src/sta/README.md to /workspace/docs/man/md/man2/sta.md +ERROR: README.md not found in ../src/stt +File linked from /workspace/src/tap/README.md to /workspace/docs/man/md/man2/tap.md +File linked from /workspace/src/upf/README.md to /workspace/docs/man/md/man2/upf.md +ERROR: README.md not found in ../src/utl +ant.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +cts.md +Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 +./man/md/man2/dbSta.md doesn't exist. Continuing +dft.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +dpl.md +Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 +./man/md/man2/dpo.md doesn't exist. Continuing +drt.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +./man/md/man2/dst.md doesn't exist. Continuing +fin.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +gpl.md +Names: 2, Desc: 1, Syn: 1, Options: 2, Args: 2 +grt.md +Names: 15, Desc: 15, Syn: 15, Options: 15, Args: 15 +gui.md +Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 +ifp.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +mpl.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +mpl2.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +pad.md +Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 +par.md +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 +pdn.md +Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +ppl.md +Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 +psm.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +rcx.md +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 +rmp.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +rsz.md +Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 +./man/md/man2/stt.md doesn't exist. Continuing +tap.md +Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 +upf.md +Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +./man/md/man2/utl.md doesn't exist. Continuing +Processing ../src/ant/messages.txt +Info: 2, Warn: 4, Error: 3 +Processing ../src/cts/messages.txt +Info: 51, Warn: 10, Error: 25 +Processing ../src/dbSta/messages.txt +Info: 0, Warn: 7, Error: 3 +Processing ../src/dft/messages.txt +Info: 1, Warn: 3, Error: 2 +Processing ../src/dpl/messages.txt +Info: 7, Warn: 4, Error: 20 +Processing ../src/dpo/messages.txt +Info: 47, Warn: 7, Error: 11 +Processing ../src/drt/messages.txt +Info: 78, Warn: 113, Error: 170 +Processing ../src/dst/messages.txt +Info: 1, Warn: 18, Error: 9 +Processing ../src/fin/messages.txt +Info: 5, Warn: 1, Error: 4 +Processing ../src/gpl/messages.txt +Info: 73, Warn: 10, Error: 13 +Processing ../src/grt/messages.txt +Info: 29, Warn: 42, Error: 96 +Processing ../src/gui/messages.txt +Info: 1, Warn: 32, Error: 64 +Processing ../src/ifp/messages.txt +Info: 2, Warn: 6, Error: 17 +Processing ../src/mpl/messages.txt +Info: 12, Warn: 7, Error: 9 +Processing ../src/mpl2/messages.txt +Info: 11, Warn: 4, Error: 20 +Processing ../src/odb/messages.txt +Info: 63, Warn: 200, Error: 129 +Processing ../src/pad/messages.txt +Info: 18, Warn: 59, Error: 355 +Processing ../src/par/messages.txt +Info: 143, Warn: 35, Error: 16 +Processing ../src/pdn/messages.txt +Info: 3, Warn: 18, Error: 89 +Processing ../src/ppl/messages.txt +Info: 20, Warn: 17, Error: 68 +Processing ../src/psm/messages.txt +Info: 10, Warn: 18, Error: 43 +Processing ../src/rcx/messages.txt +Info: 92, Warn: 63, Error: 28 +Processing ../src/rmp/messages.txt +Info: 9, Warn: 5, Error: 10 +Processing ../src/rsz/messages.txt +Info: 36, Warn: 21, Error: 25 +Processing ../src/stt/messages.txt +Info: 0, Warn: 0, Error: 7 +Processing ../src/tap/messages.txt +Info: 5, Warn: 4, Error: 9 +Processing ../src/upf/messages.txt +Info: 0, Warn: 29, Error: 8 +Processing ../src/utl/messages.txt +Info: 1, Warn: 0, Error: 9 +Processing ../messages.txt +Info: 3, Warn: 7, Error: 37 +[WARNING] Could not convert TeX math '\frac{height}{width}', rendering as TeX +[WARNING] Could not convert TeX math '[a, \frac{1}{a}]', rendering as TeX +[WARNING] Could not convert TeX math '\frac{resistanceUnit}{distanceUnit}', rendering as TeX +[WARNING] Could not convert TeX math '\frac{capacitanceUnit}{distanceUnit}', rendering as TeX +[WARNING] Could not convert TeX math '{signal}_', rendering as TeX: + {signal}_ + ^ + unexpected eof + expecting "%", "\\label", "\\nonumber", whitespace, "{", letter, digit, ".", "\\mbox", "\\text", "\\textbf", "\\textit", "\\textrm", "\\textsf", "\\texttt", "\\bm", "\\boldsymbol", "\\mathbb", "\\mathbf", "\\mathbfcal", "\\mathbffrak", "\\mathbfit", "\\mathbfscr", "\\mathbfsfit", "\\mathbfsfup", "\\mathbfup", "\\mathbold", "\\mathcal", "\\mathds", "\\mathfrak", "\\mathit", "\\mathrm", "\\mathscr", "\\mathsf", "\\mathsfit", "\\mathsfup", "\\mathtt", "\\mathup", "\\pmb", "\\symbf", "\\texttt", "\\sqrt", "\\surd", "\\mspace", "\\hspace", "\\mathop", "\\mathrel", "\\mathbin", "\\mathord", "\\mathopen", "\\mathclose", "\\mathpunct", "\\phantom", "\\boxed", "\\overset", "\\stackrel", "\\underset", "\\frac", "\\tfrac", "\\dfrac", "\\binom", "\\genfrac", "\\substack", "_", "^", "\\begin", "\\ensuremath", "\\bigg", "\\Bigg", "\\big", "\\Big", "\\biggr", "\\Biggr", "\\bigr", "\\Bigr", "\\biggl", "\\Biggl", "\\bigl", "\\", "\\left", "\\not", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", white space, "\\displaystyle" or "\\operatorname" +[WARNING] Could not convert TeX math 'orient, must be one of \"', rendering as TeX: + , must be one of \" + ^ + unexpected eof + expecting "%", "\\label", "\\nonumber" or whitespace +[WARNING] Could not convert TeX math 'group_idx: \[', rendering as TeX: + group_idx: \[ + ^ + unexpected eof + expecting "%", "\\label", "\\nonumber" or whitespace +Level 1 doc counts are equal to 1. +Level 2 doc counts are equal to 160. +Level 3 doc counts are equal to 2783. diff --git a/docs/man/test/count_outfiles.py b/docs/man/test/count_outfiles.py new file mode 100644 index 00000000000..3aba056f84b --- /dev/null +++ b/docs/man/test/count_outfiles.py @@ -0,0 +1,35 @@ +import os +import sys +sys.path.append('../scripts/') + +# Test objective: To count the number of expected files in man2/man3 + +# This script mimics the build process and checks expected output. +os.chdir("../../") +os.system("make clean -s && make preprocess -s") +os.system("make all -j16 -s") + +# This tracks how many modules are being generated for man2. +# Please change this if modules are added! +MAN2_COUNT = 24 + + +# Check if the files in html1 == cat1, html2 == cat2, html3 = cat3 +for i in range(1, 4): + man_dir = f"man/man{i}" + html_dir = f"html/html{i}" + cat_dir = f"cat/cat{i}" + assert os.path.exists(man_dir), f"{man_dir} does not exist." + assert os.path.exists(html_dir), f"{html_dir} does not exist." + assert os.path.exists(cat_dir), f"{cat_dir} does not exist." + man_count = len(os.listdir(man_dir)) + html_count = len(os.listdir(html_dir)) + cat_count = len(os.listdir(cat_dir)) + + if man_count == html_count == cat_count: + print(f"Level {i} doc counts are equal to {html_count}.") + else: + print(f"Level {i} doc counts are not equal.") + print(f"{html_dir} count: {html_count}\n\ + {cat_dir} count: {cat_count}\n\ + {man_dir} count: {man_count}") \ No newline at end of file diff --git a/docs/man/test/func.ok b/docs/man/test/func.ok deleted file mode 100644 index c8af7cb1b49..00000000000 --- a/docs/man/test/func.ok +++ /dev/null @@ -1 +0,0 @@ -No differences found. diff --git a/docs/man/test/func.py b/docs/man/test/func.py deleted file mode 100644 index 809307f74c9..00000000000 --- a/docs/man/test/func.py +++ /dev/null @@ -1,28 +0,0 @@ -import helpers -import os -import sys -import glob -sys.path.append('../scripts/') - -from md_roff_compat import extract_headers - -# to repeat this test for ALL original docs (before preprocessing). -# Function goal: to extract headers of the form (# HEADER 1) and convert -# goal is to return an error if the header cannot be extracted. - -def write_funcs(funcs, fname): - with open(fname, "w") as f: - f.write("\n".join(funcs)) - -all_docs = glob.glob("../src/*/*.txt") - -for d in all_docs: - text = open(d).read() - tool_name, _ = os.path.splitext(os.path.basename(d)) - func_file = helpers.make_result_file(f"{tool_name}.func") - funcs = extract_headers(text, 3) - write_funcs(funcs, func_file) - - # write_funcs(funcs, f"{tool_name}.funcok") - - output = helpers.diff_files(func_file, f"{tool_name}.funcok") \ No newline at end of file diff --git a/docs/man/test/man_func.ok b/docs/man/test/man_func.ok new file mode 100644 index 00000000000..df70baed28e --- /dev/null +++ b/docs/man/test/man_func.ok @@ -0,0 +1,136 @@ +--- +date: 2023/11/13 +section: 0 +title: openroad +--- + +NAME +==== +openroad - OpenROAD command-line-interface. + +SYNOPSIS +======== + +openroad [-help] [-version] [-no_init] [-exit] [-gui] +[-threads count\|max] [-log file_name] [-metrics file_name] +cmd_file + +openroad [-python] cmd_file + +DESCRIPTION +=========== + +The **openroad** command is the command-line interface for OpenROAD, an +open-source initiative for chip design and optimization. It provides a +range of options to control its behavior and execute commands specified +in the cmd_file. + +OPTIONS +======= + +`-help`: Display help information. + +`-version`: Display version information. + +`-no_init`: Skip initialization steps. + +`-exit`: Exit after executing commands in cmd_file. +`-gui`: Launch the graphical user interface (GUI). + +`-threads count|max`: Specify the number of threads to use (or use max +available). + +`-log file_name`: Log output to the specified file. + +`-metrics file_name`: Save performance metrics to the specified file. + +`-python`: Execute the cmd_file as a Python script. + +ARGUMENTS +========= + +`cmd_file`: The command file containing OpenROAD commands to be +executed. + +EXAMPLES +======== +**openroad -help**: Prints the help information + +**openroad -version -exit**: Prints the version information, and exits +the program thereafter. + +**openroad -threads max -log test.log -metrics test.metrics**: Prints +the log and metric respectively to `test.log` and `test.metrics`. Also +runs the script with maximum available number of threads. + +**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl +commands can be run. + +TCL COMMANDS +============ + +These Tcl-based commands are callable from within the OpenROAD binary. + +- read_lef [-tech] [-library] filename + + - Read Library Exchange Format (.lef) files. + + - tech: Technology-specific information + + - library: .lib files + +- read_def filename + + - Read Design Exchange Format (.def) files. + +- write_def [-version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3] filename + + - Write Design Exchange Format (.def) files. + + - version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3: Corresponding DEF version + to use. + +- read_verilog filename + + - Read Verilog (.v) input file. +- write_verilog filename + + - Write Verilog (.v) file based on current database. + +- read_db filename + + - Read OpenDB (.odb) database files. + +- write_db filename + - Write OpenDB (.odb) database files. + +- write_abstract_lef filename + + - Write abstract Library Exchange Format (.lef) files based on + current database. + +ENVIRONMENT +=========== +FILES +===== + +SEE ALSO +======== + +HISTORY +======= + +BUGS +==== + +COPYRIGHT +========= + +Copyright (c) 2024, The Regents of the University of California. All +rights reserved. + +AUTHORS +======= + +Jack Luar (TODO\@TODO.com). + diff --git a/docs/man/test/man_func.tcl b/docs/man/test/man_func.tcl new file mode 100644 index 00000000000..f1a114e1cf4 --- /dev/null +++ b/docs/man/test/man_func.tcl @@ -0,0 +1,11 @@ +source "helpers.tcl" +# man functionality test + +# Objective: Run `man` to test these features +# - Running man with no set path. (TODO) +# - Setting a new manpath. This manpath probably leads to here. + +## KIV: Need to find out interactively is the OR folders. +## For now assume we are running in ~/OpenROAD/build + +set output [man openroad -manpath "../../cat"] \ No newline at end of file diff --git a/docs/man/test/ppl.funcok b/docs/man/test/ppl.funcok deleted file mode 100644 index 9233067e94e..00000000000 --- a/docs/man/test/ppl.funcok +++ /dev/null @@ -1,10 +0,0 @@ -Define Pin Shape Pattern -Set IO Pin Constraint -Clear IO Pin Constraints -Set Pin Length -Set Pin Length Extension -Set Pin Thick Multiplier -Set Simulated Annealing Parameters -Place Pin -Place Pins -Write Pin Placement \ No newline at end of file diff --git a/docs/man/test/regression_tests.tcl b/docs/man/test/regression_tests.tcl index 38ae62ec283..d24f65c311f 100644 --- a/docs/man/test/regression_tests.tcl +++ b/docs/man/test/regression_tests.tcl @@ -1,3 +1,5 @@ record_tests { translator + count_outfiles + man_func } diff --git a/docs/man/test/translator.ok b/docs/man/test/translator.ok index ba6ad1d0544..ca09fc1a62a 100644 --- a/docs/man/test/translator.ok +++ b/docs/man/test/translator.ok @@ -1,3 +1,33 @@ +File linked from /workspace/src/ant/README.md to /workspace/docs/man/md/man2/ant.md +ERROR: README.md not found in ../src/cmake +File linked from /workspace/src/cts/README.md to /workspace/docs/man/md/man2/cts.md +ERROR: README.md not found in ../src/dbSta +File linked from /workspace/src/dft/README.md to /workspace/docs/man/md/man2/dft.md +File linked from /workspace/src/dpl/README.md to /workspace/docs/man/md/man2/dpl.md +ERROR: README.md not found in ../src/dpo +File linked from /workspace/src/drt/README.md to /workspace/docs/man/md/man2/drt.md +ERROR: README.md not found in ../src/dst +File linked from /workspace/src/fin/README.md to /workspace/docs/man/md/man2/fin.md +File linked from /workspace/src/gpl/README.md to /workspace/docs/man/md/man2/gpl.md +File linked from /workspace/src/grt/README.md to /workspace/docs/man/md/man2/grt.md +File linked from /workspace/src/gui/README.md to /workspace/docs/man/md/man2/gui.md +File linked from /workspace/src/ifp/README.md to /workspace/docs/man/md/man2/ifp.md +File linked from /workspace/src/mpl/README.md to /workspace/docs/man/md/man2/mpl.md +File linked from /workspace/src/mpl2/README.md to /workspace/docs/man/md/man2/mpl2.md +File linked from /workspace/src/odb/README.md to /workspace/docs/man/md/man2/odb.md +File linked from /workspace/src/pad/README.md to /workspace/docs/man/md/man2/pad.md +File linked from /workspace/src/par/README.md to /workspace/docs/man/md/man2/par.md +File linked from /workspace/src/pdn/README.md to /workspace/docs/man/md/man2/pdn.md +File linked from /workspace/src/ppl/README.md to /workspace/docs/man/md/man2/ppl.md +File linked from /workspace/src/psm/README.md to /workspace/docs/man/md/man2/psm.md +File linked from /workspace/src/rcx/README.md to /workspace/docs/man/md/man2/rcx.md +File linked from /workspace/src/rmp/README.md to /workspace/docs/man/md/man2/rmp.md +File linked from /workspace/src/rsz/README.md to /workspace/docs/man/md/man2/rsz.md +File linked from /workspace/src/sta/README.md to /workspace/docs/man/md/man2/sta.md +ERROR: README.md not found in ../src/stt +File linked from /workspace/src/tap/README.md to /workspace/docs/man/md/man2/tap.md +File linked from /workspace/src/upf/README.md to /workspace/docs/man/md/man2/upf.md +ERROR: README.md not found in ../src/utl ant.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 cts.md @@ -47,3 +77,61 @@ Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 ./man/md/man2/utl.md doesn't exist. Continuing +Processing ../src/ant/messages.txt +Info: 2, Warn: 4, Error: 3 +Processing ../src/cts/messages.txt +Info: 51, Warn: 10, Error: 25 +Processing ../src/dbSta/messages.txt +Info: 0, Warn: 7, Error: 3 +Processing ../src/dft/messages.txt +Info: 1, Warn: 3, Error: 2 +Processing ../src/dpl/messages.txt +Info: 7, Warn: 4, Error: 20 +Processing ../src/dpo/messages.txt +Info: 47, Warn: 7, Error: 11 +Processing ../src/drt/messages.txt +Info: 78, Warn: 113, Error: 170 +Processing ../src/dst/messages.txt +Info: 1, Warn: 18, Error: 9 +Processing ../src/fin/messages.txt +Info: 5, Warn: 1, Error: 4 +Processing ../src/gpl/messages.txt +Info: 73, Warn: 10, Error: 13 +Processing ../src/grt/messages.txt +Info: 29, Warn: 42, Error: 96 +Processing ../src/gui/messages.txt +Info: 1, Warn: 32, Error: 64 +Processing ../src/ifp/messages.txt +Info: 2, Warn: 6, Error: 17 +Processing ../src/mpl/messages.txt +Info: 12, Warn: 7, Error: 9 +Processing ../src/mpl2/messages.txt +Info: 11, Warn: 4, Error: 20 +Processing ../src/odb/messages.txt +Info: 63, Warn: 200, Error: 129 +Processing ../src/pad/messages.txt +Info: 18, Warn: 59, Error: 355 +Processing ../src/par/messages.txt +Info: 143, Warn: 35, Error: 16 +Processing ../src/pdn/messages.txt +Info: 3, Warn: 18, Error: 89 +Processing ../src/ppl/messages.txt +Info: 20, Warn: 17, Error: 68 +Processing ../src/psm/messages.txt +Info: 10, Warn: 18, Error: 43 +Processing ../src/rcx/messages.txt +Info: 92, Warn: 63, Error: 28 +Processing ../src/rmp/messages.txt +Info: 9, Warn: 5, Error: 10 +Processing ../src/rsz/messages.txt +Info: 36, Warn: 21, Error: 25 +Processing ../src/stt/messages.txt +Info: 0, Warn: 0, Error: 7 +Processing ../src/tap/messages.txt +Info: 5, Warn: 4, Error: 9 +Processing ../src/upf/messages.txt +Info: 0, Warn: 29, Error: 8 +Processing ../src/utl/messages.txt +Info: 1, Warn: 0, Error: 9 +Processing ../messages.txt +Info: 3, Warn: 7, Error: 37 diff --git a/docs/man/test/translator.py b/docs/man/test/translator.py index 7e3eab122e6..f1e27214832 100644 --- a/docs/man/test/translator.py +++ b/docs/man/test/translator.py @@ -1,29 +1,17 @@ -import helpers import os import sys -import glob sys.path.append('../scripts/') from md_roff_compat import man2, man3 -from md_roff_compat import docs2, docs3 # Test objective: if the translator script can run without errors for all the docs. # goal is to return an error if the header cannot be extracted. -# TODO: run link_readmes to get the files INSIDE docker. -## thereafter remove the files by running `make clean` - # check man2 os.chdir('../../') +os.system("./man/scripts/link_readmes.sh") man2() # check man3 -# for d in all_docs: -# text = open(d).read() -# tool_name, _ = os.path.splitext(os.path.basename(d)) -# func_file = helpers.make_result_file(f"{tool_name}.func") -# write_funcs(funcs, func_file) - -# # write_funcs(funcs, f"{tool_name}.funcok") - -# output = helpers.diff_files(func_file, f"{tool_name}.funcok") \ No newline at end of file +man3() +os.system("make clean -s") \ No newline at end of file diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index 9a69b47d997..9876bb511ce 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -1,17 +1,36 @@ global MAN_PATH set MAN_PATH "" -sta::define_cmd_args "man" {name} -proc man { name } { +sta::define_cmd_args "man" { name\ + [-manpath manpath]\ + [-slow]} +proc man { args } { + sta::parse_key_args "man" args \ + keys {-manpath} flags {-slow} + + set name [lindex $args 0] set DEFAULT_MAN_PATH "../docs/cat" global MAN_PATH - set MAN_PATH [utl::get_input] - if { [utl::check_valid_man_path $MAN_PATH] == false } { - puts "Using default manpath." + if { [info exists keys(-manpath) ]} { + set MAN_PATH $keys(-manpath) + if { [utl::check_valid_man_path $MAN_PATH] == false } { + puts "Using default manpath." + set MAN_PATH $DEFAULT_MAN_PATH + } + } else { set MAN_PATH $DEFAULT_MAN_PATH } - puts $DEFAULT_MAN_PATH - puts $MAN_PATH + + set slow 0 + if { [info exists flags(-slow) ]} { + set slow 1 + } + + #set MAN_PATH [utl::get_input] + #if { [utl::check_valid_man_path $MAN_PATH] == false } { + # puts "Using default manpath." + # set MAN_PATH $DEFAULT_MAN_PATH + #} set man_path $MAN_PATH set man_sections {} @@ -43,7 +62,7 @@ proc man { name } { puts [join $page "\n"] # Ask user to continue or quit - if {[llength $lines] > $page_size} { + if {$slow && [llength $lines] > $page_size} { puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" flush stdout; set input [gets stdin] @@ -89,7 +108,7 @@ proc check_valid_path { path } { } proc check_valid_man_path { path } { - if {[file isdirectory "$path/man1"]} { + if {[file isdirectory "$path/cat1"]} { return true } else { puts "Invalid man path, please retry." From d041e28bc88adf44076ebdcc188b07c1ce65aa6c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 24 Jan 2024 15:56:52 +0000 Subject: [PATCH 38/88] fix outfiles ok file Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/test/count_outfiles.ok | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/man/test/count_outfiles.ok b/docs/man/test/count_outfiles.ok index 73098212bad..5027b8759ab 100644 --- a/docs/man/test/count_outfiles.ok +++ b/docs/man/test/count_outfiles.ok @@ -154,6 +154,7 @@ Info: 3, Warn: 7, Error: 37 ^ unexpected eof expecting "%", "\\label", "\\nonumber" or whitespace +cat/cat1/openroad.1 Level 1 doc counts are equal to 1. Level 2 doc counts are equal to 160. Level 3 doc counts are equal to 2783. From d007c9a190eb814916f827688b01f1af5d014d83 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Fri, 26 Jan 2024 14:34:22 +0000 Subject: [PATCH 39/88] first draft for dynamic changes Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/test/man_tcl_check.py | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/man/test/man_tcl_check.py diff --git a/docs/man/test/man_tcl_check.py b/docs/man/test/man_tcl_check.py new file mode 100644 index 00000000000..4f5170b2c44 --- /dev/null +++ b/docs/man/test/man_tcl_check.py @@ -0,0 +1,43 @@ +import os +import glob +import re + +# Essentially, anything that exists in help must exist in man AND Readme.md +# Objective for each Tcl: try to parse sta::define_cmd_args {} <= end +# sta::parse_key_args ... keys {}... flags{} <-end + +# Help pattern counts (correct ones are listed) +# ant 1, fin 1, mpl 2, dbsta/readverilog 3, ifp 3, utl 1 +# dst 3 (no readme), tap 5, grt 13, gui 7 (problematic..) +# pdn 9, psm 4, stt 1 (no readme), rsz 17 +# IOPlacer.tcl missing the sta::define_cmd_args for no args functions. +# rcx 9, pad.tcl what about sta::define_hidden_cmd_args +# upf 8 dpl 1 par 6 mpl2 3 gpl 2 rmp 1 +# dft.tcl does not have any sta::define_cmd_args! + +# TODO: THose commands inside namespace eval sta need special regex. define_cmd_args. (e.g. dbsta/dbsta) + +# Proc pattern counts + +# Man pattern counts +# + +for path in glob.glob("../../../src/*/src/*tcl"): + # special handling for pad, since it has 3 Tcls. + #if "pdn.tcl" not in path: continue + if "ICeWall" in path or "PdnGen" in path: + continue + + help_pattern = r'sta::define_cmd_args\s+"(.*?)"\s*{([^}]*)}' + proc_pattern = r'' + + with open(path) as f: + content = f.read() + matches = re.findall(help_pattern, content, re.DOTALL) + print(path, len(matches)) + for match in matches: + help_cmd, help_args = match[0], match[1] + #print(help_cmd) + #print(help_args) + + if not matches: print('not found.') From e47ce26684e08253581b91a2c530754afd934e92 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:46:16 +0000 Subject: [PATCH 40/88] add no_query to man, make utl messages show and utl readme Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/utl/CMakeLists.txt | 4 +++ src/utl/README.md | 63 ++++++++++++++++++++++++++++++++++++++++++ src/utl/src/Utl.tcl | 14 +++++----- 3 files changed, 74 insertions(+), 7 deletions(-) create mode 100644 src/utl/README.md diff --git a/src/utl/CMakeLists.txt b/src/utl/CMakeLists.txt index 76a4dd0d7f9..1ca03f11d1d 100644 --- a/src/utl/CMakeLists.txt +++ b/src/utl/CMakeLists.txt @@ -114,6 +114,10 @@ target_link_libraries(utl OpenSTA ) +messages( + TARGET utl +) + ############################################################ # Unit testing ############################################################\ diff --git a/src/utl/README.md b/src/utl/README.md new file mode 100644 index 00000000000..f071ceb82da --- /dev/null +++ b/src/utl/README.md @@ -0,0 +1,63 @@ +# Utilities + +The utility module houses of the manpage command in OpenROAD, +available from the `man` command. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Man + +This can be used for a range of commands in different levels as follows: +- `man1`: Top-level openroad command (e.g. `man openroad`) +- `man2`: Individual module commands (e.g. `man clock_tree_synthesis`) +- `man3`: Info, error, warning messages (e.g. `man CTS-0001`) + +```tcl +man + name + [-manpath manpath] + [-no_query] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-name` | Name of the command/message to query. | +| `-manpath` | Include optional path to manpage pages (e.g. ~/OpenROAD/docs/cat). | +| `-no_query` | This flag determines whether you wish to see all of the man output at once. Default value is `False`, which shows a buffered output. | + +## Example scripts + +## Regression tests + +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations + +## FAQs + +Check out +[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+utl) about this tool. + +## References + +## Authors + +MAN command is written by Jack Luar with guidance from members of the OpenROAD team, +including: Cho Moon, Matt Liberty. + +## License + +BSD 3-Clause License. See [LICENSE](../../LICENSE) file. diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index 9876bb511ce..dde6ee4e64f 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -3,10 +3,10 @@ set MAN_PATH "" sta::define_cmd_args "man" { name\ [-manpath manpath]\ - [-slow]} + [-no_query]} proc man { args } { sta::parse_key_args "man" args \ - keys {-manpath} flags {-slow} + keys {-manpath} flags {-no_query} set name [lindex $args 0] set DEFAULT_MAN_PATH "../docs/cat" @@ -21,9 +21,9 @@ proc man { args } { set MAN_PATH $DEFAULT_MAN_PATH } - set slow 0 - if { [info exists flags(-slow) ]} { - set slow 1 + set no_query 0 + if { [info exists flags(-no_query) ]} { + set no_query 1 } #set MAN_PATH [utl::get_input] @@ -55,14 +55,14 @@ proc man { args } { # Display content set lines [split $content "\n"] set num_lines [llength $lines] - set page_size 10 + set page_size 40 for {set i 0} {$i < $num_lines} {incr i $page_size} { set page [lrange $lines $i [expr {$i + $page_size - 1}]] puts [join $page "\n"] # Ask user to continue or quit - if {$slow && [llength $lines] > $page_size} { + if {!$no_query && [llength $lines] > $page_size} { puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" flush stdout; set input [gets stdin] From 9b4928900bc23366ea305c0180b886b92150cc37 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:49:10 +0000 Subject: [PATCH 41/88] minor formatting changes Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/scripts/manpage.py | 2 -- docs/man/scripts/md_roff_compat.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/man/scripts/manpage.py b/docs/man/scripts/manpage.py index a3c3ed4008d..a32476de118 100644 --- a/docs/man/scripts/manpage.py +++ b/docs/man/scripts/manpage.py @@ -27,7 +27,6 @@ def write_roff_file(self, dst_dir = './md/man2'): self.write_options(f) self.write_arguments(f) self.write_placeholder(f) #TODO. - self.write_copyright(f) def write_header(self, f, man_level): assert isinstance(f, io.TextIOBase) and\ @@ -37,7 +36,6 @@ def write_header(self, f, man_level): f.write(f"---\n") f.write(f"title: {self.name}({man_level[-1]})\n") - f.write(f"author: Jack Luar (TODO@TODO.com)\n") f.write(f"date: {self.datetime}\n") f.write(f"---\n") diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index 529a9053e7d..f410d0cab10 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -101,7 +101,7 @@ def man3(path=DEST_DIR3): manpage.name = f"{module}-{num}" if "with-total" in manpage.name: print(parts); exit() manpage.synopsis = "N/A." - manpage.desc = f"Severity: {level}\n\n{message}" + manpage.desc = f"Type: {level}\n\n{message}" manpage.write_roff_file(path) # tabulate counts From 2544f08199d76c428b2efa7df8c7a84b76254d96 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 27 Jan 2024 05:48:23 +0000 Subject: [PATCH 42/88] fix bug with displaying find_messages and parsing Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/man/scripts/md_roff_compat.py | 3 ++- etc/find_messages.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/man/scripts/md_roff_compat.py b/docs/man/scripts/md_roff_compat.py index f410d0cab10..dc3f50b0cb6 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/man/scripts/md_roff_compat.py @@ -96,7 +96,8 @@ def man3(path=DEST_DIR3): for line in f: parts = line.split() module, num, message, level = parts[0], parts[1],\ - " ".join(parts[4:-2]), parts[-2] + " ".join(parts[3:-2]), parts[-2] + print(module, num, message, level) manpage = ManPage() manpage.name = f"{module}-{num}" if "with-total" in manpage.name: print(parts); exit() diff --git a/etc/find_messages.py b/etc/find_messages.py index 7ab703107a8..843e0cbdfc7 100755 --- a/etc/find_messages.py +++ b/etc/find_messages.py @@ -110,6 +110,7 @@ def scan_file(path, file_name, msgs): # remove quotes and join strings message = match.group('message') + message = message.replace("\n", "") message = message.rstrip()[1:-1] message = re.sub(r'"\s*"', '', message) message_type = match.group('type').upper() From 2a52d2af71fa43e30cb7e4473efcd8aac47e88dd Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 27 Jan 2024 09:43:19 +0000 Subject: [PATCH 43/88] major man reorg. now man,html,cat contains only auto-generated files. also fixes to make tests more portable. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/.gitignore | 10 ++- docs/Makefile | 8 +-- docs/README.md | 7 +- docs/conf.py | 7 +- docs/man/README.md | 46 ------------- docs/man/test/man_func.tcl | 11 ---- docs/man/test/test_man_flags.tcl | 0 docs/man/test/test_man_noflags.ok | 1 - docs/man/test/test_man_noflags.tcl | 11 ---- docs/man/test/translator.py | 17 ----- docs/{man => }/md/man1/openroad.md | 5 -- docs/{man => }/md/man2/.gitignore | 0 docs/{man => }/md/man3/.gitignore | 0 docs/{man => src}/scripts/extract_utils.py | 0 docs/{man => src}/scripts/link_readmes.sh | 2 +- docs/{man => src}/scripts/main.tcl | 0 docs/{man => src}/scripts/manpage.py | 0 docs/{man => src}/scripts/md_roff_compat.py | 11 +--- docs/{man => src}/test/README.md | 0 docs/{man => src}/test/count_outfiles.ok | 68 ++++++++++---------- docs/{man => src}/test/count_outfiles.py | 10 +-- docs/src/test/extract_utils.py | 1 + docs/{man => src}/test/helpers.py | 0 docs/{man => src}/test/helpers.tcl | 0 docs/{man => src}/test/man_func.ok | 17 ++--- docs/src/test/man_func.tcl | 13 ++++ docs/{man => src}/test/man_tcl_check.py | 0 docs/src/test/manpage.py | 1 + docs/src/test/md_roff_compat.py | 1 + docs/{man => src}/test/regression | 0 docs/{man => src}/test/regression_tests.tcl | 0 docs/{man => src}/test/save_ok | 0 docs/{man => src}/test/translator.ok | 71 +++++++++++---------- docs/src/test/translator.py | 42 ++++++++++++ 34 files changed, 162 insertions(+), 198 deletions(-) delete mode 100644 docs/man/README.md delete mode 100644 docs/man/test/man_func.tcl delete mode 100644 docs/man/test/test_man_flags.tcl delete mode 100644 docs/man/test/test_man_noflags.ok delete mode 100644 docs/man/test/test_man_noflags.tcl delete mode 100644 docs/man/test/translator.py rename docs/{man => }/md/man1/openroad.md (94%) rename docs/{man => }/md/man2/.gitignore (100%) rename docs/{man => }/md/man3/.gitignore (100%) rename docs/{man => src}/scripts/extract_utils.py (100%) rename docs/{man => src}/scripts/link_readmes.sh (95%) rename docs/{man => src}/scripts/main.tcl (100%) rename docs/{man => src}/scripts/manpage.py (100%) rename docs/{man => src}/scripts/md_roff_compat.py (95%) rename docs/{man => src}/test/README.md (100%) rename docs/{man => src}/test/count_outfiles.ok (88%) rename docs/{man => src}/test/count_outfiles.py (86%) create mode 120000 docs/src/test/extract_utils.py rename docs/{man => src}/test/helpers.py (100%) rename docs/{man => src}/test/helpers.tcl (100%) rename docs/{man => src}/test/man_func.ok (94%) create mode 100644 docs/src/test/man_func.tcl rename docs/{man => src}/test/man_tcl_check.py (100%) create mode 120000 docs/src/test/manpage.py create mode 120000 docs/src/test/md_roff_compat.py rename docs/{man => src}/test/regression (100%) rename docs/{man => src}/test/regression_tests.tcl (100%) rename docs/{man => src}/test/save_ok (100%) rename docs/{man => src}/test/translator.ok (85%) create mode 100644 docs/src/test/translator.py diff --git a/docs/.gitignore b/docs/.gitignore index 18f8e4d4391..5f4b7bbeb0b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,12 +1,10 @@ # dont save intermediate results -man/md/man2/*md -man/md/man3/*md +md/man2/*md +md/man3/*md html -man/man1 -man/man2 -man/man3 +man cat # for doc tests -man/test/results +src/test/results diff --git a/docs/Makefile b/docs/Makefile index a85fe09fabf..6c5761dbd79 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,7 +11,7 @@ # Define variables PANDOC = pandoc -SRC_DIR = man/md +SRC_DIR = md MAN_ROOT_DIR = man HTML_ROOT_DIR = html CAT_ROOT_DIR = cat @@ -57,7 +57,7 @@ all: doc web cat # Target to do symlinks and pandoc-compatible conversion preprocess: - ./man/scripts/link_readmes.sh && python3 man/scripts/md_roff_compat.py + ./src/scripts/link_readmes.sh && python3 src/scripts/md_roff_compat.py # Target to generate all man pages doc: $(MAN1_PAGES) $(MAN2_PAGES) $(MAN3_PAGES) @@ -158,6 +158,6 @@ clean: rm -rf $(MAN1_DIR) $(MAN2_DIR) $(MAN3_DIR) rm -rf $(HTML1_DIR) $(HTML2_DIR) $(HTML3_DIR) rm -rf $(CAT1_DIR) $(CAT2_DIR) $(CAT3_DIR) - rm -rf ./man/md/man2/*md - rm -rf ./man/md/man3/*md + rm -rf ./md/man2/*md + rm -rf ./md/man3/*md rm -rf $(BUILDDIR) \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index f5a3badc388..f230e12a7ec 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,11 +12,14 @@ This on-line documentation is available at [https://openroad.readthedocs.io/en/l ### Build instructions for Pandoc manpages +The `-j16` command is optional for speeding up the manpage compilation process by using multiple jobs +based on the number of cores in your system. + ```shell make clean # Note this step is important as it regenerates the documentation using latest sources. -make preprocess && make all #-j16 +make preprocess && make all -j16 ``` #### To view manpages @@ -46,4 +49,4 @@ make html ``` shell make checklinks -``` \ No newline at end of file +``` diff --git a/docs/conf.py b/docs/conf.py index 112689a09c7..d58ae235708 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,9 +80,10 @@ 'main/src/odb/src/def/doc/README.md', 'main/src/odb/src/lef/README.md', 'main/docs', - 'man', - 'cat', - 'html' + 'md', # manpage dir + 'man', # manpage dir + 'cat', # manpage dir + 'html' # manpage dir ] # The name of the Pygments (syntax highlighting) style to use. diff --git a/docs/man/README.md b/docs/man/README.md deleted file mode 100644 index ba8b3ccb05b..00000000000 --- a/docs/man/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Man pages implementation - -## Prototype 1 (pandoc) - -- To install pandoc, refer to this [link](https://github.com/jgm/pandoc/blob/main/INSTALL.md). `apt-get` *should* just work for Ubuntu. -- Use pandoc to convert markdown to roff format. -- Ensure that all the source files are in `src` folder before runnig. -``` -make clean - -# Note this step is important as it regenerates the documentation using latest sources. -make preprocess && make all #-j16 -``` - -- Setup environment variables as follows. This is to avoid overwriting the system default for `MANPATH`. -``` -echo "MANDATORY_MANPATH $(pwd)" >> ~/.manpath -``` - -- Afterwards, you can read your manpages using: -``` -man template -``` - -### What about inside OpenROAD? - -- To run `man` commands inside OpenROAD, you can either use the Linux `man` binary: -```tcl -# create a man wrapper -source scripts/main.tcl -man openroad -``` - -- Or just within OpenROAD itself. -```tcl -# you will be prompted to enter the RELATIVE path to cat folders. -man openroad -``` - -## Prototype 2 (git-pages) - -- TODO, they use another word processor that seems more versatile called AsciiDoc. -- Reference: https://github.com/git/git/tree/master/Documentation - -## TODO -- pandoc not the most perfect, as pandoc does not seem to do the indentation perfectly as in other manpages. for the options section \ No newline at end of file diff --git a/docs/man/test/man_func.tcl b/docs/man/test/man_func.tcl deleted file mode 100644 index f1a114e1cf4..00000000000 --- a/docs/man/test/man_func.tcl +++ /dev/null @@ -1,11 +0,0 @@ -source "helpers.tcl" -# man functionality test - -# Objective: Run `man` to test these features -# - Running man with no set path. (TODO) -# - Setting a new manpath. This manpath probably leads to here. - -## KIV: Need to find out interactively is the OR folders. -## For now assume we are running in ~/OpenROAD/build - -set output [man openroad -manpath "../../cat"] \ No newline at end of file diff --git a/docs/man/test/test_man_flags.tcl b/docs/man/test/test_man_flags.tcl deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/man/test/test_man_noflags.ok b/docs/man/test/test_man_noflags.ok deleted file mode 100644 index 514ec6c455e..00000000000 --- a/docs/man/test/test_man_noflags.ok +++ /dev/null @@ -1 +0,0 @@ -Successly run man without arguments. diff --git a/docs/man/test/test_man_noflags.tcl b/docs/man/test/test_man_noflags.tcl deleted file mode 100644 index 7582525d07e..00000000000 --- a/docs/man/test/test_man_noflags.tcl +++ /dev/null @@ -1,11 +0,0 @@ -# Objective is to test man command with no arguments - -source main.tcl - -if {[catch {man man} result]} { - # An error occurred - puts "Error: $result" -} else { - # No error occurred - puts "Successly run man without arguments." -} \ No newline at end of file diff --git a/docs/man/test/translator.py b/docs/man/test/translator.py deleted file mode 100644 index f1e27214832..00000000000 --- a/docs/man/test/translator.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -import sys -sys.path.append('../scripts/') - -from md_roff_compat import man2, man3 - -# Test objective: if the translator script can run without errors for all the docs. -# goal is to return an error if the header cannot be extracted. - -# check man2 -os.chdir('../../') -os.system("./man/scripts/link_readmes.sh") -man2() - -# check man3 -man3() -os.system("make clean -s") \ No newline at end of file diff --git a/docs/man/md/man1/openroad.md b/docs/md/man1/openroad.md similarity index 94% rename from docs/man/md/man1/openroad.md rename to docs/md/man1/openroad.md index c55d5ecfc7e..68a96ed22bd 100644 --- a/docs/man/md/man1/openroad.md +++ b/docs/md/man1/openroad.md @@ -1,6 +1,5 @@ --- title: openroad(0) -author: Jack Luar (TODO@TODO.com) date: 2023/11/13 --- @@ -110,7 +109,3 @@ OpenROAD binary. # HISTORY # BUGS - -# COPYRIGHT - -Copyright (c) 2024, The Regents of the University of California. All rights reserved. \ No newline at end of file diff --git a/docs/man/md/man2/.gitignore b/docs/md/man2/.gitignore similarity index 100% rename from docs/man/md/man2/.gitignore rename to docs/md/man2/.gitignore diff --git a/docs/man/md/man3/.gitignore b/docs/md/man3/.gitignore similarity index 100% rename from docs/man/md/man3/.gitignore rename to docs/md/man3/.gitignore diff --git a/docs/man/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py similarity index 100% rename from docs/man/scripts/extract_utils.py rename to docs/src/scripts/extract_utils.py diff --git a/docs/man/scripts/link_readmes.sh b/docs/src/scripts/link_readmes.sh similarity index 95% rename from docs/man/scripts/link_readmes.sh rename to docs/src/scripts/link_readmes.sh index c0f4214503d..c8549d2866e 100755 --- a/docs/man/scripts/link_readmes.sh +++ b/docs/src/scripts/link_readmes.sh @@ -1,7 +1,7 @@ #!/bin/bash SRC_BASE_PATH="../src" -DEST_BASE_PATH="./man/md/man2" +DEST_BASE_PATH="./md/man2" mkdir -p $DEST_BASE_PATH # Loop through all folders inside "../src" diff --git a/docs/man/scripts/main.tcl b/docs/src/scripts/main.tcl similarity index 100% rename from docs/man/scripts/main.tcl rename to docs/src/scripts/main.tcl diff --git a/docs/man/scripts/manpage.py b/docs/src/scripts/manpage.py similarity index 100% rename from docs/man/scripts/manpage.py rename to docs/src/scripts/manpage.py diff --git a/docs/man/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py similarity index 95% rename from docs/man/scripts/md_roff_compat.py rename to docs/src/scripts/md_roff_compat.py index dc3f50b0cb6..3bd152f6e55 100644 --- a/docs/man/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -1,9 +1,3 @@ -""" -Usage: -cd /docs/manpages -python md_roff_compat.py -""" - import os from manpage import ManPage from extract_utils import extract_headers, extract_description, extract_tcl_code, extract_arguments, extract_tables, parse_switch @@ -22,13 +16,13 @@ "mpl2", "odb", "pad", "par", "pdn", "ppl", "psm",\ "rcx", "rmp", "rsz", "sta", "stt", "tap", "upf", "utl"] # Process man2 (except odb and sta) -DEST_DIR2 = SRC_DIR = "./man/md/man2" +DEST_DIR2 = SRC_DIR = "./md/man2" exclude = ["odb", "sta"] docs2 = [f"{SRC_DIR}/{tool}.md" for tool in tools if tool not in exclude] # Process man3 (add extra path for ORD messages) SRC_DIR = "../src" -DEST_DIR3 = "./man/md/man3" +DEST_DIR3 = "./md/man3" exclude = ["sta"] #sta excluded because its format is different, and no severity level. docs3 = [f"{SRC_DIR}/{tool}/messages.txt" for tool in tools if tool not in exclude] docs3.append("../messages.txt") @@ -97,7 +91,6 @@ def man3(path=DEST_DIR3): parts = line.split() module, num, message, level = parts[0], parts[1],\ " ".join(parts[3:-2]), parts[-2] - print(module, num, message, level) manpage = ManPage() manpage.name = f"{module}-{num}" if "with-total" in manpage.name: print(parts); exit() diff --git a/docs/man/test/README.md b/docs/src/test/README.md similarity index 100% rename from docs/man/test/README.md rename to docs/src/test/README.md diff --git a/docs/man/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok similarity index 88% rename from docs/man/test/count_outfiles.ok rename to docs/src/test/count_outfiles.ok index 5027b8759ab..40f95756cb0 100644 --- a/docs/man/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -1,46 +1,46 @@ -File linked from /workspace/src/ant/README.md to /workspace/docs/man/md/man2/ant.md +File linked from /workspace/src/ant/README.md to /workspace/docs/md/man2/ant.md ERROR: README.md not found in ../src/cmake -File linked from /workspace/src/cts/README.md to /workspace/docs/man/md/man2/cts.md +File linked from /workspace/src/cts/README.md to /workspace/docs/md/man2/cts.md ERROR: README.md not found in ../src/dbSta -File linked from /workspace/src/dft/README.md to /workspace/docs/man/md/man2/dft.md -File linked from /workspace/src/dpl/README.md to /workspace/docs/man/md/man2/dpl.md +File linked from /workspace/src/dft/README.md to /workspace/docs/md/man2/dft.md +File linked from /workspace/src/dpl/README.md to /workspace/docs/md/man2/dpl.md ERROR: README.md not found in ../src/dpo -File linked from /workspace/src/drt/README.md to /workspace/docs/man/md/man2/drt.md +File linked from /workspace/src/drt/README.md to /workspace/docs/md/man2/drt.md ERROR: README.md not found in ../src/dst -File linked from /workspace/src/fin/README.md to /workspace/docs/man/md/man2/fin.md -File linked from /workspace/src/gpl/README.md to /workspace/docs/man/md/man2/gpl.md -File linked from /workspace/src/grt/README.md to /workspace/docs/man/md/man2/grt.md -File linked from /workspace/src/gui/README.md to /workspace/docs/man/md/man2/gui.md -File linked from /workspace/src/ifp/README.md to /workspace/docs/man/md/man2/ifp.md -File linked from /workspace/src/mpl/README.md to /workspace/docs/man/md/man2/mpl.md -File linked from /workspace/src/mpl2/README.md to /workspace/docs/man/md/man2/mpl2.md -File linked from /workspace/src/odb/README.md to /workspace/docs/man/md/man2/odb.md -File linked from /workspace/src/pad/README.md to /workspace/docs/man/md/man2/pad.md -File linked from /workspace/src/par/README.md to /workspace/docs/man/md/man2/par.md -File linked from /workspace/src/pdn/README.md to /workspace/docs/man/md/man2/pdn.md -File linked from /workspace/src/ppl/README.md to /workspace/docs/man/md/man2/ppl.md -File linked from /workspace/src/psm/README.md to /workspace/docs/man/md/man2/psm.md -File linked from /workspace/src/rcx/README.md to /workspace/docs/man/md/man2/rcx.md -File linked from /workspace/src/rmp/README.md to /workspace/docs/man/md/man2/rmp.md -File linked from /workspace/src/rsz/README.md to /workspace/docs/man/md/man2/rsz.md -File linked from /workspace/src/sta/README.md to /workspace/docs/man/md/man2/sta.md +File linked from /workspace/src/fin/README.md to /workspace/docs/md/man2/fin.md +File linked from /workspace/src/gpl/README.md to /workspace/docs/md/man2/gpl.md +File linked from /workspace/src/grt/README.md to /workspace/docs/md/man2/grt.md +File linked from /workspace/src/gui/README.md to /workspace/docs/md/man2/gui.md +File linked from /workspace/src/ifp/README.md to /workspace/docs/md/man2/ifp.md +File linked from /workspace/src/mpl/README.md to /workspace/docs/md/man2/mpl.md +File linked from /workspace/src/mpl2/README.md to /workspace/docs/md/man2/mpl2.md +File linked from /workspace/src/odb/README.md to /workspace/docs/md/man2/odb.md +File linked from /workspace/src/pad/README.md to /workspace/docs/md/man2/pad.md +File linked from /workspace/src/par/README.md to /workspace/docs/md/man2/par.md +File linked from /workspace/src/pdn/README.md to /workspace/docs/md/man2/pdn.md +File linked from /workspace/src/ppl/README.md to /workspace/docs/md/man2/ppl.md +File linked from /workspace/src/psm/README.md to /workspace/docs/md/man2/psm.md +File linked from /workspace/src/rcx/README.md to /workspace/docs/md/man2/rcx.md +File linked from /workspace/src/rmp/README.md to /workspace/docs/md/man2/rmp.md +File linked from /workspace/src/rsz/README.md to /workspace/docs/md/man2/rsz.md +File linked from /workspace/src/sta/README.md to /workspace/docs/md/man2/sta.md ERROR: README.md not found in ../src/stt -File linked from /workspace/src/tap/README.md to /workspace/docs/man/md/man2/tap.md -File linked from /workspace/src/upf/README.md to /workspace/docs/man/md/man2/upf.md -ERROR: README.md not found in ../src/utl +File linked from /workspace/src/tap/README.md to /workspace/docs/md/man2/tap.md +File linked from /workspace/src/upf/README.md to /workspace/docs/md/man2/upf.md +File linked from /workspace/src/utl/README.md to /workspace/docs/md/man2/utl.md ant.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 cts.md Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 -./man/md/man2/dbSta.md doesn't exist. Continuing +./md/man2/dbSta.md doesn't exist. Continuing dft.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 dpl.md Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 -./man/md/man2/dpo.md doesn't exist. Continuing +./md/man2/dpo.md doesn't exist. Continuing drt.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./man/md/man2/dst.md doesn't exist. Continuing +./md/man2/dst.md doesn't exist. Continuing fin.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 gpl.md @@ -71,12 +71,13 @@ rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -./man/md/man2/stt.md doesn't exist. Continuing +./md/man2/stt.md doesn't exist. Continuing tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 -./man/md/man2/utl.md doesn't exist. Continuing +utl.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt @@ -154,7 +155,10 @@ Info: 3, Warn: 7, Error: 37 ^ unexpected eof expecting "%", "\\label", "\\nonumber" or whitespace +[WARNING] This document format requires a nonempty element. + Defaulting to 'utl' as the title. + To specify a title, use 'title' in metadata or --metadata title="...". cat/cat1/openroad.1 Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 160. -Level 3 doc counts are equal to 2783. +Level 2 doc counts are equal to 162. +Level 3 doc counts are equal to 2782. diff --git a/docs/man/test/count_outfiles.py b/docs/src/test/count_outfiles.py similarity index 86% rename from docs/man/test/count_outfiles.py rename to docs/src/test/count_outfiles.py index 3aba056f84b..bb2a6890175 100644 --- a/docs/man/test/count_outfiles.py +++ b/docs/src/test/count_outfiles.py @@ -1,19 +1,15 @@ import os import sys -sys.path.append('../scripts/') # Test objective: To count the number of expected files in man2/man3 # This script mimics the build process and checks expected output. -os.chdir("../../") +path = os.path.realpath("md_roff_compat.py") +docs_dir = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(docs_dir) os.system("make clean -s && make preprocess -s") os.system("make all -j16 -s") -# This tracks how many modules are being generated for man2. -# Please change this if modules are added! -MAN2_COUNT = 24 - - # Check if the files in html1 == cat1, html2 == cat2, html3 = cat3 for i in range(1, 4): man_dir = f"man/man{i}" diff --git a/docs/src/test/extract_utils.py b/docs/src/test/extract_utils.py new file mode 120000 index 00000000000..6222d07ceea --- /dev/null +++ b/docs/src/test/extract_utils.py @@ -0,0 +1 @@ +../scripts/extract_utils.py \ No newline at end of file diff --git a/docs/man/test/helpers.py b/docs/src/test/helpers.py similarity index 100% rename from docs/man/test/helpers.py rename to docs/src/test/helpers.py diff --git a/docs/man/test/helpers.tcl b/docs/src/test/helpers.tcl similarity index 100% rename from docs/man/test/helpers.tcl rename to docs/src/test/helpers.tcl diff --git a/docs/man/test/man_func.ok b/docs/src/test/man_func.ok similarity index 94% rename from docs/man/test/man_func.ok rename to docs/src/test/man_func.ok index df70baed28e..2b85e636d46 100644 --- a/docs/man/test/man_func.ok +++ b/docs/src/test/man_func.ok @@ -1,3 +1,5 @@ +. +/workspace/docs --- date: 2023/11/13 section: 0 @@ -6,6 +8,7 @@ title: openroad NAME ==== + openroad - OpenROAD command-line-interface. SYNOPSIS @@ -54,6 +57,7 @@ executed. EXAMPLES ======== + **openroad -help**: Prints the help information **openroad -version -exit**: Prints the version information, and exits @@ -93,6 +97,7 @@ These Tcl-based commands are callable from within the OpenROAD binary. - read_verilog filename - Read Verilog (.v) input file. + - write_verilog filename - Write Verilog (.v) file based on current database. @@ -102,6 +107,7 @@ These Tcl-based commands are callable from within the OpenROAD binary. - Read OpenDB (.odb) database files. - write_db filename + - Write OpenDB (.odb) database files. - write_abstract_lef filename @@ -123,14 +129,3 @@ HISTORY BUGS ==== -COPYRIGHT -========= - -Copyright (c) 2024, The Regents of the University of California. All -rights reserved. - -AUTHORS -======= - -Jack Luar (TODO\@TODO.com). - diff --git a/docs/src/test/man_func.tcl b/docs/src/test/man_func.tcl new file mode 100644 index 00000000000..ef5a6ec2da4 --- /dev/null +++ b/docs/src/test/man_func.tcl @@ -0,0 +1,13 @@ +source "helpers.tcl" +# Tcl man functionality test + +# Test 1) Running man path with set manpath variable. +set test_dir [file dirname [file normalize [info script]]] +puts $test_dir +set manpath_dir [file normalize [file dirname [file dirname [file normalize $test_dir]]]] +puts $manpath_dir +set manpath_dir "$manpath_dir/cat" +set output [man openroad -manpath $manpath_dir -no_query] + +# Test 2) Running manpath with no set manpath variable. #TODO +## KIV: Need to find out interactively is the OR folders. \ No newline at end of file diff --git a/docs/man/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py similarity index 100% rename from docs/man/test/man_tcl_check.py rename to docs/src/test/man_tcl_check.py diff --git a/docs/src/test/manpage.py b/docs/src/test/manpage.py new file mode 120000 index 00000000000..f6ff8d0e836 --- /dev/null +++ b/docs/src/test/manpage.py @@ -0,0 +1 @@ +../scripts/manpage.py \ No newline at end of file diff --git a/docs/src/test/md_roff_compat.py b/docs/src/test/md_roff_compat.py new file mode 120000 index 00000000000..3dab319e35c --- /dev/null +++ b/docs/src/test/md_roff_compat.py @@ -0,0 +1 @@ +../scripts/md_roff_compat.py \ No newline at end of file diff --git a/docs/man/test/regression b/docs/src/test/regression similarity index 100% rename from docs/man/test/regression rename to docs/src/test/regression diff --git a/docs/man/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl similarity index 100% rename from docs/man/test/regression_tests.tcl rename to docs/src/test/regression_tests.tcl diff --git a/docs/man/test/save_ok b/docs/src/test/save_ok similarity index 100% rename from docs/man/test/save_ok rename to docs/src/test/save_ok diff --git a/docs/man/test/translator.ok b/docs/src/test/translator.ok similarity index 85% rename from docs/man/test/translator.ok rename to docs/src/test/translator.ok index ca09fc1a62a..9235bc89703 100644 --- a/docs/man/test/translator.ok +++ b/docs/src/test/translator.ok @@ -1,46 +1,52 @@ -File linked from /workspace/src/ant/README.md to /workspace/docs/man/md/man2/ant.md -ERROR: README.md not found in ../src/cmake -File linked from /workspace/src/cts/README.md to /workspace/docs/man/md/man2/cts.md +rm -rf man/man1 man/man2 man/man3 +rm -rf html/html1 html/html2 html/html3 +rm -rf cat/cat1 cat/cat2 cat/cat3 +rm -rf ./md/man2/*md +rm -rf ./md/man3/*md +rm -rf build +File linked from /workspace/src/ant/README.md to /workspace/docs/md/man2/ant.md +File linked from /workspace/src/fin/README.md to /workspace/docs/md/man2/fin.md +File linked from /workspace/src/mpl/README.md to /workspace/docs/md/man2/mpl.md ERROR: README.md not found in ../src/dbSta -File linked from /workspace/src/dft/README.md to /workspace/docs/man/md/man2/dft.md -File linked from /workspace/src/dpl/README.md to /workspace/docs/man/md/man2/dpl.md -ERROR: README.md not found in ../src/dpo -File linked from /workspace/src/drt/README.md to /workspace/docs/man/md/man2/drt.md +File linked from /workspace/src/utl/README.md to /workspace/docs/md/man2/utl.md +File linked from /workspace/src/ifp/README.md to /workspace/docs/md/man2/ifp.md ERROR: README.md not found in ../src/dst -File linked from /workspace/src/fin/README.md to /workspace/docs/man/md/man2/fin.md -File linked from /workspace/src/gpl/README.md to /workspace/docs/man/md/man2/gpl.md -File linked from /workspace/src/grt/README.md to /workspace/docs/man/md/man2/grt.md -File linked from /workspace/src/gui/README.md to /workspace/docs/man/md/man2/gui.md -File linked from /workspace/src/ifp/README.md to /workspace/docs/man/md/man2/ifp.md -File linked from /workspace/src/mpl/README.md to /workspace/docs/man/md/man2/mpl.md -File linked from /workspace/src/mpl2/README.md to /workspace/docs/man/md/man2/mpl2.md -File linked from /workspace/src/odb/README.md to /workspace/docs/man/md/man2/odb.md -File linked from /workspace/src/pad/README.md to /workspace/docs/man/md/man2/pad.md -File linked from /workspace/src/par/README.md to /workspace/docs/man/md/man2/par.md -File linked from /workspace/src/pdn/README.md to /workspace/docs/man/md/man2/pdn.md -File linked from /workspace/src/ppl/README.md to /workspace/docs/man/md/man2/ppl.md -File linked from /workspace/src/psm/README.md to /workspace/docs/man/md/man2/psm.md -File linked from /workspace/src/rcx/README.md to /workspace/docs/man/md/man2/rcx.md -File linked from /workspace/src/rmp/README.md to /workspace/docs/man/md/man2/rmp.md -File linked from /workspace/src/rsz/README.md to /workspace/docs/man/md/man2/rsz.md -File linked from /workspace/src/sta/README.md to /workspace/docs/man/md/man2/sta.md +File linked from /workspace/src/tap/README.md to /workspace/docs/md/man2/tap.md +File linked from /workspace/src/grt/README.md to /workspace/docs/md/man2/grt.md +File linked from /workspace/src/gui/README.md to /workspace/docs/md/man2/gui.md +File linked from /workspace/src/pdn/README.md to /workspace/docs/md/man2/pdn.md +File linked from /workspace/src/psm/README.md to /workspace/docs/md/man2/psm.md ERROR: README.md not found in ../src/stt -File linked from /workspace/src/tap/README.md to /workspace/docs/man/md/man2/tap.md -File linked from /workspace/src/upf/README.md to /workspace/docs/man/md/man2/upf.md -ERROR: README.md not found in ../src/utl +File linked from /workspace/src/odb/README.md to /workspace/docs/md/man2/odb.md +File linked from /workspace/src/ppl/README.md to /workspace/docs/md/man2/ppl.md +File linked from /workspace/src/drt/README.md to /workspace/docs/md/man2/drt.md +File linked from /workspace/src/cts/README.md to /workspace/docs/md/man2/cts.md +File linked from /workspace/src/dpl/README.md to /workspace/docs/md/man2/dpl.md +File linked from /workspace/src/rmp/README.md to /workspace/docs/md/man2/rmp.md +File linked from /workspace/src/gpl/README.md to /workspace/docs/md/man2/gpl.md +File linked from /workspace/src/mpl2/README.md to /workspace/docs/md/man2/mpl2.md +File linked from /workspace/src/sta/README.md to /workspace/docs/md/man2/sta.md +File linked from /workspace/src/par/README.md to /workspace/docs/md/man2/par.md +File linked from /workspace/src/dft/README.md to /workspace/docs/md/man2/dft.md +ERROR: README.md not found in ../src/dpo +File linked from /workspace/src/upf/README.md to /workspace/docs/md/man2/upf.md +File linked from /workspace/src/pad/README.md to /workspace/docs/md/man2/pad.md +File linked from /workspace/src/rcx/README.md to /workspace/docs/md/man2/rcx.md +File linked from /workspace/src/rsz/README.md to /workspace/docs/md/man2/rsz.md +ERROR: README.md not found in ../src/cmake ant.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 cts.md Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 -./man/md/man2/dbSta.md doesn't exist. Continuing +./md/man2/dbSta.md doesn't exist. Continuing dft.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 dpl.md Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 -./man/md/man2/dpo.md doesn't exist. Continuing +./md/man2/dpo.md doesn't exist. Continuing drt.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./man/md/man2/dst.md doesn't exist. Continuing +./md/man2/dst.md doesn't exist. Continuing fin.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 gpl.md @@ -71,12 +77,13 @@ rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -./man/md/man2/stt.md doesn't exist. Continuing +./md/man2/stt.md doesn't exist. Continuing tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 -./man/md/man2/utl.md doesn't exist. Continuing +utl.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt diff --git a/docs/src/test/translator.py b/docs/src/test/translator.py new file mode 100644 index 00000000000..2b29034247c --- /dev/null +++ b/docs/src/test/translator.py @@ -0,0 +1,42 @@ +import os +import sys +from md_roff_compat import man2, man3 + +# Test objective: if the translator script can run without errors for all the docs. +# goal is to return an error if the header cannot be extracted. + +# go to 3rd parent directory. +path = os.path.realpath("md_roff_compat.py") +docs_dir = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(docs_dir) +os.system("make clean") + +# check man2 +SRC_BASE_PATH = "../src" +DEST_BASE_PATH = "./md/man2" + +# Create the destination directory if it doesn't exist +os.makedirs(DEST_BASE_PATH, exist_ok=True) + +# Loop through all folders inside "../src" +for module_path in os.listdir(SRC_BASE_PATH): + full_module_path = os.path.join(SRC_BASE_PATH, module_path) + + if os.path.isdir(full_module_path): + module = os.path.basename(full_module_path) + src_path = os.path.realpath(os.path.join(SRC_BASE_PATH, module, "README.md")) + dest_path = os.path.realpath(os.path.join(DEST_BASE_PATH, module + ".md")) + + # Check if README.md exists before copying + if os.path.exists(src_path): + # Create a symbolic link from src_path to dest_path + os.symlink(src_path, dest_path) + print(f"File linked from {src_path} to {dest_path}") + else: + print(f"ERROR: README.md not found in {full_module_path}") + +# Run man2 command +man2() + +# Run man3 command +man3() \ No newline at end of file From 0398fda3676d5e0e4f899c643268f36ffada2544 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:30:35 +0000 Subject: [PATCH 44/88] add compile man into buildscript Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- CMakeLists.txt | 17 +++++++++++++++++ etc/Build.sh | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e090d2d19c..308915e2bb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,3 +153,20 @@ if(ENABLE_TESTS) endif() add_subdirectory(src) + + +#################################################################### + +# Build docs + +option(BUILD_MAN "Enable building man pages" OFF) + +# Check if the optional target should be added +if(BUILD_MAN) + # TODO ADD install path for docs installation too. + add_custom_target( + man_page ALL + COMMAND make clean && make preprocess && make all -j16 + WORKING_DIRECTORY ${OPENROAD_HOME}/docs + ) +endif() \ No newline at end of file diff --git a/etc/Build.sh b/etc/Build.sh index d4b0aba1aa2..0178baa3223 100755 --- a/etc/Build.sh +++ b/etc/Build.sh @@ -43,6 +43,7 @@ OPTIONS: -coverage Enable cmake coverage options -clean Remove build dir before compile -no-gui Disable GUI support + -build-man Build Man Pages (optional) -threads=NUM_THREADS Number of threads to use during compile. Default: \`nproc\` on linux or \`sysctl -n hw.logicalcpu\` on macOS @@ -72,6 +73,9 @@ while [ "$#" -gt 0 ]; do -no-gui) cmakeOptions+=" -DBUILD_GUI=OFF" ;; + -build-man) + cmakeOptions+=" -DBUILD_MAN=ON" + ;; -compiler=*) compiler="${1#*=}" ;; From 9834a3223f353a775e7acc6671e409b644fe9b26 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 28 Jan 2024 09:27:46 +0000 Subject: [PATCH 45/88] now openroad more path agnostic Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- CMakeLists.txt | 10 ++++++---- src/CMakeLists.txt | 5 +++++ src/utl/src/Utl.tcl | 14 +++++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 308915e2bb7..87a32ea57d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,16 +157,18 @@ add_subdirectory(src) #################################################################### -# Build docs +# Build man pages (Optional) option(BUILD_MAN "Enable building man pages" OFF) - -# Check if the optional target should be added if(BUILD_MAN) - # TODO ADD install path for docs installation too. add_custom_target( man_page ALL COMMAND make clean && make preprocess && make all -j16 WORKING_DIRECTORY ${OPENROAD_HOME}/docs ) + + # Based on ${CMAKE_INSTALL_PREFIX}, we want to go to ${CMAKE_INSTALL_PREFIX}/share/man + set(MANPAGE_DIR ${OPENROAD_HOME}/docs/cat) + install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man) + endif() \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a30ef29ecfe..5f56bfaaa49 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -462,6 +462,11 @@ endif() # executable install(TARGETS openroad DESTINATION bin) + +if(BUILD_MAN) + install(DIRECTORY ${MANPAGE_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man) +endif() + ################################################################ add_custom_target(openroad_tags etags -o TAGS diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index dde6ee4e64f..0c7fac34387 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -9,7 +9,19 @@ proc man { args } { keys {-manpath} flags {-no_query} set name [lindex $args 0] - set DEFAULT_MAN_PATH "../docs/cat" + set DEFAULT_MAN_PATH "/usr/local/share/man/cat" + + # check the default man path based on executable path + set exec_output [info nameofexecutable] + + # Check if the output contains 'build/src' + if {[string match "*build/src*" $exec_output]} { + set executable_path [file normalize [file dirname [info nameofexecutable]]] + set man_path [file normalize [file dirname [file dirname $executable_path]]] + set DEFAULT_MAN_PATH [file join $man_path "docs" "cat"] + } + puts "Default man path $DEFAULT_MAN_PATH" + global MAN_PATH if { [info exists keys(-manpath) ]} { set MAN_PATH $keys(-manpath) From 10a880b03a8d3911ed71e29f68724b442ee840a1 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 28 Jan 2024 16:58:33 +0000 Subject: [PATCH 46/88] finish core code for dyn test, enforce new styling guideline forTcl code to always put flags {} even if no flags are used. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/scripts/md_roff_compat.py | 4 +- docs/src/test/man_tcl_check.py | 69 +++++++++++++++++++++++------- docs/src/test/regression_tests.tcl | 7 +-- src/dpl/src/Opendp.tcl | 3 +- src/gpl/src/replace.tcl | 7 +-- src/grt/src/GlobalRouter.tcl | 8 ++-- src/mpl2/src/mpl.tcl | 3 +- src/pdn/src/pdn.tcl | 6 ++- src/ppl/src/IOPlacer.tcl | 15 ++++--- src/rcx/src/OpenRCX.tcl | 6 ++- 10 files changed, 89 insertions(+), 39 deletions(-) diff --git a/docs/src/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py index 3bd152f6e55..56ce5375351 100644 --- a/docs/src/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -17,8 +17,8 @@ "rcx", "rmp", "rsz", "sta", "stt", "tap", "upf", "utl"] # Process man2 (except odb and sta) DEST_DIR2 = SRC_DIR = "./md/man2" -exclude = ["odb", "sta"] -docs2 = [f"{SRC_DIR}/{tool}.md" for tool in tools if tool not in exclude] +exclude2 = ["odb", "sta"] +docs2 = [f"{SRC_DIR}/{tool}.md" for tool in tools if tool not in exclude2] # Process man3 (add extra path for ORD messages) SRC_DIR = "../src" diff --git a/docs/src/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py index 4f5170b2c44..142dcfd2881 100644 --- a/docs/src/test/man_tcl_check.py +++ b/docs/src/test/man_tcl_check.py @@ -1,7 +1,12 @@ import os import glob import re +from md_roff_compat import exclude2 +from extract_utils import extract_tcl_code +path = os.path.realpath("md_roff_compat.py") +or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) +os.chdir(or_home) # Essentially, anything that exists in help must exist in man AND Readme.md # Objective for each Tcl: try to parse sta::define_cmd_args {} <= end # sta::parse_key_args ... keys {}... flags{} <-end @@ -17,27 +22,59 @@ # TODO: THose commands inside namespace eval sta need special regex. define_cmd_args. (e.g. dbsta/dbsta) -# Proc pattern counts +# Regexes +help_pattern = r'sta::define_cmd_args\s+"(.*?)"\s*{([^}]*)}' +proc_pattern = r'sta::parse_key_args\s+"(.*?)"\s*args\s*(.*?keys.*?})(.*?flags.*?})' +help_dict, proc_dict, readme_dict = {}, {}, {} -# Man pattern counts -# +# Directories to exclude (according to md_roff_compat) +exclude = exclude2 -for path in glob.glob("../../../src/*/src/*tcl"): - # special handling for pad, since it has 3 Tcls. - #if "pdn.tcl" not in path: continue - if "ICeWall" in path or "PdnGen" in path: - continue +total = 0 +for path in glob.glob("./src/*/src/*tcl"): + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue - help_pattern = r'sta::define_cmd_args\s+"(.*?)"\s*{([^}]*)}' - proc_pattern = r'' + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + # Help patterns with open(path) as f: content = f.read() matches = re.findall(help_pattern, content, re.DOTALL) - print(path, len(matches)) - for match in matches: - help_cmd, help_args = match[0], match[1] - #print(help_cmd) - #print(help_args) + #print(path, len(matches)) + help_dict[tool_dir] = len(matches) + #for match in matches: + # help_cmd, help_args = match[0], match[1] + + if not matches: + print(tool_dir) + print('not found.') + + # Proc patterns + with open(path) as f: + content = f.read() + matches = re.findall(proc_pattern, content, re.DOTALL) + #print(path, len(matches)) + proc_dict[tool_dir] = len(matches) + #if matches: + # for match in matches: print(match) + #for match in matches: + #cmd, keys, flags = match.group(1), match.group(2), match.group(3) + + if not matches: + print(tool_dir) + print('not found.') + +for path in glob.glob("./src/*/README.md"): + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + readme_dict[tool_dir] = len(extract_tcl_code(open(path).read())) + total += 1 + +print(total) - if not matches: print('not found.') +for path in help_dict: + print(path, help_dict[path], proc_dict[path], readme_dict[path]) \ No newline at end of file diff --git a/docs/src/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl index d24f65c311f..7420eb7e28b 100644 --- a/docs/src/test/regression_tests.tcl +++ b/docs/src/test/regression_tests.tcl @@ -1,5 +1,6 @@ record_tests { - translator - count_outfiles - man_func + #translator + #count_outfiles + #man_func + man_tcl_check } diff --git a/src/dpl/src/Opendp.tcl b/src/dpl/src/Opendp.tcl index b500ec62202..793f80067b1 100644 --- a/src/dpl/src/Opendp.tcl +++ b/src/dpl/src/Opendp.tcl @@ -36,7 +36,8 @@ sta::define_cmd_args "detailed_placement" {[-max_displacement disp|{disp_x disp_ proc detailed_placement { args } { sta::parse_key_args "detailed_placement" args \ - keys {-max_displacement -report_file_name} flags {-disallow_one_site_gaps} + keys {-max_displacement -report_file_name} flags {-disallow_one_site_gaps} \ + flags {} set disallow_one_site_gaps [info exists flags(-disallow_one_site_gaps)] if { [info exists keys(-max_displacement)] } { diff --git a/src/gpl/src/replace.tcl b/src/gpl/src/replace.tcl index 5ab822570f0..3205ab1d491 100644 --- a/src/gpl/src/replace.tcl +++ b/src/gpl/src/replace.tcl @@ -329,8 +329,8 @@ sta::define_cmd_args "cluster_flops" {\ proc cluster_flops { args } { sta::parse_key_args "cluster_flops" args \ - keys { -tray_weight -timing_weight -max_split_size } - + keys { -tray_weight -timing_weight -max_split_size } \ + flags {} set tray_weight 20.0 set timing_weight 1.0 @@ -383,7 +383,8 @@ proc global_placement_debug { args } { proc get_global_placement_uniform_density { args } { sta::parse_key_args "get_global_placement_uniform_density" args \ - keys { -pad_left -pad_right } + keys { -pad_left -pad_right } \ + flags {} # no need for init IP, TD and RD gpl::set_initial_place_max_iter_cmd 0 diff --git a/src/grt/src/GlobalRouter.tcl b/src/grt/src/GlobalRouter.tcl index 50923405204..7ebe5d8c50a 100644 --- a/src/grt/src/GlobalRouter.tcl +++ b/src/grt/src/GlobalRouter.tcl @@ -69,7 +69,7 @@ sta::define_cmd_args "set_global_routing_region_adjustment" { region \ proc set_global_routing_region_adjustment { args } { sta::parse_key_args "set_global_routing_region_adjustment" args \ - keys {-layer -adjustment} + keys {-layer -adjustment} flags {} if { ![ord::db_has_tech] } { utl::error GRT 47 "Missing dbTech." @@ -119,7 +119,7 @@ sta::define_cmd_args "set_routing_layers" { [-signal layers] \ proc set_routing_layers { args } { sta::parse_key_args "set_routing_layers" args \ - keys {-signal -clock} + keys {-signal -clock} flags {} sta::check_argc_eq0 "set_routing_layers" $args @@ -163,7 +163,7 @@ sta::define_cmd_args "set_global_routing_random" { [-seed seed] \ proc set_global_routing_random { args } { sta::parse_key_args "set_global_routing_random" args \ - keys { -seed -capacities_perturbation_percentage -perturbation_amount } + keys { -seed -capacities_perturbation_percentage -perturbation_amount } flags {} sta::check_argc_eq0 "set_global_routing_random" $args @@ -290,7 +290,7 @@ sta::define_cmd_args "repair_antennas" { [diode_cell] \ proc repair_antennas { args } { sta::parse_key_args "repair_antennas" args \ - keys {-iterations -ratio_margin} + keys {-iterations -ratio_margin} flags {} if { [grt::have_routes] } { if { [llength $args] == 0 } { # repairAntennas locates diode diff --git a/src/mpl2/src/mpl.tcl b/src/mpl2/src/mpl.tcl index da88ea22e22..d8955ca847d 100644 --- a/src/mpl2/src/mpl.tcl +++ b/src/mpl2/src/mpl.tcl @@ -77,7 +77,7 @@ proc rtl_macro_placer { args } { -bus_planning_flag \ -report_directory \ -write_macro_placement \ - } flag { } + } flags { } # # Check for valid design if { [ord::get_db_block] == "NULL" } { @@ -266,6 +266,7 @@ sta::define_cmd_args "place_macro" {-macro_name macro_name \ proc place_macro { args } { sta::parse_key_args "place_macro" args \ keys {-macro_name -location -orientation} \ + flag {} if [info exists keys(-macro_name)] { set macro_name $keys(-macro_name) diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index abe6571973d..d9b3964f329 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -89,7 +89,8 @@ sta::define_cmd_args "set_voltage_domain" {-name domain_name \ proc set_voltage_domain {args} { sta::parse_key_args "set_voltage_domain" args \ - keys {-name -region -power -ground -secondary_power -switched_power} + keys {-name -region -power -ground -secondary_power -switched_power} \ + flags {} sta::check_argc_eq0 "set_voltage_domain" $args @@ -210,7 +211,8 @@ sta::define_cmd_args "define_power_switch_cell" {-name <name> \ proc define_power_switch_cell {args} { sta::parse_key_args "define_power_switch_cell" args \ - keys {-name -control -acknowledge -power_switchable -power -ground} + keys {-name -control -acknowledge -power_switchable -power -ground} \ + flags {} sta::check_argc_eq0 "define_power_switch_cell" $args diff --git a/src/ppl/src/IOPlacer.tcl b/src/ppl/src/IOPlacer.tcl index b42490d6b96..ea1021aeac9 100644 --- a/src/ppl/src/IOPlacer.tcl +++ b/src/ppl/src/IOPlacer.tcl @@ -43,7 +43,8 @@ sta::define_cmd_args "define_pin_shape_pattern" {[-layer layer] \ proc define_pin_shape_pattern { args } { sta::parse_key_args "define_pin_shape_pattern" args \ - keys {-layer -x_step -y_step -region -size -pin_keepout} + keys {-layer -x_step -y_step -region -size -pin_keepout} \ + flags {} sta::check_argc_eq0 "define_pin_shape_pattern" $args @@ -254,7 +255,8 @@ sta::define_cmd_args "set_pin_length" {[-hor_length h_length]\ proc set_pin_length { args } { sta::parse_key_args "set_pin_length" args \ - keys {-hor_length -ver_length} + keys {-hor_length -ver_length} \ + flags {} sta::check_argc_eq0 "set_pin_length" $args @@ -273,7 +275,8 @@ sta::define_cmd_args "set_pin_length_extension" {[-hor_extension h_ext]\ proc set_pin_length_extension { args } { sta::parse_key_args "set_pin_length_extension" args \ - keys {-hor_extension -ver_extension} + keys {-hor_extension -ver_extension} \ + flags {} sta::check_argc_eq0 "set_pin_length_extension" $args @@ -292,7 +295,8 @@ sta::define_cmd_args "set_pin_thick_multiplier" {[-hor_multiplier h_mult]\ proc set_pin_thick_multiplier { args } { sta::parse_key_args "set_pin_thick_multiplier" args \ - keys {-hor_multiplier -ver_multiplier} + keys {-hor_multiplier -ver_multiplier} \ + flags {} sta::check_argc_eq0 "set_pin_thick_multiplier" $args @@ -313,7 +317,8 @@ sta::define_cmd_args "set_simulated_annealing" {[-temperature temperature]\ proc set_simulated_annealing { args } { sta::parse_key_args "set_simulated_annealing" args \ - keys {-temperature -max_iterations -perturb_per_iter -alpha} + keys {-temperature -max_iterations -perturb_per_iter -alpha} \ + flags {} if [info exists keys(-temperature)] { set temperature $keys(-temperature) diff --git a/src/rcx/src/OpenRCX.tcl b/src/rcx/src/OpenRCX.tcl index a522533c30b..36b7bd2cfa1 100644 --- a/src/rcx/src/OpenRCX.tcl +++ b/src/rcx/src/OpenRCX.tcl @@ -38,7 +38,8 @@ sta::define_cmd_args "define_process_corner" { } proc define_process_corner { args } { - sta::parse_key_args "define_process_corner" args keys {-ext_model_index} + sta::parse_key_args "define_process_corner" args \ + keys {-ext_model_index} flags {} sta::check_argc_eq1 "define_process_corner" $args set ext_model_index 0 @@ -160,7 +161,8 @@ proc adjust_rc { args } { sta::parse_key_args "adjust_rc" args keys \ { -res_factor -cc_factor - -gndc_factor } + -gndc_factor } \ + flags {} set res_factor 1.0 if { [info exists keys(-res_factor)] } { From 0304b416362edfa722f8c6a45e5c70d33f94281b Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 29 Jan 2024 19:56:29 +0000 Subject: [PATCH 47/88] enforce nodocs. all modules are fixed except for grt. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/man_tcl_check.py | 40 +++++++++++++++++++++++++++---- src/cts/src/TritonCTS.tcl | 2 +- src/dft/src/dft.tcl | 12 +++++++++- src/dpl/src/Opendp.tcl | 2 ++ src/drt/README.md | 4 ++-- src/drt/src/TritonRoute.tcl | 12 +++++----- src/gpl/README.md | 21 +++++++++++++++- src/gpl/src/replace.tcl | 4 ++-- src/grt/README.md | 20 ++++++++-------- src/grt/src/GlobalRouter.tcl | 13 ++++++++++ src/mpl/README.md | 2 +- src/mpl2/src/mpl.tcl | 1 + src/pad/src/pad.tcl | 2 +- src/pdn/README.md | 44 ++++++++++++++++++++++++++++++++++ src/pdn/src/pdn.tcl | 11 +++++---- src/ppl/src/IOPlacer.tcl | 2 ++ src/rcx/src/OpenRCX.tcl | 2 ++ src/rsz/README.md | 20 ++++++++++++++-- src/rsz/src/Resizer.tcl | 13 +++++++--- 19 files changed, 188 insertions(+), 39 deletions(-) diff --git a/docs/src/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py index 142dcfd2881..64ced9ebd5a 100644 --- a/docs/src/test/man_tcl_check.py +++ b/docs/src/test/man_tcl_check.py @@ -23,8 +23,22 @@ # TODO: THose commands inside namespace eval sta need special regex. define_cmd_args. (e.g. dbsta/dbsta) # Regexes -help_pattern = r'sta::define_cmd_args\s+"(.*?)"\s*{([^}]*)}' -proc_pattern = r'sta::parse_key_args\s+"(.*?)"\s*args\s*(.*?keys.*?})(.*?flags.*?})' +help_pattern = re.compile(r''' + sta::define_cmd_args\s+ + "(.*?)"\s* + {([^}]*)} + (\s*;\s*\#\s*no\s*docs)? + ''', + re.VERBOSE | re.DOTALL) +proc_pattern = re.compile(r''' + sta::parse_key_args\s+ + "(.*?)"\s* + args\s* + (.*?keys.*?}) + (.*?flags.*?}) + (\s*;\s*\#\s*no\s*docs)? + ''', + re.VERBOSE | re.DOTALL) help_dict, proc_dict, readme_dict = {}, {}, {} # Directories to exclude (according to md_roff_compat) @@ -43,8 +57,12 @@ # Help patterns with open(path) as f: content = f.read() - matches = re.findall(help_pattern, content, re.DOTALL) + matches = re.findall(help_pattern, content) #print(path, len(matches)) + # remove nodocs (usually dev commands) + matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] + + help_dict[tool_dir] = len(matches) #for match in matches: # help_cmd, help_args = match[0], match[1] @@ -56,7 +74,10 @@ # Proc patterns with open(path) as f: content = f.read() - matches = re.findall(proc_pattern, content, re.DOTALL) + matches = re.findall(proc_pattern, content) + # remove nodocs (usually dev commands) + matches = [tup for tup in matches if not tup[3].replace(" ","") == ";#nodocs"] + #print(path, len(matches)) proc_dict[tool_dir] = len(matches) #if matches: @@ -70,8 +91,17 @@ for path in glob.glob("./src/*/README.md"): if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + offset = 0 + tool_dir = os.path.dirname(path) - readme_dict[tool_dir] = len(extract_tcl_code(open(path).read())) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 total += 1 print(total) diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index 7e0b55a25e8..994c7161b0c 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -202,7 +202,7 @@ sta::define_cmd_args "report_cts" {[-out_file file] \ } proc report_cts { args } { sta::parse_key_args "report_cts" args \ - keys {-out_file} flags {} + keys {-out_file} flags {} ;#no docs sta::check_argc_eq0 "report_cts" $args diff --git a/src/dft/src/dft.tcl b/src/dft/src/dft.tcl index 77a6c9b7d98..b86d2915e91 100644 --- a/src/dft/src/dft.tcl +++ b/src/dft/src/dft.tcl @@ -29,6 +29,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +sta::define_cmd_args "preview_dft" { [-verbose]} + proc preview_dft { args } { sta::parse_key_args "preview_dft" args \ keys {} \ @@ -41,10 +43,16 @@ proc preview_dft { args } { dft::preview_dft $verbose } -proc insert_dft {} { +sta::define_cmd_args "insert_dft" { } +proc insert_dft { args } { + sta::parse_key_args "insert_dft" args \ + keys {} flags {} dft::insert_dft } + +sta::define_cmd_args "set_dft_config" { [-max_length max_length] \ + [-clock_mixing clock_mixing]} proc set_dft_config { args } { sta::parse_key_args "set_dft_config" args \ keys {-max_length -clock_mixing} \ @@ -65,6 +73,8 @@ proc set_dft_config { args } { } } +sta::define_cmd_args "report_dft_config" { } proc report_dft_config {} { + sta::parse_key_args "report_dft_config" args keys {} flags {} dft::report_dft_config } diff --git a/src/dpl/src/Opendp.tcl b/src/dpl/src/Opendp.tcl index 793f80067b1..d3d7ba67aa0 100644 --- a/src/dpl/src/Opendp.tcl +++ b/src/dpl/src/Opendp.tcl @@ -137,6 +137,7 @@ proc filler_placement { args } { sta::define_cmd_args "remove_fillers" {} proc remove_fillers { args } { + sta::parse_key_args "remove_fillers" args keys {} flags {} sta::check_argc_eq0 "remove_fillers" $args dpl::remove_fillers_cmd } @@ -159,6 +160,7 @@ proc check_placement { args } { sta::define_cmd_args "optimize_mirroring" {} proc optimize_mirroring { args } { + sta::parse_key_args "optimize_mirroring" args keys {} flags {} sta::check_argc_eq0 "optimize_mirroring" $args dpl::optimize_mirroring_cmd } diff --git a/src/drt/README.md b/src/drt/README.md index cd54c59b1a0..3383b606fc4 100644 --- a/src/drt/README.md +++ b/src/drt/README.md @@ -184,11 +184,11 @@ Additional setup is required. Please refer to this [guide](./doc/Distributed.md) | `-shared_volume` | The mount path of the nfs shared folder. | | `-cloud_size` | The number of workers. | -## Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonRoute.cpp) or the [swig file](./src/TritonRoute.i). -| Function Name | Description | +| Command Name | Description | | ----- | ----- | | `detailed_route_set_default_via` | Set default via. | | `detailed_route_set_unidirectional_layer` | Set unidirectional layer. | diff --git a/src/drt/src/TritonRoute.tcl b/src/drt/src/TritonRoute.tcl index 4cac4b0a644..c433be1d5e6 100644 --- a/src/drt/src/TritonRoute.tcl +++ b/src/drt/src/TritonRoute.tcl @@ -358,12 +358,12 @@ sta::define_cmd_args "detailed_route_run_worker" { [-dump_dir dir] [-worker_dir dir] [-drc_rpt drc] -} +};# no docs proc detailed_route_run_worker { args } { sta::parse_key_args "detailed_route_run_worker" args \ keys {-dump_dir -worker_dir -drc_rpt} \ - flags {} + flags {};# no docs sta::check_argc_eq0 "detailed_route_run_worker" $args if { [info exists keys(-dump_dir)] } { set dump_dir $keys(-dump_dir) @@ -393,12 +393,12 @@ sta::define_cmd_args "detailed_route_worker_debug" { [-marker_decay m_decay] [-ripup_mode mode] [-follow_guide f_guide] -} +};# no docs proc detailed_route_worker_debug { args } { sta::parse_key_args "detailed_route_worker_debug" args \ keys {-maze_end_iter -drc_cost -marker_cost -fixed_shape_cost -marker_decay -ripup_mode -follow_guide} \ - flags {} + flags {};# no docs if [info exists keys(-maze_end_iter)] { set maze_end_iter $keys(-maze_end_iter) } else { @@ -467,11 +467,11 @@ proc step_dr { args } { sta::define_cmd_args "check_drc" { [-box box] [-output_file filename] -} +};# no docs proc check_drc { args } { sta::parse_key_args "check_drc" args \ keys { -box -output_file } \ - flags {} + flags {};# no docs sta::check_argc_eq0 "check_drc" $args set box { 0 0 0 0 } if [info exists keys(-box)] { diff --git a/src/gpl/README.md b/src/gpl/README.md index 7084ec4f781..63d00028964 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -123,8 +123,27 @@ global_placement | `-timing_driven_net_weight_max` | Set the multiplier for the most timing-critical nets. The default value is `1.9`, and the allowed values are floats. | | `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. | +### Cluster Flops -### Useful Developer Commands +This command does flop clustering based on parameters. + +```tcl +cluster_flops + [-tray_weight tray_weight] \ + [-timing_weight timing_weight]\ + [-max_split_size max_split_size] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-tray_weight` | Tray weight, default value is 20.0, type `float`. | +| `-timing_weight` | Timing weight, default value is 1.0, type `float`. | +| `-max_split_size` | Maximum split size, default value is -1, type `int`.| + + +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i). diff --git a/src/gpl/src/replace.tcl b/src/gpl/src/replace.tcl index 3205ab1d491..e907f1b66de 100644 --- a/src/gpl/src/replace.tcl +++ b/src/gpl/src/replace.tcl @@ -356,7 +356,7 @@ namespace eval gpl { proc global_placement_debug { args } { sta::parse_key_args "global_placement_debug" args \ keys {-pause -update -inst} \ - flags {-draw_bins -initial} + flags {-draw_bins -initial};# no docs set pause 10 if { [info exists keys(-pause)] } { @@ -384,7 +384,7 @@ proc global_placement_debug { args } { proc get_global_placement_uniform_density { args } { sta::parse_key_args "get_global_placement_uniform_density" args \ keys { -pad_left -pad_right } \ - flags {} + flags {};# no docs # no need for init IP, TD and RD gpl::set_initial_place_max_iter_cmd 0 diff --git a/src/grt/README.md b/src/grt/README.md index 1e016398ea2..9810b5beaaf 100644 --- a/src/grt/README.md +++ b/src/grt/README.md @@ -352,14 +352,6 @@ global_route_debug | `-saveSttInput` | File name to save `stt` input of a net. | | `-net` | The name of the net name to be displayed. | -## Example scripts - -Examples scripts demonstrating how to run FastRoute on a sample design of `gcd` as follows: - -```shell -./test/gcd.tcl -``` - ### Read Guides This command reads global routing guides. @@ -374,18 +366,26 @@ read_guides file_name | ----- | ----- | | `file_name` | Path to global routing guide. | +## Example scripts + +Examples scripts demonstrating how to run FastRoute on a sample design of `gcd` as follows: + +```shell +./test/gcd.tcl +``` + ## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/GlobalRouter.cpp) or the [swig file](./src/GlobalRouter.i). -| Function Name | Description | +| Command Name | Description | | ----- | ----- | | `check_routing_layer` | Check if the layer is within the min/max routing layer specified. | | `parse_layer_name` | Get routing layer number from layer name | | `parse_layer_range` | Parses a range from `layer_range` argument of format (%s-%s). `cmd` argument is not used. | | `check_region` | Checks the defined region if its within the die area. | | `define_layer_range` | Provide a Tcl list of layers and automatically generate the min and max layers for signal routing. | -| `define_clock_layer_range| Provide a Tcl list of layers and automatically generate the min and max layers for clock routing. | +| `define_clock_layer_range` | Provide a Tcl list of layers and automatically generate the min and max layers for clock routing. | | `have_detailed_route` | Checks if block has detailed route already. | ## Regression tests diff --git a/src/grt/src/GlobalRouter.tcl b/src/grt/src/GlobalRouter.tcl index 7ebe5d8c50a..b36a35aa43c 100644 --- a/src/grt/src/GlobalRouter.tcl +++ b/src/grt/src/GlobalRouter.tcl @@ -36,6 +36,10 @@ sta::define_cmd_args "set_global_routing_layer_adjustment" { layer adj } proc set_global_routing_layer_adjustment { args } { + sta::parse_key_args "set_global_routing_layer_adjustment" args \ + keys {} \ + flags {} + if {[llength $args] == 2} { lassign $args layer adj @@ -135,6 +139,9 @@ proc set_routing_layers { args } { sta::define_cmd_args "set_macro_extension" { extension } proc set_macro_extension { args } { + sta::parse_key_args "set_macro_extension" args \ + keys {} \ + flags {} if {[llength $args] == 1} { lassign $args extension sta::check_positive_integer "macro_extension" $extension @@ -147,6 +154,9 @@ proc set_macro_extension { args } { sta::define_cmd_args "set_pin_offset" { offset } proc set_pin_offset { args } { + sta::parse_key_args "set_pin_offset" args \ + keys {} \ + flags {} if {[llength $args] == 1} { lassign $args offset sta::check_positive_integer "pin_offset" $offset @@ -363,6 +373,9 @@ proc set_nets_to_route { args } { sta::define_cmd_args "read_guides" { file_name } proc read_guides { args } { + sta::parse_key_args "read_guides" args \ + keys {} \ + flags {} set file_name $args grt::read_guides $file_name } diff --git a/src/mpl/README.md b/src/mpl/README.md index b63dcc2564b..84dd4fdb59d 100644 --- a/src/mpl/README.md +++ b/src/mpl/README.md @@ -48,7 +48,7 @@ macro_placement | `-style` | Placement style, to choose either `corner_max_wl` or `corner_min_wl`. The default value is `corner_max_wl`. | -## Useful developer functions +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/MacroPlacer.cpp) or the [swig file](./src/MacroPlacer.i). diff --git a/src/mpl2/src/mpl.tcl b/src/mpl2/src/mpl.tcl index d8955ca847d..76e94496371 100644 --- a/src/mpl2/src/mpl.tcl +++ b/src/mpl2/src/mpl.tcl @@ -302,6 +302,7 @@ proc place_macro { args } { sta::define_cmd_args "write_macro_placement" { file_name } proc write_macro_placement { args } { + sta::parse_key_args "write_macro_placement" args keys {} flags {} set file_name $args mpl2::write_macro_placement $file_name } diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index 45ed035cc1a..6679618a874 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -347,7 +347,7 @@ sta::define_hidden_cmd_args "make_fake_io_site" {-name name \ proc make_fake_io_site {args} { sta::parse_key_args "make_fake_io_site" args \ keys {-name -width -height} \ - flags {} + flags {};# no docs sta::check_argc_eq0 "make_fake_io_site" $args diff --git a/src/pdn/README.md b/src/pdn/README.md index 3f567be054d..45efd48ac41 100644 --- a/src/pdn/README.md +++ b/src/pdn/README.md @@ -230,6 +230,50 @@ add_pdn_stripe | `-number_of_straps` | Number of power/ground pairs to add. | | `-nets` | Limit straps to just this list of nets. | +### Add Sroute Connect + +The `add_sroute_connect` command is employed for connecting pins located +outside of a specific power domain to the power ring, especially in cases where +multiple power domains are present. During `sroute`, multi-cut vias will be added +for new connections. The use of fixed vias from the technology file should be +specified for the connection using the `add_sroute_connect` command. The use +of max_rows and max_columns defines the row and column limit for the via stack. + +Example: +``` +add_sroute_connect -net "VIN" -outerNet "VDD" -layers {met1 met4} -cut_pitch {200 200} -fixed_vias {M3M4_PR_M} -metalwidths {1000 1000} -metalspaces {800} -ongrid {met3 met4} -insts "temp_analog_1.a_header_0" +``` + +```tcl +add_sroute_connect + -layers list_of_2_layers + -cut_pitch pitch_value + [-net net] + [-outerNet outerNet] + [-fixed_vias list_of_vias] + [-max_rows rows] + [-max_columns columns] + [-metalwidths metalwidths] + [-metalspaces metalspaces] + [-ongrid ongrid_layers] + [-insts inst] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-net` | The inner net where the power ring exists. | +| `-outerNet` | The outer net where instances/pins that need to get connected exist. | +| `-layers` | The metal layers for vertical stripes within inner power ring. | +| `-cut_pitch` | Distance between via cuts when the two layers are parallel, e.g., overlapping stdcell rails. (Default:200 200) | +| `-fixed_vias` | List of fixed vias to be used to form the via stack. | +| `-max_rows` | Maximum number of rows when adding arrays of vias. (Default:10) | +| `-max_columns` | Maximum number of columns when adding arrays of vias. (Default:10) | +| `-metalwidths` | Width for each metal layer. | +| `-metalspaces` | Spacing of each metal layer. | +| `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | +| `-insts` | List of all the instances that contain the pin that needs to get connected with power ring. (Default:nothing) | ### Add PDN Ring diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index d9b3964f329..8941fd07ee5 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -184,6 +184,9 @@ sta::define_cmd_args "define_pdn_grid" {[-name <name>] \ [-power_control_network (STAR|DAISY)]} proc define_pdn_grid {args} { + sta::parse_key_args "define_pdn_grid" args \ + keys {-name -voltage_domains -orient -instances -cells -halo -pins -obstructions -power_switch_cell -power_control -power_control_network}\ + flags {-macro -existing} set is_macro 0 set is_existing 0 foreach arg $args { @@ -786,7 +789,7 @@ sta::define_hidden_cmd_args "convert_pdn_config" { config_file } proc convert_pdn_config { args } { sta::parse_key_args "convert_pdn_config" args \ keys {} \ - flags {} + flags {};# no docs sta::check_argc_eq1 "convert_pdn_config" $args @@ -843,7 +846,7 @@ namespace eval pdn { proc define_pdn_grid { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -pins -starts_with -obstructions -power_switch_cell -power_control -power_control_network} \ - flags {} + flags {};# no docs sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -917,7 +920,7 @@ namespace eval pdn { proc define_pdn_grid_existing { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -obstructions} \ - flags {-existing} + flags {-existing};#no docs sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -938,7 +941,7 @@ namespace eval pdn { proc define_pdn_grid_macro { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -orient -instances -cells -halo -pin_direction -starts_with -obstructions} \ - flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump} + flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump};# no docs sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" diff --git a/src/ppl/src/IOPlacer.tcl b/src/ppl/src/IOPlacer.tcl index ea1021aeac9..61600b73133 100644 --- a/src/ppl/src/IOPlacer.tcl +++ b/src/ppl/src/IOPlacer.tcl @@ -424,6 +424,8 @@ proc place_pin { args } { sta::define_cmd_args "write_pin_placement" { file_name } proc write_pin_placement { args } { + sta::parse_key_args "write_pin_placement" args \ + keys {} flags {} set file_name $args ppl::write_pin_placement $file_name } diff --git a/src/rcx/src/OpenRCX.tcl b/src/rcx/src/OpenRCX.tcl index 36b7bd2cfa1..9fed123fde5 100644 --- a/src/rcx/src/OpenRCX.tcl +++ b/src/rcx/src/OpenRCX.tcl @@ -286,6 +286,7 @@ proc bench_wires { args } { sta::define_cmd_args "bench_verilog" { filename } proc bench_verilog { args } { + sta::parse_key_args "bench_verilog" args keys {} flags{} sta::check_argc_eq1 "bench_verilog" $args rcx::bench_verilog $args } @@ -293,6 +294,7 @@ proc bench_verilog { args } { sta::define_cmd_args "bench_read_spef" { filename } proc bench_read_spef { args } { + sta::parse_key_args "bench_read_spef" args keys {} flags{} sta::check_argc_eq1 "bench_read_spef" $args rcx::read_spef $args } diff --git a/src/rsz/README.md b/src/rsz/README.md index 05c148cd92f..33fa21ad47e 100644 --- a/src/rsz/README.md +++ b/src/rsz/README.md @@ -100,7 +100,15 @@ or a list of cell names (`wildcards` allowed). For example, `DLY*` says do not use cells with names that begin with `DLY` in all libraries. ```tcl -set_dont_use lib_cells # unset_dont_use lib_cells +set_dont_use lib_cells +``` + +### Unset Dont Use + +The `unset_dont_use` command reverses the `set_dont_use` command. + +```tcl +unset_dont_use lib_cells ``` ### Set Dont Touch @@ -109,7 +117,15 @@ The `set_dont_touch` command prevents the resizer commands from modifying instances or nets. ```tcl -set_dont_touch instances_nets # unset_dont_touch instances_nets +set_dont_touch instances_nets +``` + +### Unset Dont Touch + +The `unset_dont_touch` command reverse the `set_dont_touch` command. + +```tcl +unset_dont_touch instances_nets ``` ### Buffer Ports diff --git a/src/rsz/src/Resizer.tcl b/src/rsz/src/Resizer.tcl index 35a4558dc23..d9ff34a58a0 100644 --- a/src/rsz/src/Resizer.tcl +++ b/src/rsz/src/Resizer.tcl @@ -241,12 +241,14 @@ proc estimate_parasitics { args } { sta::define_cmd_args "set_dont_use" {lib_cells} proc set_dont_use { args } { + sta::parse_key_args "set_dont_use" args keys {} flags {} set_dont_use_cmd "set_dont_use" $args 1 } sta::define_cmd_args "unset_dont_use" {lib_cells} proc unset_dont_use { args } { + sta::parse_key_args "unset_dont_use" args keys {} flags {} set_dont_use_cmd "unset_dont_use" $args 0 } @@ -260,12 +262,14 @@ proc set_dont_use_cmd { cmd cmd_args dont_use } { sta::define_cmd_args "set_dont_touch" {nets_instances} proc set_dont_touch { args } { + sta::parse_key_args "set_dont_touch" args keys {} flags {} set_dont_touch_cmd "set_dont_touch" $args 1 } sta::define_cmd_args "unset_dont_touch" {nets_instances} proc unset_dont_touch { args } { + sta::parse_key_args "unset_dont_touch" args keys {} flags {} set_dont_touch_cmd "unset_dont_touch" $args 0 } @@ -308,6 +312,7 @@ proc buffer_ports { args } { sta::define_cmd_args "remove_buffers" {} proc remove_buffers { args } { + sta::parse_key_args "remove_buffers" args keys {} flags {} sta::check_argc_eq0 "remove_buffers" $args rsz::remove_buffers_cmd } @@ -354,6 +359,7 @@ proc repair_clock_nets { args } { sta::define_cmd_args "repair_clock_inverters" {} proc repair_clock_inverters { args } { + sta::parse_key_args "repair_clock_nets" args keys {} flags {} sta::check_argc_eq0 "repair_clock_inverters" $args rsz::repair_clk_inverters_cmd } @@ -486,7 +492,8 @@ proc repair_timing { args } { sta::define_cmd_args "report_design_area" {} -proc report_design_area {} { +proc report_design_area { args } { + sta::parse_key_args "report_design_area" args keys {} flags {} set util [format %.0f [expr [rsz::utilization] * 100]] set area [sta::format_area [rsz::design_area] 0] utl::report "Design area ${area} u^2 ${util}% utilization." @@ -523,12 +530,12 @@ proc report_floating_nets { args } { utl::metric "timing__drv__floating__pins" $floating_pin_count } -sta::define_cmd_args "report_long_wires" {count} +sta::define_cmd_args "report_long_wires" {count};# no docs sta::proc_redirect report_long_wires { global sta_report_default_digits - sta::parse_key_args "report_long_wires" args keys {-digits} flags {} + sta::parse_key_args "report_long_wires" args keys {-digits} flags {};# no docs set digits $sta_report_default_digits if { [info exists keys(-digits)] } { From 330f109c8d3dfac03248cb6abbf4ab457303e639 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:27:24 +0000 Subject: [PATCH 48/88] first draft for dynamic test. checks for equality in help/proc/readme counts. also added missing readmes for stt and odb. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 18 +- docs/src/test/man_tcl_check.ok | 26 +++ docs/src/test/man_tcl_check.py | 10 +- docs/src/test/regression_tests.tcl | 6 +- docs/src/test/translator.ok | 13 +- src/grt/README.md | 53 ----- src/odb/README.md | 344 ++++++++++++++++++++++++++--- src/odb/src/db/odb.tcl | 22 +- src/stt/README.md | 73 ++++++ src/utl/src/Utl.tcl | 1 - 10 files changed, 461 insertions(+), 105 deletions(-) create mode 100644 docs/src/test/man_tcl_check.ok create mode 100644 src/stt/README.md diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index 40f95756cb0..0cd7f27e608 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -24,7 +24,7 @@ File linked from /workspace/src/rcx/README.md to /workspace/docs/md/man2/rcx.md File linked from /workspace/src/rmp/README.md to /workspace/docs/md/man2/rmp.md File linked from /workspace/src/rsz/README.md to /workspace/docs/md/man2/rsz.md File linked from /workspace/src/sta/README.md to /workspace/docs/md/man2/sta.md -ERROR: README.md not found in ../src/stt +File linked from /workspace/src/stt/README.md to /workspace/docs/md/man2/stt.md File linked from /workspace/src/tap/README.md to /workspace/docs/md/man2/tap.md File linked from /workspace/src/upf/README.md to /workspace/docs/md/man2/upf.md File linked from /workspace/src/utl/README.md to /workspace/docs/md/man2/utl.md @@ -44,9 +44,9 @@ Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 fin.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 gpl.md -Names: 2, Desc: 1, Syn: 1, Options: 2, Args: 2 +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 grt.md -Names: 15, Desc: 15, Syn: 15, Options: 15, Args: 15 +Names: 13, Desc: 13, Syn: 13, Options: 13, Args: 13 gui.md Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 ifp.md @@ -60,7 +60,7 @@ Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 par.md Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 pdn.md -Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 ppl.md Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 psm.md @@ -70,8 +70,9 @@ Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md -Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -./md/man2/stt.md doesn't exist. Continuing +Names: 16, Desc: 16, Syn: 16, Options: 16, Args: 16 +stt.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md @@ -155,10 +156,13 @@ Info: 3, Warn: 7, Error: 37 ^ unexpected eof expecting "%", "\\label", "\\nonumber" or whitespace +[WARNING] This document format requires a nonempty <title> element. + Defaulting to 'stt' as the title. + To specify a title, use 'title' in metadata or --metadata title="...". [WARNING] This document format requires a nonempty <title> element. Defaulting to 'utl' as the title. To specify a title, use 'title' in metadata or --metadata title="...". cat/cat1/openroad.1 Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 162. +Level 2 doc counts are equal to 166. Level 3 doc counts are equal to 2782. diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok new file mode 100644 index 00000000000..f661e62fea4 --- /dev/null +++ b/docs/src/test/man_tcl_check.ok @@ -0,0 +1,26 @@ +Tool Dir Help count Proc count Readme count +./src/ant 1 1 1 +./src/fin 1 1 1 +./src/mpl 2 2 1 +./src/utl 1 1 1 +./src/ifp 3 3 3 +./src/tap 5 5 5 +./src/grt 13 13 13 +./src/gui 7 7 7 +./src/pdn 9 9 9 +./src/psm 4 4 4 +./src/stt 1 1 1 +./src/ppl 10 10 10 +./src/drt 3 3 3 +./src/cts 3 3 3 +./src/dpl 6 6 6 +./src/rmp 1 1 1 +./src/gpl 2 2 2 +./src/mpl2 3 3 3 +./src/par 6 6 6 +./src/dft 4 4 4 +./src/upf 8 8 8 +./src/pad 13 13 13 +./src/rcx 9 9 9 +./src/rsz 16 16 16 +./src/odb 16 16 16 diff --git a/docs/src/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py index 64ced9ebd5a..ee8ddba0a8b 100644 --- a/docs/src/test/man_tcl_check.py +++ b/docs/src/test/man_tcl_check.py @@ -42,12 +42,14 @@ help_dict, proc_dict, readme_dict = {}, {}, {} # Directories to exclude (according to md_roff_compat) -exclude = exclude2 +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] total = 0 -for path in glob.glob("./src/*/src/*tcl"): +for path in glob.glob("./src/*/src/*tcl") + include: # exclude these dirs which are not compiled in man (do not have readmes). tool_dir = os.path.dirname(os.path.dirname(path)) + if "odb" in tool_dir: tool_dir = './src/odb' if not os.path.exists(f"{tool_dir}/README.md"): continue if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue @@ -103,8 +105,6 @@ # for pad, remove `make_fake_io_site` if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 total += 1 - -print(total) - +print("Tool Dir", "Help count", "Proc count", "Readme count") for path in help_dict: print(path, help_dict[path], proc_dict[path], readme_dict[path]) \ No newline at end of file diff --git a/docs/src/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl index 7420eb7e28b..dbbdfd07c0c 100644 --- a/docs/src/test/regression_tests.tcl +++ b/docs/src/test/regression_tests.tcl @@ -1,6 +1,6 @@ record_tests { - #translator - #count_outfiles - #man_func + translator + count_outfiles + man_func man_tcl_check } diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index 9235bc89703..d1d2662a98c 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -16,7 +16,7 @@ File linked from /workspace/src/grt/README.md to /workspace/docs/md/man2/grt.md File linked from /workspace/src/gui/README.md to /workspace/docs/md/man2/gui.md File linked from /workspace/src/pdn/README.md to /workspace/docs/md/man2/pdn.md File linked from /workspace/src/psm/README.md to /workspace/docs/md/man2/psm.md -ERROR: README.md not found in ../src/stt +File linked from /workspace/src/stt/README.md to /workspace/docs/md/man2/stt.md File linked from /workspace/src/odb/README.md to /workspace/docs/md/man2/odb.md File linked from /workspace/src/ppl/README.md to /workspace/docs/md/man2/ppl.md File linked from /workspace/src/drt/README.md to /workspace/docs/md/man2/drt.md @@ -50,9 +50,9 @@ Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 fin.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 gpl.md -Names: 2, Desc: 1, Syn: 1, Options: 2, Args: 2 +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 grt.md -Names: 15, Desc: 15, Syn: 15, Options: 15, Args: 15 +Names: 13, Desc: 13, Syn: 13, Options: 13, Args: 13 gui.md Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 ifp.md @@ -66,7 +66,7 @@ Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 par.md Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 pdn.md -Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 ppl.md Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 psm.md @@ -76,8 +76,9 @@ Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md -Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -./md/man2/stt.md doesn't exist. Continuing +Names: 16, Desc: 16, Syn: 16, Options: 16, Args: 16 +stt.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md diff --git a/src/grt/README.md b/src/grt/README.md index 9810b5beaaf..6b8fe9d09c1 100644 --- a/src/grt/README.md +++ b/src/grt/README.md @@ -120,42 +120,6 @@ set_global_routing_layer_adjustment layer adjustment | `adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | -### Set Routing Alpha - -This command sets routing alphas for a given net `net_name`. - -By default the global router uses heuristic rectilinear Steiner minimum -trees (RSMTs) as an initial basis to construct route guides. An RSMT -tries to minimize the total wirelength needed to connect a given set -of pins. The Prim-Dijkstra heuristic is an alternative net topology -algorithm that supports a trade-off between total wirelength and maximum -path depth from the net driver to its loads. The `set_routing_alpha` -command enables the Prim/Dijkstra algorithm and sets the alpha parameter -used to trade-off wirelength and path depth. Alpha is between 0.0 -and 1.0. When alpha is 0.0 the net topology minimizes total wirelength -(i.e. capacitance). When alpha is 1.0 it minimizes longest path between -the driver and loads (i.e., maximum resistance). Typical values are -0.4-0.8. You can call it multiple times for different nets. - -Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. - -```tcl -set_routing_alpha - [-net net_name] - [-min_fanout fanout] - [-min_hpwl hpwl] - alpha -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `-net` | Net name. | -| `-min_fanout` | Set the minimum number for fanout. | -| `-min_hpwl` | Set the minimum half-perimetere wirelength (microns). | -| `alpha` | Float between 0 and 1 describing the trade-off between wirelength and path depth. | - ### Set Global Routing Region Adjustment Set global routing region adjustment. @@ -259,23 +223,6 @@ repair_antennas | `-iterations` | Number of iterations. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | | `-ratio_margin` | Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. | -### Write Guides - -This command writes global routing guides, which can be used as input -for global routing. - -Example: `write_guides route.guide`. - -```tcl -write_guides file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `file_name` | Guide file name. | - ### Draw Route Guides diff --git a/src/odb/README.md b/src/odb/README.md index 17bff93d033..3e62a7c8f34 100644 --- a/src/odb/README.md +++ b/src/odb/README.md @@ -1,9 +1,9 @@ # OpenDB -OpenDB is a design database to support tools for physical chip design. It -was originally developed by Athena Design Systems. Nefelus, Inc. acquired -the rights to the code and open-sourced it with BSD-3 license in 2019 to support the DARPA -OpenROAD project. +The OpenDB (`odb`) module in OpenROAD is a design database to support tools for physical +chip design. It was originally developed by Athena Design Systems. +Nefelus, Inc. acquired the rights to the code and open-sourced it with BSD-3 license +in 2019 to support the DARPA OpenROAD project. The structure of OpenDB is based on the text file formats LEF (library) and DEF (design) formats version 5.6. OpenDB supports a @@ -14,6 +14,12 @@ OpenDB is written in C++ 98 with standard library style iterators. The classes are designed to be fast enough to base an application on without having to copy them into application-specific structures. +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` ## Directory structure @@ -32,24 +38,7 @@ We are still working on documenting the APIs. We have over 1,800 objects and functions that we are still documenting (for both TCL and Python). **Contributions are very welcome in this effort**. Find starting points below. -### TCL - -After building successfully, run OpenDB Tcl shell using -`../../build/src/odb/src/swig/tcl/odbtcl`. An example usage: - -``` -set db [dbDatabase_create] -set lef_parser [new_lefin $db true] -set tech [lefin_createTech $lef_parser ./src/odb/test/data/gscl45nm.lef] -``` - -You can find examples on using the API from Tcl under `test/tcl/` directory. - -The full set of the Tcl commands exposed can be found under -`./build/src/swig/tcl/opendb_wrapper.cpp`. Search for `SWIG_prefix`. - - -### Python +## Python After building successfully, run `openroad -python` to enable the Python interpreter. You can find examples on using the API from Python under @@ -64,7 +53,7 @@ print(', '.join(dir(openroad))) print(', '.join(dir(odb))) ``` -### C++ +## C++ All public database classes are defined in `db.h`. These class definitions provide all functions for examining and modifying the database objects. The @@ -89,15 +78,314 @@ database to have exactly the same layout across save/restores. The database distance units are **nanometers** and use the type `uint`. +### Create Physical Cluster + +Description TBC. + +```tcl +create_physical_cluster cluster_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `cluster_name` | Name of cluster. | + + +### Create Child Physical Clusters + +Description TBC. + +```tcl +create_child_physical_clusters + [-top_module] +or +create_child_physical_clusters + [-modinst path] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `top_module` | TBC. | +| `-modinst` | TBC. | + +### Set NDR Layer Rule + +Description TBC. + +```tcl +set_ndr_layer_rule + tech + ndr + layerName + input + isSpacing +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `tech` | TBC. | +| `ndr` | TBC. | +| `values` | TBC. | +| `isSpacing` | TBC. | + +### Set NDR Rules + +Description TBC. + +```tcl +set_ndr_rules + tech + ndr + values + isSpacing +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `tech` | TBC. | +| `ndr` | TBC. | +| `layerName` | TBC. | +| `input` | TBC. | + +### Create NDR + +Description TBC. + +```tcl +set_ndr_rules + -name name + [-spacing val] + [-width val] + [-via val] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-name` | TBC. | +| `-spacing` | TBC. | +| `-width` | TBC. | +| `-via` | TBC. | + +### Create Voltage Domain + +Description TBC. + +```tcl +create_voltage_domain + domain_name + -area {llx lly urx ury} +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-domain_name` | TBC. | +| `-area` | TBC. | + +### Delete Physical Cluster + +Description TBC. + +```tcl +delete_physical_cluster cluster_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `cluster_name` | TBC. | + +### Delete Voltage Domain + +Description TBC. + +```tcl +delete_voltage_domain domain_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `domain_name` | TBC. | + +### Assign Power Net + +Description TBC. + +```tcl +assign_power_net + -domain domain_name + -net snet_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-domain_name` | TBC. | +| `-net` | TBC. | + +### Assign Ground Net + +Description TBC. + +```tcl +assign_ground_net + -domain domain_name + -net snet_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-domain_name` | TBC. | +| `-net` | TBC. | + +### Add to Physical Cluster + +Description TBC. + +```tcl +add_to_physical_cluster + [-modinst path] + cluster_name +or +add_to_physical_cluster + [-inst inst_name] + cluster_name +or +add_to_physical_cluster + [-physical_cluster cluster_name] + cluster_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-modinst` | TBC. | +| `-inst` | TBC. | +| `-physical_cluster` | TBC. | +| `cluster_name` | TBC. | + +### Remove From Physical Cluster + +Description TBC. + +```tcl +remove_from_physical_cluster + [-parent_module module_name] + [-modinst modinst_name] + cluster_name +or +remove_from_physical_cluster + [-inst inst_name] + cluster_name +or +remove_from_physical_cluster + [-physical_cluster cluster_name] + cluster_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-parent_module` | TBC. | +| `-modinst` | TBC. | +| `-inst` | TBC. | +| `-physical_cluster` | TBC. | +| `-cluster_name` | TBC. | + +### Report Physical Clusters + +Description TBC. + +```tcl +report_physical_clusters +``` + +### Report Voltage Domains + +Description TBC. + +```tcl +report_voltage_domains +``` + +### Report Group + +Description TBC. + +```tcl +report_group group +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `group` | TBC. | + +### Write Guides + +This command writes global routing guides, which can be used as input +for global routing. + +Example: `write_guides route.guide`. + +```tcl +write_guides file_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `file_name` | Guide file name. | + + + + + ## Example scripts +After building successfully, run OpenDB Tcl shell using +`../../build/src/odb/src/swig/tcl/odbtcl`. An example usage: + +``` +set db [dbDatabase_create] +set lef_parser [new_lefin $db true] +set tech [lefin_createTech $lef_parser ./src/odb/test/data/gscl45nm.lef] +``` + +You can find examples on using the API from Tcl under `test/tcl/` directory. + +The full set of the Tcl commands exposed can be found under +`./build/src/swig/tcl/opendb_wrapper.cpp`. Search for `SWIG_prefix`. + ## Regression tests -There are a set of regression tests in /test. +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). -``` -./test/regression-tcl.sh -./test/regression-py.sh +Simply run the following script: + +```shell +./test/regression ``` ## Database Internals @@ -160,7 +448,7 @@ DRC on the whole chip). ## FAQs Check out -[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+fastroute+in%3Atitle) +[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+odb+in%3Atitle) about this tool. diff --git a/src/odb/src/db/odb.tcl b/src/odb/src/db/odb.tcl index 0ade91c2a99..719d52af9ad 100644 --- a/src/odb/src/db/odb.tcl +++ b/src/odb/src/db/odb.tcl @@ -1,7 +1,7 @@ - sta::define_cmd_args "create_physical_cluster" {cluster_name} proc create_physical_cluster { args } { + sta::parse_key_args "create_physical_cluster" args keys {} flags {} sta::check_argc_eq1 "create_physical_cluster" $args set cluster_name $args set db [ord::get_db] @@ -63,7 +63,11 @@ proc create_child_physical_clusters { args } { } } } + +sta::define_cmd_args "set_ndr_layer_rule" {tech ndr layerName input isSpacing} + proc set_ndr_layer_rule { tech ndr layerName input isSpacing} { + sta::parse_key_args "set_ndr_layer_rule" args keys {} flags {} set layer [$tech findLayer $layerName] if { $layer == "NULL" } { utl::warn ODB 1000 "Layer ${layerName} not found, skipping NDR for this layer" @@ -95,7 +99,11 @@ proc set_ndr_layer_rule { tech ndr layerName input isSpacing} { $rule setWidth $value } } + +sta::define_cmd_args "set_ndr_rules" {tech ndr values isSpacing} + proc set_ndr_rules { tech ndr values isSpacing } { + sta::parse_key_args "set_ndr_rules" args keys {} flags {} if { [llength $values] == 1 } { # Omitting layers set value [lindex $values 0] @@ -144,7 +152,10 @@ proc set_ndr_rules { tech ndr values isSpacing } { } } -sta::define_cmd_args "create_ndr" { -name name [-spacing val] [-width val] [-via val]} +sta::define_cmd_args "create_ndr" { -name name \ + [-spacing val] \ + [-width val] \ + [-via val]} proc create_ndr { args } { sta::parse_key_args "create_ndr" args keys {-name -spacing -width -via} flags {} @@ -228,6 +239,7 @@ proc create_voltage_domain { args } { sta::define_cmd_args "delete_physical_cluster" {cluster_name} proc delete_physical_cluster { args } { + sta::parse_key_args "delete_physical_cluster" args keys {} flags {} sta::check_argc_eq1 "delete_physical_cluster" $args set cluster_name $args set db [ord::get_db] @@ -249,6 +261,7 @@ proc delete_physical_cluster { args } { sta::define_cmd_args "delete_voltage_domain" {domain_name} proc delete_voltage_domain { args } { + sta::parse_key_args "delete_voltage_domain" args keys {} flags {} sta::check_argc_eq1 "delete_voltage_domain" $args set domain_name $args set db [ord::get_db] @@ -432,6 +445,7 @@ proc remove_from_physical_cluster { args } { sta::define_cmd_args "report_physical_clusters" {} proc report_physical_clusters {} { + sta::parse_key_args "report_physical_clusters" args keys {} flags {} set db [ord::get_db] set chip [$db getChip] if { $chip == "NULL" } { @@ -450,6 +464,7 @@ proc report_physical_clusters {} { sta::define_cmd_args "report_voltage_domains" {} proc report_voltage_domains {} { + sta::parse_key_args "report_voltage_domains" args keys {} flags {} set db [ord::get_db] set chip [$db getChip] if { $chip == "NULL" } { @@ -465,7 +480,9 @@ proc report_voltage_domains {} { } } +sta::define_cmd_args "report_group" {group} proc report_group { group } { + sta::parse_key_args "report_group" args keys {} flags {} utl::report "[expr \"[$group getType]\" == \"PHYSICAL_CLUSTER\" ? \"Physical Cluster\": \"Voltage Domain\"]: [$group getName]" if { [$group hasBox] } { set rect [$group getBox] @@ -511,6 +528,7 @@ proc report_group { group } { sta::define_cmd_args "write_guides" { filename } proc write_guides { args } { + sta::parse_key_args "write_guides" args keys {} flags {} sta::check_argc_eq1 "write_guides" $args set filename $args set db [ord::get_db] diff --git a/src/stt/README.md b/src/stt/README.md new file mode 100644 index 00000000000..0605e766526 --- /dev/null +++ b/src/stt/README.md @@ -0,0 +1,73 @@ +# Rectilinear Steiner Tree + +The steiner tree (`stt`) module in OpenROAD constructs steiner trees used in +the global routing (`grt`) module. Documentation is current under construction. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Set Routing Alpha + +This command sets routing alphas for a given net `net_name`. + +By default the global router uses heuristic rectilinear Steiner minimum +trees (RSMTs) as an initial basis to construct route guides. An RSMT +tries to minimize the total wirelength needed to connect a given set +of pins. The Prim-Dijkstra heuristic is an alternative net topology +algorithm that supports a trade-off between total wirelength and maximum +path depth from the net driver to its loads. The `set_routing_alpha` +command enables the Prim/Dijkstra algorithm and sets the alpha parameter +used to trade-off wirelength and path depth. Alpha is between 0.0 +and 1.0. When alpha is 0.0 the net topology minimizes total wirelength +(i.e. capacitance). When alpha is 1.0 it minimizes longest path between +the driver and loads (i.e., maximum resistance). Typical values are +0.4-0.8. You can call it multiple times for different nets. + +Example: `set_routing_alpha -net clk 0.3` sets the alpha value of 0.3 for net *clk*. + +```tcl +set_routing_alpha + [-net net_name] + [-min_fanout fanout] + [-min_hpwl hpwl] + alpha +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-net` | Net name. | +| `-min_fanout` | Set the minimum number for fanout. | +| `-min_hpwl` | Set the minimum half-perimetere wirelength (microns). | +| `alpha` | Float between 0 and 1 describing the trade-off between wirelength and path depth. | + +## Example scripts + +## Regression tests + +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations + +## FAQs + +Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+stt+in%3Atitle) +about this tool. + +## References + +## License + +BSD 3-Clause License. See [LICENSE](LICENSE) file. + diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index 0c7fac34387..c3ff1de5fd9 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -20,7 +20,6 @@ proc man { args } { set man_path [file normalize [file dirname [file dirname $executable_path]]] set DEFAULT_MAN_PATH [file join $man_path "docs" "cat"] } - puts "Default man path $DEFAULT_MAN_PATH" global MAN_PATH if { [info exists keys(-manpath) ]} { From e84a7d3278fbb9ebd2afcb7169bc36c12f47bd5a Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:36:29 +0000 Subject: [PATCH 49/88] functionize man_tcl_check and also introduce man_tcl_params dyn test. todo cts readme missing params Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/scripts/extract_utils.py | 32 +++++++++ docs/src/test/man_tcl_check.ok | 77 +++++++++++++------- docs/src/test/man_tcl_check.py | 87 +++++------------------ docs/src/test/man_tcl_params.py | 113 ++++++++++++++++++++++++++++++ src/cts/README.md | 12 +++- src/cts/src/TritonCTS.tcl | 9 +-- src/mpl/src/MacroPlacer.tcl | 4 +- 7 files changed, 229 insertions(+), 105 deletions(-) create mode 100644 docs/src/test/man_tcl_params.py diff --git a/docs/src/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py index 4e58dcc28cd..f1843a068ba 100644 --- a/docs/src/scripts/extract_utils.py +++ b/docs/src/scripts/extract_utils.py @@ -76,6 +76,38 @@ def extract_tables(text): return table_matches +def extract_help(text): + help_pattern = re.compile(r''' + sta::define_cmd_args\s+ + "(.*?)"\s* + {([^}]*)} + (\s*;\s*\#\s*no\s*docs)? + ''', + re.VERBOSE | re.DOTALL) + + matches = re.findall(help_pattern, text) + + # remove nodocs (usually dev commands) + matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] + return matches + +def extract_proc(text): + proc_pattern = re.compile(r''' + sta::parse_key_args\s+ + "(.*?)"\s* + args\s* + (.*?keys.*?}) + (.*?flags.*?}) + (\s*;\s*\#\s*no\s*docs)? + ''', + re.VERBOSE | re.DOTALL) + + matches = re.findall(proc_pattern, text) + + # remove nodocs (usually dev commands) + matches = [tup for tup in matches if not tup[3].replace(" ","") == ";#nodocs"] + return matches + def parse_switch(text): # Find the index of the 1nd and last occurrence of "|". Since some content might contain "|" switch_name = text.split("|")[1] diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index f661e62fea4..7f6cd0cc1a3 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -1,26 +1,51 @@ -Tool Dir Help count Proc count Readme count -./src/ant 1 1 1 -./src/fin 1 1 1 -./src/mpl 2 2 1 -./src/utl 1 1 1 -./src/ifp 3 3 3 -./src/tap 5 5 5 -./src/grt 13 13 13 -./src/gui 7 7 7 -./src/pdn 9 9 9 -./src/psm 4 4 4 -./src/stt 1 1 1 -./src/ppl 10 10 10 -./src/drt 3 3 3 -./src/cts 3 3 3 -./src/dpl 6 6 6 -./src/rmp 1 1 1 -./src/gpl 2 2 2 -./src/mpl2 3 3 3 -./src/par 6 6 6 -./src/dft 4 4 4 -./src/upf 8 8 8 -./src/pad 13 13 13 -./src/rcx 9 9 9 -./src/rsz 16 16 16 -./src/odb 16 16 16 +Tool Dir Help count Proc count Readme count +./src/ant 1 1 1 +Command counts match. +./src/fin 1 1 1 +Command counts match. +./src/mpl 1 1 1 +Command counts match. +./src/utl 1 1 1 +Command counts match. +./src/ifp 3 3 3 +Command counts match. +./src/tap 5 5 5 +Command counts match. +./src/grt 13 13 13 +Command counts match. +./src/gui 7 7 7 +Command counts match. +./src/pdn 9 9 9 +Command counts match. +./src/psm 4 4 4 +Command counts match. +./src/stt 1 1 1 +Command counts match. +./src/ppl 10 10 10 +Command counts match. +./src/drt 3 3 3 +Command counts match. +./src/cts 3 3 3 +Command counts match. +./src/dpl 6 6 6 +Command counts match. +./src/rmp 1 1 1 +Command counts match. +./src/gpl 2 2 2 +Command counts match. +./src/mpl2 3 3 3 +Command counts match. +./src/par 6 6 6 +Command counts match. +./src/dft 4 4 4 +Command counts match. +./src/upf 8 8 8 +Command counts match. +./src/pad 13 13 13 +Command counts match. +./src/rcx 9 9 9 +Command counts match. +./src/rsz 16 16 16 +Command counts match. +./src/odb 16 16 16 +Command counts match. diff --git a/docs/src/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py index ee8ddba0a8b..d1ba2fcec56 100644 --- a/docs/src/test/man_tcl_check.py +++ b/docs/src/test/man_tcl_check.py @@ -1,51 +1,19 @@ import os import glob import re -from md_roff_compat import exclude2 -from extract_utils import extract_tcl_code +from extract_utils import extract_tcl_code, extract_help, extract_proc +# Test objective: Make sure similar output in all three: help, proc, and readme path = os.path.realpath("md_roff_compat.py") or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) os.chdir(or_home) -# Essentially, anything that exists in help must exist in man AND Readme.md -# Objective for each Tcl: try to parse sta::define_cmd_args {} <= end -# sta::parse_key_args ... keys {}... flags{} <-end -# Help pattern counts (correct ones are listed) -# ant 1, fin 1, mpl 2, dbsta/readverilog 3, ifp 3, utl 1 -# dst 3 (no readme), tap 5, grt 13, gui 7 (problematic..) -# pdn 9, psm 4, stt 1 (no readme), rsz 17 -# IOPlacer.tcl missing the sta::define_cmd_args for no args functions. -# rcx 9, pad.tcl what about sta::define_hidden_cmd_args -# upf 8 dpl 1 par 6 mpl2 3 gpl 2 rmp 1 -# dft.tcl does not have any sta::define_cmd_args! - -# TODO: THose commands inside namespace eval sta need special regex. define_cmd_args. (e.g. dbsta/dbsta) - -# Regexes -help_pattern = re.compile(r''' - sta::define_cmd_args\s+ - "(.*?)"\s* - {([^}]*)} - (\s*;\s*\#\s*no\s*docs)? - ''', - re.VERBOSE | re.DOTALL) -proc_pattern = re.compile(r''' - sta::parse_key_args\s+ - "(.*?)"\s* - args\s* - (.*?keys.*?}) - (.*?flags.*?}) - (\s*;\s*\#\s*no\s*docs)? - ''', - re.VERBOSE | re.DOTALL) help_dict, proc_dict, readme_dict = {}, {}, {} # Directories to exclude (according to md_roff_compat) exclude = ["sta"] include = ["./src/odb/src/db/odb.tcl"] -total = 0 for path in glob.glob("./src/*/src/*tcl") + include: # exclude these dirs which are not compiled in man (do not have readmes). tool_dir = os.path.dirname(os.path.dirname(path)) @@ -56,55 +24,34 @@ # special handling for pad, since it has 3 Tcls. if "ICeWall" in path or "PdnGen" in path: continue - # Help patterns with open(path) as f: + # Help patterns content = f.read() - matches = re.findall(help_pattern, content) - #print(path, len(matches)) - # remove nodocs (usually dev commands) - matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] - - + matches = extract_help(content) help_dict[tool_dir] = len(matches) - #for match in matches: - # help_cmd, help_args = match[0], match[1] - if not matches: - print(tool_dir) - print('not found.') - - # Proc patterns - with open(path) as f: - content = f.read() - matches = re.findall(proc_pattern, content) - # remove nodocs (usually dev commands) - matches = [tup for tup in matches if not tup[3].replace(" ","") == ";#nodocs"] - - #print(path, len(matches)) + # Proc patterns + matches = extract_proc(content) proc_dict[tool_dir] = len(matches) - #if matches: - # for match in matches: print(match) - #for match in matches: - #cmd, keys, flags = match.group(1), match.group(2), match.group(3) - - if not matches: - print(tool_dir) - print('not found.') for path in glob.glob("./src/*/README.md"): if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue - offset = 0 - tool_dir = os.path.dirname(path) # for gui, filter out the gui:: for separate processing results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] - readme_dict[tool_dir] = len(results) - # for pad, remove `make_fake_io_site` + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 - total += 1 -print("Tool Dir", "Help count", "Proc count", "Readme count") + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + for path in help_dict: - print(path, help_dict[path], proc_dict[path], readme_dict[path]) \ No newline at end of file + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py new file mode 100644 index 00000000000..7eb519c50ce --- /dev/null +++ b/docs/src/test/man_tcl_params.py @@ -0,0 +1,113 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +def clean_whitespaces(text): + tmp = text.strip().replace("\\", "").replace("\n", "") + return " ".join(tmp.split()) + +def clean_parse_syntax(text): + tmp = text.replace("keys", "").replace("flags", "")\ + .replace("{", "").replace("}", "") + return ' '.join([f'[{option}]' for option in tmp.split()]) + +def check_function_signatures(text1, text2): + set1 = set(match.group(1) for \ + match in re.finditer(r'\[([^\]]+)\]', text1)) + set1 = {x.split()[0] for x in set1} + + set2 = set(match.group(1) for \ + match in re.finditer(r'\[([^\]]+)\]', text2)) + set2 = {x.split()[0] for x in set2} + + if set1 == set2: return True + print(set1) + print(set2) + return False + +# Test this tool +tool = "cts" + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.path.realpath("md_roff_compat.py") +or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) +os.chdir(or_home) + +# Regexes +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + if tool not in path: continue + + # Help patterns + content = f.read() + matches = extract_help(content) + + for match in matches: + cmd, rest = match[0], match[1] + cmd, rest = clean_whitespaces(cmd), clean_whitespaces(rest) + help_dict[cmd] = rest + #print(cmd, rest) + + # Proc patterns + matches = extract_proc(content) + + for match in matches: + cmd, keys, flags = match[0], match[1], match[2] + cmd, rest = clean_whitespaces(cmd), clean_whitespaces(keys + " " + flags) + rest = clean_parse_syntax(rest) + proc_dict[cmd] = rest + # print(cmd, rest) + + +for path in glob.glob("./src/*/README.md"): + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + if tool not in path: continue + + # for gui, filter out the gui:: for separate processing + matches = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + + # for pad, remove `make_fake_io_site` + if 'pad' in tool_dir: + matches = [x for x in matches if "make_fake_io_site" not in x] + + for match in matches: + cmd = match.split()[0] + rest = " ".join(match.split()[1:]) + readme_dict[cmd] = rest + # print(cmd, rest) + +for cmd in help_dict: + print(cmd) + isValid = True + if cmd not in help_dict: print("command not parsed in help_dict"); isValid = False + if cmd not in proc_dict: print("command not parsed in proc_dict"); isValid = False + if cmd not in readme_dict: print("command not parsed in readme_dict"); isValid = False + + # If invalid, don't need to test further. + if not isValid: + print("Skipping keys/flag testing") + continue + + # Test switches here + s1, s2, s3 = help_dict[cmd], proc_dict[cmd], readme_dict[cmd] + print(f"Help/Proc: {check_function_signatures(s1,s2)}") + print(f"Help/Rdme: {check_function_signatures(s1,s3)}") + print(f"Proc/Rdme: {check_function_signatures(s2,s3)}") \ No newline at end of file diff --git a/src/cts/README.md b/src/cts/README.md index e4fd32ce8ce..6ebbeec3e6d 100644 --- a/src/cts/README.md +++ b/src/cts/README.md @@ -42,20 +42,26 @@ Perform clock tree synthesis. ```tcl clock_tree_synthesis - -buf_list <list_of_buffers> - [-root_buf root_buf] [-wire_unit wire_unit] + [-buf_list <list_of_buffers>] + [-root_buf root_buf] [-clk_nets <list_of_clk_nets>] + [-tree_buf <buf>] [-distance_between_buffers] [-branching_point_buffers_distance] [-clustering_exponent] [-clustering_unbalance_ratio] - [-sink_clustering_enable] [-sink_clustering_size cluster_size] [-sink_clustering_max_diameter max_diameter] + [-sink_clustering_enable] [-balance_levels] + [-sink_clustering_levels levels] [-num_static_layers] [-sink_clustering_buffer] + [-obstruction_aware] + [-apply_ndr] + [-insertion_delay] + [-post_cts_disable] ``` #### Options diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index 994c7161b0c..88412975471 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -85,8 +85,9 @@ sta::define_cmd_args "clock_tree_synthesis" {[-wire_unit unit] [-num_static_layers] \ [-sink_clustering_buffer] \ [-obstruction_aware] \ - [-apply_ndr] \ - [-insertion_delay] + [-apply_ndr] \ + [-insertion_delay] \ + [-post_cts_disable] } proc clock_tree_synthesis { args } { @@ -202,7 +203,7 @@ sta::define_cmd_args "report_cts" {[-out_file file] \ } proc report_cts { args } { sta::parse_key_args "report_cts" args \ - keys {-out_file} flags {} ;#no docs + keys {-out_file} flags {} sta::check_argc_eq0 "report_cts" $args @@ -217,7 +218,7 @@ proc report_cts { args } { namespace eval cts { proc clock_tree_synthesis_debug { args } { sta::parse_key_args "clock_tree_synthesis_debug" args \ - keys {} flags {-plot} + keys {} flags {-plot}; # no docs sta::check_argc_eq0 "clock_tree_synthesis_debug" $args cts::set_plot_option [info exists flags(-plot)] diff --git a/src/mpl/src/MacroPlacer.tcl b/src/mpl/src/MacroPlacer.tcl index 99df412fa0c..2c268f45423 100644 --- a/src/mpl/src/MacroPlacer.tcl +++ b/src/mpl/src/MacroPlacer.tcl @@ -118,13 +118,13 @@ proc macro_placement { args } { sta::define_cmd_args "macro_placement_debug" { [-partitions] -} +}; # no docs # This seg faults if the gui is not present -cherry proc macro_placement_debug { args } { sta::parse_key_args "macro_placement_debug" args \ keys {} \ - flags {-partitions} + flags {-partitions}; # no docs set partitions [info exists flags(-partitions)] From e43214e016c903042c0333e95a86ebd4cf0f0779 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 31 Jan 2024 19:12:23 +0000 Subject: [PATCH 50/88] fix extract help bug that had troubles extracting [-param {}] dyn test do until mpl Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/scripts/extract_utils.py | 7 ++++--- docs/src/test/man_tcl_params.py | 5 ++++- src/dpl/README.md | 4 ++-- src/drt/README.md | 7 +++++-- src/drt/src/TritonRoute.tcl | 5 +++-- src/gpl/README.md | 7 ++++--- src/grt/README.md | 2 ++ src/grt/src/GlobalRouter.tcl | 4 +++- src/mpl/src/MacroPlacer.tcl | 2 +- 9 files changed, 28 insertions(+), 15 deletions(-) diff --git a/docs/src/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py index f1843a068ba..f6ddd3aa430 100644 --- a/docs/src/scripts/extract_utils.py +++ b/docs/src/scripts/extract_utils.py @@ -77,18 +77,19 @@ def extract_tables(text): return table_matches def extract_help(text): + # Logic now captures everything between { to earliest "proc" help_pattern = re.compile(r''' sta::define_cmd_args\s+ "(.*?)"\s* - {([^}]*)} - (\s*;\s*\#\s*no\s*docs)? + (.*?)proc ''', re.VERBOSE | re.DOTALL) matches = re.findall(help_pattern, text) # remove nodocs (usually dev commands) - matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] + matches = [tup for tup in matches if ";#nodocs" not in tup[1].replace(" ","")] + #matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] return matches def extract_proc(text): diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py index 7eb519c50ce..0e8693cbb60 100644 --- a/docs/src/test/man_tcl_params.py +++ b/docs/src/test/man_tcl_params.py @@ -27,7 +27,8 @@ def check_function_signatures(text1, text2): return False # Test this tool -tool = "cts" +tool = "grt" +tool = f"./src/{tool}/" # Test objective: Make sure similar output in all three: help, proc, and readme path = os.path.realpath("md_roff_compat.py") @@ -80,6 +81,7 @@ def check_function_signatures(text1, text2): tool_dir = os.path.dirname(path) if tool not in path: continue + print(path) # for gui, filter out the gui:: for separate processing matches = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] @@ -95,6 +97,7 @@ def check_function_signatures(text1, text2): # print(cmd, rest) for cmd in help_dict: + print("----------") print(cmd) isValid = True if cmd not in help_dict: print("command not parsed in help_dict"); isValid = False diff --git a/src/dpl/README.md b/src/dpl/README.md index 0faf66c3cf5..57bff64634f 100644 --- a/src/dpl/README.md +++ b/src/dpl/README.md @@ -106,7 +106,7 @@ The `check_placement` command checks the placement legality. It returns check_placement [-verbose] [-disallow_one_site_gaps] - [-report_filename filename] + [-report_file_name filename] ``` #### Options @@ -115,7 +115,7 @@ check_placement | ----- | ----- | | `-verbose` | Enable verbose logging. | | `-disallow_one_site_gaps` | Disable one site gap during placement check. | -| `-report_filename` | File name for saving the report to (e.g. `report.json`. | +| `-report_file_name` | File name for saving the report to (e.g. `report.json`. | ### Optimize Mirroring diff --git a/src/drt/README.md b/src/drt/README.md index 3383b606fc4..3fd29f72079 100644 --- a/src/drt/README.md +++ b/src/drt/README.md @@ -46,7 +46,7 @@ detailed_route [-via_in_pin_bottom_layer layer] [-via_in_pin_top_layer layer] [-or_seed seed] - [-or_k_ k] + [-or_k k] [-bottom_routing_layer layer] [-top_routing_layer layer] [-verbose level] @@ -60,6 +60,7 @@ detailed_route [-min_access_points count] [-save_guide_updates] [-repair_pdn_vias layer] + [-single_step_dr] ``` #### Options @@ -110,11 +111,12 @@ detailed_route_debug [-maze] [-net name] [-pin name] - [-worker x y] + [-box x1 y1 x2 y2] [-iter iter] [-pa_markers] [-dump_dr] [-dump_dir dir] + [-dump_last_worker] [-pa_edge] [-pa_commit] [-write_net_tracks] @@ -130,6 +132,7 @@ detailed_route_debug | `-maze` | Enable debug for maze routing. | | `-net` | Enable debug for net name. | | `-pin` | Enable debug for pin name. | +| `-box` | Set the box for debugging given by lower left/upper right coordinates. | | `-worker` | Debugs routes that pass through the point `{x, y}`. | | `-iter` | Specifies the number of debug iterations. The default value is `0`, and the accepted values are integers `[0, MAX_INT`. | | `-pa_markers` | Enable pin access markers. | diff --git a/src/drt/src/TritonRoute.tcl b/src/drt/src/TritonRoute.tcl index c433be1d5e6..5e8993f2cf1 100644 --- a/src/drt/src/TritonRoute.tcl +++ b/src/drt/src/TritonRoute.tcl @@ -45,7 +45,7 @@ sta::define_cmd_args "detailed_route" { [-via_in_pin_bottom_layer layer] [-via_in_pin_top_layer layer] [-or_seed seed] - [-or_k_ k] + [-or_k k] [-bottom_routing_layer layer] [-top_routing_layer layer] [-verbose level] @@ -59,6 +59,7 @@ sta::define_cmd_args "detailed_route" { [-min_access_points count] [-save_guide_updates] [-repair_pdn_vias layer] + [-single_step_dr] } proc detailed_route { args } { @@ -224,7 +225,7 @@ sta::define_cmd_args "detailed_route_debug" { proc detailed_route_debug { args } { sta::parse_key_args "detailed_route_debug" args \ keys {-net -iter -pin -dump_dir -box} \ - flags {-dr -maze -pa -pa_markers -pa_edge -pa_commit -dump_dr -ta -write_net_tracks} + flags {-dr -maze -pa -pa_markers -pa_edge -pa_commit -dump_dr -ta -write_net_tracks -dump_last_worker} sta::check_argc_eq0 "detailed_route_debug" $args diff --git a/src/gpl/README.md b/src/gpl/README.md index 63d00028964..bbd706a6f65 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -49,6 +49,8 @@ Timing-driven arguments global_placement [-timing_driven] [-routability_driven] + [-disable_timing_driven] + [-disable_routability_driven] [-skip_initial_place] [-incremental] [-bin_grid_count grid_count] @@ -57,21 +59,21 @@ global_placement [-init_wirelength_coef init_wirelength_coef] [-min_phi_coef min_phi_conef] [-max_phi_coef max_phi_coef] + [-reference_hpwl reference_hpwl] [-overflow overflow] [-initial_place_max_iter initial_place_max_iter] [-initial_place_max_fanout initial_place_max_fanout] [-pad_left pad_left] [-pad_right pad_right] - [-verbose_level level] [-force_cpu] [-skip_io] + [-skip_nesterov_place] [-routability_check_overflow routability_check_overflow] [-routability_max_density routability_max_density] [-routability_max_bloat_iter routability_max_bloat_iter] [-routability_max_inflation_iter routability_max_inflation_iter] [-routability_target_rc_metric routability_target_rc_metric] [-routability_inflation_ratio_coef routability_inflation_ratio_coef] - [-routability_pitch_scale routability_pitch_scale] [-routability_max_inflation_ratio routability_max_inflation_ratio] [-routability_rc_coefficients routability_rc_coefficients] [-timing_driven_net_reweight_overflow] @@ -98,7 +100,6 @@ global_placement | `-initial_place_max_fanout` | Set net escape condition in initial place when $fanout \geq initial\_place\_max\_fanout$. The default value is 200. Allowed values are integers `[1, MAX_INT]`. | | `-pad_left` | Set left padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | | `-pad_right` | Set right padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | -| `-verbose_level` | Set verbose level for `gpl`. The default value is 1. Allowed values are integers `[0, 5]`. | | `-force_cpu` | Force to use the CPU solver even if the GPU is available. | | `-skip_io` | Flag to ignore the IO ports when computing wirelength during placement. The default value is False, allowed values are boolean. | diff --git a/src/grt/README.md b/src/grt/README.md index 6b8fe9d09c1..a31fbc26a64 100644 --- a/src/grt/README.md +++ b/src/grt/README.md @@ -25,6 +25,8 @@ global_route [-grid_origin {x y}] [-critical_nets_percentage percent] [-allow_congestion] + [-allow_overflow] + [-overflow_iterations] [-verbose] [-start_incremental] [-end_incremental] diff --git a/src/grt/src/GlobalRouter.tcl b/src/grt/src/GlobalRouter.tcl index b36a35aa43c..24e0037f8c0 100644 --- a/src/grt/src/GlobalRouter.tcl +++ b/src/grt/src/GlobalRouter.tcl @@ -207,6 +207,8 @@ sta::define_cmd_args "global_route" {[-guide_file out_file] \ [-grid_origin origin] \ [-critical_nets_percentage percent] \ [-allow_congestion] \ + [-allow_overflow] \ + [-overflow_iterations iterations] \ [-verbose] \ [-start_incremental] \ [-end_incremental] @@ -294,7 +296,7 @@ proc global_route { args } { } } -sta::define_cmd_args "repair_antennas" { [diode_cell] \ +sta::define_cmd_args "repair_antennas" { diode_cell \ [-iterations iterations] \ [-ratio_margin ratio_margin]} diff --git a/src/mpl/src/MacroPlacer.tcl b/src/mpl/src/MacroPlacer.tcl index 2c268f45423..d7d0a9c4b5d 100644 --- a/src/mpl/src/MacroPlacer.tcl +++ b/src/mpl/src/MacroPlacer.tcl @@ -120,8 +120,8 @@ sta::define_cmd_args "macro_placement_debug" { [-partitions] }; # no docs -# This seg faults if the gui is not present -cherry proc macro_placement_debug { args } { +# This seg faults if the gui is not present -cherry sta::parse_key_args "macro_placement_debug" args \ keys {} \ flags {-partitions}; # no docs From 0dc56cf2e078bc7784078893977a76ee969418b4 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 1 Feb 2024 19:06:57 +0000 Subject: [PATCH 51/88] finish dynamic params test 142/146 passing Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 62 ++-- docs/src/test/man_tcl_check.ok | 8 +- docs/src/test/man_tcl_params.ok | 466 +++++++++++++++++++++++++++++ docs/src/test/man_tcl_params.py | 55 +--- docs/src/test/regression_tests.tcl | 1 + docs/src/test/translator.ok | 60 ++-- docs/src/test/translator.py | 2 +- 7 files changed, 548 insertions(+), 106 deletions(-) create mode 100644 docs/src/test/man_tcl_params.ok diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index 0cd7f27e608..d9b9c122d57 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -1,42 +1,42 @@ -File linked from /workspace/src/ant/README.md to /workspace/docs/md/man2/ant.md +File linked successfully. ERROR: README.md not found in ../src/cmake -File linked from /workspace/src/cts/README.md to /workspace/docs/md/man2/cts.md +File linked successfully. ERROR: README.md not found in ../src/dbSta -File linked from /workspace/src/dft/README.md to /workspace/docs/md/man2/dft.md -File linked from /workspace/src/dpl/README.md to /workspace/docs/md/man2/dpl.md +File linked successfully. +File linked successfully. ERROR: README.md not found in ../src/dpo -File linked from /workspace/src/drt/README.md to /workspace/docs/md/man2/drt.md +File linked successfully. ERROR: README.md not found in ../src/dst -File linked from /workspace/src/fin/README.md to /workspace/docs/md/man2/fin.md -File linked from /workspace/src/gpl/README.md to /workspace/docs/md/man2/gpl.md -File linked from /workspace/src/grt/README.md to /workspace/docs/md/man2/grt.md -File linked from /workspace/src/gui/README.md to /workspace/docs/md/man2/gui.md -File linked from /workspace/src/ifp/README.md to /workspace/docs/md/man2/ifp.md -File linked from /workspace/src/mpl/README.md to /workspace/docs/md/man2/mpl.md -File linked from /workspace/src/mpl2/README.md to /workspace/docs/md/man2/mpl2.md -File linked from /workspace/src/odb/README.md to /workspace/docs/md/man2/odb.md -File linked from /workspace/src/pad/README.md to /workspace/docs/md/man2/pad.md -File linked from /workspace/src/par/README.md to /workspace/docs/md/man2/par.md -File linked from /workspace/src/pdn/README.md to /workspace/docs/md/man2/pdn.md -File linked from /workspace/src/ppl/README.md to /workspace/docs/md/man2/ppl.md -File linked from /workspace/src/psm/README.md to /workspace/docs/md/man2/psm.md -File linked from /workspace/src/rcx/README.md to /workspace/docs/md/man2/rcx.md -File linked from /workspace/src/rmp/README.md to /workspace/docs/md/man2/rmp.md -File linked from /workspace/src/rsz/README.md to /workspace/docs/md/man2/rsz.md -File linked from /workspace/src/sta/README.md to /workspace/docs/md/man2/sta.md -File linked from /workspace/src/stt/README.md to /workspace/docs/md/man2/stt.md -File linked from /workspace/src/tap/README.md to /workspace/docs/md/man2/tap.md -File linked from /workspace/src/upf/README.md to /workspace/docs/md/man2/upf.md -File linked from /workspace/src/utl/README.md to /workspace/docs/md/man2/utl.md +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. ant.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 cts.md -Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 ./md/man2/dbSta.md doesn't exist. Continuing dft.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 dpl.md -Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 ./md/man2/dpo.md doesn't exist. Continuing drt.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 @@ -56,13 +56,13 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 mpl2.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 pad.md -Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 +Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 par.md Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 pdn.md Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 ppl.md -Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 psm.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 rcx.md @@ -164,5 +164,5 @@ Info: 3, Warn: 7, Error: 37 To specify a title, use 'title' in metadata or --metadata title="...". cat/cat1/openroad.1 Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 166. +Level 2 doc counts are equal to 167. Level 3 doc counts are equal to 2782. diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index 7f6cd0cc1a3..95fc24727e0 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -21,8 +21,8 @@ Command counts match. Command counts match. ./src/stt 1 1 1 Command counts match. -./src/ppl 10 10 10 -Command counts match. +./src/ppl 10 10 11 +Command counts do not match. ./src/drt 3 3 3 Command counts match. ./src/cts 3 3 3 @@ -33,8 +33,8 @@ Command counts match. Command counts match. ./src/gpl 2 2 2 Command counts match. -./src/mpl2 3 3 3 -Command counts match. +./src/mpl2 3 4 3 +Command counts do not match. ./src/par 6 6 6 Command counts match. ./src/dft 4 4 4 diff --git a/docs/src/test/man_tcl_params.ok b/docs/src/test/man_tcl_params.ok new file mode 100644 index 00000000000..471a93beeb1 --- /dev/null +++ b/docs/src/test/man_tcl_params.ok @@ -0,0 +1,466 @@ +---------- +check_antennas +['-net', '-verbose'] +['-net', '-report_file', '-report_violating_nets', '-verbose'] +['-net', '-report_file', '-report_violating_nets', '-verbose'] +['-net', '-verbose'] +Help/Proc: False +Help/Rdme: True +Proc/Rdme: False +---------- +density_fill +Success. +---------- +macro_placement +Success. +---------- +man +Success. +---------- +initialize_floorplan +Success. +---------- +make_tracks +Success. +---------- +insert_tiecells +Success. +---------- +tapcell +Success. +---------- +cut_rows +Success. +---------- +tapcell_ripup +Success. +---------- +place_endcaps +Success. +---------- +place_tapcells +Success. +---------- +set_global_routing_layer_adjustment +Success. +---------- +set_global_routing_region_adjustment +Success. +---------- +set_routing_layers +['-clock', '-signal'] +['-clock', '-max', '-signal'] +['-clock', '-signal'] +['-clock', '-max', '-signal'] +Help/Proc: True +Help/Rdme: False +Proc/Rdme: False +---------- +set_macro_extension +Success. +---------- +set_pin_offset +Success. +---------- +set_global_routing_random +Success. +---------- +global_route +Success. +---------- +repair_antennas +Success. +---------- +set_nets_to_route +Success. +---------- +read_guides +Success. +---------- +draw_route_guides +Success. +---------- +global_route_debug +Success. +---------- +report_wire_length +Success. +---------- +create_toolbar_button +Success. +---------- +create_menu_item +Success. +---------- +save_image +Success. +---------- +save_clocktree_image +Success. +---------- +select +Success. +---------- +display_timing_cone +Success. +---------- +focus_net +Success. +---------- +pdngen +Success. +---------- +set_voltage_domain +Success. +---------- +define_pdn_grid +['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domains'] +['-cells', '-existing', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-voltage_domains'] +['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domains'] +['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domain'] +['-cells', '-existing', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-voltage_domains'] +['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domain'] +Help/Proc: False +Help/Rdme: False +Proc/Rdme: False +---------- +define_power_switch_cell +Success. +---------- +add_pdn_stripe +Success. +---------- +add_pdn_ring +Success. +---------- +add_pdn_connect +Success. +---------- +add_sroute_connect +Success. +---------- +repair_pdn_vias +Success. +---------- +analyze_power_grid +Success. +---------- +check_power_grid +Success. +---------- +write_pg_spice +Success. +---------- +set_pdnsim_net_voltage +Success. +---------- +set_routing_alpha +Success. +---------- +define_pin_shape_pattern +Success. +---------- +set_io_pin_constraint +Success. +---------- +set_pin_length +Success. +---------- +set_pin_length_extension +Success. +---------- +set_pin_thick_multiplier +Success. +---------- +set_simulated_annealing +Success. +---------- +simulated_annealing_debug +Success. +---------- +place_pin +Success. +---------- +write_pin_placement +Success. +---------- +place_pins +Success. +---------- +detailed_route +Success. +---------- +detailed_route_debug +Success. +---------- +pin_access +Success. +---------- +configure_cts_characterization +Success. +---------- +clock_tree_synthesis +Success. +---------- +report_cts +Success. +---------- +detailed_placement +Success. +---------- +set_placement_padding +Success. +---------- +filler_placement +Success. +---------- +remove_fillers +Success. +---------- +check_placement +Success. +---------- +optimize_mirroring +Success. +---------- +restructure +Success. +---------- +global_placement +Success. +---------- +cluster_flops +Success. +---------- +rtl_macro_placer +Success. +---------- +place_macro +Success. +---------- +write_macro_placement +Success. +---------- +triton_part_hypergraph +Success. +---------- +evaluate_hypergraph_solution +Success. +---------- +triton_part_design +Success. +---------- +evaluate_part_design_solution +Success. +---------- +write_partition_verilog +Success. +---------- +read_partitioning +Success. +---------- +preview_dft +Success. +---------- +insert_dft +Success. +---------- +set_dft_config +Success. +---------- +report_dft_config +Success. +---------- +read_upf +Success. +---------- +create_power_domain +Success. +---------- +create_logic_port +Success. +---------- +create_power_switch +Success. +---------- +set_isolation +Success. +---------- +use_interface_cell +Success. +---------- +set_domain_area +Success. +---------- +map_power_switch +Success. +---------- +make_io_bump_array +Success. +---------- +remove_io_bump_array +Success. +---------- +remove_io_bump +Success. +---------- +assign_io_bump +Success. +---------- +make_io_sites +['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] +['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] +['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] +['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] +Help/Proc: False +Help/Rdme: True +Proc/Rdme: False +---------- +remove_io_rows +Success. +---------- +place_corners +Success. +---------- +place_pad +Success. +---------- +place_io_fill +Success. +---------- +connect_by_abutment +Success. +---------- +place_bondpad +Success. +---------- +place_io_terminals +Success. +---------- +rdl_route +Success. +---------- +define_process_corner +Success. +---------- +extract_parasitics +Success. +---------- +write_spef +Success. +---------- +adjust_rc +Success. +---------- +diff_spef +Success. +---------- +bench_wires +Success. +---------- +bench_verilog +Success. +---------- +bench_read_spef +Success. +---------- +write_rules +Success. +---------- +set_layer_rc +Success. +---------- +set_wire_rc +Success. +---------- +estimate_parasitics +Success. +---------- +set_dont_use +Success. +---------- +unset_dont_use +Success. +---------- +set_dont_touch +Success. +---------- +unset_dont_touch +Success. +---------- +buffer_ports +Success. +---------- +remove_buffers +Success. +---------- +repair_design +Success. +---------- +repair_clock_nets +Success. +---------- +repair_clock_inverters +Success. +---------- +repair_tie_fanout +Success. +---------- +repair_timing +Success. +---------- +report_design_area +Success. +---------- +report_floating_nets +Success. +---------- +create_physical_cluster +Success. +---------- +create_child_physical_clusters +Success. +---------- +set_ndr_layer_rule +Success. +---------- +set_ndr_rules +Success. +---------- +create_ndr +Success. +---------- +create_voltage_domain +Success. +---------- +delete_physical_cluster +Success. +---------- +delete_voltage_domain +Success. +---------- +assign_power_net +Success. +---------- +assign_ground_net +Success. +---------- +add_to_physical_cluster +Success. +---------- +remove_from_physical_cluster +Success. +---------- +report_physical_clusters +Success. +---------- +report_voltage_domains +Success. +---------- +report_group +Success. +---------- +write_guides +Success. +---------- +Succeeded: 142 out of 146 tests. diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py index 0e8693cbb60..4f105016b5a 100644 --- a/docs/src/test/man_tcl_params.py +++ b/docs/src/test/man_tcl_params.py @@ -2,40 +2,14 @@ import glob import re from extract_utils import extract_tcl_code, extract_help, extract_proc - -def clean_whitespaces(text): - tmp = text.strip().replace("\\", "").replace("\n", "") - return " ".join(tmp.split()) - -def clean_parse_syntax(text): - tmp = text.replace("keys", "").replace("flags", "")\ - .replace("{", "").replace("}", "") - return ' '.join([f'[{option}]' for option in tmp.split()]) - -def check_function_signatures(text1, text2): - set1 = set(match.group(1) for \ - match in re.finditer(r'\[([^\]]+)\]', text1)) - set1 = {x.split()[0] for x in set1} - - set2 = set(match.group(1) for \ - match in re.finditer(r'\[([^\]]+)\]', text2)) - set2 = {x.split()[0] for x in set2} - - if set1 == set2: return True - print(set1) - print(set2) - return False - -# Test this tool -tool = "grt" -tool = f"./src/{tool}/" +from extract_utils import clean_whitespaces, clean_parse_syntax, check_function_signatures # Test objective: Make sure similar output in all three: help, proc, and readme path = os.path.realpath("md_roff_compat.py") or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) os.chdir(or_home) -# Regexes +# Store results help_dict, proc_dict, readme_dict = {}, {}, {} # Directories to exclude (according to md_roff_compat) @@ -53,8 +27,6 @@ def check_function_signatures(text1, text2): if "ICeWall" in path or "PdnGen" in path: continue with open(path) as f: - if tool not in path: continue - # Help patterns content = f.read() matches = extract_help(content) @@ -63,7 +35,6 @@ def check_function_signatures(text1, text2): cmd, rest = match[0], match[1] cmd, rest = clean_whitespaces(cmd), clean_whitespaces(rest) help_dict[cmd] = rest - #print(cmd, rest) # Proc patterns matches = extract_proc(content) @@ -73,16 +44,11 @@ def check_function_signatures(text1, text2): cmd, rest = clean_whitespaces(cmd), clean_whitespaces(keys + " " + flags) rest = clean_parse_syntax(rest) proc_dict[cmd] = rest - # print(cmd, rest) - for path in glob.glob("./src/*/README.md"): if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue tool_dir = os.path.dirname(path) - if tool not in path: continue - print(path) - # for gui, filter out the gui:: for separate processing matches = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] @@ -94,8 +60,8 @@ def check_function_signatures(text1, text2): cmd = match.split()[0] rest = " ".join(match.split()[1:]) readme_dict[cmd] = rest - # print(cmd, rest) +succeeded = 0 for cmd in help_dict: print("----------") print(cmd) @@ -111,6 +77,15 @@ def check_function_signatures(text1, text2): # Test switches here s1, s2, s3 = help_dict[cmd], proc_dict[cmd], readme_dict[cmd] - print(f"Help/Proc: {check_function_signatures(s1,s2)}") - print(f"Help/Rdme: {check_function_signatures(s1,s3)}") - print(f"Proc/Rdme: {check_function_signatures(s2,s3)}") \ No newline at end of file + res1, res2, res3 = check_function_signatures(s1,s2), \ + check_function_signatures(s1,s3), \ + check_function_signatures(s2,s3) + if res1 and res2 and res3: + succeeded += 1 + print("Success.") + else: + print(f"Help/Proc: {res1}") + print(f"Help/Rdme: {res2}") + print(f"Proc/Rdme: {res3}") + +print(f"----------\nSucceeded: {succeeded} out of {len(help_dict)} tests.") \ No newline at end of file diff --git a/docs/src/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl index dbbdfd07c0c..5dfab8bda03 100644 --- a/docs/src/test/regression_tests.tcl +++ b/docs/src/test/regression_tests.tcl @@ -3,4 +3,5 @@ record_tests { count_outfiles man_func man_tcl_check + man_tcl_params } diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index d1d2662a98c..acbdc4fc4b3 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -4,45 +4,45 @@ rm -rf cat/cat1 cat/cat2 cat/cat3 rm -rf ./md/man2/*md rm -rf ./md/man3/*md rm -rf build -File linked from /workspace/src/ant/README.md to /workspace/docs/md/man2/ant.md -File linked from /workspace/src/fin/README.md to /workspace/docs/md/man2/fin.md -File linked from /workspace/src/mpl/README.md to /workspace/docs/md/man2/mpl.md +File linked successfully. +File linked successfully. +File linked successfully. ERROR: README.md not found in ../src/dbSta -File linked from /workspace/src/utl/README.md to /workspace/docs/md/man2/utl.md -File linked from /workspace/src/ifp/README.md to /workspace/docs/md/man2/ifp.md +File linked successfully. +File linked successfully. ERROR: README.md not found in ../src/dst -File linked from /workspace/src/tap/README.md to /workspace/docs/md/man2/tap.md -File linked from /workspace/src/grt/README.md to /workspace/docs/md/man2/grt.md -File linked from /workspace/src/gui/README.md to /workspace/docs/md/man2/gui.md -File linked from /workspace/src/pdn/README.md to /workspace/docs/md/man2/pdn.md -File linked from /workspace/src/psm/README.md to /workspace/docs/md/man2/psm.md -File linked from /workspace/src/stt/README.md to /workspace/docs/md/man2/stt.md -File linked from /workspace/src/odb/README.md to /workspace/docs/md/man2/odb.md -File linked from /workspace/src/ppl/README.md to /workspace/docs/md/man2/ppl.md -File linked from /workspace/src/drt/README.md to /workspace/docs/md/man2/drt.md -File linked from /workspace/src/cts/README.md to /workspace/docs/md/man2/cts.md -File linked from /workspace/src/dpl/README.md to /workspace/docs/md/man2/dpl.md -File linked from /workspace/src/rmp/README.md to /workspace/docs/md/man2/rmp.md -File linked from /workspace/src/gpl/README.md to /workspace/docs/md/man2/gpl.md -File linked from /workspace/src/mpl2/README.md to /workspace/docs/md/man2/mpl2.md -File linked from /workspace/src/sta/README.md to /workspace/docs/md/man2/sta.md -File linked from /workspace/src/par/README.md to /workspace/docs/md/man2/par.md -File linked from /workspace/src/dft/README.md to /workspace/docs/md/man2/dft.md +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. ERROR: README.md not found in ../src/dpo -File linked from /workspace/src/upf/README.md to /workspace/docs/md/man2/upf.md -File linked from /workspace/src/pad/README.md to /workspace/docs/md/man2/pad.md -File linked from /workspace/src/rcx/README.md to /workspace/docs/md/man2/rcx.md -File linked from /workspace/src/rsz/README.md to /workspace/docs/md/man2/rsz.md +File linked successfully. +File linked successfully. +File linked successfully. +File linked successfully. ERROR: README.md not found in ../src/cmake ant.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 cts.md -Names: 4, Desc: 3, Syn: 3, Options: 4, Args: 4 +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 ./md/man2/dbSta.md doesn't exist. Continuing dft.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 dpl.md -Names: 7, Desc: 6, Syn: 6, Options: 7, Args: 7 +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 ./md/man2/dpo.md doesn't exist. Continuing drt.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 @@ -62,13 +62,13 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 mpl2.md Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 pad.md -Names: 15, Desc: 14, Syn: 14, Options: 15, Args: 15 +Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 par.md Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 pdn.md Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 ppl.md -Names: 11, Desc: 11, Syn: 10, Options: 11, Args: 11 +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 psm.md Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 rcx.md diff --git a/docs/src/test/translator.py b/docs/src/test/translator.py index 2b29034247c..042a6e9b38d 100644 --- a/docs/src/test/translator.py +++ b/docs/src/test/translator.py @@ -31,7 +31,7 @@ if os.path.exists(src_path): # Create a symbolic link from src_path to dest_path os.symlink(src_path, dest_path) - print(f"File linked from {src_path} to {dest_path}") + print(f"File linked successfully.") else: print(f"ERROR: README.md not found in {full_module_path}") From c8a072d2610afc22207e7484bf19cd9576a855dd Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 3 Feb 2024 03:23:11 +0000 Subject: [PATCH 52/88] add TclFormat, ReadmeFormat, ;#nodocs -> ;#checkeroff Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/contrib/DeveloperGuide.md | 15 +++++ docs/contrib/ReadmeFormat.md | 92 +++++++++++++++++++++++++++++++ docs/contrib/TclFormat.md | 42 ++++++++++++++ docs/src/scripts/extract_utils.py | 25 +++++++-- docs/src/scripts/link_readmes.sh | 2 +- docs/toc.yml | 4 ++ src/cts/README.md | 2 +- src/cts/src/TritonCTS.tcl | 2 +- src/dpl/README.md | 2 +- src/drt/src/TritonRoute.tcl | 12 ++-- src/gpl/src/replace.tcl | 4 +- src/gui/src/gui.tcl | 2 +- src/mpl/src/MacroPlacer.tcl | 4 +- src/mpl2/README.md | 3 + src/mpl2/src/mpl.tcl | 66 +++++++++++----------- src/odb/README.md | 2 +- src/pad/README.md | 2 +- src/pad/src/pad.tcl | 7 +-- src/par/README.md | 6 ++ src/par/src/partitionmgr.tcl | 2 +- src/pdn/README.md | 4 ++ src/pdn/src/pdn.tcl | 21 ++++--- src/ppl/README.md | 21 ++++++- src/ppl/src/IOPlacer.tcl | 5 +- src/psm/README.md | 4 +- src/rcx/README.md | 4 ++ src/rcx/src/OpenRCX.tcl | 5 +- src/rmp/README.md | 20 ++++--- src/rmp/src/rmp.tcl | 1 + src/rsz/README.md | 21 ++++++- src/rsz/src/Resizer.tcl | 24 +++++--- src/stt/README.md | 2 + src/tap/README.md | 7 ++- src/tap/src/tapcell.tcl | 7 ++- src/upf/src/upf.tcl | 2 +- 35 files changed, 345 insertions(+), 99 deletions(-) create mode 100644 docs/contrib/ReadmeFormat.md create mode 100644 docs/contrib/TclFormat.md diff --git a/docs/contrib/DeveloperGuide.md b/docs/contrib/DeveloperGuide.md index 3d2a718411c..b7da4f08281 100644 --- a/docs/contrib/DeveloperGuide.md +++ b/docs/contrib/DeveloperGuide.md @@ -134,6 +134,13 @@ examples. Use swig to define internal functions to C++ functionality. Tcl files can be included by encoding them in CMake into a string that is evaluated at run time (See [`Resizer::init()`](../main/src/rsz/src/Resizer.cc)). +:::{Note} +Please refer to the top-level Tcl formatting [guide](TclFormat.md). +Our top-level Tcl files, in particular, have to be formatted in this specific +manner because of the automatic parsing used to convert the READMEs into +manpages. +::: + ## Errors Tools should report errors to the user using the `ord::error` function @@ -228,6 +235,13 @@ toolize [-key1 key1] [-flag1] positional_argument1 Tool commands should be documented in the top-level OpenROAD `README.md` file. Detailed documentation should be the `tool/README.md` file. +:::{Note} +Please refer to the README formatting [guide](ReadmeFormat.md). +Our top-level READMEs, in particular, have to be formatted in this specific +manner because of the automatic parsing used to convert the READMEs into +manpages. +::: + ## Tool Flow Namespace Tool namespaces are usually three-lettered lowercase letters. @@ -285,6 +299,7 @@ dependencies make this vastly more complicated. 1. `regression` script should only write files in a directory that is in the tool's `.gitignore` so the hierarchy does not have modified files in it as a result or running the regressions. 1. Regressions report no memory errors with `valgrind` (stretch goal). 1. Regressions report no memory leaks with `valgrind` (difficult). +1. Ensure the top-level README and Tcl format are compliant. ## Code Linting and Formatting OpenROAD uses both `clang-tidy` and `clang-format` to perform automatic linting and formatting whenever a pull request is submitted. To run these locally, please first setup Clang Tooling using this [guide](https://clang.llvm.org/docs/HowToSetupToolingForLLVM.html). Thereafter, you may run these commands: diff --git a/docs/contrib/ReadmeFormat.md b/docs/contrib/ReadmeFormat.md new file mode 100644 index 00000000000..fe7a56b0fdb --- /dev/null +++ b/docs/contrib/ReadmeFormat.md @@ -0,0 +1,92 @@ +# Tool Name + +The top-level READMEs in each tool folder (`~/OpenROAD/src/<tool>/README.md`) +has to be formatted in this particular manner. For most part, you can copy +the format and replace the contents where necessary. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Command ABC + +The `command_abc` command performs... + +The developer arguments are... + +Note for commands, you must adhere to the top-level Tcl definition +for the same command. +- Arguments: cannot be preceded with dashes +- Flags/Keys: verify if it is optional or required, then insert the +necessary square brackets. Also, keys have to be followed with a specifier +whereas flags only require the `-flag` itself. + +```tcl +command_abc + arg1 + -key1 key1 + [-flag1] + [-flagDev] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `arg1` | Description for `arg1`. | +| `-key1` | Description for `key1`. | +| `-flag1` | Description for `flag1`. | + +#### Developer Arguments + +If there are some developer arguments you want to highlight to the end user +not to worry about - you can park them in the same level below the main +`Options` category. + +| Switch Name | Description | +| ----- | ----- | +| `-flagDev` | Description for `flagDev`. | + +## Useful Developer Commands + +If you are a developer, you might find these useful. More details can be found in the [source file]() or the [swig file](). + +| Command Name | Description | +| ----- | ----- | +| `command_abc_debug` | Debug something. | + +## Example scripts + +Examples scripts demonstrating ... + +```shell +./test/asdfg.tcl +``` + +## Regression tests + +There are a set of regression tests in `./test`. Refer to this [section](../../README.md#regression-tests) for more information. + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations + +## FAQs + +Check out [GitHub discussion]() +about this tool. + +## Authors + +## References + +## License + +BSD 3-Clause License. See [LICENSE](../../LICENSE) file. \ No newline at end of file diff --git a/docs/contrib/TclFormat.md b/docs/contrib/TclFormat.md new file mode 100644 index 00000000000..5b47d962d5a --- /dev/null +++ b/docs/contrib/TclFormat.md @@ -0,0 +1,42 @@ +# Tcl Format + +The most important part to take note of are: +`sta::define_cmd_args` - which defines what is printed when +a user types `help command` in the OR shell; as well as +`sta::parse_key_args` - which defines what keys/flags the +command actually parses. + +Let us use `check_antennas` command for an example. + +## Specification + +```tcl +sta::define_cmd_args "check_antennas" { [-verbose]\ + [-net net]} + +proc check_antennas { args } { + sta::parse_key_args "check_antennas" args \ + keys {-report_file -net} \ + flags {-verbose -report_violating_nets} +... +} +``` + +## Do not compile + +If you add `;# checker off` behind the command's +`sta::define_cmd_args {} ` and `sta::parse_key_args {}` +the function will not be compiled in the Manpages and +included in the doctests. + +```tcl +sta::define_cmd_args "check_antennas" { [-verbose]\ + [-net net]} ;# checker off + +proc check_antennas { args } { + sta::parse_key_args "check_antennas" args \ + keys {-report_file -net} \ + flags {-verbose -report_violating_nets};# checker off +... +} +``` \ No newline at end of file diff --git a/docs/src/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py index f6ddd3aa430..1c970765be7 100644 --- a/docs/src/scripts/extract_utils.py +++ b/docs/src/scripts/extract_utils.py @@ -81,15 +81,14 @@ def extract_help(text): help_pattern = re.compile(r''' sta::define_cmd_args\s+ "(.*?)"\s* - (.*?)proc + (.*?)proc\s ''', re.VERBOSE | re.DOTALL) matches = re.findall(help_pattern, text) # remove nodocs (usually dev commands) - matches = [tup for tup in matches if ";#nodocs" not in tup[1].replace(" ","")] - #matches = [tup for tup in matches if not tup[2].replace(" ","") == ";#nodocs"] + matches = [tup for tup in matches if ";#checkeroff" not in tup[1].replace(" ","")] return matches def extract_proc(text): @@ -99,14 +98,14 @@ def extract_proc(text): args\s* (.*?keys.*?}) (.*?flags.*?}) - (\s*;\s*\#\s*no\s*docs)? + (\s*;\s*\#\s*checker\s*off)? ''', re.VERBOSE | re.DOTALL) matches = re.findall(proc_pattern, text) # remove nodocs (usually dev commands) - matches = [tup for tup in matches if not tup[3].replace(" ","") == ";#nodocs"] + matches = [tup for tup in matches if not tup[3].replace(" ","") == ";#checkeroff"] return matches def parse_switch(text): @@ -118,6 +117,22 @@ def parse_switch(text): switch_description = text[second_pipe_index+1: last_pipe_index-1] return switch_name, switch_description +def clean_whitespaces(text): + tmp = text.strip().replace("\\", "").replace("\n", "") + return " ".join(tmp.split()) + +def clean_parse_syntax(text): + tmp = text.replace("keys", "").replace("flags", "")\ + .replace("{", "").replace("}", "") + return ' '.join([f'[{option}]' for option in tmp.split()]) + +def check_function_signatures(text1, text2): + set1 = set(re.findall(r'-\w+', text1)) + set2 = set(re.findall(r'-\w+', text2)) + if set1 == set2: return True + print(sorted(list(set1))) + print(sorted(list(set2))) + return False if __name__ == "__main__": pass \ No newline at end of file diff --git a/docs/src/scripts/link_readmes.sh b/docs/src/scripts/link_readmes.sh index c8549d2866e..94e1ada92a9 100755 --- a/docs/src/scripts/link_readmes.sh +++ b/docs/src/scripts/link_readmes.sh @@ -14,7 +14,7 @@ for MODULE_PATH in "$SRC_BASE_PATH"/*; do # Check if README.md exists before copying if [ -e "$SRC_PATH" ]; then ln -s -f "$SRC_PATH" "$DEST_PATH" - echo "File linked from $SRC_PATH to $DEST_PATH" + echo "File linked successfully." else echo "ERROR: README.md not found in $MODULE_PATH" fi diff --git a/docs/toc.yml b/docs/toc.yml index 8e1507a0034..135a89a69d5 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -95,6 +95,10 @@ entries: title: Logger - file: contrib/CI title: CI + - file: contrib/ReadmeFormat + title: README Format + - file: contrib/TclFormat + title: Tcl Format - file: main/CODE_OF_CONDUCT title: Code of Conduct diff --git a/src/cts/README.md b/src/cts/README.md index 6ebbeec3e6d..8b9654db467 100644 --- a/src/cts/README.md +++ b/src/cts/README.md @@ -106,7 +106,7 @@ report_cts | ----- | ----- | | `-out_file` | The file to save `cts` reports. If this parameter is omitted, the report is streamed to `stdout` and not saved. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/TritonCTS.cpp) or the [swig file](./src/TritonCTS.i). diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index 88412975471..208a0cdbe73 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -218,7 +218,7 @@ proc report_cts { args } { namespace eval cts { proc clock_tree_synthesis_debug { args } { sta::parse_key_args "clock_tree_synthesis_debug" args \ - keys {} flags {-plot}; # no docs + keys {} flags {-plot}; # checker off sta::check_argc_eq0 "clock_tree_synthesis_debug" $args cts::set_plot_option [info exists flags(-plot)] diff --git a/src/dpl/README.md b/src/dpl/README.md index 57bff64634f..8a0409d9769 100644 --- a/src/dpl/README.md +++ b/src/dpl/README.md @@ -126,7 +126,7 @@ a weak attempt to reduce the total half-perimeter wirelength (HPWL). optimize_mirroring ``` -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/Opendp.cpp) or the [swig file](./src/Opendp.i). diff --git a/src/drt/src/TritonRoute.tcl b/src/drt/src/TritonRoute.tcl index 5e8993f2cf1..b8f8bf88707 100644 --- a/src/drt/src/TritonRoute.tcl +++ b/src/drt/src/TritonRoute.tcl @@ -359,12 +359,12 @@ sta::define_cmd_args "detailed_route_run_worker" { [-dump_dir dir] [-worker_dir dir] [-drc_rpt drc] -};# no docs +};# checker off proc detailed_route_run_worker { args } { sta::parse_key_args "detailed_route_run_worker" args \ keys {-dump_dir -worker_dir -drc_rpt} \ - flags {};# no docs + flags {};# checker off sta::check_argc_eq0 "detailed_route_run_worker" $args if { [info exists keys(-dump_dir)] } { set dump_dir $keys(-dump_dir) @@ -394,12 +394,12 @@ sta::define_cmd_args "detailed_route_worker_debug" { [-marker_decay m_decay] [-ripup_mode mode] [-follow_guide f_guide] -};# no docs +};# checker off proc detailed_route_worker_debug { args } { sta::parse_key_args "detailed_route_worker_debug" args \ keys {-maze_end_iter -drc_cost -marker_cost -fixed_shape_cost -marker_decay -ripup_mode -follow_guide} \ - flags {};# no docs + flags {};# checker off if [info exists keys(-maze_end_iter)] { set maze_end_iter $keys(-maze_end_iter) } else { @@ -468,11 +468,11 @@ proc step_dr { args } { sta::define_cmd_args "check_drc" { [-box box] [-output_file filename] -};# no docs +};# checker off proc check_drc { args } { sta::parse_key_args "check_drc" args \ keys { -box -output_file } \ - flags {};# no docs + flags {};# checker off sta::check_argc_eq0 "check_drc" $args set box { 0 0 0 0 } if [info exists keys(-box)] { diff --git a/src/gpl/src/replace.tcl b/src/gpl/src/replace.tcl index e907f1b66de..0845ffde831 100644 --- a/src/gpl/src/replace.tcl +++ b/src/gpl/src/replace.tcl @@ -356,7 +356,7 @@ namespace eval gpl { proc global_placement_debug { args } { sta::parse_key_args "global_placement_debug" args \ keys {-pause -update -inst} \ - flags {-draw_bins -initial};# no docs + flags {-draw_bins -initial};# checker off set pause 10 if { [info exists keys(-pause)] } { @@ -384,7 +384,7 @@ proc global_placement_debug { args } { proc get_global_placement_uniform_density { args } { sta::parse_key_args "get_global_placement_uniform_density" args \ keys { -pad_left -pad_right } \ - flags {};# no docs + flags {};# checker off # no need for init IP, TD and RD gpl::set_initial_place_max_iter_cmd 0 diff --git a/src/gui/src/gui.tcl b/src/gui/src/gui.tcl index 0bd187d339d..3a4b8c6f74d 100644 --- a/src/gui/src/gui.tcl +++ b/src/gui/src/gui.tcl @@ -164,7 +164,7 @@ sta::define_cmd_args "save_clocktree_image" { } proc save_clocktree_image { args } { - sta::parse_key_args "save_image" args \ + sta::parse_key_args "save_clocktree_image" args \ keys {-clock -width -height -corner} flags {} sta::check_argc_eq1 "save_image" $args diff --git a/src/mpl/src/MacroPlacer.tcl b/src/mpl/src/MacroPlacer.tcl index d7d0a9c4b5d..bdf1f8e6c27 100644 --- a/src/mpl/src/MacroPlacer.tcl +++ b/src/mpl/src/MacroPlacer.tcl @@ -118,13 +118,13 @@ proc macro_placement { args } { sta::define_cmd_args "macro_placement_debug" { [-partitions] -}; # no docs +}; # checker off proc macro_placement_debug { args } { # This seg faults if the gui is not present -cherry sta::parse_key_args "macro_placement_debug" args \ keys {} \ - flags {-partitions}; # no docs + flags {-partitions}; # checker off set partitions [info exists flags(-partitions)] diff --git a/src/mpl2/README.md b/src/mpl2/README.md index 97a3db6385e..bdc0441bfe2 100644 --- a/src/mpl2/README.md +++ b/src/mpl2/README.md @@ -19,6 +19,7 @@ This command executes the Hier-RTLMP algorithm for macro placement. rtl_macro_placer [-halo_width halo_width] [-min_num_macro min_num_macro] + [-max_num_macro max_num_macro] [-max_num_inst max_num_inst] [-min_num_inst min_num_inst] [-tolerance tolerance] @@ -28,6 +29,7 @@ rtl_macro_placer [-large_net_threshold large_net_threshold] [-signature_net_threshold signature_net_threshold] [-halo_width halo_width] + [-halo_height halo_height] [-fence_lx fence_lx] [-fence_ly fence_ly] [-fence_ux fence_ux] @@ -40,6 +42,7 @@ rtl_macro_placer [-boundary_weight boundary_weight] [-notch_weight notch_weight] [-macro_blockage_weight macro_blockage_weight] + [-pin_access_th pin_access_th] [-target_util target_util] [-target_dead_space target_dead_space] [-min_ar min_ar] diff --git a/src/mpl2/src/mpl.tcl b/src/mpl2/src/mpl.tcl index 76e94496371..01a3babf345 100644 --- a/src/mpl2/src/mpl.tcl +++ b/src/mpl2/src/mpl.tcl @@ -31,38 +31,38 @@ ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ############################################################################ -sta::define_cmd_args "rtl_macro_placer" { -max_num_macro max_num_macro \ - -min_num_macro min_num_macro \ - -max_num_inst max_num_inst \ - -min_num_inst min_num_inst \ - -tolerance tolerance \ - -max_num_level max_num_level \ - -coarsening_ratio coarsening_ratio \ - -num_bundled_ios num_bundled_ios \ - -large_net_threshold large_net_threshold \ - -signature_net_threshold signature_net_threshold \ - -halo_width halo_width \ - -halo_height halo_height \ - -fence_lx fence_lx \ - -fence_ly fence_ly \ - -fence_ux fence_ux \ - -fence_uy fence_uy \ - -area_weight area_weight \ - -outline_weight outline_weight \ - -wirelength_weight wirelength_weight \ - -guidance_weight guidance_weight \ - -fence_weight fence_weight \ - -boundary_weight boundary_weight \ - -notch_weight notch_weight \ - -macro_blockage_weight macro_blockage_weight \ - -pin_access_th pin_access_th \ - -target_util target_util \ - -target_dead_space target_dead_space \ - -min_ar min_ar \ - -snap_layer snap_layer \ - -bus_planning_flag bus_planning_flag \ - -report_directory report_directory \ - -write_macro_placement file_name \ +sta::define_cmd_args "rtl_macro_placer" { [-max_num_macro max_num_macro] \ + [-min_num_macro min_num_macro] \ + [-max_num_inst max_num_inst] \ + [-min_num_inst min_num_inst] \ + [-tolerance tolerance] \ + [-max_num_level max_num_level] \ + [-coarsening_ratio coarsening_ratio] \ + [-num_bundled_ios num_bundled_ios] \ + [-large_net_threshold large_net_threshold] \ + [-signature_net_threshold signature_net_threshold] \ + [-halo_width halo_width] \ + [-halo_height halo_height] \ + [-fence_lx fence_lx] \ + [-fence_ly fence_ly] \ + [-fence_ux fence_ux] \ + [-fence_uy fence_uy] \ + [-area_weight area_weight] \ + [-outline_weight outline_weight] \ + [-wirelength_weight wirelength_weight] \ + [-guidance_weight guidance_weight] \ + [-fence_weight fence_weight] \ + [-boundary_weight boundary_weight] \ + [-notch_weight notch_weight] \ + [-macro_blockage_weight macro_blockage_weight] \ + [-pin_access_th pin_access_th] \ + [-target_util target_util] \ + [-target_dead_space target_dead_space] \ + [-min_ar min_ar] \ + [-snap_layer snap_layer] \ + [-bus_planning_flag bus_planning_flag] \ + [-report_directory report_directory] \ + [-write_macro_placement file_name] \ } proc rtl_macro_placer { args } { sta::parse_key_args "rtl_macro_placer" args keys { @@ -266,7 +266,7 @@ sta::define_cmd_args "place_macro" {-macro_name macro_name \ proc place_macro { args } { sta::parse_key_args "place_macro" args \ keys {-macro_name -location -orientation} \ - flag {} + flags {} if [info exists keys(-macro_name)] { set macro_name $keys(-macro_name) diff --git a/src/odb/README.md b/src/odb/README.md index 3e62a7c8f34..5d509b64399 100644 --- a/src/odb/README.md +++ b/src/odb/README.md @@ -160,7 +160,7 @@ set_ndr_rules Description TBC. ```tcl -set_ndr_rules +create_ndr -name name [-spacing val] [-width val] diff --git a/src/pad/README.md b/src/pad/README.md index 929c5ee0295..4ba4401ec20 100644 --- a/src/pad/README.md +++ b/src/pad/README.md @@ -357,7 +357,7 @@ rdl_route | `-allow45` | Specifies that 45 degree routing is permitted. | | `nets` | Nets to route. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/ICeWall.cpp) or the [swig file](./src/pad.i). diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index 6679618a874..632e2059bba 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -203,8 +203,7 @@ sta::define_cmd_args "place_corners" {[-ring_index index] \ proc place_corners {args} { sta::parse_key_args "place_corners" args \ - keys {} \ - flags {} + keys {-ring_index} flags {} sta::check_argc_eq1 "place_corners" $args @@ -328,7 +327,7 @@ proc place_bondpad {args} { sta::define_cmd_args "place_io_terminals" {inst_terms} proc place_io_terminals {args} { - sta::parse_key_args "place_bondpad" args \ + sta::parse_key_args "place_io_terminals" args \ keys {} \ flags {} @@ -347,7 +346,7 @@ sta::define_hidden_cmd_args "make_fake_io_site" {-name name \ proc make_fake_io_site {args} { sta::parse_key_args "make_fake_io_site" args \ keys {-name -width -height} \ - flags {};# no docs + flags {};# checker off sta::check_argc_eq0 "make_fake_io_site" $args diff --git a/src/par/README.md b/src/par/README.md index 0c55634afa2..b93b46bc715 100644 --- a/src/par/README.md +++ b/src/par/README.md @@ -209,6 +209,7 @@ triton_part_hypergraph -num_parts num_parts -balance_constraint balance_constraint [-base_balance base_balance] + [-scale_factor scale_factor] [-seed seed] [-vertex_dimension vertex_dimension] [-hyperedge_dimension hyperedge_dimension] @@ -289,6 +290,7 @@ evaluate_hypergraph_solution -hypergraph_file hypergraph_file -solution_file solution_file [-base_balance base_balance] + [-scale_factor scale_factor] [-vertex_dimension vertex_dimension] [-hyperedge_dimension hyperedge_dimension] [-fixed_file fixed_file] @@ -323,6 +325,7 @@ triton_part_design [-num_parts num_parts] [-balance_constraint balance_constraint] [-base_balance base_balance] + [-scale_factor scale_factor] [-seed seed] [-timing_aware_flag timing_aware_flag] [-top_n top_n] @@ -422,6 +425,7 @@ evaluate_part_design_solution [-num_parts num_parts] [-balance_constraint balance_constraint] [-base_balance base_balance] + [-scale_factor scale_factor] [-timing_aware_flag timing_aware_flag] [-top_n top_n] [-fence_flag fence_flag] @@ -482,6 +486,7 @@ This command writes the partition result to verilog. write_partition_verilog [-port_prefix prefix] [-module_suffix suffix] + [-partitioning_id id] [file] ``` @@ -491,6 +496,7 @@ write_partition_verilog | ----- | ----- | | `-port_prefix` | Port name prefix. | | `-module_suffix` | Module name suffix. | +| `-partitioning_id` | TBC. | | `file` | Filename to write parition verilog to. | ### Read Partitioning diff --git a/src/par/src/partitionmgr.tcl b/src/par/src/partitionmgr.tcl index 0831042c33b..316df77be04 100644 --- a/src/par/src/partitionmgr.tcl +++ b/src/par/src/partitionmgr.tcl @@ -982,7 +982,7 @@ proc evaluate_part_design_solution { args } { #-------------------------------------------------------------------- sta::define_cmd_args "write_partition_verilog" { \ - [-port_prefix prefix] [-module_suffix suffix] [file] + [-port_prefix prefix] [-module_suffix suffix] [-partitioning_id id] [file] } proc write_partition_verilog { args } { diff --git a/src/pdn/README.md b/src/pdn/README.md index 45efd48ac41..4767db64812 100644 --- a/src/pdn/README.md +++ b/src/pdn/README.md @@ -27,6 +27,7 @@ pdngen [-ripup] [-report_only] [-failed_via_report file] + [-verbose] ``` #### Options @@ -305,6 +306,9 @@ add_pdn_ring [-connect_to_pad_layers layers] [-starts_with POWER|GROUND] [-nets list_of_nets] + [-ground_pads pads] + [-power_pads pads] + ``` #### Options diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index 8941fd07ee5..36ef43252c5 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -33,7 +33,8 @@ sta::define_cmd_args "pdngen" {[-skip_trim] \ [-reset] \ [-ripup] \ [-report_only] \ - [-failed_via_report file] + [-failed_via_report file] \ + [-verbose] } proc pdngen { args } { @@ -275,7 +276,7 @@ sta::define_cmd_args "add_pdn_stripe" {[-grid grid_name] \ [-pitch pitch_value] \ [-spacing spacing_value] \ [-offset offset_value] \ - [-starts_width (POWER|GROUND)] + [-starts_with (POWER|GROUND)] [-extend_to_boundary] \ [-snap_to_grid] \ [-number_of_straps count] \ @@ -399,7 +400,9 @@ sta::define_cmd_args "add_pdn_ring" {[-grid grid_name] \ [-connect_to_pads] \ [-connect_to_pad_layers layers] \ [-starts_with (POWER|GROUND)] \ - [-nets list_of_nets]} + [-nets list_of_nets] \ + [-ground_pads pads] + [-power_pads pads]} proc add_pdn_ring {args} { sta::parse_key_args "add_pdn_ring" args \ @@ -789,7 +792,7 @@ sta::define_hidden_cmd_args "convert_pdn_config" { config_file } proc convert_pdn_config { args } { sta::parse_key_args "convert_pdn_config" args \ keys {} \ - flags {};# no docs + flags {};# checker off sta::check_argc_eq1 "convert_pdn_config" $args @@ -846,7 +849,7 @@ namespace eval pdn { proc define_pdn_grid { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -pins -starts_with -obstructions -power_switch_cell -power_control -power_control_network} \ - flags {};# no docs + flags {};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -918,9 +921,9 @@ namespace eval pdn { } proc define_pdn_grid_existing { args } { - sta::parse_key_args "define_pdn_grid" args \ + sta::parse_key_args "define_pdn_grid_existing" args \ keys {-name -obstructions} \ - flags {-existing};#no docs + flags {-existing};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -939,9 +942,9 @@ namespace eval pdn { } proc define_pdn_grid_macro { args } { - sta::parse_key_args "define_pdn_grid" args \ + sta::parse_key_args "define_pdn_grid_macro" args \ keys {-name -voltage_domains -orient -instances -cells -halo -pin_direction -starts_with -obstructions} \ - flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump};# no docs + flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" diff --git a/src/ppl/README.md b/src/ppl/README.md index 5b5735fc239..30a6e2e3306 100644 --- a/src/ppl/README.md +++ b/src/ppl/README.md @@ -181,6 +181,24 @@ set_simulated_annealing | `-perturb_per_iter` | The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | | `-alpha` | The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. | +### Simulated Annealing Debug + +The `simulated_annealing_debug` command allows you to debug the simulated +annealing pin placement with a pause mode. + +```tcl +simulated_annealing_debug + [-iters_between_paintings iters] + [-no_pause_mode no_pause_mode] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-iters_between_paintings` | Determines the number of iterations between updates. | +| `-no_pause_mode` | Print solver state every second based on `iters_between_paintings`. | + ### Place Pin The `place_pin` command places a specific pin in the specified location with the specified size. @@ -196,6 +214,7 @@ place_pin -location {x y} [-pin_size {width height}] [-force_to_die_boundary] + [-placed_status] ``` #### Options @@ -273,7 +292,7 @@ write_pin_placement | ----- | ----- | | `file_name` | The name of the file with the pin placement. | -### Useful Developer Commands +## Useful Developer Commands If you are a developer, you might find these useful. More details can be found in the [source file](./src/IOPlacer.cpp) or the [swig file](./src/IOPlacer.i). diff --git a/src/ppl/src/IOPlacer.tcl b/src/ppl/src/IOPlacer.tcl index 61600b73133..397aecc52a4 100644 --- a/src/ppl/src/IOPlacer.tcl +++ b/src/ppl/src/IOPlacer.tcl @@ -342,7 +342,7 @@ proc set_simulated_annealing { args } { sta::define_cmd_args "simulated_annealing_debug" { [-iters_between_paintings iters] - [-no_pause_mode no_pause_mode] # Print solver state every second based on iters_between_paintings + [-no_pause_mode no_pause_mode] } proc simulated_annealing_debug { args } { @@ -363,7 +363,8 @@ sta::define_cmd_args "place_pin" {[-pin_name pin_name]\ [-layer layer]\ [-location location]\ [-pin_size pin_size]\ - [-force_to_die_boundary] + [-force_to_die_boundary]\ + [-placed_status] } proc place_pin { args } { diff --git a/src/psm/README.md b/src/psm/README.md index 92491d87c0c..3810cd5def9 100644 --- a/src/psm/README.md +++ b/src/psm/README.md @@ -63,7 +63,8 @@ This command checks power grid. ```tcl check_power_grid - -net net_name + [-net net_name] + [-error_file error_file] ``` #### Options @@ -71,6 +72,7 @@ check_power_grid | Switch Name | Description | | ----- | ----- | | `-net` | Name of the net to analyze. Must be a power or ground net name. | +| `-error_file` | Name of the error file to save output to. | ### Write PG Spice diff --git a/src/rcx/README.md b/src/rcx/README.md index 5cbea0d4b55..8cb558fe3c5 100644 --- a/src/rcx/README.md +++ b/src/rcx/README.md @@ -84,6 +84,7 @@ in the database. write_spef [-net_id net_id] [-nets nets] + [-coordinates] filename ``` @@ -93,6 +94,7 @@ write_spef | ----- | ----- | | `-net_id` | Output the parasitics info for specific net IDs. | | `-nets` | Net name. | +| `coordinates` | Coordinates TBC. | | `filename` | Output filename. | ### Adjust RC @@ -234,6 +236,7 @@ write_rules [-dir dir] [-name name] [-pattern pattern] + [-db] ``` #### Options @@ -244,6 +247,7 @@ write_rules | `-dir` | Output file directory. | | `-name` | Name of rule. | | `-pattern` | Flag to write the pattern to rulefile (0/1). | +| `-db` | DB tbc. | ## Example scripts diff --git a/src/rcx/src/OpenRCX.tcl b/src/rcx/src/OpenRCX.tcl index 9fed123fde5..6312a89775c 100644 --- a/src/rcx/src/OpenRCX.tcl +++ b/src/rcx/src/OpenRCX.tcl @@ -125,7 +125,9 @@ proc extract_parasitics { args } { sta::define_cmd_args "write_spef" { [-net_id net_id] - [-nets nets] filename } + [-nets nets] + [-coordinates] + filename } proc write_spef { args } { sta::parse_key_args "write_spef" args keys \ @@ -304,6 +306,7 @@ sta::define_cmd_args "write_rules" { [-dir dir] [-name name] [-pattern pattern] + [-db] } proc write_rules { args } { diff --git a/src/rmp/README.md b/src/rmp/README.md index 244827be12f..64d6e932dc0 100644 --- a/src/rmp/README.md +++ b/src/rmp/README.md @@ -30,12 +30,14 @@ Example: `restructure -liberty_file ckt.lib -target delay -tielo_pin ABC -tiehi_ ```tcl restructure - -liberty_file liberty_file - -target area|delay - -tielo_pin tielo_pin_name - -tiehi_pin tiehi_pin_name - -slack_threshold slack_val - -depth_threshold depth_threshold + [-slack_threshold slack_val] + [-depth_threshold depth_threshold] + [-target area|delay] + [-abc_logfile logfile] + [-liberty_file liberty_file] + [-tielo_port tielo_pin_name] + [-tiehi_port tiehi_pin_name] + [-work_dir work_dir] ``` #### Options @@ -46,8 +48,10 @@ restructure | `-target` | Either `area` or `delay`. In area mode, the focus is area reduction, and timing may degrade. In delay mode, delay is likely reduced, but the area may increase. | | `-slack_threshold` | Specifies a (setup) timing slack value below which timing paths need to be analyzed for restructuring. | | `-depth_threshold` | Specifies the path depth above which a timing path would be considered for restructuring. | -| `-tielo_pin` | Tie cell pin that can drive constant zero. The format is `lib/cell/pin`. | -| `-tiehi_pin` | Tie cell pin that can drive constant one. The format is `lib/cell/pin`. | +| `-tielo_port` | Tie cell pin that can drive constant zero. The format is `lib/cell/pin`. | +| `-tiehi_port` | Tie cell pin that can drive constant one. The format is `lib/cell/pin`. | +| `-abc_logfile` | Output file to save abc logs to. | +| `-work_dir` | Work directory. | ## Example scripts diff --git a/src/rmp/src/rmp.tcl b/src/rmp/src/rmp.tcl index 20eacdf43c5..e5d9ff22625 100644 --- a/src/rmp/src/rmp.tcl +++ b/src/rmp/src/rmp.tcl @@ -51,6 +51,7 @@ sta::define_cmd_args "restructure" { \ [-slack_threshold slack]\ [-depth_threshold depth]\ [-target area|timing]\ + [-abc_logfile logfile]\ [-liberty_file liberty_file]\ [-tielo_port tielow_port]\ [-tiehi_port tiehigh_port]\ diff --git a/src/rsz/README.md b/src/rsz/README.md index 33fa21ad47e..b87a922370d 100644 --- a/src/rsz/README.md +++ b/src/rsz/README.md @@ -19,14 +19,21 @@ delay of routing wires. Separate values can be specified for clock and data nets with the `-signal` and `-clock` flags. Without either `-signal` or `-clock` the resistance and capacitance for clocks and data nets are set. +``` +# Either run +set_wire_rc -clock ... -signal ... -layer ... + +# Or +set_wire_rc -resistance ... -capacitance ... +``` + ```tcl set_wire_rc [-clock] [-signal] + [-data] + [-corner corner] [-layer layer_name] - -or -set_wire_rc [-resistance res] [-capacitance cap] ``` @@ -141,6 +148,7 @@ buffer_ports [-inputs] [-outputs] [-max_utilization util] + [-buffer_cell buf_cell] ``` #### Options @@ -197,6 +205,7 @@ of the tie high/low cell. ```tcl repair_tie_fanout [-separation dist] + [-max_fanout fanout] [-verbose] lib_port ``` @@ -223,10 +232,16 @@ endpoints are repaired to reduced the total negative slack. repair_timing [-setup] [-hold] + [-recover_power percent] [-setup_margin setup_margin] [-hold_margin hold_margin] + [-slack_margin slack_margin] + [-libraries libs] [-allow_setup_violations] + [-skip_pin_swap] + [-skip_gate_cloning] [-repair_tns tns_end_percent] + [-max_passes passes] [-max_utilization util] [-max_buffer_percent buffer_percent] [-verbose] diff --git a/src/rsz/src/Resizer.tcl b/src/rsz/src/Resizer.tcl index d9ff34a58a0..2802f43f650 100644 --- a/src/rsz/src/Resizer.tcl +++ b/src/rsz/src/Resizer.tcl @@ -124,7 +124,7 @@ proc set_layer_rc {args} { } } -sta::define_cmd_args "set_wire_rc" {[-clock] [-signal]\ +sta::define_cmd_args "set_wire_rc" {[-clock] [-signal] [-data]\ [-layer layer_name]\ [-resistance res]\ [-capacitance cap]\ @@ -285,7 +285,8 @@ proc set_dont_touch_cmd { cmd cmd_args dont_touch } { } sta::define_cmd_args "buffer_ports" {[-inputs] [-outputs]\ - [-max_utilization util]} + [-max_utilization util]\ + [-buffer_cell buf_cell]} proc buffer_ports { args } { sta::parse_key_args "buffer_ports" args \ @@ -359,12 +360,15 @@ proc repair_clock_nets { args } { sta::define_cmd_args "repair_clock_inverters" {} proc repair_clock_inverters { args } { - sta::parse_key_args "repair_clock_nets" args keys {} flags {} + sta::parse_key_args "repair_clock_inverters" args keys {} flags {} sta::check_argc_eq0 "repair_clock_inverters" $args rsz::repair_clk_inverters_cmd } -sta::define_cmd_args "repair_tie_fanout" {lib_port [-separation dist] [-verbose]} +sta::define_cmd_args "repair_tie_fanout" {lib_port\ + [-separation dist]\ + [-max_fanout fanout]\ + [-verbose]} proc repair_tie_fanout { args } { sta::parse_key_args "repair_tie_fanout" args keys {-separation -max_fanout} \ @@ -395,13 +399,17 @@ proc repair_tie_fanout { args } { # -max_passes is for developer debugging so intentionally not documented # in define_cmd_args -sta::define_cmd_args "repair_timing" {[-setup] [-hold] [-recover_power percent_of_paths_with_slack]\ +sta::define_cmd_args "repair_timing" {[-setup] [-hold]\ + [-recover_power percent_of_paths_with_slack]\ [-setup_margin setup_margin]\ [-hold_margin hold_margin]\ + [-slack_margin slack_margin]\ + [-libraries libs]\ [-allow_setup_violations]\ [-skip_pin_swap]\ - [-skip_gate_cloning)]\ + [-skip_gate_cloning]\ [-repair_tns tns_end_percent]\ + [-max_passes passes]\ [-max_buffer_percent buffer_percent]\ [-max_utilization util] \ [-verbose]} @@ -530,12 +538,12 @@ proc report_floating_nets { args } { utl::metric "timing__drv__floating__pins" $floating_pin_count } -sta::define_cmd_args "report_long_wires" {count};# no docs +sta::define_cmd_args "report_long_wires" {count};# checker off sta::proc_redirect report_long_wires { global sta_report_default_digits - sta::parse_key_args "report_long_wires" args keys {-digits} flags {};# no docs + sta::parse_key_args "report_long_wires" args keys {-digits} flags {};# checker off set digits $sta_report_default_digits if { [info exists keys(-digits)] } { diff --git a/src/stt/README.md b/src/stt/README.md index 0605e766526..d36cdd0b344 100644 --- a/src/stt/README.md +++ b/src/stt/README.md @@ -34,6 +34,7 @@ set_routing_alpha [-net net_name] [-min_fanout fanout] [-min_hpwl hpwl] + [-clock_nets] alpha ``` @@ -44,6 +45,7 @@ set_routing_alpha | `-net` | Net name. | | `-min_fanout` | Set the minimum number for fanout. | | `-min_hpwl` | Set the minimum half-perimetere wirelength (microns). | +| `-clock_nets` | If this flag is set to True, only clock nets will be modified. | | `alpha` | Float between 0 and 1 describing the trade-off between wirelength and path depth. | ## Example scripts diff --git a/src/tap/README.md b/src/tap/README.md index dddfbd8c74a..797629ee982 100644 --- a/src/tap/README.md +++ b/src/tap/README.md @@ -26,7 +26,9 @@ placement is similar to Figure 2. ```tcl tapcell [-tapcell_master tapcell_master] + [-tap_prefix tap_prefix] [-endcap_master endcap_master] + [-endcap_prefix endcap_prefix] [-distance dist] [-halo_width_x halo_x] [-halo_width_y halo_y] @@ -40,8 +42,9 @@ tapcell [-cnrcap_nwout_master cnrcap_nwout_master] [-incnrcap_nwin_master incnrcap_nwin_master] [-incnrcap_nwout_master incnrcap_nwout_master] - [-tap_prefix tap_prefix] - [-endcap_prefix endcap_prefix] + [-tbtie_cpp tbtie_cpp] + [-endcap_cpp endcap_cpp] + [-no_cell_at_top_bottom] ``` #### Options diff --git a/src/tap/src/tapcell.tcl b/src/tap/src/tapcell.tcl index b7ca4f4b381..d93ac0c62a7 100644 --- a/src/tap/src/tapcell.tcl +++ b/src/tap/src/tapcell.tcl @@ -52,6 +52,7 @@ sta::define_cmd_args "tapcell" {[-tapcell_master tapcell_master]\ [-incnrcap_nwin_master incnrcap_nwin_master]\ [-incnrcap_nwout_master incnrcap_nwout_master]\ [-tbtie_cpp tbtie_cpp]\ + [-endcap_cpp endcap_cpp]\ [-no_cell_at_top_bottom]\ } @@ -222,7 +223,7 @@ sta::define_cmd_args "tapcell_ripup" {[-tap_prefix tap_prefix]\ # This will remove the tap cells and endcaps to tapcell can be rerun with new parameters proc tapcell_ripup { args } { - sta::parse_key_args "tapcell" args \ + sta::parse_key_args "tapcell_ripup" args \ keys {-tap_prefix -endcap_prefix} \ flags {} @@ -339,11 +340,11 @@ sta::define_cmd_args "place_tapcells" { proc place_tapcells {args } { - sta::parse_key_args "place_boundary_cells" args \ + sta::parse_key_args "place_tapcells" args \ keys {-master -distance} \ flags {} - sta::check_argc_eq0 "place_boundary_cells" $args + sta::check_argc_eq0 "place_tapcells" $args set dist -1 if { [info exists keys(-distance)] } { diff --git a/src/upf/src/upf.tcl b/src/upf/src/upf.tcl index 0a359e2eca2..24910d18682 100644 --- a/src/upf/src/upf.tcl +++ b/src/upf/src/upf.tcl @@ -361,7 +361,7 @@ proc map_power_switch { args } { check_block_exists sta::parse_key_args "map_power_switch" args \ - keys {switch_name_list -lib_cells -port_map} flags {} + keys {-switch_name_list -lib_cells -port_map} flags {} sta::check_argc_eq1 "map_power_switch" $args From 821dbbd37ed483db8027ea7c281efee37e40ace1 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 3 Feb 2024 03:40:45 +0000 Subject: [PATCH 53/88] Turned checker off for check_antennas, set_routing_layers, make_fake_io_sites. 143/143 dyn tst passing Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/man_tcl_check.ok | 12 +++++----- docs/src/test/man_tcl_params.ok | 39 ++------------------------------- src/ant/src/AntennaChecker.tcl | 4 ++-- src/grt/src/GlobalRouter.tcl | 8 +++---- src/pad/src/pad.tcl | 4 ++-- src/pdn/README.md | 12 +++++----- src/pdn/src/pdn.tcl | 7 ++++-- 7 files changed, 27 insertions(+), 59 deletions(-) diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index 95fc24727e0..9d8c1daaca0 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -1,6 +1,6 @@ Tool Dir Help count Proc count Readme count -./src/ant 1 1 1 -Command counts match. +./src/ant 0 0 1 +Command counts do not match. ./src/fin 1 1 1 Command counts match. ./src/mpl 1 1 1 @@ -11,8 +11,8 @@ Command counts match. Command counts match. ./src/tap 5 5 5 Command counts match. -./src/grt 13 13 13 -Command counts match. +./src/grt 12 12 13 +Command counts do not match. ./src/gui 7 7 7 Command counts match. ./src/pdn 9 9 9 @@ -41,8 +41,8 @@ Command counts match. Command counts match. ./src/upf 8 8 8 Command counts match. -./src/pad 13 13 13 -Command counts match. +./src/pad 12 12 13 +Command counts do not match. ./src/rcx 9 9 9 Command counts match. ./src/rsz 16 16 16 diff --git a/docs/src/test/man_tcl_params.ok b/docs/src/test/man_tcl_params.ok index 471a93beeb1..138621e2637 100644 --- a/docs/src/test/man_tcl_params.ok +++ b/docs/src/test/man_tcl_params.ok @@ -1,13 +1,4 @@ ---------- -check_antennas -['-net', '-verbose'] -['-net', '-report_file', '-report_violating_nets', '-verbose'] -['-net', '-report_file', '-report_violating_nets', '-verbose'] -['-net', '-verbose'] -Help/Proc: False -Help/Rdme: True -Proc/Rdme: False ----------- density_fill Success. ---------- @@ -47,15 +38,6 @@ Success. set_global_routing_region_adjustment Success. ---------- -set_routing_layers -['-clock', '-signal'] -['-clock', '-max', '-signal'] -['-clock', '-signal'] -['-clock', '-max', '-signal'] -Help/Proc: True -Help/Rdme: False -Proc/Rdme: False ----------- set_macro_extension Success. ---------- @@ -114,15 +96,7 @@ set_voltage_domain Success. ---------- define_pdn_grid -['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domains'] -['-cells', '-existing', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-voltage_domains'] -['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domains'] -['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domain'] -['-cells', '-existing', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-voltage_domains'] -['-cells', '-default', '-existing', '-grid_over_boundary', '-grid_over_pg_pins', '-halo', '-instances', '-macro', '-name', '-obstructions', '-orient', '-pins', '-power_control', '-power_control_network', '-power_switch_cell', '-starts_with', '-voltage_domain'] -Help/Proc: False -Help/Rdme: False -Proc/Rdme: False +Success. ---------- define_power_switch_cell Success. @@ -307,15 +281,6 @@ Success. assign_io_bump Success. ---------- -make_io_sites -['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] -['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] -['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] -['-corner_site', '-horizontal_site', '-offset', '-ring_index', '-rotation_corner', '-rotation_horizontal', '-rotation_vertical', '-vertical_site'] -Help/Proc: False -Help/Rdme: True -Proc/Rdme: False ----------- remove_io_rows Success. ---------- @@ -463,4 +428,4 @@ Success. write_guides Success. ---------- -Succeeded: 142 out of 146 tests. +Succeeded: 143 out of 143 tests. diff --git a/src/ant/src/AntennaChecker.tcl b/src/ant/src/AntennaChecker.tcl index a7802aca164..dbaf893cf38 100644 --- a/src/ant/src/AntennaChecker.tcl +++ b/src/ant/src/AntennaChecker.tcl @@ -30,12 +30,12 @@ # POSSIBILITY OF SUCH DAMAGE. sta::define_cmd_args "check_antennas" { [-verbose]\ - [-net net]} + [-net net]};# checker off proc check_antennas { args } { sta::parse_key_args "check_antennas" args \ keys {-report_file -net} \ - flags {-verbose -report_violating_nets} + flags {-verbose -report_violating_nets};# checker off sta::check_argc_eq0 "check_antennas" $args diff --git a/src/grt/src/GlobalRouter.tcl b/src/grt/src/GlobalRouter.tcl index 24e0037f8c0..ab597428177 100644 --- a/src/grt/src/GlobalRouter.tcl +++ b/src/grt/src/GlobalRouter.tcl @@ -117,13 +117,13 @@ proc set_global_routing_region_adjustment { args } { } } -sta::define_cmd_args "set_routing_layers" { [-signal layers] \ - [-clock layers] \ -} +sta::define_cmd_args "set_routing_layers" { [-signal min-max] \ + [-clock min-max] \ +};# checker off proc set_routing_layers { args } { sta::parse_key_args "set_routing_layers" args \ - keys {-signal -clock} flags {} + keys {-signal -clock} flags {};# checker off sta::check_argc_eq0 "set_routing_layers" $args diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index 632e2059bba..1463ab6791d 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -137,12 +137,12 @@ sta::define_cmd_args "make_io_sites" {-horizontal_site site \ [-rotation_horizontal rotation] \ [-rotation_vertical rotation] \ [-rotation_corner rotation] \ - [-ring_index index]} + [-ring_index index]}; # checker off proc make_io_sites {args} { sta::parse_key_args "make_io_sites" args \ keys {-horizontal_site -vertical_site -corner_site -offset -rotation -rotation_horizontal -rotation_vertical -rotation_corner -ring_index} \ - flags {} + flags {}; # checker off sta::check_argc_eq0 "make_io_sites" $args set index -1 diff --git a/src/pdn/README.md b/src/pdn/README.md index 4767db64812..440909e751b 100644 --- a/src/pdn/README.md +++ b/src/pdn/README.md @@ -113,21 +113,21 @@ define_pdn_grid -name main_grid -existing ```tcl define_pdn_grid [-name name] - [-voltage_domain list_of_domain_names] - [-pins list_of_pin_layers] - [-starts_with POWER|GROUND] - [-obstructions list_of_layers] [-macro] + [-existing] + [-voltage_domains list_of_domain_names] [-grid_over_pg_pins|-grid_over_boundary] [-orient list_of_valid_orientations] [-instances list_of_instances] [-cells list_of_cells] [-default] [-halo list_of_halo_values] + [-pins list_of_pin_layers] + [-starts_with POWER|GROUND] + [-obstructions list_of_layers] [-power_switch_cell name] [-power_control signal_name] [-power_control_network STAR|DAISY] - [-existing] ``` #### Options @@ -135,7 +135,7 @@ define_pdn_grid | Switch Name | Description | | ----- | ----- | | `-name` | Defines a name to use when referring to this grid definition. | -| `-voltage_domain` | Defines the name of the voltage domain for this grid (Default: Last domain created). | +| `-voltage_domains` | Defines the name of the voltage domain for this grid (Default: Last domain created). | | `-pins` | Defines a list of layers which where the power straps will be promoted to block pins. | | `-starts_with` | Specifies whether the first strap placed will be POWER or GROUND (Default: GROUND). | | `-obstructions` | Specify the layers to add routing blockages, in order to avoid DRC violations. | diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index 36ef43252c5..7e4ec3a5c79 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -186,8 +186,11 @@ sta::define_cmd_args "define_pdn_grid" {[-name <name>] \ proc define_pdn_grid {args} { sta::parse_key_args "define_pdn_grid" args \ - keys {-name -voltage_domains -orient -instances -cells -halo -pins -obstructions -power_switch_cell -power_control -power_control_network}\ - flags {-macro -existing} + keys {-name -voltage_domains -orient -instances\ + -cells -halo -pins -obstructions -power_switch_cell\ + -power_control -power_control_network -starts_with}\ + flags {-macro -existing -grid_over_pg_pins -grid_over_boundary\ + -default} set is_macro 0 set is_existing 0 foreach arg $args { From 93cecb4f2979305f6d06b290960922e8bacdb00a Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 3 Feb 2024 03:48:12 +0000 Subject: [PATCH 54/88] fix default man path to be build/src and dont hardcore j16 Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.py | 3 ++- src/utl/src/Utl.tcl | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/test/count_outfiles.py b/docs/src/test/count_outfiles.py index bb2a6890175..f9679698a27 100644 --- a/docs/src/test/count_outfiles.py +++ b/docs/src/test/count_outfiles.py @@ -4,11 +4,12 @@ # Test objective: To count the number of expected files in man2/man3 # This script mimics the build process and checks expected output. +NUM_CORES = os.cpu_count() path = os.path.realpath("md_roff_compat.py") docs_dir = os.path.dirname(os.path.dirname(os.path.dirname(path))) os.chdir(docs_dir) os.system("make clean -s && make preprocess -s") -os.system("make all -j16 -s") +os.system(f"make all -j{NUM_CORES} -s") # Check if the files in html1 == cat1, html2 == cat2, html3 = cat3 for i in range(1, 4): diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index c3ff1de5fd9..a9046f60db0 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -9,7 +9,6 @@ proc man { args } { keys {-manpath} flags {-no_query} set name [lindex $args 0] - set DEFAULT_MAN_PATH "/usr/local/share/man/cat" # check the default man path based on executable path set exec_output [info nameofexecutable] @@ -19,6 +18,8 @@ proc man { args } { set executable_path [file normalize [file dirname [info nameofexecutable]]] set man_path [file normalize [file dirname [file dirname $executable_path]]] set DEFAULT_MAN_PATH [file join $man_path "docs" "cat"] + } else { + set DEFAULT_MAN_PATH "/usr/local/share/man/cat" } global MAN_PATH From edae869bb9844d7c6a4fc59a067d5735f4ea644c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sun, 4 Feb 2024 18:02:09 +0000 Subject: [PATCH 55/88] improve regex logic for filenames and revert to more verbose headers in readme Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/scripts/extract_utils.py | 6 +++ docs/src/scripts/md_roff_compat.py | 18 +++---- src/drt/README.md | 4 +- src/grt/README.md | 12 ++--- src/gui/README.md | 86 +++++++++++++++--------------- src/ifp/README.md | 2 +- src/pad/README.md | 22 ++++---- src/par/README.md | 2 +- src/pdn/README.md | 10 ++-- src/ppl/README.md | 14 ++--- src/psm/README.md | 2 +- src/rcx/README.md | 12 ++--- src/rsz/README.md | 8 +-- src/tap/README.md | 8 +-- src/upf/README.md | 6 +-- 15 files changed, 108 insertions(+), 104 deletions(-) diff --git a/docs/src/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py index 1c970765be7..62b53b0fa1b 100644 --- a/docs/src/scripts/extract_utils.py +++ b/docs/src/scripts/extract_utils.py @@ -8,6 +8,12 @@ def extract_headers(text, level = 1): #if "Useful Developer Commands" in headers: headers.remove("Useful Developer Commands") return headers +def extract_tcl_command(text): + # objective is to extract tcl command from the synopsis + pattern = r'```tcl\s*(.*?)\s' + headers = re.findall(pattern, text, flags=re.MULTILINE) + return headers + def extract_description(text): # this is so that it always tries to match the longer headers first, to disambiguate sorted_headers = sorted(extract_headers(text,3), key=len, reverse=True) diff --git a/docs/src/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py index 56ce5375351..3f9007c8195 100644 --- a/docs/src/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -1,13 +1,10 @@ import os from manpage import ManPage -from extract_utils import extract_headers, extract_description, extract_tcl_code, extract_arguments, extract_tables, parse_switch - -# also you need to change the ### FUNCTION_NAME parsing. Sometimes the -# function name could be something weird like `diff_spef` or `pdngen` -# so it would be better to have a more informative header for the RTD docs. -# TODO: New function name parsing. Instead of parsing level3 header. -# parse the func_name from the tcl itself. Then the level3 header can be used to -# be the description of the function. E.g. `func_name - Useful Function Description` in the roff. +from extract_utils import extract_tcl_command, extract_description +from extract_utils import extract_tcl_code, extract_arguments +from extract_utils import extract_tables, parse_switch + +# Undocumented manpages. # sta: documentation is hosted elsewhere. (not currently in RTD also.) # odb: documentation is hosted on doxygen. @@ -15,6 +12,7 @@ "dst", "fin", "gpl", "grt", "gui", "ifp", "mpl",\ "mpl2", "odb", "pad", "par", "pdn", "ppl", "psm",\ "rcx", "rmp", "rsz", "sta", "stt", "tap", "upf", "utl"] + # Process man2 (except odb and sta) DEST_DIR2 = SRC_DIR = "./md/man2" exclude2 = ["odb", "sta"] @@ -34,8 +32,8 @@ def man2(path=DEST_DIR2): continue text = open(doc).read() - # function names (and convert gui:: to gui_) - func_names = extract_headers(text, 3) + # new function names (reading tcl synopsis + convert gui:: to gui_) + func_names = extract_tcl_command(text) func_names = ["_".join(s.lower().split()) for s in func_names] func_names = [s.replace("::", "_") for s in func_names] diff --git a/src/drt/README.md b/src/drt/README.md index 3fd29f72079..195beae2e6f 100644 --- a/src/drt/README.md +++ b/src/drt/README.md @@ -98,7 +98,7 @@ Some arguments that are helpful for developers are listed here. | `-or_seed` | Random seed for the order of nets to reroute. The default value is `-1`, and the allowed values are integers `[0, MAX_INT]`. | | `-or_k` | Number of swaps is given by $k * sizeof(rerouteNets)$. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | -### Detailed Route Debug +### Detailed Route Debugging The following command and arguments are useful when debugging error messages from `drt` and to understand its behavior. @@ -142,7 +142,7 @@ detailed_route_debug | `-pa_commit` | Enable visibility of pin access commits. | | `-write_net_tracks` | Enable writing of net track assigments. | -### Pin Access +### Check Pin Access This function checks pin access. diff --git a/src/grt/README.md b/src/grt/README.md index a31fbc26a64..d9edcdb9fa6 100644 --- a/src/grt/README.md +++ b/src/grt/README.md @@ -142,7 +142,7 @@ set_global_routing_region_adjustment | `-layer` | Integer for the layer number (e.g. for M1 you would use 1). | | `-adjustment` | Float indicating the percentage reduction of each edge in the specified layer. | -### Set Global Routing Random +### Set Global Routing Randomness The command randomizes global routing by shuffling the order of the nets and randomly subtracts or adds to the capacities of a random set of edges. @@ -167,7 +167,7 @@ set_global_routing_random | `-capacities_perturbation_percentage` | Sets the percentage of edges whose capacities are perturbed. By default, the edge capacities are perturbed by adding or subtracting 1 (track) from the original capacity. | | `-perturbation_amount` | Sets the perturbation value of the edge capacities. This option is only meaningful when `-capacities_perturbation_percentage` is used. | -### Set Nets to Route +### Set Specific Nets to Route The `set_nets_to_route` command defines a list of nets to route. Only the nets defined in this command are routed, leaving the remaining nets without any @@ -226,7 +226,7 @@ repair_antennas | `-ratio_margin` | Add a margin to the antenna ratios. The default value is `0`, and the allowed values are integers `[0, 100]`. | -### Draw Route Guides +### Plot Global Routing Guides The `draw_route_guides` command plots the route guides for a set of nets. To erase the route guides from the GUI, pass an empty list to this command: @@ -245,7 +245,7 @@ draw_route_guides | `net_names` | Tcl list of set of nets (e.g. `{net1, net2}`). | | `-show_pin_locations` | Draw circles for the pin positions on the routing grid. | -### Report Wire Length +### Report Wirelength The `report_wire_length` command reports the wire length of the nets. Use the `-global_route` and the `-detailed_route` flags to report the wire length from global and detailed routing, @@ -273,7 +273,7 @@ report_wire_length | `-detailed_route` | Report the wire length of the detailed routing. | | `-verbose` | This flag enables the full reporting of the layer-wise wirelength information. | -### Global Route Debug +### Global Route Debug Mode The `global_route_debug` command allows you to start a debug mode to view the status of the Steiner Trees. It also allows you to dump the input positions for the Steiner tree creation of a net. @@ -301,7 +301,7 @@ global_route_debug | `-saveSttInput` | File name to save `stt` input of a net. | | `-net` | The name of the net name to be displayed. | -### Read Guides +### Read Global Routing Guides This command reads global routing guides. diff --git a/src/gui/README.md b/src/gui/README.md index 55ed81b8319..a4e7bbdad3d 100644 --- a/src/gui/README.md +++ b/src/gui/README.md @@ -10,7 +10,7 @@ by opening it from the command-line with ``gui::show``. - Parameters without square brackets `-param2 param2` are required. ``` -### Create Toolbar Button +### Add Buttons to the Toolbar This command creates toolbar button with name set using the `-text` flag and accompanying logic in the `-script` flag. @@ -34,7 +34,7 @@ create_toolbar_button | `-script` | The tcl script to evaluate when the button is pressed. | | `-echo` | This indicate that the commands in the ``tcl_script`` should be echoed in the log. | -### gui::Remove Toolbar Button +### Remove Toolbar Button To remove toolbar button: @@ -49,7 +49,7 @@ gui::remove_toolbar_button | ---- | ---- | | `-name` | The name of the button, used when deleting the button. | -### Create Menu Item +### Add items to the Menubar This command add items to the menubar. Returns: name of the new item, either ``name`` or ``actionX``. @@ -76,7 +76,7 @@ create_menu_item | `-shortcut`| (optional) key shortcut to trigger this item.| | `-echo` | (optional) indicate that the commands in the ``tcl_script`` should be echoed in the log. | -### gui::Remove Menu Item +### Remove items from the Menubar To remove menu item: @@ -139,7 +139,7 @@ save_clocktree_image |`-height`| height of the image in pixels, defaults to the height of the GUI widget. | |`-width`| width of the image in pixels, defaults to the width of the GUI widget. | -### Select +### Select Objects This command selects object based on options. Returns: number of objects selected. @@ -162,7 +162,7 @@ select |`-filter`| (optional) filter selection based on the objects' properties. ``attribute`` represents the property's name and ``value`` the property's value. In case the property holds a collection (e. g. BTerms in a Net) or a table (e. g. Layers in a Generate Via Rule) ``value`` can be any element within those. A special case exists for checking whether a collection is empty or not by using the value ``CONNECTED``. This can be useful to select a specific group of elements (e. g. BTerms=CONNECTED will select only Nets connected to Input/Output Pins).| |`-highlight`| (optional) add the selection to the specific highlighting group. Values can be 0 to 7. | -### Display Timing Cone +### Display Timing Cones This command displays timing cones for a pin given options. @@ -204,7 +204,7 @@ focus_net ## TCL functions -### gui::Enabled +### Is GUI Enabled Determine is the GUI is active: @@ -212,7 +212,7 @@ Determine is the GUI is active: gui::enabled ``` -### gui::Design Created +### Is Design Created Announce to the GUI that a design was loaded (note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): @@ -221,7 +221,7 @@ Announce to the GUI that a design was loaded gui::design_created ``` -### gui::Load DRC +### Load DRC Result To load the results of a DRC report: @@ -236,7 +236,7 @@ gui::load_drc | ---- | ---- | | `filename` | Filename for DRC report. | -### gui::Show +### Show GUI To open the GUI from the command-line (this command does not return until the GUI is closed): @@ -253,7 +253,7 @@ gui::show | `script` | TCL script to evaluate in the GUI. | | `interactive` | Boolean if true, the GUI should open in an interactive session (default), or if false that the GUI would execute the script and return to the terminal.| -### gui::Hide +### Hide GUI To close the GUI and return to the command-line: @@ -261,7 +261,7 @@ To close the GUI and return to the command-line: gui::hide ``` -### gui::Fit +### Layout Fit To fit the whole layout in the window: @@ -269,7 +269,7 @@ To fit the whole layout in the window: gui::fit ``` -### gui::Zoom To +### Zoom to a specific region To zoom in our out to a specific region: @@ -284,7 +284,7 @@ gui::zoom_to | ---- | ---- | | `x0, y0, x1, y1`| first and second corner of the layout area in microns.| -### gui::Zoom In +### Zoom In To zoom in the layout: @@ -299,7 +299,7 @@ gui::zoom_in | ---- | ---- | | `x, y` | new center of layout in microns.| -### gui::Zoom Out +### Zoom Out To zoom out the layout: @@ -314,7 +314,7 @@ gui::zoom_out | ---- | ---- | | `x, y` | new center of layout in microns.| -### gui::Center At +### Center At To move the layout to new area: @@ -329,7 +329,7 @@ gui::center_at | ---- | ---- | | `x, y` | new center of layout in microns.| -### gui::Set Resolution +### Set Resolution To change the resolution to a specific value: @@ -344,7 +344,7 @@ gui::set_resolution | ---- | ---- | | `resolution` | database units per pixel. | -### gui::Selection Add Net +### Add a single net to selection To add a single net to the selected items: @@ -359,7 +359,7 @@ gui::selection_add_net | ---- | ---- | | `name` | name of the net to add.| -### gui::Selection Add Nets +### Add multiple nets to selection To add several nets to the selected items using a regex: @@ -374,7 +374,7 @@ gui::selection_add_nets | ---- | ---- | | `name_regex`| regular expression of the net names to add.| -### gui::Selection Add Inst +### Add a single inst to selection To add a single instance to the selected items: @@ -389,7 +389,7 @@ gui::selection_add_inst | ---- | ---- | | `name` | name of the instance to add. | -### gui::Selection Add Insts +### Add multiple insts to selection To add several instances to the selected items using a regex: @@ -404,7 +404,7 @@ gui::selection_add_insts | ---- | ---- | | `name_regex` | regular expression of the instance names to add. | -### gui::Select At +### Select at point or area To add items at a specific point or in an area: @@ -436,7 +436,7 @@ gui::select_at | `x0, y0, x1, y1`| first and second corner of the layout area in microns. | | `append`| if ``true`` (the default value) append the new selections to the current selection list, else replace the selection list with the new selections. | -### gui::Select Next +### Select next item from selection To navigate through multiple selected items: Returns: current index of the selected item. @@ -445,7 +445,7 @@ Returns: current index of the selected item. gui::select_next ``` -### gui::Select Previous +### Select previous item from selection To navigate through multiple selected items: Returns: current index of the selected item. @@ -454,7 +454,7 @@ Returns: current index of the selected item. gui::select_previous ``` -### gui::Clear Selections +### Clear Selection To clear the current set of selected items: @@ -462,7 +462,7 @@ To clear the current set of selected items: gui::clear_selections ``` -### gui::Get Selection Property +### Get Selection Property To get the properties for the current selection in the Inspector: @@ -477,7 +477,7 @@ gui::get_selection_property | ---- | ---- | | `name` | name of the property. For example, ``Type`` for object type or ``bbox`` for the bounding box of the object. | -### gui::Selection Animate +### Animate Selection To animate the current selection in the Inspector: @@ -492,7 +492,7 @@ gui::selection_animate | ---- | ---- | | `repeat` | indicate how many times the animation should repeat, default value is 0 repeats. If the value is 0, the animation will repeat indefinitely.| -### gui::Highlight net +### Highlight Net To highlight a net: @@ -509,7 +509,7 @@ gui::highlight_net | `name` | name of the net to highlight.| | `highlight_group` | group to add the highlighted net to, defaults to ``0``, valid groups are ``0 - 7``. | -### gui::Highlight Inst +### Highlight Instance To highlight an instance: @@ -526,7 +526,7 @@ gui::highlight_inst | `name` | name of the instance to highlight. | | `highlight_group` | group to add the highlighted instance to, defaults to ``0``, valid groups are ``0 - 7``. | -### gui::Clear Highlights +### Clear Highlight Groups To clear the highlight groups: @@ -541,7 +541,7 @@ gui::clear_highlights | ---- | ---- | | `highlight_group` | group to clear, defaults to ``0``, valid groups are ``-1 - 7``. Use ``-1`` to clear all groups. | -### gui::Add Ruler +### Add Ruler to Layout To add a ruler to the layout: @@ -569,7 +569,7 @@ gui::add_ruler | `name` | name of the ruler. | | `euclidian` | ``1`` for euclidian ruler, and ``0`` for regular ruler. | -### gui::Delete Ruler +### Delete a single ruler To remove a single ruler: @@ -584,7 +584,7 @@ gui::delete_ruler | ---- | ---- | | `name` | name of the ruler. | -### gui::Clear Rulers +### Clear All Rulers To remove all the rulers: @@ -592,7 +592,7 @@ To remove all the rulers: gui::clear_rulers ``` -### gui::Set Heatmap +### Set Heatmap To control the settings in the heat maps: @@ -619,7 +619,7 @@ gui::set_heatmap | `option` | is the name of the option to modify. If option is ``rebuild`` the map will be destroyed and rebuilt. | | `value` | is the new value for the specified option. This is not used when rebuilding map. | -### gui::Dump Heatmap Name +### Dump Heatmap to file To save the raw data from the heat maps ins a comma separated value (CSV) format: @@ -636,7 +636,7 @@ gui::dump_heatmap |`name` | is the name of the heatmap. | |`filename` | path to the file to write the data to. | -### gui::Set Display Controls +### Set Display Controls Control the visible and selected elements in the layout: @@ -655,7 +655,7 @@ gui::set_display_controls | `display_type` | is either ``visible`` or ``selectable`` | | `value` |is either ``true`` or ``false`` | -### gui::Check Display Controls +### Check Display Controls To check the visibility or selectability of elements in the layout: @@ -672,7 +672,7 @@ gui::check_display_controls | `name` | is the name of the control. For example, for the power nets option this would be ``Signals/Power`` or could be ``Layers/*`` to set the option for all the layers. | | `display_type` | is either ``visible`` or ``selectable`` | -### gui::Save Display Controls +### Save Display Controls When performing a batch operation changing the display controls settings, the following command can be used to save the current state of the display controls. @@ -681,7 +681,7 @@ the following command can be used to save the current state of the display contr gui::save_display_controls ``` -### gui::Restore Display Controls +### Restore Display Controls This command restores display controls. @@ -689,7 +689,7 @@ This command restores display controls. gui::restore_display_controls ``` -### gui::Input Dialog +### Input Dialog To request user input via the GUI: Returns: a string with the input, or empty string if canceled. @@ -707,7 +707,7 @@ gui::input_dialog | `title` | is the title of the input message box. | | `question` | is the text for the message box. | -### gui::Pause +### Pause script execution Pause the execution of the script: @@ -722,7 +722,7 @@ gui::pause | ---- | ---- | | `timeout` | is specified in milliseconds, if it is not provided the pause will last until the user presses the Continue button.| -### gui::Show widget +### Show widget To open a specific layout widget: @@ -737,7 +737,7 @@ gui::show_widget | ---- | ---- | | `name` | of the widget. For example, the display controls would be "Display Control". | -### gui::Hide widget +### Hide widget To close a specific layout widget: diff --git a/src/ifp/README.md b/src/ifp/README.md index 39eb7950d38..74c4d0d3c05 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -84,7 +84,7 @@ make_tracks | `-x_pitch`, `-y_pitch` | If set, overrides the LEF technology x-/y- pitch. Use the same unit as in the LEF file. | | `-x_offset`, `-y_offset` | If set, overrides the LEF technology x-/y- offset. Use the same unit as in the LEFT file. | -### Insert tiecells +### Insert tieoff cells This comamnd inserts tiecells. diff --git a/src/pad/README.md b/src/pad/README.md index 4ba4401ec20..9e8e640fd7f 100644 --- a/src/pad/README.md +++ b/src/pad/README.md @@ -33,7 +33,7 @@ place_io_terminals | ----- | ----- | | `inst_pins` | Instance pins to place the terminals on. | -### Make IO Bump Array +### Defining a Bump Array This command defines a bump array. @@ -65,7 +65,7 @@ make_io_bump_array | `-prefix` | Name prefix for the bump array. The default value is `BUMP_`. | -### Remove IO Bump Array +### Remove Entire Bump Array This command removes the entire bump array. @@ -86,7 +86,7 @@ remove_io_bump_array | ----- | ----- | | `-bump` | Name of the bump master. | -### Remove IO Bump +### Remove a single Bump Instance This command removes a single bump instance. @@ -101,7 +101,7 @@ remove_io_bump | ----- | ----- | | `instance_name` | Name of the bump. | -### Assign IO Bump +### Assign a net to IO Bump This command assigns a net to a bump instance. @@ -179,7 +179,7 @@ When the padring is complete, the following command can remove the IO rows to av remove_io_rows ``` -### Place Corners +### Placing Corner Cells This command places the corner cells. @@ -202,7 +202,7 @@ Example usage: place_corners sky130_fd_io__corner_bus_overlay ``` -### Place Pad +### Placing Pads To place a pad into the pad ring. @@ -235,7 +235,7 @@ place_pad | `name` | Name of the instance. | -### Place IO Fill +### Placing IO Filler Cells To place the IO filler cells. @@ -263,7 +263,7 @@ place_io_fill | `-permit_overlaps` | Names of the masters for the IO filler cells that allow for overlapping. | | `masters` | Names of the masters for the IO filler cells. | -### Connect By Abutment +### Connecting Ring Signals Once the ring is complete, use the following command to connect the ring signals. @@ -271,7 +271,7 @@ Once the ring is complete, use the following command to connect the ring signals connect_by_abutment ``` -### Place Bondpad +### Place Wirebond Pads To place the wirebond pads over the IO cells. @@ -328,9 +328,9 @@ make_fake_io_site | `-height` | Height of the site (in microns). | -### RDL Route +### Redistribution Layer Routing -To route the RDL for the bump arrays. +To route the Redistribution Layer (RDL) for the bump arrays. ```tcl rdl_route diff --git a/src/par/README.md b/src/par/README.md index b93b46bc715..c26ef8c5ff2 100644 --- a/src/par/README.md +++ b/src/par/README.md @@ -279,7 +279,7 @@ triton_part_hypergraph | `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning.(default 50, integer). | | `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart (default 1000, integer). | -### Evaluate Hypergraph Partition +### Evaluate Hypergraph Solution This command evaluates hypergraph partition. diff --git a/src/pdn/README.md b/src/pdn/README.md index 440909e751b..c8f7bb0bce4 100644 --- a/src/pdn/README.md +++ b/src/pdn/README.md @@ -41,7 +41,7 @@ pdngen | `-report_only` | Print the current specifications. | | `-failed_via_report` | Generate a report file which can be viewed in the DRC viewer for all the failed vias (ie. those that did not get built or were removed). | -### Set Voltage Domain +### Define Voltage Domain Defines a named voltage domain with the names of the power and ground nets for a region. @@ -76,7 +76,7 @@ set_voltage_domain | `-secondary_power` | Specifies the name of the secondary power net for this voltage domain. | | `-switched_power` | Specifies the name of the switched power net for switched power domains. | -### Define PDN Grid +### Define Power Grids ```{warning} `define_pdn_grid` is overloaded with two different signatures. Take note of the arguments when using this function! @@ -153,7 +153,7 @@ define_pdn_grid | `-existing` | Flag to enable defining for existing routing solution. | -### Define Power Switch Cell +### Power Switch Cell insertion Define a power switch cell that will be inserted into a power grid @@ -184,7 +184,7 @@ define_power_switch_cell | `-ground` | Defines the name of the pin that connects to the ground net. | | `-acknowledge` | Defines the name of the output control signal of the power control switch if it has one. | -### Add PDN Stripe +### Add PDN Straps/Stripes Defines a pattern of power and ground stripes in a single layer to be added to a power grid. @@ -374,7 +374,7 @@ add_pdn_connect | `-ongrid` | List of intermediate layers in a via stack to snap onto a routing grid. | | `-split_cuts` | Specifies layers to use split cuts on with an associated pitch, for example `{metal3 0.380 metal5 0.500}`. | -### Repair PDN Vias +### Repairing power grid vias after detailed routing To remove vias which generate DRC violations after detailed placement and routing use `repair_pdn_vias`. diff --git a/src/ppl/README.md b/src/ppl/README.md index 30a6e2e3306..5f18e60cba7 100644 --- a/src/ppl/README.md +++ b/src/ppl/README.md @@ -50,7 +50,7 @@ and [hybrid bonding](https://www.3dincites.com/2018/04/hybrid-bonding-from-concept-to-commercialization/) for high density face-to-face interconnect. -### Set IO Pin Constraint +### Set IO Pin Constraints The `set_io_pin_constraint` command sets region constraints for pins according to the pin direction or the pin name. This command can be called multiple @@ -142,7 +142,7 @@ set_pin_length_extension | `-hor_extension` | The length (in microns) for the horizontal pins. | | `-ver_extension` | The length (in microns) for the vertical pins. | -### Set Pin Thick Multiplier +### Set Pin Thickness Multiplier The `set_pin_thick_multiplier` command defines a multiplier for the thickness of all vertical and horizontal pins. @@ -160,7 +160,7 @@ set_pin_thick_multiplier | `-hor_multiplier` | The thickness multiplier for the horizontal pins. | | `-ver_multiplier` | The thickness multiplier for the vertical pins. | -### Set Simulated Annealing Parameters +### Set Simulated Annealing The `set_simulated_annealing` command defines the parameters for simulated annealing pin placement. @@ -181,7 +181,7 @@ set_simulated_annealing | `-perturb_per_iter` | The number of perturbations per iteration. The default value is `0`, and the allowed values are integers `[0, MAX_INT]`. | | `-alpha` | The temperature decay factor. The default value is `0.985`, and the allowed values are floats `(0, 1]`. | -### Simulated Annealing Debug +### Simulated Annealing Debug Mode The `simulated_annealing_debug` command allows you to debug the simulated annealing pin placement with a pause mode. @@ -199,7 +199,7 @@ simulated_annealing_debug | `-iters_between_paintings` | Determines the number of iterations between updates. | | `-no_pause_mode` | Print solver state every second based on `iters_between_paintings`. | -### Place Pin +### Place specific Pin The `place_pin` command places a specific pin in the specified location with the specified size. It is recommended that individual pins be placed before the `place_pins` command, @@ -227,7 +227,7 @@ place_pin | `-pin_size` | Tthe width and height of the pin (in microns). | | `-force_to_die_boundary` | When this flag is enabled, the pin will be snapped to the nearest routing track, next to the die boundary. | -### Place Pins +### Place all Pins The `place_pins` command places all pins together. Use the following command to perform pin placement: @@ -313,7 +313,7 @@ If you are a developer, you might find these useful. More details can be found i Example scripts of `ppl` running on a sample design of `gcd` as follows: -```tcl +``` ./test/gcd.tcl ``` diff --git a/src/psm/README.md b/src/psm/README.md index 3810cd5def9..76a6a4321b4 100644 --- a/src/psm/README.md +++ b/src/psm/README.md @@ -74,7 +74,7 @@ check_power_grid | `-net` | Name of the net to analyze. Must be a power or ground net name. | | `-error_file` | Name of the error file to save output to. | -### Write PG Spice +### Write Spice Power Grid This command writes the `spice` file for power grid. diff --git a/src/rcx/README.md b/src/rcx/README.md index 8cb558fe3c5..40d4eb52062 100644 --- a/src/rcx/README.md +++ b/src/rcx/README.md @@ -97,7 +97,7 @@ write_spef | `coordinates` | Coordinates TBC. | | `filename` | Output filename. | -### Adjust RC +### Scale RC Use the `adjust_rc` command to scale the resistance, ground, and coupling capacitance. @@ -117,7 +117,7 @@ adjust_rc | `-cc_factor` | Scale factor for coupling capacitance. | | `-gndc_factor` | Scale factor for ground capacitance. | -### Diff SPEF +### Comparing different SPEF files The `diff_spef` command compares the parasitics in the reference database `<filename>.spef`. The output of this command is `diff_spef.out` @@ -143,7 +143,7 @@ diff_spef | `-r_cc_cap` | Read coupled capacitance. | | `r_conn` | Read connections. | -### Bench Wires +### Extraction Rules File Generation The `bench_wires` command produces a layout which contains various patterns that are used to characterize per-unit length R and C values. The generated patterns model @@ -182,7 +182,7 @@ bench_wires | `-s_list` | Lists of wire spacing multipliers from the minimum spacing defined in the LEF. The list will be the input index on the OpenRCX RC table (Extraction Rules file). | | `-over_dist`, `-under_dist` | Consider over and under metal distance respectively. | -### Bench Verilog +### Generate verilog netlist `bench_verilog` is used after the `bench_wires` command. This command generates a Verilog netlist of the generated pattern layout by the `bench_wires` @@ -204,7 +204,7 @@ bench_verilog | ----- | ----- | | `filename` | Name for the Verilog output file (e.g., `output.v`). | -### Bench Read SPEF +### Read SPEF The `bench_read_spef` command reads a `<filename>.spef` file and stores the parasitics into the database. @@ -220,7 +220,7 @@ bench_read_spef | ----- | ----- | | `filename` | Path to the input `.spef` file. | -### Write Rules +### Write Rule File The `write_rules` command writes the Extraction Rules file (RC technology file) for OpenRCX. It processes the parasitics data from the layout patterns that are diff --git a/src/rsz/README.md b/src/rsz/README.md index b87a922370d..fd6025f4417 100644 --- a/src/rsz/README.md +++ b/src/rsz/README.md @@ -99,7 +99,7 @@ estimate_parasitics | ----- | ----- | | `-placement` or `-global_routing` | Either of these flags must be set. Parasitics are estimated based after placement stage versus after global routing stage. | -### Set Dont Use +### Set Don't Use The `set_dont_use` command removes library cells from consideration by the `resizer` engine and the `CTS` engine. `lib_cells` is a list of cells returned by `get_lib_cells` @@ -110,7 +110,7 @@ not use cells with names that begin with `DLY` in all libraries. set_dont_use lib_cells ``` -### Unset Dont Use +### Unset Don't Use The `unset_dont_use` command reverses the `set_dont_use` command. @@ -118,7 +118,7 @@ The `unset_dont_use` command reverses the `set_dont_use` command. unset_dont_use lib_cells ``` -### Set Dont Touch +### Set Don't Touch The `set_dont_touch` command prevents the resizer commands from modifying instances or nets. @@ -127,7 +127,7 @@ modifying instances or nets. set_dont_touch instances_nets ``` -### Unset Dont Touch +### Unset Don't Touch The `unset_dont_touch` command reverse the `set_dont_touch` command. diff --git a/src/tap/README.md b/src/tap/README.md index 797629ee982..b93f598e8d8 100644 --- a/src/tap/README.md +++ b/src/tap/README.md @@ -9,7 +9,7 @@ Tapcell and endcap insertion. - Parameters without square brackets `-param2 param2` are required. ``` -### Tapcell +### Add Tapcell/Endcap This command inserts tapcells or endcaps. @@ -88,7 +88,7 @@ cut_rows | `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | | `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | -### Place Endcaps +### Only adding boundary/endcap cells Place endcaps into the design, the naming for the arguments to `place_endcaps` is based on the LEF58 `CLASS` specification foe endcaps. @@ -138,7 +138,7 @@ place_endcaps | `-top_edge` | List of masters for the top row endcaps. (overrides `-endcap_horizontal`). | | `-bottom_edge` | List of masters for the bottom row endcaps. (overrides `-endcap_horizontal`). | -### Place Tapcells +### Only adding Tapcells This command is used for tapcell placement only. @@ -156,7 +156,7 @@ place_tapcells | `-distance` | Distance between tapcells. | -### Tapcell Ripup +### Remove Tapcells/Endcaps This command is used for removing tapcells or endcaps based on their prefix. diff --git a/src/upf/README.md b/src/upf/README.md index edc3800941a..ade87a92373 100644 --- a/src/upf/README.md +++ b/src/upf/README.md @@ -85,7 +85,7 @@ create_power_switch | `-on_state` | One of {`state_name`, `input_supply_port`, `boolean_expression`}. | | `name` | Power switch name. | -### Set Isolation +### Create or Update Isolation Strategy This command creates or update isolation strategy. @@ -114,7 +114,7 @@ set_isolation | `-update` | Only available if using existing strategy, will error if the strategy doesn't exist. | | `name` | Isolation strategy name. | -### Use Interface cell +### Set Interface cell This command sets the interface cell. @@ -151,7 +151,7 @@ set_domain_area | `-area` | x-/y- coordinates in microns for the lower left and upper right corners of the power domain area. | -### Map Power Switch +### Map existing power switch This command maps existing power switch. From ba967f946923a4e57b8251e40acb5e7bf059e079 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 01:48:51 +0000 Subject: [PATCH 56/88] change pandoc to nroff for cat file conversion Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/Makefile | 12 +-- docs/src/test/count_outfiles.ok | 2 + docs/src/test/man_func.ok | 132 +++++++++++++------------------- docs/src/test/man_func.tcl | 2 - 4 files changed, 60 insertions(+), 88 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 6c5761dbd79..b6c63753a58 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,6 +11,7 @@ # Define variables PANDOC = pandoc +NROFF = nroff SRC_DIR = md MAN_ROOT_DIR = man HTML_ROOT_DIR = html @@ -107,14 +108,13 @@ $(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) # Rule to generate a cat file from a corresponding roff file $(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ + nroff -man $< | col -b > $@ $(CAT2_DIR)/%.md: $(MAN2_DIR)/%.2 | $(CAT2_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ + nroff -man $< | col -b > $@ $(CAT3_DIR)/%.md: $(MAN3_DIR)/%.3 | $(CAT3_DIR) - $(PANDOC) -s -o markdown $< -o $@ - sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ + nroff -man $< | col -b > $@ +#$(PANDOC) -s -o markdown $< -o $@ +#sed -i 's/\\\[/\[/g; s/\\]/\]/g; s/\\_/_/g' $@ $(CAT1_DIR)/%.1: $(CAT1_DIR)/%.md mv $< $@ diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index d9b9c122d57..de60edc5e67 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -162,6 +162,8 @@ Info: 3, Warn: 7, Error: 37 [WARNING] This document format requires a nonempty <title> element. Defaulting to 'utl' as the title. To specify a title, use 'title' in metadata or --metadata title="...". +troff: man/man2/stt.2:109: warning [p 1, 10.0i]: cannot adjust line +troff: man/man2/utl.2:80: warning [p 1, 7.2i]: cannot adjust line cat/cat1/openroad.1 Level 1 doc counts are equal to 1. Level 2 doc counts are equal to 167. diff --git a/docs/src/test/man_func.ok b/docs/src/test/man_func.ok index 2b85e636d46..e957f2b27ea 100644 --- a/docs/src/test/man_func.ok +++ b/docs/src/test/man_func.ok @@ -1,131 +1,103 @@ -. -/workspace/docs ---- -date: 2023/11/13 -section: 0 -title: openroad ---- +openroad(0) openroad(0) -NAME -==== -openroad - OpenROAD command-line-interface. -SYNOPSIS -======== +NAME + openroad - OpenROAD command-line-interface. -openroad [-help] [-version] [-no_init] [-exit] [-gui] -[-threads count\|max] [-log file_name] [-metrics file_name] -cmd_file +SYNOPSIS + openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads + count|max] [-log file_name] [-metrics file_name] cmd_file -openroad [-python] cmd_file + openroad [-python] cmd_file DESCRIPTION -=========== - -The **openroad** command is the command-line interface for OpenROAD, an -open-source initiative for chip design and optimization. It provides a -range of options to control its behavior and execute commands specified -in the cmd_file. + The openroad command is the command-line interface for OpenROAD, an + open-source initiative for chip design and optimization. It provides a + range of options to control its behavior and execute commands specified + in the cmd_file. OPTIONS -======= - -`-help`: Display help information. + -help: Display help information. -`-version`: Display version information. + -version: Display version information. -`-no_init`: Skip initialization steps. + -no_init: Skip initialization steps. -`-exit`: Exit after executing commands in cmd_file. -`-gui`: Launch the graphical user interface (GUI). + -exit: Exit after executing commands in cmd_file. -`-threads count|max`: Specify the number of threads to use (or use max -available). + -gui: Launch the graphical user interface (GUI). -`-log file_name`: Log output to the specified file. + -threads count|max: Specify the number of threads to use (or use max + available). -`-metrics file_name`: Save performance metrics to the specified file. + -log file_name: Log output to the specified file. -`-python`: Execute the cmd_file as a Python script. + -metrics file_name: Save performance metrics to the specified file. + -python: Execute the cmd_file as a Python script. ARGUMENTS -========= - -`cmd_file`: The command file containing OpenROAD commands to be -executed. + cmd_file: The command file containing OpenROAD commands to be executed. EXAMPLES -======== - -**openroad -help**: Prints the help information + openroad -help: Prints the help information -**openroad -version -exit**: Prints the version information, and exits -the program thereafter. + openroad -version -exit: Prints the version information, and exits the + program thereafter. -**openroad -threads max -log test.log -metrics test.metrics**: Prints -the log and metric respectively to `test.log` and `test.metrics`. Also -runs the script with maximum available number of threads. + openroad -threads max -log test.log -metrics test.metrics: Prints the + log and metric respectively to test.log and test.metrics. Also runs + the script with maximum available number of threads. -**openroad -gui**: Launches OpenROAD GUI, which further interactive Tcl -commands can be run. + openroad -gui: Launches OpenROAD GUI, which further interactive Tcl + commands can be run. TCL COMMANDS -============ - -These Tcl-based commands are callable from within the OpenROAD binary. + These Tcl-based commands are callable from within the OpenROAD binary. -- read_lef [-tech] [-library] filename + • read_lef [-tech] [-library] filename - - Read Library Exchange Format (.lef) files. + • Read Library Exchange Format (.lef) files. - - tech: Technology-specific information + • tech: Technology-specific information - - library: .lib files + • library: .lib files -- read_def filename + • read_def filename - - Read Design Exchange Format (.def) files. + • Read Design Exchange Format (.def) files. -- write_def [-version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3] filename + • write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename - - Write Design Exchange Format (.def) files. + • Write Design Exchange Format (.def) files. - - version 5.8\|5.7\|5.6\|5.5\|5.4\|5.3: Corresponding DEF version - to use. + • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. -- read_verilog filename + • read_verilog filename - - Read Verilog (.v) input file. + • Read Verilog (.v) input file. -- write_verilog filename + • write_verilog filename - - Write Verilog (.v) file based on current database. + • Write Verilog (.v) file based on current database. -- read_db filename + • read_db filename - - Read OpenDB (.odb) database files. + • Read OpenDB (.odb) database files. -- write_db filename + • write_db filename - - Write OpenDB (.odb) database files. + • Write OpenDB (.odb) database files. -- write_abstract_lef filename + • write_abstract_lef filename - - Write abstract Library Exchange Format (.lef) files based on - current database. + • Write abstract Library Exchange Format (.lef) files based on cur‐ + rent database. ENVIRONMENT -=========== FILES -===== - SEE ALSO -======== - HISTORY -======= - BUGS -==== + 2023/11/13 openroad(0) diff --git a/docs/src/test/man_func.tcl b/docs/src/test/man_func.tcl index ef5a6ec2da4..01520eac4db 100644 --- a/docs/src/test/man_func.tcl +++ b/docs/src/test/man_func.tcl @@ -3,9 +3,7 @@ source "helpers.tcl" # Test 1) Running man path with set manpath variable. set test_dir [file dirname [file normalize [info script]]] -puts $test_dir set manpath_dir [file normalize [file dirname [file dirname [file normalize $test_dir]]]] -puts $manpath_dir set manpath_dir "$manpath_dir/cat" set output [man openroad -manpath $manpath_dir -no_query] From 6e4d7aa6af6b9578cd63b30181cb76e48bd1dbb1 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:45:38 +0000 Subject: [PATCH 57/88] test github ci with dyn test Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .../workflows/github-actions-docs-test.yml | 40 +++++++++++++++++++ docs/src/test/man_tcl_params.py | 14 ++----- 2 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/github-actions-docs-test.yml diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml new file mode 100644 index 00000000000..deca574f526 --- /dev/null +++ b/.github/workflows/github-actions-docs-test.yml @@ -0,0 +1,40 @@ +name: Docs Tester + +on: + push: + branches: + - master + +jobs: + docs-test-job: + name: 'Test docs for Tcl syntax and README' + strategy: + fail-fast: false + matrix: + os: ['debian10', 'debian11', 'ubuntu20.04', 'ubuntu22.04'] + runs-on: ubuntu-latest + container: + image: openroad/${{ matrix.os }}-dev + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: true + + - name: Install required package + run: | + sudo apt-get update && sudo apt-get install -y pandoc + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.10 # Adjust the Python version as needed + + - name: Preprocess files + run: | + cd docs && make preprocess -j${nproc} + + - name: Run syntax parser + run: | + ./src/test/regression man_tcl_params diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py index 4f105016b5a..3f0dcde90d9 100644 --- a/docs/src/test/man_tcl_params.py +++ b/docs/src/test/man_tcl_params.py @@ -71,21 +71,15 @@ if cmd not in readme_dict: print("command not parsed in readme_dict"); isValid = False # If invalid, don't need to test further. - if not isValid: - print("Skipping keys/flag testing") - continue + assert isValid, "Keys/flags are missing in one of Help/Proc/Readme." # Test switches here s1, s2, s3 = help_dict[cmd], proc_dict[cmd], readme_dict[cmd] res1, res2, res3 = check_function_signatures(s1,s2), \ check_function_signatures(s1,s3), \ check_function_signatures(s2,s3) - if res1 and res2 and res3: - succeeded += 1 - print("Success.") - else: - print(f"Help/Proc: {res1}") - print(f"Help/Rdme: {res2}") - print(f"Proc/Rdme: {res3}") + assert res1 and res2 and res3, print(f"Help/Proc: {res1}\nHelp/Rdme: {res2}\nProc/Rdme: {res3}") + succeeded += 1 + print("Success.") print(f"----------\nSucceeded: {succeeded} out of {len(help_dict)} tests.") \ No newline at end of file From 768f7b44c8b42e07c084be4dcef56f2bc6b24892 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:47:57 +0000 Subject: [PATCH 58/88] change actions to push Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index deca574f526..b65a5cbd18f 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -2,8 +2,6 @@ name: Docs Tester on: push: - branches: - - master jobs: docs-test-job: From b7dea23082684ce679ff44a3df93396033e89bea Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:52:52 +0000 Subject: [PATCH 59/88] only ubuntu in ci for now Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index b65a5cbd18f..177e18b4012 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -6,13 +6,7 @@ on: jobs: docs-test-job: name: 'Test docs for Tcl syntax and README' - strategy: - fail-fast: false - matrix: - os: ['debian10', 'debian11', 'ubuntu20.04', 'ubuntu22.04'] runs-on: ubuntu-latest - container: - image: openroad/${{ matrix.os }}-dev steps: - name: Checkout repository From 1758127e913b80a3f875357806a804fb4d71aaf4 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:57:43 +0000 Subject: [PATCH 60/88] fix syntax for ci Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index 177e18b4012..fe6ceac5350 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -7,6 +7,8 @@ jobs: docs-test-job: name: 'Test docs for Tcl syntax and README' runs-on: ubuntu-latest + container: + image: openroad/ubuntu22.04-dev steps: - name: Checkout repository @@ -21,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.10 # Adjust the Python version as needed + python-version: '3.10' # Adjust the Python version as needed - name: Preprocess files run: | From d66579f1ecb7a873441983115229e3dbfd484825 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:00:09 +0000 Subject: [PATCH 61/88] no sudo Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index fe6ceac5350..e902a17c85a 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -18,7 +18,7 @@ jobs: - name: Install required package run: | - sudo apt-get update && sudo apt-get install -y pandoc + apt-get update && apt-get install -y pandoc - name: Set up Python uses: actions/setup-python@v5 From 656447db90a09947c6ea3710767a7dfd80b12e43 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:07:19 +0000 Subject: [PATCH 62/88] add build openroad commands. Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index e902a17c85a..b475a42be0c 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -8,22 +8,26 @@ jobs: name: 'Test docs for Tcl syntax and README' runs-on: ubuntu-latest container: - image: openroad/ubuntu22.04-dev + image: openroad/ubuntu-cpp20 steps: - name: Checkout repository uses: actions/checkout@v3 with: - submodules: true + submodules: 'recursive' - name: Install required package run: | apt-get update && apt-get install -y pandoc + + - name: Build OpenROAD + run: | + ./etc/Build.sh -compiler='clang-16' -cmake='-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20' - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' # Adjust the Python version as needed + python-version: '3.10' - name: Preprocess files run: | From 471ac87366bb4e903e3f9b7d99edf463fcc2a603 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:40:08 +0000 Subject: [PATCH 63/88] make docs test more compact Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index b475a42be0c..83074450769 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -8,22 +8,17 @@ jobs: name: 'Test docs for Tcl syntax and README' runs-on: ubuntu-latest container: - image: openroad/ubuntu-cpp20 + image: openroad/ubuntu22.04-dev steps: - name: Checkout repository uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: true - name: Install required package run: | apt-get update && apt-get install -y pandoc - - - name: Build OpenROAD - run: | - ./etc/Build.sh -compiler='clang-16' -cmake='-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20' - - name: Set up Python uses: actions/setup-python@v5 with: @@ -32,7 +27,6 @@ jobs: - name: Preprocess files run: | cd docs && make preprocess -j${nproc} - - name: Run syntax parser run: | - ./src/test/regression man_tcl_params + ./docs/src/test/regression man_tcl_params From 89479bde1f22616ffd6d60e0edd3f5afe4a91fee Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:58:44 +0000 Subject: [PATCH 64/88] remove absolute paths from man_tcl_params for CI Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .../workflows/github-actions-docs-test.yml | 4 +- docs/src/test/man_tcl_params.ok | 431 ------------------ docs/src/test/man_tcl_params.py | 3 - docs/src/test/regression_tests.tcl | 1 - 4 files changed, 1 insertion(+), 438 deletions(-) delete mode 100644 docs/src/test/man_tcl_params.ok diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index 83074450769..958df6de0fe 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -7,8 +7,6 @@ jobs: docs-test-job: name: 'Test docs for Tcl syntax and README' runs-on: ubuntu-latest - container: - image: openroad/ubuntu22.04-dev steps: - name: Checkout repository @@ -29,4 +27,4 @@ jobs: cd docs && make preprocess -j${nproc} - name: Run syntax parser run: | - ./docs/src/test/regression man_tcl_params + python3 docs/src/test/man_tcl_params.py diff --git a/docs/src/test/man_tcl_params.ok b/docs/src/test/man_tcl_params.ok deleted file mode 100644 index 138621e2637..00000000000 --- a/docs/src/test/man_tcl_params.ok +++ /dev/null @@ -1,431 +0,0 @@ ----------- -density_fill -Success. ----------- -macro_placement -Success. ----------- -man -Success. ----------- -initialize_floorplan -Success. ----------- -make_tracks -Success. ----------- -insert_tiecells -Success. ----------- -tapcell -Success. ----------- -cut_rows -Success. ----------- -tapcell_ripup -Success. ----------- -place_endcaps -Success. ----------- -place_tapcells -Success. ----------- -set_global_routing_layer_adjustment -Success. ----------- -set_global_routing_region_adjustment -Success. ----------- -set_macro_extension -Success. ----------- -set_pin_offset -Success. ----------- -set_global_routing_random -Success. ----------- -global_route -Success. ----------- -repair_antennas -Success. ----------- -set_nets_to_route -Success. ----------- -read_guides -Success. ----------- -draw_route_guides -Success. ----------- -global_route_debug -Success. ----------- -report_wire_length -Success. ----------- -create_toolbar_button -Success. ----------- -create_menu_item -Success. ----------- -save_image -Success. ----------- -save_clocktree_image -Success. ----------- -select -Success. ----------- -display_timing_cone -Success. ----------- -focus_net -Success. ----------- -pdngen -Success. ----------- -set_voltage_domain -Success. ----------- -define_pdn_grid -Success. ----------- -define_power_switch_cell -Success. ----------- -add_pdn_stripe -Success. ----------- -add_pdn_ring -Success. ----------- -add_pdn_connect -Success. ----------- -add_sroute_connect -Success. ----------- -repair_pdn_vias -Success. ----------- -analyze_power_grid -Success. ----------- -check_power_grid -Success. ----------- -write_pg_spice -Success. ----------- -set_pdnsim_net_voltage -Success. ----------- -set_routing_alpha -Success. ----------- -define_pin_shape_pattern -Success. ----------- -set_io_pin_constraint -Success. ----------- -set_pin_length -Success. ----------- -set_pin_length_extension -Success. ----------- -set_pin_thick_multiplier -Success. ----------- -set_simulated_annealing -Success. ----------- -simulated_annealing_debug -Success. ----------- -place_pin -Success. ----------- -write_pin_placement -Success. ----------- -place_pins -Success. ----------- -detailed_route -Success. ----------- -detailed_route_debug -Success. ----------- -pin_access -Success. ----------- -configure_cts_characterization -Success. ----------- -clock_tree_synthesis -Success. ----------- -report_cts -Success. ----------- -detailed_placement -Success. ----------- -set_placement_padding -Success. ----------- -filler_placement -Success. ----------- -remove_fillers -Success. ----------- -check_placement -Success. ----------- -optimize_mirroring -Success. ----------- -restructure -Success. ----------- -global_placement -Success. ----------- -cluster_flops -Success. ----------- -rtl_macro_placer -Success. ----------- -place_macro -Success. ----------- -write_macro_placement -Success. ----------- -triton_part_hypergraph -Success. ----------- -evaluate_hypergraph_solution -Success. ----------- -triton_part_design -Success. ----------- -evaluate_part_design_solution -Success. ----------- -write_partition_verilog -Success. ----------- -read_partitioning -Success. ----------- -preview_dft -Success. ----------- -insert_dft -Success. ----------- -set_dft_config -Success. ----------- -report_dft_config -Success. ----------- -read_upf -Success. ----------- -create_power_domain -Success. ----------- -create_logic_port -Success. ----------- -create_power_switch -Success. ----------- -set_isolation -Success. ----------- -use_interface_cell -Success. ----------- -set_domain_area -Success. ----------- -map_power_switch -Success. ----------- -make_io_bump_array -Success. ----------- -remove_io_bump_array -Success. ----------- -remove_io_bump -Success. ----------- -assign_io_bump -Success. ----------- -remove_io_rows -Success. ----------- -place_corners -Success. ----------- -place_pad -Success. ----------- -place_io_fill -Success. ----------- -connect_by_abutment -Success. ----------- -place_bondpad -Success. ----------- -place_io_terminals -Success. ----------- -rdl_route -Success. ----------- -define_process_corner -Success. ----------- -extract_parasitics -Success. ----------- -write_spef -Success. ----------- -adjust_rc -Success. ----------- -diff_spef -Success. ----------- -bench_wires -Success. ----------- -bench_verilog -Success. ----------- -bench_read_spef -Success. ----------- -write_rules -Success. ----------- -set_layer_rc -Success. ----------- -set_wire_rc -Success. ----------- -estimate_parasitics -Success. ----------- -set_dont_use -Success. ----------- -unset_dont_use -Success. ----------- -set_dont_touch -Success. ----------- -unset_dont_touch -Success. ----------- -buffer_ports -Success. ----------- -remove_buffers -Success. ----------- -repair_design -Success. ----------- -repair_clock_nets -Success. ----------- -repair_clock_inverters -Success. ----------- -repair_tie_fanout -Success. ----------- -repair_timing -Success. ----------- -report_design_area -Success. ----------- -report_floating_nets -Success. ----------- -create_physical_cluster -Success. ----------- -create_child_physical_clusters -Success. ----------- -set_ndr_layer_rule -Success. ----------- -set_ndr_rules -Success. ----------- -create_ndr -Success. ----------- -create_voltage_domain -Success. ----------- -delete_physical_cluster -Success. ----------- -delete_voltage_domain -Success. ----------- -assign_power_net -Success. ----------- -assign_ground_net -Success. ----------- -add_to_physical_cluster -Success. ----------- -remove_from_physical_cluster -Success. ----------- -report_physical_clusters -Success. ----------- -report_voltage_domains -Success. ----------- -report_group -Success. ----------- -write_guides -Success. ----------- -Succeeded: 143 out of 143 tests. diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py index 3f0dcde90d9..4e29d2efa11 100644 --- a/docs/src/test/man_tcl_params.py +++ b/docs/src/test/man_tcl_params.py @@ -5,9 +5,6 @@ from extract_utils import clean_whitespaces, clean_parse_syntax, check_function_signatures # Test objective: Make sure similar output in all three: help, proc, and readme -path = os.path.realpath("md_roff_compat.py") -or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) -os.chdir(or_home) # Store results help_dict, proc_dict, readme_dict = {}, {}, {} diff --git a/docs/src/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl index 5dfab8bda03..dbbdfd07c0c 100644 --- a/docs/src/test/regression_tests.tcl +++ b/docs/src/test/regression_tests.tcl @@ -3,5 +3,4 @@ record_tests { count_outfiles man_func man_tcl_check - man_tcl_params } From 59893f8fcf28add8790caec7569e8a56bc5ab74c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:01:04 +0000 Subject: [PATCH 65/88] bring back sudo Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .github/workflows/github-actions-docs-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index 958df6de0fe..f6a54c77c1d 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -16,7 +16,7 @@ jobs: - name: Install required package run: | - apt-get update && apt-get install -y pandoc + sudo apt-get update && sudo apt-get install -y pandoc - name: Set up Python uses: actions/setup-python@v5 with: From cfe6d3ca30b86033130443bc5330bda1204eb22c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:24:37 +0000 Subject: [PATCH 66/88] add readme checker ci Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .../workflows/github-actions-docs-test.yml | 6 +++- docs/src/scripts/md_roff_compat.py | 2 ++ docs/src/test/readme_check.py | 33 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 docs/src/test/readme_check.py diff --git a/.github/workflows/github-actions-docs-test.yml b/.github/workflows/github-actions-docs-test.yml index f6a54c77c1d..693502c8ff6 100644 --- a/.github/workflows/github-actions-docs-test.yml +++ b/.github/workflows/github-actions-docs-test.yml @@ -25,6 +25,10 @@ jobs: - name: Preprocess files run: | cd docs && make preprocess -j${nproc} - - name: Run syntax parser + - name: Run Tcl syntax parser run: | python3 docs/src/test/man_tcl_params.py + - name: Run readme parser + run : | + cd docs && make clean + python3 src/test/readme_check.py diff --git a/docs/src/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py index 3f9007c8195..86e1de2973d 100644 --- a/docs/src/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -52,6 +52,8 @@ def man2(path=DEST_DIR2): Syn: {len(func_synopsis)},\ Options: {len(func_options)},\ Args: {len(func_args)}''') + assert len(func_names) == len(func_descs) == len(func_synopsis) == len(func_options) == len(func_args),\ + "Counts for all 5 categories must match up." for func_id in range(len(func_synopsis)): manpage = ManPage() diff --git a/docs/src/test/readme_check.py b/docs/src/test/readme_check.py new file mode 100644 index 00000000000..9ee38371486 --- /dev/null +++ b/docs/src/test/readme_check.py @@ -0,0 +1,33 @@ +import os +import sys +from md_roff_compat import man2, man3 + +# Test objective: if the translator script can run without errors for all the docs. +# goal is to return an error if the header cannot be extracted. + +# check man2 +SRC_BASE_PATH = "../src" +DEST_BASE_PATH = "./md/man2" + +# Create the destination directory if it doesn't exist +os.makedirs(DEST_BASE_PATH, exist_ok=True) + +# Loop through all folders inside "../src" +for module_path in os.listdir(SRC_BASE_PATH): + full_module_path = os.path.join(SRC_BASE_PATH, module_path) + + if os.path.isdir(full_module_path): + module = os.path.basename(full_module_path) + src_path = os.path.realpath(os.path.join(SRC_BASE_PATH, module, "README.md")) + dest_path = os.path.realpath(os.path.join(DEST_BASE_PATH, module + ".md")) + + # Check if README.md exists before copying + if os.path.exists(src_path): + # Create a symbolic link from src_path to dest_path + os.symlink(src_path, dest_path) + print(f"File linked successfully.") + else: + print(f"ERROR: README.md not found in {full_module_path}") + +# Run man2 command +man2() \ No newline at end of file From d8df6bb00220d83e7e6d8b84d94610ff8325d28e Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:35:46 +0000 Subject: [PATCH 67/88] passing all docs test Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 8 +-- docs/src/test/man_tcl_check.ok | 22 ++++---- docs/src/test/translator.ok | 6 +-- src/cts/src/TritonCTS.tcl | 4 +- src/gpl/README.md | 6 ++- src/gpl/src/replace.tcl | 2 + src/ifp/README.md | 7 +-- src/mpl2/README.md | 14 ----- src/mpl2/src/mpl.tcl | 7 ++- src/odb/README.md | 13 +++++ src/odb/src/db/odb.tcl | 1 + src/pad/src/pad.tcl | 3 +- src/par/README.md | 44 +++++++++++---- src/pdn/src/pdn.tcl | 10 ++-- src/ppl/src/IOPlacer.tcl | 3 ++ src/rsz/README.md | 8 +++ src/rsz/src/Resizer.tcl | 1 + src/tap/README.md | 10 ++-- src/upf/README.md | 96 +++++++++++++++++++++++++++++++++ 19 files changed, 203 insertions(+), 62 deletions(-) diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index de60edc5e67..7b5584c09a1 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -54,7 +54,7 @@ Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 mpl.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 mpl2.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 pad.md Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 par.md @@ -70,13 +70,13 @@ Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md -Names: 16, Desc: 16, Syn: 16, Options: 16, Args: 16 +Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 stt.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md -Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 utl.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt @@ -166,5 +166,5 @@ troff: man/man2/stt.2:109: warning [p 1, 10.0i]: cannot adjust line troff: man/man2/utl.2:80: warning [p 1, 7.2i]: cannot adjust line cat/cat1/openroad.1 Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 167. +Level 2 doc counts are equal to 170. Level 3 doc counts are equal to 2782. diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index 9d8c1daaca0..f2414fe4597 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -15,37 +15,37 @@ Command counts match. Command counts do not match. ./src/gui 7 7 7 Command counts match. -./src/pdn 9 9 9 -Command counts match. +./src/pdn 8 8 9 +Command counts do not match. ./src/psm 4 4 4 Command counts match. ./src/stt 1 1 1 Command counts match. -./src/ppl 10 10 11 -Command counts do not match. -./src/drt 3 3 3 +./src/ppl 11 11 11 Command counts match. -./src/cts 3 3 3 +./src/drt 3 3 3 Command counts match. +./src/cts 2 2 3 +Command counts do not match. ./src/dpl 6 6 6 Command counts match. ./src/rmp 1 1 1 Command counts match. ./src/gpl 2 2 2 Command counts match. -./src/mpl2 3 4 3 -Command counts do not match. +./src/mpl2 2 2 2 +Command counts match. ./src/par 6 6 6 Command counts match. ./src/dft 4 4 4 Command counts match. -./src/upf 8 8 8 +./src/upf 11 11 11 Command counts match. ./src/pad 12 12 13 Command counts do not match. ./src/rcx 9 9 9 Command counts match. -./src/rsz 16 16 16 +./src/rsz 17 17 17 Command counts match. -./src/odb 16 16 16 +./src/odb 17 17 17 Command counts match. diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index acbdc4fc4b3..7d6c5d6cb93 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -60,7 +60,7 @@ Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 mpl.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 mpl2.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 pad.md Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 par.md @@ -76,13 +76,13 @@ Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 rmp.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 rsz.md -Names: 16, Desc: 16, Syn: 16, Options: 16, Args: 16 +Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 stt.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 tap.md Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 upf.md -Names: 8, Desc: 8, Syn: 8, Options: 8, Args: 8 +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 utl.md Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index e988bdd4586..3f70d572cf2 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -89,7 +89,7 @@ sta::define_cmd_args "clock_tree_synthesis" {[-wire_unit unit] [-insertion_delay] \ [-sink_buffer_max_cap_derate] \ [-use_dummy_load] - } + };# checker off proc clock_tree_synthesis { args } { sta::parse_key_args "clock_tree_synthesis" args \ @@ -98,7 +98,7 @@ proc clock_tree_synthesis { args } { -clustering_unbalance_ratio -sink_clustering_max_diameter -sink_clustering_levels -tree_buf\ -sink_buffer_max_cap_derate}\ flags {-post_cts_disable -sink_clustering_enable -balance_levels \ - -obstruction_aware -apply_ndr -insertion_delay -use_dummy_load} + -obstruction_aware -apply_ndr -insertion_delay -use_dummy_load};# checker off sta::check_argc_eq0 "clock_tree_synthesis" $args diff --git a/src/gpl/README.md b/src/gpl/README.md index 40b665e2e9e..e59ade15aa1 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -129,9 +129,10 @@ This command does flop clustering based on parameters. ```tcl cluster_flops - [-tray_weight tray_weight] \ + [-tray_weight tray_weight]\ [-timing_weight timing_weight]\ - [-max_split_size max_split_size] + [-max_split_size max_split_size]\ + [-num_paths num_paths] ``` #### Options @@ -141,6 +142,7 @@ cluster_flops | `-tray_weight` | Tray weight, default value is 20.0, type `float`. | | `-timing_weight` | Timing weight, default value is 1.0, type `float`. | | `-max_split_size` | Maximum split size, default value is -1, type `int`.| +| `-num_paths` | KIV, default value is 0, type `int`. | ## Useful Developer Commands diff --git a/src/gpl/src/replace.tcl b/src/gpl/src/replace.tcl index 09c3ec34372..52394a795ce 100644 --- a/src/gpl/src/replace.tcl +++ b/src/gpl/src/replace.tcl @@ -36,6 +36,8 @@ sta::define_cmd_args "global_placement" {\ [-skip_nesterov_place]\ [-timing_driven]\ [-routability_driven]\ + [-disable_timing_driven]\ + [-disable_routability_driven]\ [-incremental]\ [-force_cpu]\ [-skip_io]\ diff --git a/src/ifp/README.md b/src/ifp/README.md index 8852fdb581b..ed5403e0a96 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -55,10 +55,10 @@ initialize_floorplan [-utilization util] [-aspect_ratio ratio] [-core_space space | {bottom top left right}] - [-sites site_name] [-die_area {llx lly urx ury}] [-core_area {llx lly urx ury}] - [-sites site_name] + [-additional_sites site_names] + [-site site_name] ``` #### Options @@ -68,7 +68,8 @@ initialize_floorplan | `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | | `-aspect_ratio` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | | `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | -| `-sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | +| `-additional_sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | +| `-site` | Site name. | | `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | | `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | diff --git a/src/mpl2/README.md b/src/mpl2/README.md index b135a4c36fd..861e16e30c1 100644 --- a/src/mpl2/README.md +++ b/src/mpl2/README.md @@ -90,20 +90,6 @@ Do note that while action probabilities are normalized to 1.0, the weights are n | `-notch_weight` | Weight for the notch, or the existence of dead space that cannot be used for placement & routing. Note that this cost applies only to hard macro clusters. The allowed values are floats, and the default value is `10.0`. | | `-macro_blockage_weight` | Weight for macro blockage, or the overlapping instances of the macro. The allowed values are floats, and the default value is `10.0`. | -### Write Macro Placement - -Command to generate a file with the placement of the macros in the design using multiple calls for the `place_macro` command: - -```tcl -write_macro_placement file_name -``` - -#### Options - -| Switch Name | Description | -| ----- | ----- | -| `filename` | Filename to write the macro placement flow commands to. | - ### Place Macro Command for placement of one specific macro. diff --git a/src/mpl2/src/mpl.tcl b/src/mpl2/src/mpl.tcl index b2c1c3c15a1..34aa85b10de 100644 --- a/src/mpl2/src/mpl.tcl +++ b/src/mpl2/src/mpl.tcl @@ -260,8 +260,7 @@ sta::define_cmd_args "place_macro" {-macro_name macro_name \ proc place_macro { args } { sta::parse_key_args "place_macro" args \ - keys {-macro_name -location -orientation} \ - flags {} + keys {-macro_name -location -orientation} flags {} if [info exists keys(-macro_name)] { set macro_name $keys(-macro_name) @@ -312,7 +311,7 @@ proc parse_macro_name {cmd macro_name} { proc mpl_debug { args } { sta::parse_key_args "mpl_debug" args \ keys {} \ - flags {-coarse -fine} + flags {-coarse -fine};# checker off set coarse [info exists flags(-coarse)] set fine [info exists flags(-fine)] @@ -324,4 +323,4 @@ proc mpl_debug { args } { mpl2::set_debug_cmd $coarse $fine } -} +} \ No newline at end of file diff --git a/src/odb/README.md b/src/odb/README.md index 5d509b64399..56459c5a88f 100644 --- a/src/odb/README.md +++ b/src/odb/README.md @@ -358,6 +358,19 @@ write_guides file_name | ----- | ----- | | `file_name` | Guide file name. | +### Write Macro Placement + +This command writes macro placement. + +```tcl +write_macro_placement file_name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `file_name` | Macro placement file name. | diff --git a/src/odb/src/db/odb.tcl b/src/odb/src/db/odb.tcl index 7ad5cb9f23f..14810d4f170 100644 --- a/src/odb/src/db/odb.tcl +++ b/src/odb/src/db/odb.tcl @@ -543,6 +543,7 @@ proc write_guides { args } { sta::define_cmd_args "write_macro_placement" { file_name } proc write_macro_placement { args } { + sta::parse_key_args "write_macro_placement" args keys {} flags {} sta::check_argc_eq1 "write_macro_placement" $args set file_name $args set db [ord::get_db] diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index c996ab4173d..21ea30032b2 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -330,7 +330,8 @@ proc place_bondpad {args} { $offset_y } -sta::define_cmd_args "place_io_terminals" {inst_terms} +sta::define_cmd_args "place_io_terminals" {inst_terms + [-allow_non_top_layer]} proc place_io_terminals {args} { sta::parse_key_args "place_io_terminals" args \ diff --git a/src/par/README.md b/src/par/README.md index 1aae7df6524..8c51d316af0 100644 --- a/src/par/README.md +++ b/src/par/README.md @@ -193,7 +193,9 @@ the end of each PM/FM/HER pass. - Parameters without square brackets `-param2 param2` are required. ``` -### Partition Netlist +### Partition Hypergraph Netlist + +This command performs hypergraph netlist partitioning. ```tcl triton_part_hypergraph @@ -201,6 +203,7 @@ triton_part_hypergraph -num_parts num_parts -balance_constraint balance_constraint [-base_balance base_balance] + [-scale_factor scale_factor] [-seed seed] [-vertex_dimension vertex_dimension] [-hyperedge_dimension hyperedge_dimension] @@ -239,6 +242,7 @@ triton_part_hypergraph | `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | | `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | | `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | +| `-scale_factor` | KIV. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | | `-seed` | Random seed. The default value is `0`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | | `-vertex_dimension` | Number of vertices in the hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | | `-hyperedge_dimension` | Number of hyperedges in hypergraph. The default value is `1`, and the allowed values are integers `[0, MAX_INT]`. | @@ -272,6 +276,8 @@ triton_part_hypergraph ### Evaluate Hypergraph Partition +This command evaluates hypergraph partition. + ```tcl evaluate_hypergraph_solution -num_parts num_parts @@ -279,6 +285,7 @@ evaluate_hypergraph_solution -hypergraph_file hypergraph_file -solution_file solution_file [-base_balance base_balance] + [-scale_factor scale_factor] [-vertex_dimension vertex_dimension] [-hyperedge_dimension hyperedge_dimension] [-fixed_file fixed_file] @@ -298,6 +305,7 @@ evaluate_hypergraph_solution | `-hypergraph_file` | Path to hypergraph file. | | `-solution_file` | Path to solution file. | | `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | +| `-scale_factor` | KIV. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | | `-fixed_file` | Path to fixed vertices constraint file. | | `-group_file` | Path to `stay together` attributes file. | | `-e_wt_factors` | Hyperedge weight factor. | @@ -306,11 +314,14 @@ evaluate_hypergraph_solution ### Partition Netlist +This command partitions the design netlist. Note that design must be loaded in memory. + ```tcl triton_part_design [-num_parts num_parts] [-balance_constraint balance_constraint] [-base_balance base_balance] + [-scale_factor scale_factor] [-seed seed] [-timing_aware_flag timing_aware_flag] [-top_n top_n] @@ -360,6 +371,7 @@ triton_part_design | `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | | `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | | `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | +| `-scale_factor` | KIV. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | | `-seed` | Random seed. The default value is `1`, and the allowed values are integers `[-MAX_INT, MAX_INT]`. | | `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | | `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT`. | @@ -401,13 +413,16 @@ triton_part_design | `-num_vertices_threshold_ilp` | Describes threshold $t$, the number of vertices used for integer linear programming (ILP) partitioning. if $n_{vertices} > t$, do not use ILP-based partitioning. The default value is `50`, and the allowed values are integers `[0, MAX_INT]`. | | `-global_net_threshold` | If the net is larger than this, it will be ignored by TritonPart. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | -### Evaluation Netlist Partition +### Evaluate Netlist Partition + +This command evaluates partition design solution. ```tcl evaluate_part_design_solution [-num_parts num_parts] [-balance_constraint balance_constraint] [-base_balance base_balance] + [-scale_factor scale_factor] [-timing_aware_flag timing_aware_flag] [-top_n top_n] [-fence_flag fence_flag] @@ -438,6 +453,7 @@ evaluate_part_design_solution | `-num_parts` | Number of partitions. The default value is `2`, and the allowed values are integers `[0, MAX_INT]`. | | `-balance_constraint` | Allowed imbalance between blocks. The default value is `1.0`, and the allowed values are floats. | | `-base_balance` | Tcl list of baseline imbalance between partitions. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | +| `-scale_factor` | KIV. The default value is `{1.0}`, and the allowed values are floats that sum up to `1.0`. | | `-timing_aware_flag` | Enable timing-driven mode. The default value is `true`, and the allowed values are booleans. | | `-top_n` | Extract the top n critical timing paths. The default value is `1000`, and the allowed values are integers `[0, MAX_INT]`. | | `-fence_flag ` | Consider fences in the partitioning. The default value is `false`, and the allowed values are booleans. | @@ -462,10 +478,13 @@ evaluate_part_design_solution ### Write Partition to Verilog +This command writes the partition result to verilog. + ```tcl write_partition_verilog [-port_prefix prefix] [-module_suffix suffix] + [-partitioning_id part_id] [file] ``` @@ -479,24 +498,31 @@ write_partition_verilog ### Read the Partition file +This command reads the partition file into design. + ```tcl read_partitioning -read_file name [-instance_map_file file_path] +``` +| Switch Name | Description | +| ----- | ----- | +| `-read_file` | Read partitioning file (usually with the extension `.part`). The file format must match the same format as the output of `write_partition_verilog`. | +| `-instance_map_file` | Instance mapping file. | ## Example Scripts -### How to partition a hypergraph in the way you would using hMETIS (min-cut partitioning) +## How to partition a hypergraph in the way you would using hMETIS (min-cut partitioning) -```tcl +``` triton_part_hypergraph -hypergraph_file des90.hgr -num_parts 5 -balance_constraint 2 -seed 2 ``` You can also check the provided example [here](./examples/min-cut-partitioning/run_openroad.tcl). -### How to perform the embedding-aware partitioning +## How to perform the embedding-aware partitioning -```tcl +``` set num_parts 2 set balance_constraint 2 set seed 0 @@ -516,9 +542,9 @@ triton_part_hypergraph -hypergraph_file $hypergraph_file -num_parts $num_parts You can find the provided example [here](./examples/embedding-aware-partitioning/run_placement_aware_flow.tcl). -### How to partition a netlist +## How to partition a netlist -```tcl +``` # set technology information set ALL_LEFS “list_of_lefs” set ALL_LIBS “list_of_libs” @@ -549,7 +575,7 @@ set timing_guardband true set part_design_solution_file "${design}_part_design.hgr.part.${num_parts}" ############################################################################################## -### TritonPart with slack progagation +## TritonPart with slack progagation ############################################################################################## puts "Start TritonPart with slack propagation" # call triton_part to partition the netlist diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index 5957e3d3fd6..cf35ac91a8a 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -184,7 +184,7 @@ sta::define_cmd_args "define_pdn_grid" {[-name <name>] \ [-obstructions <list_of_layers>] \ [-power_switch_cell <name>] \ [-power_control <signal_name>] \ - [-power_control_network (STAR|DAISY)]} + [-power_control_network (STAR|DAISY)]}; # checker off proc define_pdn_grid {args} { sta::parse_key_args "define_pdn_grid" args \ @@ -192,7 +192,7 @@ proc define_pdn_grid {args} { -cells -halo -pins -obstructions -power_switch_cell\ -power_control -power_control_network -starts_with}\ flags {-macro -existing -grid_over_pg_pins -grid_over_boundary\ - -default} + -default}; # checker off set is_macro 0 set is_existing 0 foreach arg $args { @@ -865,7 +865,7 @@ proc define_pdn_grid { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -pins -starts_with -obstructions -power_switch_cell \ -power_control -power_control_network} \ - flags {} + flags {};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -940,7 +940,7 @@ proc define_pdn_grid { args } { proc define_pdn_grid_existing { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -obstructions} \ - flags {-existing} + flags {-existing}; # checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -962,7 +962,7 @@ proc define_pdn_grid_macro { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -orient -instances -cells -halo -pin_direction -starts_with \ -obstructions} \ - flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump} + flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump}; # checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" diff --git a/src/ppl/src/IOPlacer.tcl b/src/ppl/src/IOPlacer.tcl index 2460104719a..fe7514b1e80 100644 --- a/src/ppl/src/IOPlacer.tcl +++ b/src/ppl/src/IOPlacer.tcl @@ -244,7 +244,10 @@ proc set_io_pin_constraint { args } { } +sta::define_cmd_args "clear_io_pin_constraints" {} + proc clear_io_pin_constraints {} { + sta::parse_key_args "clear_io_pin_constraints" args keys {} flags {} ppl::clear_constraints } diff --git a/src/rsz/README.md b/src/rsz/README.md index 3b8e959f51b..907a55e10dc 100644 --- a/src/rsz/README.md +++ b/src/rsz/README.md @@ -168,6 +168,14 @@ in buffering nets. remove_buffers ``` +### Balance Row Usage + +Command description pending. + +```tcl +balance_row_usage +``` + ### Repair Design The `repair_design` command inserts buffers on nets to repair max slew, max diff --git a/src/rsz/src/Resizer.tcl b/src/rsz/src/Resizer.tcl index ba2a93ea04b..2456b498389 100644 --- a/src/rsz/src/Resizer.tcl +++ b/src/rsz/src/Resizer.tcl @@ -315,6 +315,7 @@ proc remove_buffers { args } { sta::define_cmd_args "balance_row_usage" {} proc balance_row_usage { args } { + sta::parse_key_args "balance_row_usage" args keys {} flags {} sta::check_argc_eq0 "balance_row_usage" $args rsz::balance_row_usage_cmd } diff --git a/src/tap/README.md b/src/tap/README.md index a0b880b0505..60f88b2a2c9 100644 --- a/src/tap/README.md +++ b/src/tap/README.md @@ -30,6 +30,7 @@ tapcell [-endcap_master endcap_master] [-endcap_prefix endcap_prefix] [-distance dist] + [-disallow_one_site_gaps] [-halo_width_x halo_x] [-halo_width_y halo_y] [-tap_nwin2_master tap_nwin2_master] @@ -42,9 +43,8 @@ tapcell [-cnrcap_nwout_master cnrcap_nwout_master] [-incnrcap_nwin_master incnrcap_nwin_master] [-incnrcap_nwout_master incnrcap_nwout_master] - [-tap_prefix tap_prefix] - [-endcap_prefix endcap_prefix] [-tbtie_cpp tbtie_cpp] + [-endcap_cpp endcap_cpp] [-no_cell_at_top_bottom] ``` @@ -53,8 +53,11 @@ tapcell | Switch Name | Description | | ----- | ----- | | `-tapcell_master` | Master used as a tapcell. | +| `-tap_prefix` | Prefix for the tapcell instances. The default value is `TAP_`. | | `-endcap_master` | Master used as an endcap. | +| `-endcap_prefix` | Prefix for the endcaps instances. The default value is `PHY_`. | | `-distance` | Distance (in microns) between each tapcell in the checkerboard. | +| `-disallow_one_site_gaps` | KIV. | | `-halo_width_x` | Horizontal halo size (in microns) around macros during cut rows. | | `-halo_width_y` | Vertical halo size (in microns) around macros during cut rows. | | `-tap_nwintie_master` | Master cell placed at the top and bottom of|macros and the core area according the row orientation. | @@ -67,9 +70,8 @@ tapcell | `-incnrcap_nwout_master` | Master cell placed at the corners of macros, according the row orientation. | | `-cnrcap_nwin_master` | Macro cell placed at the corners the core area according the row orientation. | | `-cnrcap_nwout_master` | Macro cell placed at the corners the core area according the row orientation. | -| `-tap_prefix` | Prefix for the tapcell instances. The default value is `TAP_`. | -| `-endcap_prefix` | Prefix for the endcaps instances. The default value is `PHY_`. | | `-tbtie_cpp` | Option is deprecated. | +| `-endcap_cpp` | Option is deprecated. | | `-no_cell_at_top_bottom` | Option is deprecated. | ### Cut Rows diff --git a/src/upf/README.md b/src/upf/README.md index ade87a92373..0c50faa97b6 100644 --- a/src/upf/README.md +++ b/src/upf/README.md @@ -170,6 +170,102 @@ map_power_switch | `-lib_cells` | A list of library cells that could be mapped to the power switch | | `-port_map` | A map that associates model ports defined by create_power_switch to logical ports | +### Set Level Shifter + +This command sets level shifter. +Options coming soon. + +```tcl +set_level_shifter + [-domain domain] \ + [-elements elements] \ + [-exclude_elements exclude_elements] \ + [-source source] \ + [-sink sink] \ + [-use_functional_equivalence use_functional_equivalence] \ + [-applies_to applies_to] \ + [-applies_to_boundary applies_to_boundary] \ + [-rule rule] \ + [-threshold threshold] \ + [-no_shift] \ + [-force_shift] \ + [-location location] \ + [-input_supply input_supply] \ + [-output_supply output_supply] \ + [-internal_supply internal_supply] \ + [-name_prefix name_prefix] \ + [-name_suffix name_suffix] \ + [-instance instance] \ + [-update] \ + [-use_equivalence use_equivalence] \ + name +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-domain` | | +| `-elements` | | +| `-exclude_elements` | | +| `-source` | | +| `-sink` | | +| `-use_functional_equivalence` | | +| `-applies_to` | | +| `-applies_to_boundary` | | +| `-rule` | | +| `-threshold` | | +| `-no_shift` | | +| `-force_shift` | | +| `-location` | | +| `-input_supply` | | +| `-output_supply` | | +| `-internal_supply` | | +| `-name_prefix` | | +| `-name_suffix` | | +| `-instance` | | +| `-update` | | +| `-use_equivalence` | | +| `name` | | + +### Set Domain Voltage + +This command sets the voltage of a power domain. + +```tcl +set_domain_voltage + [-domain domain] \ + [-voltage voltage] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-domain` | Power domain name. | +| `-voltage` | Power domain voltage. The allowed values are `float`, default value is `0.0`. | + +### Set Level Shifter Cell + +This command sets the library cell used for level shifter. + +```tcl +set_level_shifter_cell + [-level_shifter level_shifter] \ + [-cell_name cell_name] \ + [-input_port input_port] \ + [-output_port output_port] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-level_shifter` | KIV. | +| `-cell_name` | KIV. | +| `-input_port` | KIV. | +| `-output_port` | KIV. | + ## Example scripts Example script demonstrating how to run `upf` related commands can be found here: From 5d06e4157ebbad1169e97ee7c95155c1ef31dfd8 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:13:26 +0000 Subject: [PATCH 68/88] all regressions should be fixed Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 40 ++++++++++++++++----------------- docs/src/test/man_tcl_check.ok | 6 ++--- docs/src/test/translator.ok | 38 +++++++++++++++---------------- src/dpl/src/Opendp.tcl | 3 +-- src/odb/src/db/odb.tcl | 16 +++++-------- src/pdn/src/pdn.tcl | 28 +++++++++-------------- 6 files changed, 59 insertions(+), 72 deletions(-) diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index 7b5584c09a1..378d2f7b7ca 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -82,61 +82,61 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt -Info: 51, Warn: 10, Error: 25 +Info: 59, Warn: 10, Error: 33 Processing ../src/dbSta/messages.txt Info: 0, Warn: 7, Error: 3 Processing ../src/dft/messages.txt Info: 1, Warn: 3, Error: 2 Processing ../src/dpl/messages.txt -Info: 7, Warn: 4, Error: 20 +Info: 7, Warn: 4, Error: 29 Processing ../src/dpo/messages.txt Info: 47, Warn: 7, Error: 11 Processing ../src/drt/messages.txt -Info: 78, Warn: 113, Error: 170 +Info: 78, Warn: 114, Error: 171 Processing ../src/dst/messages.txt Info: 1, Warn: 18, Error: 9 Processing ../src/fin/messages.txt Info: 5, Warn: 1, Error: 4 Processing ../src/gpl/messages.txt -Info: 73, Warn: 10, Error: 13 +Info: 70, Warn: 10, Error: 14 Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 96 +Info: 29, Warn: 42, Error: 93 Processing ../src/gui/messages.txt -Info: 1, Warn: 32, Error: 64 +Info: 1, Warn: 33, Error: 64 Processing ../src/ifp/messages.txt -Info: 2, Warn: 6, Error: 17 +Info: 4, Warn: 7, Error: 17 Processing ../src/mpl/messages.txt Info: 12, Warn: 7, Error: 9 Processing ../src/mpl2/messages.txt -Info: 11, Warn: 4, Error: 20 +Info: 2, Warn: 6, Error: 21 Processing ../src/odb/messages.txt -Info: 63, Warn: 200, Error: 129 +Info: 64, Warn: 199, Error: 136 Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 355 +Info: 18, Warn: 59, Error: 356 Processing ../src/par/messages.txt -Info: 143, Warn: 35, Error: 16 +Info: 13, Warn: 9, Error: 16 Processing ../src/pdn/messages.txt -Info: 3, Warn: 18, Error: 89 +Info: 3, Warn: 18, Error: 86 Processing ../src/ppl/messages.txt -Info: 20, Warn: 17, Error: 68 +Info: 19, Warn: 17, Error: 68 Processing ../src/psm/messages.txt -Info: 10, Warn: 18, Error: 43 +Info: 10, Warn: 18, Error: 39 Processing ../src/rcx/messages.txt -Info: 92, Warn: 63, Error: 28 +Info: 90, Warn: 63, Error: 28 Processing ../src/rmp/messages.txt Info: 9, Warn: 5, Error: 10 Processing ../src/rsz/messages.txt -Info: 36, Warn: 21, Error: 25 +Info: 35, Warn: 21, Error: 25 Processing ../src/stt/messages.txt Info: 0, Warn: 0, Error: 7 Processing ../src/tap/messages.txt Info: 5, Warn: 4, Error: 9 Processing ../src/upf/messages.txt -Info: 0, Warn: 29, Error: 8 +Info: 0, Warn: 44, Error: 8 Processing ../src/utl/messages.txt -Info: 1, Warn: 0, Error: 9 +Info: 1, Warn: 2, Error: 7 Processing ../messages.txt -Info: 3, Warn: 7, Error: 37 +Info: 3, Warn: 7, Error: 38 [WARNING] Could not convert TeX math '\frac{height}{width}', rendering as TeX [WARNING] Could not convert TeX math '[a, \frac{1}{a}]', rendering as TeX [WARNING] Could not convert TeX math '\frac{resistanceUnit}{distanceUnit}', rendering as TeX @@ -167,4 +167,4 @@ troff: man/man2/utl.2:80: warning [p 1, 7.2i]: cannot adjust line cat/cat1/openroad.1 Level 1 doc counts are equal to 1. Level 2 doc counts are equal to 170. -Level 3 doc counts are equal to 2782. +Level 3 doc counts are equal to 2660. diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index f2414fe4597..b6ca329048c 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -15,7 +15,7 @@ Command counts match. Command counts do not match. ./src/gui 7 7 7 Command counts match. -./src/pdn 8 8 9 +./src/pdn 8 9 9 Command counts do not match. ./src/psm 4 4 4 Command counts match. @@ -47,5 +47,5 @@ Command counts do not match. Command counts match. ./src/rsz 17 17 17 Command counts match. -./src/odb 17 17 17 -Command counts match. +./src/odb 13 13 17 +Command counts do not match. diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index 7d6c5d6cb93..c973850096c 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -88,58 +88,58 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt -Info: 51, Warn: 10, Error: 25 +Info: 59, Warn: 10, Error: 33 Processing ../src/dbSta/messages.txt Info: 0, Warn: 7, Error: 3 Processing ../src/dft/messages.txt Info: 1, Warn: 3, Error: 2 Processing ../src/dpl/messages.txt -Info: 7, Warn: 4, Error: 20 +Info: 7, Warn: 4, Error: 29 Processing ../src/dpo/messages.txt Info: 47, Warn: 7, Error: 11 Processing ../src/drt/messages.txt -Info: 78, Warn: 113, Error: 170 +Info: 78, Warn: 114, Error: 171 Processing ../src/dst/messages.txt Info: 1, Warn: 18, Error: 9 Processing ../src/fin/messages.txt Info: 5, Warn: 1, Error: 4 Processing ../src/gpl/messages.txt -Info: 73, Warn: 10, Error: 13 +Info: 70, Warn: 10, Error: 14 Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 96 +Info: 29, Warn: 42, Error: 93 Processing ../src/gui/messages.txt -Info: 1, Warn: 32, Error: 64 +Info: 1, Warn: 33, Error: 64 Processing ../src/ifp/messages.txt -Info: 2, Warn: 6, Error: 17 +Info: 4, Warn: 7, Error: 17 Processing ../src/mpl/messages.txt Info: 12, Warn: 7, Error: 9 Processing ../src/mpl2/messages.txt -Info: 11, Warn: 4, Error: 20 +Info: 2, Warn: 6, Error: 21 Processing ../src/odb/messages.txt -Info: 63, Warn: 200, Error: 129 +Info: 64, Warn: 199, Error: 136 Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 355 +Info: 18, Warn: 59, Error: 356 Processing ../src/par/messages.txt -Info: 143, Warn: 35, Error: 16 +Info: 13, Warn: 9, Error: 16 Processing ../src/pdn/messages.txt -Info: 3, Warn: 18, Error: 89 +Info: 3, Warn: 18, Error: 86 Processing ../src/ppl/messages.txt -Info: 20, Warn: 17, Error: 68 +Info: 19, Warn: 17, Error: 68 Processing ../src/psm/messages.txt -Info: 10, Warn: 18, Error: 43 +Info: 10, Warn: 18, Error: 39 Processing ../src/rcx/messages.txt -Info: 92, Warn: 63, Error: 28 +Info: 90, Warn: 63, Error: 28 Processing ../src/rmp/messages.txt Info: 9, Warn: 5, Error: 10 Processing ../src/rsz/messages.txt -Info: 36, Warn: 21, Error: 25 +Info: 35, Warn: 21, Error: 25 Processing ../src/stt/messages.txt Info: 0, Warn: 0, Error: 7 Processing ../src/tap/messages.txt Info: 5, Warn: 4, Error: 9 Processing ../src/upf/messages.txt -Info: 0, Warn: 29, Error: 8 +Info: 0, Warn: 44, Error: 8 Processing ../src/utl/messages.txt -Info: 1, Warn: 0, Error: 9 +Info: 1, Warn: 2, Error: 7 Processing ../messages.txt -Info: 3, Warn: 7, Error: 37 +Info: 3, Warn: 7, Error: 38 diff --git a/src/dpl/src/Opendp.tcl b/src/dpl/src/Opendp.tcl index d3d7ba67aa0..4d556480bef 100644 --- a/src/dpl/src/Opendp.tcl +++ b/src/dpl/src/Opendp.tcl @@ -36,8 +36,7 @@ sta::define_cmd_args "detailed_placement" {[-max_displacement disp|{disp_x disp_ proc detailed_placement { args } { sta::parse_key_args "detailed_placement" args \ - keys {-max_displacement -report_file_name} flags {-disallow_one_site_gaps} \ - flags {} + keys {-max_displacement -report_file_name} flags {-disallow_one_site_gaps} set disallow_one_site_gaps [info exists flags(-disallow_one_site_gaps)] if { [info exists keys(-max_displacement)] } { diff --git a/src/odb/src/db/odb.tcl b/src/odb/src/db/odb.tcl index 14810d4f170..2cc85aad47d 100644 --- a/src/odb/src/db/odb.tcl +++ b/src/odb/src/db/odb.tcl @@ -64,10 +64,9 @@ proc create_child_physical_clusters { args } { } } -sta::define_cmd_args "set_ndr_layer_rule" {tech ndr layerName input isSpacing} +sta::define_cmd_args "set_ndr_layer_rule" {tech ndr layerName input isSpacing};# checker off proc set_ndr_layer_rule { tech ndr layerName input isSpacing} { - sta::parse_key_args "set_ndr_layer_rule" args keys {} flags {} set layer [$tech findLayer $layerName] if { $layer == "NULL" } { utl::warn ODB 1000 "Layer ${layerName} not found, skipping NDR for this layer" @@ -100,10 +99,9 @@ proc set_ndr_layer_rule { tech ndr layerName input isSpacing} { } } -sta::define_cmd_args "set_ndr_rules" {tech ndr values isSpacing} +sta::define_cmd_args "set_ndr_rules" {tech ndr values isSpacing};#checker off proc set_ndr_rules { tech ndr values isSpacing } { - sta::parse_key_args "set_ndr_rules" args keys {} flags {} if { [llength $values] == 1 } { # Omitting layers set value [lindex $values 0] @@ -236,10 +234,9 @@ proc create_voltage_domain { args } { $group setType VOLTAGE_DOMAIN } -sta::define_cmd_args "delete_physical_cluster" {cluster_name} +sta::define_cmd_args "delete_physical_cluster" {cluster_name};# checker off proc delete_physical_cluster { args } { - sta::parse_key_args "delete_physical_cluster" args keys {} flags {} sta::check_argc_eq1 "delete_physical_cluster" $args set cluster_name $args set db [ord::get_db] @@ -444,7 +441,7 @@ proc remove_from_physical_cluster { args } { sta::define_cmd_args "report_physical_clusters" {} -proc report_physical_clusters {} { +proc report_physical_clusters { args } { sta::parse_key_args "report_physical_clusters" args keys {} flags {} set db [ord::get_db] set chip [$db getChip] @@ -463,7 +460,7 @@ proc report_physical_clusters {} { sta::define_cmd_args "report_voltage_domains" {} -proc report_voltage_domains {} { +proc report_voltage_domains { args } { sta::parse_key_args "report_voltage_domains" args keys {} flags {} set db [ord::get_db] set chip [$db getChip] @@ -480,9 +477,8 @@ proc report_voltage_domains {} { } } -sta::define_cmd_args "report_group" {group} +sta::define_cmd_args "report_group" {group};# checker off proc report_group { group } { - sta::parse_key_args "report_group" args keys {} flags {} utl::report "[expr \"[$group getType]\" == \"PHYSICAL_CLUSTER\" ? \"Physical Cluster\": \"Voltage Domain\"]: [$group getName]" if { [$group hasBox] } { set rect [$group getBox] diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index cf35ac91a8a..b6dfc723b14 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -90,8 +90,7 @@ sta::define_cmd_args "set_voltage_domain" {-name domain_name \ proc set_voltage_domain {args} { sta::parse_key_args "set_voltage_domain" args \ - keys {-name -region -power -ground -secondary_power -switched_power} \ - flags {} + keys {-name -region -power -ground -secondary_power -switched_power} flags {} sta::check_argc_eq0 "set_voltage_domain" $args @@ -184,15 +183,9 @@ sta::define_cmd_args "define_pdn_grid" {[-name <name>] \ [-obstructions <list_of_layers>] \ [-power_switch_cell <name>] \ [-power_control <signal_name>] \ - [-power_control_network (STAR|DAISY)]}; # checker off + [-power_control_network (STAR|DAISY)]};#checker off proc define_pdn_grid {args} { - sta::parse_key_args "define_pdn_grid" args \ - keys {-name -voltage_domains -orient -instances\ - -cells -halo -pins -obstructions -power_switch_cell\ - -power_control -power_control_network -starts_with}\ - flags {-macro -existing -grid_over_pg_pins -grid_over_boundary\ - -default}; # checker off set is_macro 0 set is_existing 0 foreach arg $args { @@ -220,8 +213,7 @@ sta::define_cmd_args "define_power_switch_cell" {-name <name> \ proc define_power_switch_cell {args} { sta::parse_key_args "define_power_switch_cell" args \ - keys {-name -control -acknowledge -power_switchable -power -ground} \ - flags {} + keys {-name -control -acknowledge -power_switchable -power -ground} flags {} sta::check_argc_eq0 "define_power_switch_cell" $args @@ -403,14 +395,14 @@ sta::define_cmd_args "add_pdn_ring" {[-grid grid_name] \ -spacings (spacing_value|list_of_spacing_values) \ [-core_offsets (offset_value|list_of_offset_values)] \ [-pad_offsets (offset_value|list_of_offset_values)] \ + [-ground_pads list_of_gnd_pads] \ + [-power_pads list_of_pwr_pads] \ [-add_connect] \ [-extend_to_boundary] \ [-connect_to_pads] \ [-connect_to_pad_layers layers] \ [-starts_with (POWER|GROUND)] \ - [-nets list_of_nets] \ - [-ground_pads pads] - [-power_pads pads]} + [-nets list_of_nets]} proc add_pdn_ring {args} { sta::parse_key_args "add_pdn_ring" args \ @@ -808,7 +800,7 @@ sta::define_hidden_cmd_args "convert_pdn_config" { config_file } proc convert_pdn_config { args } { sta::parse_key_args "convert_pdn_config" args \ keys {} \ - flags {};# checker off + flags {} sta::check_argc_eq1 "convert_pdn_config" $args @@ -940,7 +932,7 @@ proc define_pdn_grid { args } { proc define_pdn_grid_existing { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -obstructions} \ - flags {-existing}; # checker off + flags {-existing};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -962,7 +954,7 @@ proc define_pdn_grid_macro { args } { sta::parse_key_args "define_pdn_grid" args \ keys {-name -voltage_domains -orient -instances -cells -halo -pin_direction -starts_with \ -obstructions} \ - flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump}; # checker off + flags {-macro -grid_over_pg_pins -grid_over_boundary -default -bump};# checker off sta::check_argc_eq0 "define_pdn_grid" $args pdn::check_design_state "define_pdn_grid" @@ -1531,4 +1523,4 @@ proc get_pdn_ground_nets {} { } } # namespace pdngen -} +} \ No newline at end of file From 2cc08d456f4005c0fc8cda5552e97046f1658edb Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:19:12 +0000 Subject: [PATCH 69/88] format clang Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/utl/src/MakeLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utl/src/MakeLogger.cpp b/src/utl/src/MakeLogger.cpp index 625fd2fa4ba..12f0e3ad2df 100644 --- a/src/utl/src/MakeLogger.cpp +++ b/src/utl/src/MakeLogger.cpp @@ -40,7 +40,7 @@ #include "sta/StaMain.hh" #include "utl/Logger.h" -namespace sta{ +namespace sta { extern const char* utl_tcl_inits[]; } From 46b36065162fd34a0beb9ac071a164a16751788c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:34:18 +0000 Subject: [PATCH 70/88] fix clang-format Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/utl/src/MakeLogger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utl/src/MakeLogger.cpp b/src/utl/src/MakeLogger.cpp index 12f0e3ad2df..f632eb29929 100644 --- a/src/utl/src/MakeLogger.cpp +++ b/src/utl/src/MakeLogger.cpp @@ -41,7 +41,7 @@ #include "utl/Logger.h" namespace sta { - extern const char* utl_tcl_inits[]; +extern const char* utl_tcl_inits[]; } extern "C" { From f414b8700d485351be019c5589cb71e0d6fb58a8 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:20:27 +0000 Subject: [PATCH 71/88] passing tclint Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/man_tcl_check.ok | 4 ++-- src/pad/src/pad.tcl | 5 +++-- src/pdn/src/pdn.tcl | 3 ++- src/rsz/src/Resizer.tcl | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index b6ca329048c..a961ba9810e 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -45,7 +45,7 @@ Command counts match. Command counts do not match. ./src/rcx 9 9 9 Command counts match. -./src/rsz 17 17 17 -Command counts match. +./src/rsz 16 16 17 +Command counts do not match. ./src/odb 13 13 17 Command counts do not match. diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index 21ea30032b2..5a46d5c1b9e 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -138,7 +138,8 @@ sta::define_cmd_args "make_io_sites" {-horizontal_site site \ [-rotation_horizontal rotation] \ [-rotation_vertical rotation] \ [-rotation_corner rotation] \ - [-ring_index index]}; # checker off + [-ring_index index] +};# checker off proc make_io_sites {args} { sta::parse_key_args "make_io_sites" args \ @@ -353,7 +354,7 @@ sta::define_hidden_cmd_args "make_fake_io_site" {-name name \ proc make_fake_io_site {args} { sta::parse_key_args "make_fake_io_site" args \ keys {-name -width -height} \ - flags {};# checker off + flags {};# checker off sta::check_argc_eq0 "make_fake_io_site" $args diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index b6dfc723b14..68291d53ff4 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -183,7 +183,8 @@ sta::define_cmd_args "define_pdn_grid" {[-name <name>] \ [-obstructions <list_of_layers>] \ [-power_switch_cell <name>] \ [-power_control <signal_name>] \ - [-power_control_network (STAR|DAISY)]};#checker off + [-power_control_network (STAR|DAISY)] +};#checker off proc define_pdn_grid {args} { set is_macro 0 diff --git a/src/rsz/src/Resizer.tcl b/src/rsz/src/Resizer.tcl index bbbba316932..9972bb90d99 100644 --- a/src/rsz/src/Resizer.tcl +++ b/src/rsz/src/Resizer.tcl @@ -509,10 +509,10 @@ proc report_design_area { args } { utl::report "Design area ${area} u^2 ${util}% utilization." } -sta::define_cmd_args "report_floating_nets" {[-verbose] [> filename] [>> filename]} +sta::define_cmd_args "report_floating_nets" {[-verbose] [> filename] [>> filename]};# checker off sta::proc_redirect report_floating_nets { - sta::parse_key_args "report_floating_nets" args keys {} flags {-verbose} + sta::parse_key_args "report_floating_nets" args keys {} flags {-verbose};# checker off set verbose [info exists flags(-verbose)] set floating_nets [rsz::find_floating_nets] From 8f0052732968c143511dc0fd5529af9ca2e4532e Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 8 Feb 2024 18:14:29 +0000 Subject: [PATCH 72/88] no more hardcore j16, update test framework readme and other formatting fixes Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- CMakeLists.txt | 7 ++- docs/md/man1/openroad.md | 9 ++-- docs/src/test/README.md | 77 ++++++++++++++++++++------- docs/src/test/man_func.ok | 105 ++++++++++++++++++++++++++++++++++++- docs/src/test/man_func.tcl | 4 +- src/gui/README.md | 18 +++---- 6 files changed, 184 insertions(+), 36 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da890933bd3..8a9df206c38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,11 +159,16 @@ add_subdirectory(src) # Build man pages (Optional) +# Use the processor_count command to get the number of cores +include(ProcessorCount) +ProcessorCount(PROCESSOR_COUNT) +message("Number of processor cores: ${PROCESSOR_COUNT}") + option(BUILD_MAN "Enable building man pages" OFF) if(BUILD_MAN) add_custom_target( man_page ALL - COMMAND make clean && make preprocess && make all -j16 + COMMAND make clean && make preprocess && make all -j${PROCESSOR_COUNT} WORKING_DIRECTORY ${OPENROAD_HOME}/docs ) diff --git a/docs/md/man1/openroad.md b/docs/md/man1/openroad.md index 68a96ed22bd..be466e824e0 100644 --- a/docs/md/man1/openroad.md +++ b/docs/md/man1/openroad.md @@ -1,6 +1,6 @@ --- title: openroad(0) -date: 2023/11/13 +date: 2024/02/09 --- # NAME @@ -9,9 +9,10 @@ openroad - OpenROAD command-line-interface. # SYNOPSIS -openroad [-help] [-version] [-no_init] [-exit] [-gui] - [-threads count|max] [-log file_name] [-metrics - file_name] cmd_file +openroad [-help] [-version] [-no_init] [-exit] [-gui] + [-threads count|max] [-log file_name] + [-metrics file_name] [-python] + cmd_file openroad [-python] cmd_file diff --git a/docs/src/test/README.md b/docs/src/test/README.md index 8e53bbd85b4..8838d704c4d 100644 --- a/docs/src/test/README.md +++ b/docs/src/test/README.md @@ -1,32 +1,71 @@ -# Doc test framework +# Manpages Test Framework -There are `n` tests, documentation TBC. +There are 4 regression tests we conduct for the manpages, namely: +- Translator +- Count output files +- Man functionality check +- Man-to-Tcl check -## Test Description +There are also 2 CI tests as part of the +They can be found in `.github/workflows/github-actions-docs-test.yml` file. -TODO +## Regression tests + +### Translator + +The code file can be found [here](translator.py). +The objective of this test is to test if the underlying `README.md` +file can be converted to roff format via regex extraction. Namely, +the script checks for equality in the number of function names, +descriptors, synopsis, options and arguments detected per Tcl command. + +### Count output files + +The code file can be found [here](count_outfiles.py). +The objective of this test is to count if the expected number of files +in `man2` and `man3` are as expected. + +### Man functionality check + +The code file can be found [here](man_func.tcl). +The objective of this test is to check the functionality of the Tcl +`man` command implemented within the OpenROAD binary. +Mode 1 is where we run `man -manpath <CMD>`, and mode 2 +is where we do not specify the `-manpath` argument and just run +`man <CMD>`. + +This check makes sure that the files are compiled in the correct location +and viewable by the `man` command. + +### Man-to-Tcl check + +The code file can be found [here](man_tcl_check.py). +The objective of this test is to ensure that there are similar counts of +command in the following: `proc`, `help`, `man`. + +`proc` and `help` commands are parsed from the Tcl file, whereas +`man` commands are parsed from the README file. + +## CI tests + +These two tests ensure that the documents and top-level Tcl files +are formatted properly to catch manpage extraction or compilation errors. + +- Tcl Syntax Parser [code](man_tcl_params.py) +- Readme Syntax Parser [code](readme_parser.py) + +## New Test Checklist -## Checklist Adding a new test called `func`, you must create/update the following: - `func.py|tcl`: Test script. - `func.ok`: Log output of the test. - `.*ok`: Ideal file output of the test (can be `def`, `lef` etc). - `regression_tests.tcl`: Update the name of the test. In this case, `func`. -``` -# Please replace with your path to OR. -cd ~/OpenROAD/docs/man +## Authors -# run the tests -./test/regression +Jack Luar (Advisor: Cho Moon) -# save the ok files -./test/save_ok <TEST_NAME> -``` +## License -## TODO -- This documentation -- MD to ROFF translation tests: options, synopsis, description -- Tcl test for `man` command -- Missing manpage test: Help exists but no manpage. -- Check consistency of options between `help` and `man`. The command line options should MATCH. \ No newline at end of file +BSD 3-Clause License. See [LICENSE](../../../LICENSE) file. \ No newline at end of file diff --git a/docs/src/test/man_func.ok b/docs/src/test/man_func.ok index e957f2b27ea..70370592509 100644 --- a/docs/src/test/man_func.ok +++ b/docs/src/test/man_func.ok @@ -7,7 +7,110 @@ NAME SYNOPSIS openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads - count|max] [-log file_name] [-metrics file_name] cmd_file + count|max] [-log file_name] [-metrics file_name] [-python] cmd_file + + openroad [-python] cmd_file + +DESCRIPTION + The openroad command is the command-line interface for OpenROAD, an + open-source initiative for chip design and optimization. It provides a + range of options to control its behavior and execute commands specified + in the cmd_file. + +OPTIONS + -help: Display help information. + + -version: Display version information. + + -no_init: Skip initialization steps. + + -exit: Exit after executing commands in cmd_file. + + -gui: Launch the graphical user interface (GUI). + + -threads count|max: Specify the number of threads to use (or use max + available). + + -log file_name: Log output to the specified file. + + -metrics file_name: Save performance metrics to the specified file. + + -python: Execute the cmd_file as a Python script. +ARGUMENTS + cmd_file: The command file containing OpenROAD commands to be executed. + +EXAMPLES + openroad -help: Prints the help information + + openroad -version -exit: Prints the version information, and exits the + program thereafter. + + openroad -threads max -log test.log -metrics test.metrics: Prints the + log and metric respectively to test.log and test.metrics. Also runs + the script with maximum available number of threads. + + openroad -gui: Launches OpenROAD GUI, which further interactive Tcl + commands can be run. + +TCL COMMANDS + These Tcl-based commands are callable from within the OpenROAD binary. + + • read_lef [-tech] [-library] filename + + • Read Library Exchange Format (.lef) files. + + • tech: Technology-specific information + + • library: .lib files + + • read_def filename + + • Read Design Exchange Format (.def) files. + + • write_def [-version 5.8|5.7|5.6|5.5|5.4|5.3] filename + + • Write Design Exchange Format (.def) files. + + • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. + + • read_verilog filename + + • Read Verilog (.v) input file. + + • write_verilog filename + + • Write Verilog (.v) file based on current database. + + • read_db filename + + • Read OpenDB (.odb) database files. + + • write_db filename + + • Write OpenDB (.odb) database files. + + • write_abstract_lef filename + + • Write abstract Library Exchange Format (.lef) files based on cur‐ + rent database. + +ENVIRONMENT +FILES +SEE ALSO +HISTORY +BUGS + 2023/11/13 openroad(0) + +openroad(0) openroad(0) + + + +NAME + openroad - OpenROAD command-line-interface. + +SYNOPSIS + openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads + count|max] [-log file_name] [-metrics file_name] [-python] cmd_file openroad [-python] cmd_file diff --git a/docs/src/test/man_func.tcl b/docs/src/test/man_func.tcl index 01520eac4db..41a368f4a23 100644 --- a/docs/src/test/man_func.tcl +++ b/docs/src/test/man_func.tcl @@ -7,5 +7,5 @@ set manpath_dir [file normalize [file dirname [file dirname [file normalize $tes set manpath_dir "$manpath_dir/cat" set output [man openroad -manpath $manpath_dir -no_query] -# Test 2) Running manpath with no set manpath variable. #TODO -## KIV: Need to find out interactively is the OR folders. \ No newline at end of file +# Test 2) Running manpath with no set manpath variable. +set output [man openroad -no_query] diff --git a/src/gui/README.md b/src/gui/README.md index 5675214a43b..0b7e2a698c2 100644 --- a/src/gui/README.md +++ b/src/gui/README.md @@ -212,7 +212,7 @@ Determine is the GUI is active: gui::enabled ``` -### Is Design Created +### Trigger GUI to Load Design Announce to the GUI that a design was loaded (note: this is only needed when the design was loaded through the odb API and not via ``read_def`` or ``read_db``): @@ -242,8 +242,8 @@ To open the GUI from the command-line (this command does not return until the GU ```tcl gui::show - [script] - [interactive] + script + interactive ``` #### Options @@ -275,7 +275,7 @@ To zoom in our out to a specific region: ```tcl gui::zoom_to - [x0 y0 x1 y1] + x0 y0 x1 y1 ``` #### Options @@ -289,8 +289,8 @@ gui::zoom_to To zoom in the layout: ```tcl -gui::zoom_in - [x y] +gui::zoom_in + x y ``` #### Options @@ -305,7 +305,7 @@ To zoom out the layout: ```tcl gui::zoom_out - [x y] + x y ``` #### Options @@ -320,7 +320,7 @@ To move the layout to new area: ```tcl gui::center_at - [x y] + x y ``` #### Options @@ -335,7 +335,7 @@ To change the resolution to a specific value: ```tcl gui::set_resolution - [resolution] + resolution ``` #### Options From 5ae8d03d170cd6a7b62bb2bd758bcf2c1d159f7f Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:01:45 +0000 Subject: [PATCH 73/88] update Dependency installer Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- etc/DependencyInstaller.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index f34e65bef08..29f1ecc1ee0 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -246,6 +246,7 @@ _installUbuntuPackages() { g++ \ gcc \ git \ + groff \ lcov \ libffi-dev \ libgomp1 \ @@ -254,6 +255,7 @@ _installUbuntuPackages() { libpcre3-dev \ libreadline-dev \ libtcl \ + pandoc \ python3-dev \ qt5-image-formats-plugins \ tcl \ @@ -315,12 +317,14 @@ _installRHELPackages() { gdb \ git \ glibc-devel \ + groff \ libtool \ libffi-devel \ llvm7.0 \ llvm7.0-devel \ llvm7.0-libs \ make \ + pandoc \ pcre-devel \ pcre2-devel \ pkgconf \ @@ -368,11 +372,13 @@ _installCentosPackages() { yum install -y \ devtoolset-8 \ devtoolset-8-libatomic-devel \ + groff \ libffi-devel \ libgomp \ libstdc++ \ llvm-toolset-7.0 \ llvm-toolset-7.0-libomp-devel \ + pandoc \ pcre-devel \ pcre2-devel \ python-devel \ @@ -414,6 +420,7 @@ _installOpenSusePackages() { gcc \ gcc11-c++ \ git \ + groff \ gzip \ lcov \ libffi-devel \ @@ -425,6 +432,7 @@ _installOpenSusePackages() { libqt5-qtstyleplugins \ libstdc++6-devel-gcc8 \ llvm \ + pandoc \ pcre-devel \ pcre2-devel \ python3-devel \ @@ -477,7 +485,7 @@ Then, rerun this script. EOF exit 1 fi - brew install bison boost cmake eigen flex libomp pyqt5 python swig tcl-tk zlib + brew install bison boost cmake eigen flex groff libomp pandoc pyqt5 python swig tcl-tk zlib # Some systems neeed this to correclty find OpenMP package during build brew link --force libomp @@ -513,6 +521,7 @@ _installDebianPackages() { g++ \ gcc \ git \ + groff \ lcov \ libgomp1 \ libomp-dev \ @@ -520,6 +529,7 @@ _installDebianPackages() { libpcre3-dev \ libreadline-dev \ libtcl \ + pandoc \ python3-dev \ qt5-image-formats-plugins \ tcl-dev \ From d38376d3b7c03b5cc5c017abf592c8e699a54a4d Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 13 Feb 2024 18:07:11 +0000 Subject: [PATCH 74/88] fix rhel pandoc dep Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- etc/DependencyInstaller.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 29f1ecc1ee0..2c732044a71 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -298,6 +298,9 @@ _installRHELCleanUp() { } _installRHELPackages() { + arch=amd64 + version=3.1.11.1 + yum -y update if [[ $(yum repolist | egrep -c "rhel-8-for-x86_64-appstream-rpms") -eq 0 ]]; then yum -y install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm @@ -317,7 +320,6 @@ _installRHELPackages() { gdb \ git \ glibc-devel \ - groff \ libtool \ libffi-devel \ llvm7.0 \ @@ -348,6 +350,10 @@ _installRHELPackages() { yum install -y \ http://repo.okay.com.mx/centos/8/x86_64/release/bison-3.0.4-10.el8.x86_64.rpm \ https://forensics.cert.org/centos/cert/7/x86_64/flex-2.6.1-9.el7.x86_64.rpm + + wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz &&\ + sudo tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/ &&\ + rm -rf pandoc-${version}-linux-${arch}.tar.gz } _installCentosCleanUp() { From c14a7bed30db5e07fb1cef3e6c1264ba27d4b7bb Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 13 Feb 2024 18:11:05 +0000 Subject: [PATCH 75/88] fix pandoc dep rhel Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- etc/DependencyInstaller.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 2c732044a71..44ead9110a9 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -326,7 +326,6 @@ _installRHELPackages() { llvm7.0-devel \ llvm7.0-libs \ make \ - pandoc \ pcre-devel \ pcre2-devel \ pkgconf \ From 7cf3664203c91839a61c92f06cd967e449237d8f Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Wed, 14 Feb 2024 01:06:10 +0000 Subject: [PATCH 76/88] remove need for sudo command Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- etc/DependencyInstaller.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 44ead9110a9..5bfdc36d45c 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -351,7 +351,7 @@ _installRHELPackages() { https://forensics.cert.org/centos/cert/7/x86_64/flex-2.6.1-9.el7.x86_64.rpm wget https://github.com/jgm/pandoc/releases/download/${version}/pandoc-${version}-linux-${arch}.tar.gz &&\ - sudo tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/ &&\ + tar xvzf pandoc-${version}-linux-${arch}.tar.gz --strip-components 1 -C /usr/local/ &&\ rm -rf pandoc-${version}-linux-${arch}.tar.gz } From 0af1835dddd8d21efdddc7527fdc2f674104d38c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:49:25 +0000 Subject: [PATCH 77/88] attended review comments Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- .gitignore | 2 -- docs/Makefile | 15 ++++++++------- docs/README.md | 5 +++-- docs/contrib/ReadmeFormat.md | 4 +++- docs/md/man1/openroad.md | 6 +++++- docs/md/man2/.gitignore | 0 docs/md/man3/.gitignore | 0 docs/src/test/count_outfiles.ok | 29 +---------------------------- docs/src/test/man_func.ok | 18 ++++++++++++------ docs/src/test/man_tcl_check.ok | 4 ++-- src/ant/README.md | 10 +++++----- src/cts/src/TritonCTS.tcl | 2 +- src/gpl/README.md | 6 ------ src/pad/src/pad.tcl | 8 ++++---- src/utl/README.md | 9 ++++----- 15 files changed, 48 insertions(+), 70 deletions(-) delete mode 100644 docs/md/man2/.gitignore delete mode 100644 docs/md/man3/.gitignore diff --git a/.gitignore b/.gitignore index 7dabea10942..02c2c7a4128 100644 --- a/.gitignore +++ b/.gitignore @@ -30,8 +30,6 @@ docs/main messages.txt Messages.md MessagesFinal.md -!docs/man -!docs/man/Makefile .idea/ cmake-build-debug/ diff --git a/docs/Makefile b/docs/Makefile index b6c63753a58..3ec67297280 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -22,7 +22,8 @@ MAN3 = man3 # Exclude these set of keywords EXCLUDE_KEYWORDS = ant cts dft dpl drt fin gpl grt gui ifp mpl \ - mpl2 odb pad par pdn ppl psm rcx rmp rsz sta tap upf + mpl2 odb pad par pdn ppl psm rcx rmp rsz sta \ + stt tap upf utl EXCLUDE_FILES := $(addsuffix .md,$(EXCLUDE_KEYWORDS)) MAN1_DIR = $(MAN_ROOT_DIR)/$(MAN1) @@ -92,19 +93,19 @@ $(CAT3_DIR): # Rule to generate a roff file from a corresponding Markdown file $(MAN1_DIR)/%.1: $(SRC1_DIR)/%.md | $(MAN1_DIR) - $(PANDOC) -s -t man $< -o $@ + $(PANDOC) -s -t man $< -o $@ --quiet $(MAN2_DIR)/%.2: $(SRC2_DIR)/%.md | $(MAN2_DIR) - $(PANDOC) -s -t man $< -o $@ + $(PANDOC) -s -t man $< -o $@ --quiet $(MAN3_DIR)/%.3: $(SRC3_DIR)/%.md | $(MAN3_DIR) - $(PANDOC) -s -t man $< -o $@ + $(PANDOC) -s -t man $< -o $@ --quiet # Rule to generate a html file from a corresponding roff file $(HTML1_DIR)/%.html: $(MAN1_DIR)/%.1 | $(HTML1_DIR) - $(PANDOC) -s -o html $< -o $@ + $(PANDOC) -s -o html $< -o $@ --quiet $(HTML2_DIR)/%.html: $(MAN2_DIR)/%.2 | $(HTML2_DIR) - $(PANDOC) -s -o html $< -o $@ + $(PANDOC) -s -o html $< -o $@ --quiet $(HTML3_DIR)/%.html: $(MAN3_DIR)/%.3 | $(HTML3_DIR) - $(PANDOC) -s -o html $< -o $@ + $(PANDOC) -s -o html $< -o $@ --quiet # Rule to generate a cat file from a corresponding roff file $(CAT1_DIR)/%.md: $(MAN1_DIR)/%.1 | $(CAT1_DIR) diff --git a/docs/README.md b/docs/README.md index f230e12a7ec..73bba993db3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,8 @@ # OpenROAD Documentation -This repo houses code and raw files to build the on-line documentation (using Sphinx) -and manual pages using (using Pandoc) +This `docs/` hierarchy houses code and raw files to +build the on-line documentation (using Sphinx) and +manual pages using (using Pandoc) This on-line documentation is available at [https://openroad.readthedocs.io/en/latest/](https://openroad.readthedocs.io/en/latest/). diff --git a/docs/contrib/ReadmeFormat.md b/docs/contrib/ReadmeFormat.md index fe7a56b0fdb..651bf3cb8f2 100644 --- a/docs/contrib/ReadmeFormat.md +++ b/docs/contrib/ReadmeFormat.md @@ -24,12 +24,14 @@ for the same command. necessary square brackets. Also, keys have to be followed with a specifier whereas flags only require the `-flag` itself. +As far as possible, do place the positional arguments last. + ```tcl command_abc - arg1 -key1 key1 [-flag1] [-flagDev] + arg1 ``` #### Options diff --git a/docs/md/man1/openroad.md b/docs/md/man1/openroad.md index be466e824e0..b2102f563f0 100644 --- a/docs/md/man1/openroad.md +++ b/docs/md/man1/openroad.md @@ -14,7 +14,6 @@ openroad [-help] [-version] [-no_init] [-exit] [-gui] [-metrics file_name] [-python] cmd_file -openroad [-python] cmd_file # DESCRIPTION @@ -88,6 +87,7 @@ OpenROAD binary. - write_verilog filename - Write Verilog (.v) file based on current database. + - read_db filename - Read OpenDB (.odb) database files. @@ -101,6 +101,10 @@ OpenROAD binary. - Write abstract Library Exchange Format (.lef) files based on current database. +- write_cdl [-include_fillers] -masters out_filename + + - Write Circuit Design Language (.cdl) netlist file. + # ENVIRONMENT # FILES diff --git a/docs/md/man2/.gitignore b/docs/md/man2/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/md/man3/.gitignore b/docs/md/man3/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index 378d2f7b7ca..d0db372d0c3 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -137,34 +137,7 @@ Processing ../src/utl/messages.txt Info: 1, Warn: 2, Error: 7 Processing ../messages.txt Info: 3, Warn: 7, Error: 38 -[WARNING] Could not convert TeX math '\frac{height}{width}', rendering as TeX -[WARNING] Could not convert TeX math '[a, \frac{1}{a}]', rendering as TeX -[WARNING] Could not convert TeX math '\frac{resistanceUnit}{distanceUnit}', rendering as TeX -[WARNING] Could not convert TeX math '\frac{capacitanceUnit}{distanceUnit}', rendering as TeX -[WARNING] Could not convert TeX math '{signal}_', rendering as TeX: - {signal}_ - ^ - unexpected eof - expecting "%", "\\label", "\\nonumber", whitespace, "{", letter, digit, ".", "\\mbox", "\\text", "\\textbf", "\\textit", "\\textrm", "\\textsf", "\\texttt", "\\bm", "\\boldsymbol", "\\mathbb", "\\mathbf", "\\mathbfcal", "\\mathbffrak", "\\mathbfit", "\\mathbfscr", "\\mathbfsfit", "\\mathbfsfup", "\\mathbfup", "\\mathbold", "\\mathcal", "\\mathds", "\\mathfrak", "\\mathit", "\\mathrm", "\\mathscr", "\\mathsf", "\\mathsfit", "\\mathsfup", "\\mathtt", "\\mathup", "\\pmb", "\\symbf", "\\texttt", "\\sqrt", "\\surd", "\\mspace", "\\hspace", "\\mathop", "\\mathrel", "\\mathbin", "\\mathord", "\\mathopen", "\\mathclose", "\\mathpunct", "\\phantom", "\\boxed", "\\overset", "\\stackrel", "\\underset", "\\frac", "\\tfrac", "\\dfrac", "\\binom", "\\genfrac", "\\substack", "_", "^", "\\begin", "\\ensuremath", "\\bigg", "\\Bigg", "\\big", "\\Big", "\\biggr", "\\Biggr", "\\bigr", "\\Bigr", "\\biggl", "\\Biggl", "\\bigl", "\\", "\\left", "\\not", "!", "'", "''", "'''", "''''", "*", "+", ",", "-", ".", "/", ":", ":=", ";", "<", "=", ">", "?", "@", "~", white space, "\\displaystyle" or "\\operatorname" -[WARNING] Could not convert TeX math 'orient, must be one of \"', rendering as TeX: - , must be one of \" - ^ - unexpected eof - expecting "%", "\\label", "\\nonumber" or whitespace -[WARNING] Could not convert TeX math 'group_idx: \[', rendering as TeX: - group_idx: \[ - ^ - unexpected eof - expecting "%", "\\label", "\\nonumber" or whitespace -[WARNING] This document format requires a nonempty <title> element. - Defaulting to 'stt' as the title. - To specify a title, use 'title' in metadata or --metadata title="...". -[WARNING] This document format requires a nonempty <title> element. - Defaulting to 'utl' as the title. - To specify a title, use 'title' in metadata or --metadata title="...". -troff: man/man2/stt.2:109: warning [p 1, 10.0i]: cannot adjust line -troff: man/man2/utl.2:80: warning [p 1, 7.2i]: cannot adjust line cat/cat1/openroad.1 Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 170. +Level 2 doc counts are equal to 168. Level 3 doc counts are equal to 2660. diff --git a/docs/src/test/man_func.ok b/docs/src/test/man_func.ok index 70370592509..27ac609cd08 100644 --- a/docs/src/test/man_func.ok +++ b/docs/src/test/man_func.ok @@ -9,8 +9,6 @@ SYNOPSIS openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] [-metrics file_name] [-python] cmd_file - openroad [-python] cmd_file - DESCRIPTION The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a @@ -36,6 +34,7 @@ OPTIONS -metrics file_name: Save performance metrics to the specified file. -python: Execute the cmd_file as a Python script. + ARGUMENTS cmd_file: The command file containing OpenROAD commands to be executed. @@ -94,12 +93,16 @@ TCL COMMANDS • Write abstract Library Exchange Format (.lef) files based on cur‐ rent database. + • write_cdl [-include_fillers] -masters out_filename + + • Write Circuit Design Language (.cdl) netlist file. + ENVIRONMENT FILES SEE ALSO HISTORY BUGS - 2023/11/13 openroad(0) + 2024/02/09 openroad(0) openroad(0) openroad(0) @@ -112,8 +115,6 @@ SYNOPSIS openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads count|max] [-log file_name] [-metrics file_name] [-python] cmd_file - openroad [-python] cmd_file - DESCRIPTION The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a @@ -139,6 +140,7 @@ OPTIONS -metrics file_name: Save performance metrics to the specified file. -python: Execute the cmd_file as a Python script. + ARGUMENTS cmd_file: The command file containing OpenROAD commands to be executed. @@ -197,10 +199,14 @@ TCL COMMANDS • Write abstract Library Exchange Format (.lef) files based on cur‐ rent database. + • write_cdl [-include_fillers] -masters out_filename + + • Write Circuit Design Language (.cdl) netlist file. + ENVIRONMENT FILES SEE ALSO HISTORY BUGS - 2023/11/13 openroad(0) + 2024/02/09 openroad(0) diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok index a961ba9810e..7e29e246810 100644 --- a/docs/src/test/man_tcl_check.ok +++ b/docs/src/test/man_tcl_check.ok @@ -41,8 +41,8 @@ Command counts match. Command counts match. ./src/upf 11 11 11 Command counts match. -./src/pad 12 12 13 -Command counts do not match. +./src/pad 13 13 13 +Command counts match. ./src/rcx 9 9 9 Command counts match. ./src/rsz 16 16 17 diff --git a/src/ant/README.md b/src/ant/README.md index 52a50178563..4077a5081b8 100644 --- a/src/ant/README.md +++ b/src/ant/README.md @@ -65,15 +65,15 @@ about this tool. | <img src="./doc/images/example_ant.png" width=400px> | <img src="./doc/images/step1.png" width=400px> | | --- | --- | -| <b>Antenna Checker Algorithm</b>: WireGraph Example | <b>Step 1</b>: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. | +| **Antenna Checker Algorithm**: WireGraph Example | **Step 1**: (a) Start from the root node (ITerm) using upper Via to find a node for a new wire. (b) Save the ITerm area for cumulative gate/diffusion area. | | <img src="./doc/images/step2.png" width=400px> | <img src="./doc/images/step3.png" width=400px> | -| <b>Step 2</b>: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | <b>Step 3</b>: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. | +| **Step 2**: From the node of the wire, find all the nodes in the wire through segment wires and find the "root" node of this wire. | **Step 3**: (a) From the "root" node of the wire, along the outgoing segment edge that goes to other nodes belonging to this wire, calculate the area of this wire. (b) Then, find all the ITerms below these nodes, except for the root node (directly use an ITerm or lower Vias to find ITerms for lower metals). (c) Sum up the areas of all the ITerms found with the cumulative areas and calculate the PAR of this wire. (d) Add the PAR value and the wire info (layer, Index) into the PAR table. Add the new area to the cumulative areas. | | <img src="./doc/images/step4.png" width=400px> | <img src="./doc/images/step5.png" width=400px> | -| <b>Step 4</b>: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | <b>Step 5</b>: Repeat Steps 2 and 3 for new-found upper-level wires. | +| **Step 4**: Find all the upper Vias on this wire (for all the nodes on this wire), and go to the higher-level metal. | **Step 5**: Repeat Steps 2 and 3 for new-found upper-level wires. | | <img src="./doc/images/step6.png" width=400px> | <img src="./doc/images/step7.png" width=400px> | -| <b>Step 6</b>: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | <b>Step 7</b>: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. | +| **Step 6**: Repeat Steps 4 and 5 until we reach a wire that cannot have upper Vias for its nodes (highest-level metal). | **Step 7**: Pick up another ITerm as a root node and repeat Steps 1 to 6, skipping the wires already in the PAR table. Repeat this for all the ITerms to get a whole PAR table. | | <img src="./doc/images/step8.png" width=400px> | -| <b>Step 8</b>: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. | +| **Step 8**: (a) Pick up a gate ITerm and a node of a wire (e.g., M4,1). Find possible paths that connect them, look up the PAR value of the wires along these paths, and add them up to get the CAR of the (gate, wire) pair. (b) Compare to the AntennaRule to see if the CAR violates the rules. (c) Check this for all (gate, wire) pairs. | ## License diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index dc380167a06..daae01645b3 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -85,7 +85,7 @@ sta::define_cmd_args "clock_tree_synthesis" {[-wire_unit unit] [-num_static_layers] \ [-sink_clustering_buffer] \ [-obstruction_aware] \ - [-apply_ndr] \ + [-apply_ndr] \ [-insertion_delay] \ [-sink_buffer_max_cap_derate] \ [-use_dummy_load] \ diff --git a/src/gpl/README.md b/src/gpl/README.md index e59ade15aa1..abeabc3d78b 100644 --- a/src/gpl/README.md +++ b/src/gpl/README.md @@ -163,12 +163,6 @@ Example scripts demonstrating how to run `gpl` on a sample design on `core01` as ./test/core01.tcl ``` -Example scripts demonstrating how to run `gpl` on a sample design on `core01` as follows: - -```shell -./test/core01.tcl -``` - ## Regression tests There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). diff --git a/src/pad/src/pad.tcl b/src/pad/src/pad.tcl index 5a46d5c1b9e..c4f213d4873 100644 --- a/src/pad/src/pad.tcl +++ b/src/pad/src/pad.tcl @@ -347,14 +347,14 @@ proc place_io_terminals {args} { pad::place_terminals $iterms [info exists flags(-allow_non_top_layer)] } -sta::define_hidden_cmd_args "make_fake_io_site" {-name name \ - -width width \ - -height height} +sta::define_cmd_args "make_fake_io_site" {-name name \ + -width width \ + -height height} proc make_fake_io_site {args} { sta::parse_key_args "make_fake_io_site" args \ keys {-name -width -height} \ - flags {};# checker off + flags {} sta::check_argc_eq0 "make_fake_io_site" $args diff --git a/src/utl/README.md b/src/utl/README.md index f071ceb82da..d79e78d0213 100644 --- a/src/utl/README.md +++ b/src/utl/README.md @@ -1,7 +1,6 @@ # Utilities -The utility module houses of the manpage command in OpenROAD, -available from the `man` command. +The utility module contains the `man` command. ## Commands @@ -13,9 +12,9 @@ available from the `man` command. ### Man This can be used for a range of commands in different levels as follows: -- `man1`: Top-level openroad command (e.g. `man openroad`) -- `man2`: Individual module commands (e.g. `man clock_tree_synthesis`) -- `man3`: Info, error, warning messages (e.g. `man CTS-0001`) +- Level 1: Top-level openroad command (e.g. `man openroad`) +- Level 2: Individual module commands (e.g. `man clock_tree_synthesis`) +- Level 3: Info, error, warning messages (e.g. `man CTS-0001`) ```tcl man From 4bda21e0b82da80c688a3f1f046ac0eaf575493f Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 22 Feb 2024 16:57:42 +0000 Subject: [PATCH 78/88] fix no_splash and add copyright notice Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/scripts/extract_utils.py | 37 ++++++++++++++++++++++++++++ docs/src/scripts/link_readmes.sh | 38 +++++++++++++++++++++++++++++ docs/src/scripts/main.tcl | 8 ------ docs/src/scripts/manpage.py | 39 +++++++++++++++++++++++++++++- docs/src/scripts/md_roff_compat.py | 38 +++++++++++++++++++++++++++++ src/Main.cc | 4 +-- src/utl/src/Utl.tcl | 37 ++++++++++++++++++++++++++++ 7 files changed, 190 insertions(+), 11 deletions(-) delete mode 100644 docs/src/scripts/main.tcl diff --git a/docs/src/scripts/extract_utils.py b/docs/src/scripts/extract_utils.py index 62b53b0fa1b..ee4643b9a06 100644 --- a/docs/src/scripts/extract_utils.py +++ b/docs/src/scripts/extract_utils.py @@ -1,3 +1,40 @@ +############################################################################### +## +## BSD 3-Clause License +## +## Copyright (c) 2024, The Regents of the University of California +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: +## +## * Redistributions of source code must retain the above copyright notice, this +## list of conditions and the following disclaimer. +## +## * Redistributions in binary form must reproduce the above copyright notice, +## this list of conditions and the following disclaimer in the documentation +## and#or other materials provided with the distribution. +## +## * Neither the name of the copyright holder nor the names of its +## contributors may be used to endorse or promote products derived from +## this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +## +############################################################################### + +# This code contains the necessary regex parsing functions for manpage compilation. + import re def extract_headers(text, level = 1): diff --git a/docs/src/scripts/link_readmes.sh b/docs/src/scripts/link_readmes.sh index 94e1ada92a9..aec0329e70e 100755 --- a/docs/src/scripts/link_readmes.sh +++ b/docs/src/scripts/link_readmes.sh @@ -1,5 +1,43 @@ #!/bin/bash +############################################################################### +## +## BSD 3-Clause License +## +## Copyright (c) 2024, The Regents of the University of California +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: +## +## * Redistributions of source code must retain the above copyright notice, this +## list of conditions and the following disclaimer. +## +## * Redistributions in binary form must reproduce the above copyright notice, +## this list of conditions and the following disclaimer in the documentation +## and#or other materials provided with the distribution. +## +## * Neither the name of the copyright holder nor the names of its +## contributors may be used to endorse or promote products derived from +## this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +## +############################################################################### + +# This code does the symlink for module-level READMEs to the working folder +# for manpage compilations. + SRC_BASE_PATH="../src" DEST_BASE_PATH="./md/man2" mkdir -p $DEST_BASE_PATH diff --git a/docs/src/scripts/main.tcl b/docs/src/scripts/main.tcl deleted file mode 100644 index 865c4a75da5..00000000000 --- a/docs/src/scripts/main.tcl +++ /dev/null @@ -1,8 +0,0 @@ -# man wrapper function -proc man args { - exec {*}[auto_execok man] {*}$args <@stdin >@stdout 2>@stderr -} - -proc clear {} { - exec clear -} \ No newline at end of file diff --git a/docs/src/scripts/manpage.py b/docs/src/scripts/manpage.py index a32476de118..14d2c9f79d0 100644 --- a/docs/src/scripts/manpage.py +++ b/docs/src/scripts/manpage.py @@ -1,3 +1,41 @@ +############################################################################### +## +## BSD 3-Clause License +## +## Copyright (c) 2024, The Regents of the University of California +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: +## +## * Redistributions of source code must retain the above copyright notice, this +## list of conditions and the following disclaimer. +## +## * Redistributions in binary form must reproduce the above copyright notice, +## this list of conditions and the following disclaimer in the documentation +## and#or other materials provided with the distribution. +## +## * Neither the name of the copyright holder nor the names of its +## contributors may be used to endorse or promote products derived from +## this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +## +############################################################################### + +# This code describes the ManPage class, which consists of the data classes +# as well as the code needed to write the roff-compatible manpage file. + import io import datetime @@ -53,7 +91,6 @@ def write_synopsis(self, f): f.write(f"\n# SYNOPSIS\n\n") f.write(f"{self.synopsis}\n") - def write_description(self, f): assert isinstance(f, io.TextIOBase) and\ f.writable(), "File pointer is not open for writing." diff --git a/docs/src/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py index 86e1de2973d..e2e01b7054e 100644 --- a/docs/src/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -1,3 +1,41 @@ +############################################################################### +## +## BSD 3-Clause License +## +## Copyright (c) 2024, The Regents of the University of California +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: +## +## * Redistributions of source code must retain the above copyright notice, this +## list of conditions and the following disclaimer. +## +## * Redistributions in binary form must reproduce the above copyright notice, +## this list of conditions and the following disclaimer in the documentation +## and#or other materials provided with the distribution. +## +## * Neither the name of the copyright holder nor the names of its +## contributors may be used to endorse or promote products derived from +## this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +## +############################################################################### + +# This code contains the scripts to convert the individual module READMEs +# into individual functions for man2 and man3 level. + import os from manpage import ManPage from extract_utils import extract_tcl_command, extract_description diff --git a/src/Main.cc b/src/Main.cc index a2d2e3fca1c..c7edc7979c3 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -468,8 +468,8 @@ int ord::tclAppInit(Tcl_Interp* interp) static void showUsage(const char* prog, const char* init_filename) { - printf("Usage: %s [-help] [-version] [-no_init] [-exit] [-gui] ", prog); - printf("[-threads count|max] [-log file_name] [-metrics file_name] "); + printf("Usage: %s [-help] [-version] [-no_init] [-no_splash] [-exit] ", prog); + printf("[-gui] [-threads count|max] [-log file_name] [-metrics file_name] "); printf("cmd_file\n"); printf(" -help show help and exit\n"); printf(" -version show version and exit\n"); diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index a9046f60db0..dfb590444f0 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -1,3 +1,40 @@ +############################################################################### +## +## BSD 3-Clause License +## +## Copyright (c) 2024, The Regents of the University of California +## All rights reserved. +## +## Redistribution and use in source and binary forms, with or without +## modification, are permitted provided that the following conditions are met: +## +## * Redistributions of source code must retain the above copyright notice, this +## list of conditions and the following disclaimer. +## +## * Redistributions in binary form must reproduce the above copyright notice, +## this list of conditions and the following disclaimer in the documentation +## and#or other materials provided with the distribution. +## +## * Neither the name of the copyright holder nor the names of its +## contributors may be used to endorse or promote products derived from +## this software without specific prior written permission. +## +## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +## POSSIBILITY OF SUCH DAMAGE. +## +############################################################################### + +# This code contains the Tcl-native implementation of man command. + global MAN_PATH set MAN_PATH "" From 08745574ecc7135ee11a8f4e458b3e40a631fe63 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:21:50 +0000 Subject: [PATCH 79/88] fix github actions Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/man_tcl_params.py | 6 +----- src/upf/src/upf.tcl | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/src/test/man_tcl_params.py b/docs/src/test/man_tcl_params.py index 4e29d2efa11..f7dc2cf9137 100644 --- a/docs/src/test/man_tcl_params.py +++ b/docs/src/test/man_tcl_params.py @@ -49,10 +49,6 @@ # for gui, filter out the gui:: for separate processing matches = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] - # for pad, remove `make_fake_io_site` - if 'pad' in tool_dir: - matches = [x for x in matches if "make_fake_io_site" not in x] - for match in matches: cmd = match.split()[0] rest = " ".join(match.split()[1:]) @@ -79,4 +75,4 @@ succeeded += 1 print("Success.") -print(f"----------\nSucceeded: {succeeded} out of {len(help_dict)} tests.") \ No newline at end of file +print(f"----------\nSucceeded: {succeeded} out of {len(help_dict)} tests.") diff --git a/src/upf/src/upf.tcl b/src/upf/src/upf.tcl index a998f1665ef..bc982859397 100644 --- a/src/upf/src/upf.tcl +++ b/src/upf/src/upf.tcl @@ -358,7 +358,7 @@ proc map_power_switch { args } { check_block_exists sta::parse_key_args "map_power_switch" args \ - keys {switch_name_list -lib_cells -port_map} flags {} + keys {-switch_name_list -lib_cells -port_map} flags {} sta::check_argc_eq1 "map_power_switch" $args From f7828ffb325afe12831c5a94cd3a455373f15eb0 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Thu, 22 Feb 2024 18:07:59 +0000 Subject: [PATCH 80/88] fix regressions and tclint Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 16 +++++----- docs/src/test/translator.ok | 14 ++++----- src/ant/src/AntennaChecker.tcl | 3 +- src/cts/src/TritonCTS.tcl | 5 +-- src/grt/src/GlobalRouter.tcl | 24 ++++++--------- src/mpl/src/MacroPlacer.tcl | 2 +- src/ppl/src/IOPlacer.tcl | 2 +- src/rcx/src/OpenRCX.tcl | 4 +-- src/tap/src/tapcell.tcl | 4 +-- src/utl/src/Utl.tcl | 54 ++++++++++++++++----------------- 10 files changed, 63 insertions(+), 65 deletions(-) diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok index d0db372d0c3..6bd91fd23e8 100644 --- a/docs/src/test/count_outfiles.ok +++ b/docs/src/test/count_outfiles.ok @@ -82,7 +82,7 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt -Info: 59, Warn: 10, Error: 33 +Info: 61, Warn: 10, Error: 34 Processing ../src/dbSta/messages.txt Info: 0, Warn: 7, Error: 3 Processing ../src/dft/messages.txt @@ -100,25 +100,25 @@ Info: 5, Warn: 1, Error: 4 Processing ../src/gpl/messages.txt Info: 70, Warn: 10, Error: 14 Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 93 +Info: 29, Warn: 42, Error: 88 Processing ../src/gui/messages.txt Info: 1, Warn: 33, Error: 64 Processing ../src/ifp/messages.txt Info: 4, Warn: 7, Error: 17 Processing ../src/mpl/messages.txt -Info: 12, Warn: 7, Error: 9 +Info: 12, Warn: 7, Error: 8 Processing ../src/mpl2/messages.txt Info: 2, Warn: 6, Error: 21 Processing ../src/odb/messages.txt -Info: 64, Warn: 199, Error: 136 +Info: 64, Warn: 199, Error: 137 Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 356 +Info: 18, Warn: 59, Error: 353 Processing ../src/par/messages.txt Info: 13, Warn: 9, Error: 16 Processing ../src/pdn/messages.txt Info: 3, Warn: 18, Error: 86 Processing ../src/ppl/messages.txt -Info: 19, Warn: 17, Error: 68 +Info: 17, Warn: 17, Error: 66 Processing ../src/psm/messages.txt Info: 10, Warn: 18, Error: 39 Processing ../src/rcx/messages.txt @@ -136,8 +136,8 @@ Info: 0, Warn: 44, Error: 8 Processing ../src/utl/messages.txt Info: 1, Warn: 2, Error: 7 Processing ../messages.txt -Info: 3, Warn: 7, Error: 38 +Info: 3, Warn: 6, Error: 34 cat/cat1/openroad.1 Level 1 doc counts are equal to 1. Level 2 doc counts are equal to 168. -Level 3 doc counts are equal to 2660. +Level 3 doc counts are equal to 2646. diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index c973850096c..a8b0ee651c4 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -88,7 +88,7 @@ Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 Processing ../src/ant/messages.txt Info: 2, Warn: 4, Error: 3 Processing ../src/cts/messages.txt -Info: 59, Warn: 10, Error: 33 +Info: 61, Warn: 10, Error: 34 Processing ../src/dbSta/messages.txt Info: 0, Warn: 7, Error: 3 Processing ../src/dft/messages.txt @@ -106,25 +106,25 @@ Info: 5, Warn: 1, Error: 4 Processing ../src/gpl/messages.txt Info: 70, Warn: 10, Error: 14 Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 93 +Info: 29, Warn: 42, Error: 88 Processing ../src/gui/messages.txt Info: 1, Warn: 33, Error: 64 Processing ../src/ifp/messages.txt Info: 4, Warn: 7, Error: 17 Processing ../src/mpl/messages.txt -Info: 12, Warn: 7, Error: 9 +Info: 12, Warn: 7, Error: 8 Processing ../src/mpl2/messages.txt Info: 2, Warn: 6, Error: 21 Processing ../src/odb/messages.txt -Info: 64, Warn: 199, Error: 136 +Info: 64, Warn: 199, Error: 137 Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 356 +Info: 18, Warn: 59, Error: 353 Processing ../src/par/messages.txt Info: 13, Warn: 9, Error: 16 Processing ../src/pdn/messages.txt Info: 3, Warn: 18, Error: 86 Processing ../src/ppl/messages.txt -Info: 19, Warn: 17, Error: 68 +Info: 17, Warn: 17, Error: 66 Processing ../src/psm/messages.txt Info: 10, Warn: 18, Error: 39 Processing ../src/rcx/messages.txt @@ -142,4 +142,4 @@ Info: 0, Warn: 44, Error: 8 Processing ../src/utl/messages.txt Info: 1, Warn: 2, Error: 7 Processing ../messages.txt -Info: 3, Warn: 7, Error: 38 +Info: 3, Warn: 6, Error: 34 diff --git a/src/ant/src/AntennaChecker.tcl b/src/ant/src/AntennaChecker.tcl index dbaf893cf38..d9c60239ce0 100644 --- a/src/ant/src/AntennaChecker.tcl +++ b/src/ant/src/AntennaChecker.tcl @@ -30,7 +30,8 @@ # POSSIBILITY OF SUCH DAMAGE. sta::define_cmd_args "check_antennas" { [-verbose]\ - [-net net]};# checker off + [-net net] +};# checker off proc check_antennas { args } { sta::parse_key_args "check_antennas" args \ diff --git a/src/cts/src/TritonCTS.tcl b/src/cts/src/TritonCTS.tcl index 78a8df1d7e9..e7e05c63d0f 100644 --- a/src/cts/src/TritonCTS.tcl +++ b/src/cts/src/TritonCTS.tcl @@ -90,7 +90,7 @@ sta::define_cmd_args "clock_tree_synthesis" {[-wire_unit unit] [-sink_buffer_max_cap_derate] \ [-use_dummy_load] \ [-delay_buffer_derate] \ - };# checker off +};# checker off proc clock_tree_synthesis { args } { sta::parse_key_args "clock_tree_synthesis" args \ @@ -102,7 +102,8 @@ proc clock_tree_synthesis { args } { -sink_clustering_levels -tree_buf \ -sink_buffer_max_cap_derate -delay_buffer_derate} \ flags {-post_cts_disable -sink_clustering_enable -balance_levels \ - -obstruction_aware -apply_ndr -insertion_delay -use_dummy_load};# checker off + -obstruction_aware -apply_ndr -insertion_delay -use_dummy_load + };# checker off sta::check_argc_eq0 "clock_tree_synthesis" $args diff --git a/src/grt/src/GlobalRouter.tcl b/src/grt/src/GlobalRouter.tcl index 1db1c88a841..6c1a7667abf 100644 --- a/src/grt/src/GlobalRouter.tcl +++ b/src/grt/src/GlobalRouter.tcl @@ -37,8 +37,8 @@ sta::define_cmd_args "set_global_routing_layer_adjustment" { layer adj } proc set_global_routing_layer_adjustment { args } { sta::parse_key_args "set_global_routing_layer_adjustment" args \ - keys {} \ - flags {} + keys {} \ + flags {} if {[llength $args] == 2} { lassign $args layer adj @@ -123,7 +123,7 @@ proc set_global_routing_region_adjustment { args } { sta::define_cmd_args "set_routing_layers" { [-signal min-max] \ [-clock min-max] \ -};# checker off +};# checker off proc set_routing_layers { args } { sta::parse_key_args "set_routing_layers" args \ @@ -144,8 +144,8 @@ sta::define_cmd_args "set_macro_extension" { extension } proc set_macro_extension { args } { sta::parse_key_args "set_macro_extension" args \ - keys {} \ - flags {} + keys {} \ + flags {} if {[llength $args] == 1} { lassign $args extension sta::check_positive_integer "macro_extension" $extension @@ -159,8 +159,8 @@ sta::define_cmd_args "set_pin_offset" { offset } proc set_pin_offset { args } { sta::parse_key_args "set_pin_offset" args \ - keys {} \ - flags {} + keys {} \ + flags {} if {[llength $args] == 1} { lassign $args offset sta::check_positive_integer "pin_offset" $offset @@ -307,11 +307,7 @@ sta::define_cmd_args "repair_antennas" { diode_cell \ proc repair_antennas { args } { sta::parse_key_args "repair_antennas" args \ -<<<<<<< HEAD - keys {-iterations -ratio_margin} flags {} -======= - keys {-iterations -ratio_margin} ->>>>>>> origin/master + keys {-iterations -ratio_margin} flags {} if { [grt::have_routes] } { if { [llength $args] == 0 } { # repairAntennas locates diode @@ -385,8 +381,8 @@ sta::define_cmd_args "read_guides" { file_name } proc read_guides { args } { sta::parse_key_args "read_guides" args \ - keys {} \ - flags {} + keys {} \ + flags {} set file_name $args grt::read_guides $file_name } diff --git a/src/mpl/src/MacroPlacer.tcl b/src/mpl/src/MacroPlacer.tcl index 9b18290f165..f01f6feb3d7 100644 --- a/src/mpl/src/MacroPlacer.tcl +++ b/src/mpl/src/MacroPlacer.tcl @@ -122,7 +122,7 @@ sta::define_cmd_args "macro_placement_debug" { }; # checker off proc macro_placement_debug { args } { -# This seg faults if the gui is not present -cherry + # This seg faults if the gui is not present -cherry sta::parse_key_args "macro_placement_debug" args \ keys {} \ flags {-partitions};# checker off diff --git a/src/ppl/src/IOPlacer.tcl b/src/ppl/src/IOPlacer.tcl index 67a42c73264..b5aac3c279d 100644 --- a/src/ppl/src/IOPlacer.tcl +++ b/src/ppl/src/IOPlacer.tcl @@ -352,7 +352,7 @@ proc set_simulated_annealing { args } { sta::define_cmd_args "simulated_annealing_debug" { [-iters_between_paintings iters] - [-no_pause_mode no_pause_mode] + [-no_pause_mode no_pause_mode] } proc simulated_annealing_debug { args } { diff --git a/src/rcx/src/OpenRCX.tcl b/src/rcx/src/OpenRCX.tcl index 3fa7e129ecc..b947cf0695a 100644 --- a/src/rcx/src/OpenRCX.tcl +++ b/src/rcx/src/OpenRCX.tcl @@ -39,7 +39,7 @@ sta::define_cmd_args "define_process_corner" { proc define_process_corner { args } { sta::parse_key_args "define_process_corner" args \ - keys {-ext_model_index} flags {} + keys {-ext_model_index} flags {} sta::check_argc_eq1 "define_process_corner" $args set ext_model_index 0 @@ -125,7 +125,7 @@ proc extract_parasitics { args } { sta::define_cmd_args "write_spef" { [-net_id net_id] - [-nets nets] + [-nets nets] [-coordinates] filename } diff --git a/src/tap/src/tapcell.tcl b/src/tap/src/tapcell.tcl index 55a8089150a..6f9e83d9d0c 100644 --- a/src/tap/src/tapcell.tcl +++ b/src/tap/src/tapcell.tcl @@ -357,11 +357,11 @@ sta::define_cmd_args "place_tapcells" { } proc place_tapcells {args } { - + sta::parse_key_args "place_tapcells" args \ keys {-master -distance} \ flags {} - + sta::check_argc_eq0 "place_tapcells" $args set dist -1 diff --git a/src/utl/src/Utl.tcl b/src/utl/src/Utl.tcl index dfb590444f0..341315ea008 100644 --- a/src/utl/src/Utl.tcl +++ b/src/utl/src/Utl.tcl @@ -35,7 +35,7 @@ # This code contains the Tcl-native implementation of man command. -global MAN_PATH +global MAN_PATH set MAN_PATH "" sta::define_cmd_args "man" { name\ @@ -44,7 +44,7 @@ sta::define_cmd_args "man" { name\ proc man { args } { sta::parse_key_args "man" args \ keys {-manpath} flags {-no_query} - + set name [lindex $args 0] # check the default man path based on executable path @@ -84,7 +84,7 @@ proc man { args } { set man_path $MAN_PATH set man_sections {} foreach man_section {cat1 cat2 cat3} { - lappend man_sections "$man_path/$man_section" + lappend man_sections "$man_path/$man_section" } set man_found false foreach man_section $man_sections { @@ -96,32 +96,32 @@ proc man { args } { append name1 ".$man_suffix" set man_file [file join $man_section $name1] if { [file exists $man_file] } { - set man_found true - set file_handle [open $man_file r] - set content [read $file_handle] - close $file_handle - - # Display content - set lines [split $content "\n"] - set num_lines [llength $lines] - set page_size 40 - - for {set i 0} {$i < $num_lines} {incr i $page_size} { - set page [lrange $lines $i [expr {$i + $page_size - 1}]] - puts [join $page "\n"] - - # Ask user to continue or quit - if {!$no_query && [llength $lines] > $page_size} { - puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" - flush stdout; - set input [gets stdin] - if {$input == "q"} { - break - } - } + set man_found true + set file_handle [open $man_file r] + set content [read $file_handle] + close $file_handle + + # Display content + set lines [split $content "\n"] + set num_lines [llength $lines] + set page_size 40 + + for {set i 0} {$i < $num_lines} {incr i $page_size} { + set page [lrange $lines $i [expr {$i + $page_size - 1}]] + puts [join $page "\n"] + + # Ask user to continue or quit + if {!$no_query && [llength $lines] > $page_size} { + puts -nonewline "---\nPress 'q' to quit or any other key to continue: \n---" + flush stdout; + set input [gets stdin] + if {$input == "q"} { + break } } } + } + } if { $man_found == false } { utl::error UTL 100 "Man page for $name is not found." @@ -149,7 +149,7 @@ proc get_input { } { proc check_valid_path { path } { if {[file isdirectory $path]} { - return true + return true } else { puts "Invalid path, please retry." return false From 46d7cff1670f7ceb6bcd5813828d42a10ffdf27e Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:14:49 +0000 Subject: [PATCH 81/88] update local test for dynamic Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/md/man1/openroad.md | 8 +- docs/src/scripts/manpage.py | 13 +- docs/src/scripts/md_roff_compat.py | 45 ++--- docs/src/test/README.md | 31 +++- docs/src/test/man_func.ok | 44 ++--- docs/src/test/regression_tests.tcl | 2 - docs/src/test/translator.md | 245 ++++++++++++++++++++++++++ docs/src/test/translator.ok | 144 +-------------- docs/src/test/translator.py | 46 +---- docs/src/test/translator.txt | 94 ++++++++++ src/ant/test/ant_man_tcl_check.ok | 3 + src/ant/test/ant_man_tcl_check.py | 66 +++++++ src/ant/test/ant_readme_msgs_check.ok | 3 + src/ant/test/ant_readme_msgs_check.py | 19 ++ src/ant/test/extract_utils.py | 1 + src/ant/test/manpage.py | 1 + src/ant/test/md_roff_compat.py | 1 + src/ant/test/regression_tests.tcl | 2 + 18 files changed, 524 insertions(+), 244 deletions(-) create mode 100644 docs/src/test/translator.md create mode 100644 docs/src/test/translator.txt create mode 100644 src/ant/test/ant_man_tcl_check.ok create mode 100644 src/ant/test/ant_man_tcl_check.py create mode 100644 src/ant/test/ant_readme_msgs_check.ok create mode 100644 src/ant/test/ant_readme_msgs_check.py create mode 120000 src/ant/test/extract_utils.py create mode 120000 src/ant/test/manpage.py create mode 120000 src/ant/test/md_roff_compat.py diff --git a/docs/md/man1/openroad.md b/docs/md/man1/openroad.md index b2102f563f0..d2af1365922 100644 --- a/docs/md/man1/openroad.md +++ b/docs/md/man1/openroad.md @@ -9,9 +9,9 @@ openroad - OpenROAD command-line-interface. # SYNOPSIS -openroad [-help] [-version] [-no_init] [-exit] [-gui] - [-threads count|max] [-log file_name] - [-metrics file_name] [-python] +openroad [-help] [-version] [-no_init] [-no_splash] + [-exit] [-gui] [-threads count|max] + [-log file_name] [-metrics file_name] [-python] cmd_file @@ -27,6 +27,8 @@ The **openroad** command is the command-line interface for OpenROAD, an open-sou `-no_init`: Skip initialization steps. +`-no_splash`: Do not show the license splash at startup. + `-exit`: Exit after executing commands in cmd_file. `-gui`: Launch the graphical user interface (GUI). diff --git a/docs/src/scripts/manpage.py b/docs/src/scripts/manpage.py index 14d2c9f79d0..c993d2969e8 100644 --- a/docs/src/scripts/manpage.py +++ b/docs/src/scripts/manpage.py @@ -41,13 +41,15 @@ # identify key section and stored in ManPage class. class ManPage(): - def __init__(self): + def __init__(self, man_level = 2): + assert man_level in [2,3], "only writable for man2/man3" self.name = "" self.desc = "" self.synopsis = "" self.switches = {} self.args = {} self.datetime = datetime.datetime.now().strftime("%y/%m/%d") + self.man_level = f"man{man_level}" def write_roff_file(self, dst_dir = './md/man2'): assert self.name, print("func name not set") @@ -56,9 +58,8 @@ def write_roff_file(self, dst_dir = './md/man2'): # it is okay for a function to have no switches. #assert self.switches, print("func switches not set") filepath = f"{dst_dir}/{self.name}.md" - man_level = dst_dir.split("/")[-1] with open(filepath, "w") as f: - self.write_header(f, man_level) + self.write_header(f) self.write_name(f) self.write_synopsis(f) self.write_description(f) @@ -66,14 +67,12 @@ def write_roff_file(self, dst_dir = './md/man2'): self.write_arguments(f) self.write_placeholder(f) #TODO. - def write_header(self, f, man_level): + def write_header(self, f): assert isinstance(f, io.TextIOBase) and\ f.writable(), "File pointer is not open for writing." - assert man_level == "man1" or man_level == "man2" or\ - man_level == "man3", print("must be either man1|man2|man3") f.write(f"---\n") - f.write(f"title: {self.name}({man_level[-1]})\n") + f.write(f"title: {self.name}({self.man_level[-1]})\n") f.write(f"date: {self.datetime}\n") f.write(f"---\n") diff --git a/docs/src/scripts/md_roff_compat.py b/docs/src/scripts/md_roff_compat.py index e2e01b7054e..9d22349a9ab 100644 --- a/docs/src/scripts/md_roff_compat.py +++ b/docs/src/scripts/md_roff_compat.py @@ -68,8 +68,11 @@ def man2(path=DEST_DIR2): if not os.path.exists(doc): print(f"{doc} doesn't exist. Continuing") continue - text = open(doc).read() + man2_translate(doc, path) +def man2_translate(doc, path): + with open(doc) as f: + text = f.read() # new function names (reading tcl synopsis + convert gui:: to gui_) func_names = extract_tcl_command(text) func_names = ["_".join(s.lower().split()) for s in func_names] @@ -106,7 +109,7 @@ def man2(path=DEST_DIR2): key, val = parse_switch(line) switches_dict[key] = val manpage.switches = switches_dict - + if func_args[func_id]: # convert it to dict args_dict = {} @@ -119,29 +122,31 @@ def man2(path=DEST_DIR2): def man3(path=DEST_DIR3): for doc in docs3: - _info, _warn, _error = 0, 0, 0 print(f"Processing {doc}") if not os.path.exists(doc): print(f"{doc} doesn't exist. Continuing") continue - with open(doc, 'r') as f: - for line in f: - parts = line.split() - module, num, message, level = parts[0], parts[1],\ - " ".join(parts[3:-2]), parts[-2] - manpage = ManPage() - manpage.name = f"{module}-{num}" - if "with-total" in manpage.name: print(parts); exit() - manpage.synopsis = "N/A." - manpage.desc = f"Type: {level}\n\n{message}" - manpage.write_roff_file(path) - - # tabulate counts - if level == 'INFO': _info += 1 - elif level == 'WARN': _warn += 1 - elif level == 'ERROR': _error += 1 - print(f"Info: {_info}, Warn: {_warn}, Error: {_error}") + man3_translate(doc, path) + +def man3_translate(doc, path): + _info, _warn, _error = 0, 0, 0 + with open(doc) as f: + for line in f: + parts = line.split() + module, num, message, level = parts[0], parts[1],\ + " ".join(parts[3:-2]), parts[-2] + manpage = ManPage() + manpage.name = f"{module}-{num}" + if "with-total" in manpage.name: print(parts); exit() + manpage.synopsis = "N/A." + manpage.desc = f"Type: {level}\n\n{message}" + manpage.write_roff_file(path) + # tabulate counts + if level == 'INFO': _info += 1 + elif level == 'WARN': _warn += 1 + elif level == 'ERROR': _error += 1 + print(f"Info: {_info}, Warn: {_warn}, Error: {_error}") if __name__ == "__main__": man2() diff --git a/docs/src/test/README.md b/docs/src/test/README.md index 8838d704c4d..04b3c6aa6fa 100644 --- a/docs/src/test/README.md +++ b/docs/src/test/README.md @@ -11,7 +11,14 @@ They can be found in `.github/workflows/github-actions-docs-test.yml` file. ## Regression tests -### Translator +This is divided into static and dynamic regression tests. +Static tests are designed to test the script functionality, whereas +dynamic tests are designed to test the documentation compatibitity with the +script and will be housed in individual module folders. + +### Static Test + +#### Translator The code file can be found [here](translator.py). The objective of this test is to test if the underlying `README.md` @@ -19,13 +26,7 @@ file can be converted to roff format via regex extraction. Namely, the script checks for equality in the number of function names, descriptors, synopsis, options and arguments detected per Tcl command. -### Count output files - -The code file can be found [here](count_outfiles.py). -The objective of this test is to count if the expected number of files -in `man2` and `man3` are as expected. - -### Man functionality check +#### Man functionality check The code file can be found [here](man_func.tcl). The objective of this test is to check the functionality of the Tcl @@ -37,9 +38,21 @@ is where we do not specify the `-manpath` argument and just run This check makes sure that the files are compiled in the correct location and viewable by the `man` command. +### Dynamic Test + +For all the tests below, do make sure to update it locally every +time you make a change to the `README.md`, update messages, or +make a change to the top-level `Tcl` code. + +#### README-messages check + +The name of this test is `{MODULE}_readme_msgs_check.py`. +The objective of this test is to check the number of +parsed module commands and messages. + ### Man-to-Tcl check -The code file can be found [here](man_tcl_check.py). +The name of this test is `{MODULE}_man_tcl_check.py` The objective of this test is to ensure that there are similar counts of command in the following: `proc`, `help`, `man`. diff --git a/docs/src/test/man_func.ok b/docs/src/test/man_func.ok index 27ac609cd08..f340c5fb75f 100644 --- a/docs/src/test/man_func.ok +++ b/docs/src/test/man_func.ok @@ -6,11 +6,12 @@ NAME openroad - OpenROAD command-line-interface. SYNOPSIS - openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads - count|max] [-log file_name] [-metrics file_name] [-python] cmd_file + openroad [-help] [-version] [-no_init] [-no_splash] [-exit] [-gui] + [-threads count|max] [-log file_name] [-metrics file_name] [-python] + cmd_file DESCRIPTION - The openroad command is the command-line interface for OpenROAD, an + The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file. @@ -22,11 +23,13 @@ OPTIONS -no_init: Skip initialization steps. + -no_splash: Do not show the license splash at startup. + -exit: Exit after executing commands in cmd_file. -gui: Launch the graphical user interface (GUI). - -threads count|max: Specify the number of threads to use (or use max + -threads count|max: Specify the number of threads to use (or use max available). -log file_name: Log output to the specified file. @@ -41,14 +44,14 @@ ARGUMENTS EXAMPLES openroad -help: Prints the help information - openroad -version -exit: Prints the version information, and exits the + openroad -version -exit: Prints the version information, and exits the program thereafter. - openroad -threads max -log test.log -metrics test.metrics: Prints the - log and metric respectively to test.log and test.metrics. Also runs + openroad -threads max -log test.log -metrics test.metrics: Prints the + log and metric respectively to test.log and test.metrics. Also runs the script with maximum available number of threads. - openroad -gui: Launches OpenROAD GUI, which further interactive Tcl + openroad -gui: Launches OpenROAD GUI, which further interactive Tcl commands can be run. TCL COMMANDS @@ -73,7 +76,6 @@ TCL COMMANDS • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. • read_verilog filename - • Read Verilog (.v) input file. • write_verilog filename @@ -90,7 +92,7 @@ TCL COMMANDS • write_abstract_lef filename - • Write abstract Library Exchange Format (.lef) files based on cur‐ + • Write abstract Library Exchange Format (.lef) files based on cur‐ rent database. • write_cdl [-include_fillers] -masters out_filename @@ -112,11 +114,12 @@ NAME openroad - OpenROAD command-line-interface. SYNOPSIS - openroad [-help] [-version] [-no_init] [-exit] [-gui] [-threads - count|max] [-log file_name] [-metrics file_name] [-python] cmd_file + openroad [-help] [-version] [-no_init] [-no_splash] [-exit] [-gui] + [-threads count|max] [-log file_name] [-metrics file_name] [-python] + cmd_file DESCRIPTION - The openroad command is the command-line interface for OpenROAD, an + The openroad command is the command-line interface for OpenROAD, an open-source initiative for chip design and optimization. It provides a range of options to control its behavior and execute commands specified in the cmd_file. @@ -128,11 +131,13 @@ OPTIONS -no_init: Skip initialization steps. + -no_splash: Do not show the license splash at startup. + -exit: Exit after executing commands in cmd_file. -gui: Launch the graphical user interface (GUI). - -threads count|max: Specify the number of threads to use (or use max + -threads count|max: Specify the number of threads to use (or use max available). -log file_name: Log output to the specified file. @@ -147,14 +152,14 @@ ARGUMENTS EXAMPLES openroad -help: Prints the help information - openroad -version -exit: Prints the version information, and exits the + openroad -version -exit: Prints the version information, and exits the program thereafter. - openroad -threads max -log test.log -metrics test.metrics: Prints the - log and metric respectively to test.log and test.metrics. Also runs + openroad -threads max -log test.log -metrics test.metrics: Prints the + log and metric respectively to test.log and test.metrics. Also runs the script with maximum available number of threads. - openroad -gui: Launches OpenROAD GUI, which further interactive Tcl + openroad -gui: Launches OpenROAD GUI, which further interactive Tcl commands can be run. TCL COMMANDS @@ -179,7 +184,6 @@ TCL COMMANDS • version 5.8|5.7|5.6|5.5|5.4|5.3: Corresponding DEF version to use. • read_verilog filename - • Read Verilog (.v) input file. • write_verilog filename @@ -196,7 +200,7 @@ TCL COMMANDS • write_abstract_lef filename - • Write abstract Library Exchange Format (.lef) files based on cur‐ + • Write abstract Library Exchange Format (.lef) files based on cur‐ rent database. • write_cdl [-include_fillers] -masters out_filename diff --git a/docs/src/test/regression_tests.tcl b/docs/src/test/regression_tests.tcl index dbbdfd07c0c..b7f7b62f5c4 100644 --- a/docs/src/test/regression_tests.tcl +++ b/docs/src/test/regression_tests.tcl @@ -1,6 +1,4 @@ record_tests { translator - count_outfiles man_func - man_tcl_check } diff --git a/docs/src/test/translator.md b/docs/src/test/translator.md new file mode 100644 index 00000000000..deb5663ae55 --- /dev/null +++ b/docs/src/test/translator.md @@ -0,0 +1,245 @@ +# Global Placement + +The global placement module in OpenROAD (`gpl`) is based on the open-source +RePlAce tool, from the paper "Advancing Solution Quality and Routability Validation +in Global Placement". + +Features: + +- Analytic and nonlinear placement algorithm. Solves + electrostatic force equations using Nesterov's method. + ([link](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf)) +- Verified with various commercial technologies and research enablements using OpenDB + (7/14/16/28/45/55/65nm). +- Verified deterministic solution generation with various compilers and OS. +- Supports Mixed-size placement mode. + +## Commands + +```{note} +- Parameters in square brackets `[-param param]` are optional. +- Parameters without square brackets `-param2 param2` are required. +``` + +### Global Placement + +When using the `-timing_driven` flag, `gpl` does a virtual `repair_design` +to find slacks and +weight nets with low slack. It adjusts the worst slacks (modified with +`-timing_driven_nets_percentage`) using a multiplier (modified with +`-timing_driven_net_weight_max`). The multiplier +is scaled from the full value for the worst slack, to 1.0 at the +`timing_driven_nets_percentage` point. Use the `set_wire_rc` command to set +resistance and capacitance of estimated wires used for timing. + +Routability-driven arguments +- They begin with `-routability`. +- `-routability_check_overflow`, `-routability_max_density`, `-routability_max_bloat_iter`, `-routability_max_inflation_iter`, `-routability_target_rc_metric`, `-routability_inflation_ratio_coef`, `-routability_max_inflation_ratio`, `-routability_rc_coefficients` + +Timing-driven arguments +- They begin with `-timing_driven`. +- `-timing_driven_net_reweight_overflow`, `-timing_driven_net_weight_max`, `-timing_driven_nets_percentage` + +```tcl +global_placement + [-timing_driven] + [-routability_driven] + [-disable_timing_driven] + [-disable_routability_driven] + [-skip_initial_place] + [-incremental] + [-bin_grid_count grid_count] + [-density target_density] + [-init_density_penalty init_density_penalty] + [-init_wirelength_coef init_wirelength_coef] + [-min_phi_coef min_phi_conef] + [-max_phi_coef max_phi_coef] + [-reference_hpwl reference_hpwl] + [-overflow overflow] + [-initial_place_max_iter initial_place_max_iter] + [-initial_place_max_fanout initial_place_max_fanout] + [-pad_left pad_left] + [-pad_right pad_right] + [-force_cpu] + [-skip_io] + [-skip_nesterov_place] + [-routability_check_overflow routability_check_overflow] + [-routability_max_density routability_max_density] + [-routability_max_bloat_iter routability_max_bloat_iter] + [-routability_max_inflation_iter routability_max_inflation_iter] + [-routability_target_rc_metric routability_target_rc_metric] + [-routability_inflation_ratio_coef routability_inflation_ratio_coef] + [-routability_max_inflation_ratio routability_max_inflation_ratio] + [-routability_rc_coefficients routability_rc_coefficients] + [-timing_driven_net_reweight_overflow] + [-timing_driven_net_weight_max] + [-timing_driven_nets_percentage] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-timing_driven` | Enable timing-driven mode. See [link](#timing-driven-arguments) for timing-specific arguments. | +| `-routability_driven` | Enable routability-driven mode. See [link](#routability-driven-arguments) for routability-specific arguments. | +| `-skip_initial_place` | Skip the initial placement (Biconjugate gradient stabilized, or BiCGSTAB solving) before Nesterov placement. Initial placement improves HPWL by ~5% on large designs. Equivalent to `-initial_place_max_iter 0`. | +| `-incremental` | Enable the incremental global placement. Users would need to tune other parameters (e.g., `init_density_penalty`) with pre-placed solutions. | +| `-bin_grid_count` | Set bin grid's counts. The internal heuristic defines the default value. Allowed values are integers `[64,128,256,512,...]`. | +| `-density` | Set target density. The default value is `0.7` (i.e., 70%). Allowed values are floats `[0, 1]`. | +| `-init_density_penalty` | Set initial density penalty. The default value is `8e-5`. Allowed values are floats `[1e-6, 1e6]`. | +| `-init_wirelength_coef` | Set initial wirelength coefficient. The default value is `0.25`. Allowed values are floats. | +| `-min_phi_coef` | Set `pcof_min` ($\mu_k$ Lower Bound). The default value is `0.95`. Allowed values are floats `[0.95, 1.05]`. | +| `-max_phi_coef` | Set `pcof_max` ($\mu_k$ Upper Bound). Default value is 1.05. Allowed values are `[1.00-1.20, float]`. | +| `-overflow` | Set target overflow for termination condition. The default value is `0.1`. Allowed values are floats `[0, 1]`. | +| `-initial_place_max_iter` | Set maximum iterations in the initial place. The default value is 20. Allowed values are integers `[0, MAX_INT]`. | +| `-initial_place_max_fanout` | Set net escape condition in initial place when $fanout \geq initial\_place\_max\_fanout$. The default value is 200. Allowed values are integers `[1, MAX_INT]`. | +| `-pad_left` | Set left padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | +| `-pad_right` | Set right padding in terms of number of sites. The default value is 0, and the allowed values are integers `[1, MAX_INT]` | +| `-force_cpu` | Force to use the CPU solver even if the GPU is available. | +| `-skip_io` | Flag to ignore the IO ports when computing wirelength during placement. The default value is False, allowed values are boolean. | + +#### Routability-Driven Arguments + +| Switch Name | Description | +| ----- | ----- | +| `-routability_check_overflow` | Set overflow threshold for routability mode. The default value is `0.2`, and the allowed values are floats `[0, 1]`. | +| `-routability_max_density` | Set density threshold for routability mode. The default value is `0.99`, and the allowed values are floats `[0, 1]`. | +| `-routability_max_bloat_iter` | Set bloat iteration threshold for routability mode. The default value is `1`, and the allowed values are integers `[1, MAX_INT]`.| +| `-routability_max_inflation_iter` | Set inflation iteration threshold for routability mode. The default value is `4`, and the allowed values are integers `[1, MAX_INT]`. | +| `-routability_target_rc_metric` | Set target RC metric for routability mode. The default value is `1.25`, and the allowed values are floats. | +| `-routability_inflation_ratio_coef` | Set inflation ratio coefficient for routability mode. The default value is `2.5`, and the allowed values are floats. | +| `-routability_max_inflation_ratio` | Set inflation ratio threshold for routability mode. The default value is `2.5`, and the allowed values are floats. | +| `-routability_rc_coefficients` | Set routability RC coefficients. It comes in the form of a Tcl List `{k1, k2, k3, k4}`. The default value for each coefficient is `{1.0, 1.0, 0.0, 0.0}` respectively, and the allowed values are floats. | + +#### Timing-Driven Arguments + +| Switch Name | Description | +| ----- | ----- | +| `-timing_driven_net_reweight_overflow` | Set overflow threshold for timing-driven net reweighting. Allowed value is a Tcl list of integers where each number is `[0, 100]`. | +| `-timing_driven_net_weight_max` | Set the multiplier for the most timing-critical nets. The default value is `1.9`, and the allowed values are floats. | +| `-timing_driven_nets_percentage` | Set the reweighted percentage of nets in timing-driven mode. The default value is 10. Allowed values are floats `[0, 100]`. | + +### Cluster Flops + +This command does flop clustering based on parameters. + +```tcl +cluster_flops + [-tray_weight tray_weight]\ + [-timing_weight timing_weight]\ + [-max_split_size max_split_size]\ + [-num_paths num_paths] +``` + +#### Options + +| Switch Name | Description | +| ----- | ----- | +| `-tray_weight` | Tray weight, default value is 20.0, type `float`. | +| `-timing_weight` | Timing weight, default value is 1.0, type `float`. | +| `-max_split_size` | Maximum split size, default value is -1, type `int`.| +| `-num_paths` | KIV, default value is 0, type `int`. | + + +## Useful Developer Commands + +If you are a developer, you might find these useful. More details can be found in the [source file](./src/replace.cpp) or the [swig file](./src/replace.i). + +``` +# debugging global placement +global_placement_debug -pause -update -inst -draw_bins -initial + +# adds padding and gets global placement uniform target density +get_global_placement_uniform_density -pad_left -pad_right +``` + +Example scripts demonstrating how to run `gpl` on a sample design on `core01` as follows: + +```shell +./test/core01.tcl +``` + +## Regression tests + +There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests). + +Simply run the following script: + +```shell +./test/regression +``` + +## Limitations + +## Using the Python interface to gpl + +This API tries to stay close to the API defined in `C++` class `Replace` +that is located [here](include/gpl/Replace.h). + +When initializing a design, a sequence of Python commands might look like +the following: + +```python +from openroad import Design, Tech +tech = Tech() +tech.readLef(...) +design = Design(tech) +design.readDef(...) +gpl = design.getReplace() +``` + +Here is an example of some options / configurations to the global placer. +(See [Replace.h](include/gpl/Replace.h) for a complete list) + +```python +gpl.setInitialPlaceMaxIter(iter) +gpl.setSkipIoMode(skip_io) +gpl.setTimingDrivenMode(timing_driven) +gpl.setTimingNetWeightMax(weight) +``` + +There are some useful Python functions located in the file +[grt_aux.py](test/grt_aux.py) but these are not considered a part of the *final* +API and they may change. + +## FAQs + +Check out [GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+replace+in%3Atitle) +about this tool. + +## References + +- C.-K. Cheng, A. B. Kahng, I. Kang and L. Wang, "RePlAce: Advancing + Solution Quality and Routability Validation in Global Placement", IEEE + Transactions on Computer-Aided Design of Integrated Circuits and Systems, + 38(9) (2019), pp. 1717-1730. [(.pdf)](https://vlsicad.ucsd.edu/Publications/Journals/j126.pdf) +- J. Lu, P. Chen, C.-C. Chang, L. Sha, D. J.-H. Huang, C.-C. Teng and + C.-K. Cheng, "ePlace: Electrostatics based Placement using Fast Fourier + Transform and Nesterov's Method", ACM TODAES 20(2) (2015), article 17. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-todaes14/paper.pdf) +- J. Lu, H. Zhuang, P. Chen, H. Chang, C.-C. Chang, Y.-C. Wong, L. Sha, + D. J.-H. Huang, Y. Luo, C.-C. Teng and C.-K. Cheng, "ePlace-MS: + Electrostatics based Placement for Mixed-Size Circuits", IEEE TCAD 34(5) + (2015), pp. 685-698. [(.pdf)](https://cseweb.ucsd.edu/~jlu/papers/eplace-ms-tcad14/paper.pdf) +- A. B. Kahng, J. Li and L. Wang, + "Improved Flop Tray-Based Design Implementation for Power Reduction", + IEEE/ACM ICCAD, 2016, pp. 20:1-20:8. +- The timing-driven mode has been implemented by + Mingyu Woo (only available in [legacy repo in standalone + branch](https://github.com/The-OpenROAD-Project/RePlAce/tree/standalone).) +- The routability-driven mode has been implemented by Mingyu Woo. +- Timing-driven mode re-implementation is ongoing with the current + clean-code structure. + + ## Authors + +- Authors/maintainer since Jan 2020: Mingyu Woo (Ph.D. Advisor: + Andrew. B. Kahng) +- Original open-sourcing of RePlAce: August 2018, by Ilgweon Kang + (Ph.D. Advisor: Chung-Kuan Cheng), Lutong Wang (Ph.D. Advisor: Andrew + B. Kahng), and Mingyu Woo (Ph.D. Advisor: Andrew B. Kahng). +- Also thanks to Dr. Jingwei Lu for open-sourcing the previous + ePlace-MS/ePlace project code. + +## License + +BSD 3-Clause License. See [LICENSE](LICENSE) file. \ No newline at end of file diff --git a/docs/src/test/translator.ok b/docs/src/test/translator.ok index a8b0ee651c4..c276fa3f4e3 100644 --- a/docs/src/test/translator.ok +++ b/docs/src/test/translator.ok @@ -1,145 +1,3 @@ -rm -rf man/man1 man/man2 man/man3 -rm -rf html/html1 html/html2 html/html3 -rm -rf cat/cat1 cat/cat2 cat/cat3 -rm -rf ./md/man2/*md -rm -rf ./md/man3/*md -rm -rf build -File linked successfully. -File linked successfully. -File linked successfully. -ERROR: README.md not found in ../src/dbSta -File linked successfully. -File linked successfully. -ERROR: README.md not found in ../src/dst -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -ERROR: README.md not found in ../src/dpo -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -ERROR: README.md not found in ../src/cmake -ant.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -cts.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./md/man2/dbSta.md doesn't exist. Continuing -dft.md -Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 -dpl.md -Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 -./md/man2/dpo.md doesn't exist. Continuing -drt.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./md/man2/dst.md doesn't exist. Continuing -fin.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -gpl.md +translator.md Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 -grt.md -Names: 13, Desc: 13, Syn: 13, Options: 13, Args: 13 -gui.md -Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 -ifp.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -mpl.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -mpl2.md -Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 -pad.md -Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -par.md -Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 -pdn.md -Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 -ppl.md -Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 -psm.md -Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 -rcx.md -Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 -rmp.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -rsz.md -Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 -stt.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -tap.md -Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 -upf.md -Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 -utl.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -Processing ../src/ant/messages.txt -Info: 2, Warn: 4, Error: 3 -Processing ../src/cts/messages.txt -Info: 61, Warn: 10, Error: 34 -Processing ../src/dbSta/messages.txt -Info: 0, Warn: 7, Error: 3 -Processing ../src/dft/messages.txt -Info: 1, Warn: 3, Error: 2 -Processing ../src/dpl/messages.txt -Info: 7, Warn: 4, Error: 29 -Processing ../src/dpo/messages.txt -Info: 47, Warn: 7, Error: 11 -Processing ../src/drt/messages.txt -Info: 78, Warn: 114, Error: 171 -Processing ../src/dst/messages.txt -Info: 1, Warn: 18, Error: 9 -Processing ../src/fin/messages.txt -Info: 5, Warn: 1, Error: 4 -Processing ../src/gpl/messages.txt Info: 70, Warn: 10, Error: 14 -Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 88 -Processing ../src/gui/messages.txt -Info: 1, Warn: 33, Error: 64 -Processing ../src/ifp/messages.txt -Info: 4, Warn: 7, Error: 17 -Processing ../src/mpl/messages.txt -Info: 12, Warn: 7, Error: 8 -Processing ../src/mpl2/messages.txt -Info: 2, Warn: 6, Error: 21 -Processing ../src/odb/messages.txt -Info: 64, Warn: 199, Error: 137 -Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 353 -Processing ../src/par/messages.txt -Info: 13, Warn: 9, Error: 16 -Processing ../src/pdn/messages.txt -Info: 3, Warn: 18, Error: 86 -Processing ../src/ppl/messages.txt -Info: 17, Warn: 17, Error: 66 -Processing ../src/psm/messages.txt -Info: 10, Warn: 18, Error: 39 -Processing ../src/rcx/messages.txt -Info: 90, Warn: 63, Error: 28 -Processing ../src/rmp/messages.txt -Info: 9, Warn: 5, Error: 10 -Processing ../src/rsz/messages.txt -Info: 35, Warn: 21, Error: 25 -Processing ../src/stt/messages.txt -Info: 0, Warn: 0, Error: 7 -Processing ../src/tap/messages.txt -Info: 5, Warn: 4, Error: 9 -Processing ../src/upf/messages.txt -Info: 0, Warn: 44, Error: 8 -Processing ../src/utl/messages.txt -Info: 1, Warn: 2, Error: 7 -Processing ../messages.txt -Info: 3, Warn: 6, Error: 34 diff --git a/docs/src/test/translator.py b/docs/src/test/translator.py index 042a6e9b38d..a60b9759c71 100644 --- a/docs/src/test/translator.py +++ b/docs/src/test/translator.py @@ -1,42 +1,8 @@ import os -import sys -from md_roff_compat import man2, man3 +from md_roff_compat import man2_translate, man3_translate -# Test objective: if the translator script can run without errors for all the docs. -# goal is to return an error if the header cannot be extracted. - -# go to 3rd parent directory. -path = os.path.realpath("md_roff_compat.py") -docs_dir = os.path.dirname(os.path.dirname(os.path.dirname(path))) -os.chdir(docs_dir) -os.system("make clean") - -# check man2 -SRC_BASE_PATH = "../src" -DEST_BASE_PATH = "./md/man2" - -# Create the destination directory if it doesn't exist -os.makedirs(DEST_BASE_PATH, exist_ok=True) - -# Loop through all folders inside "../src" -for module_path in os.listdir(SRC_BASE_PATH): - full_module_path = os.path.join(SRC_BASE_PATH, module_path) - - if os.path.isdir(full_module_path): - module = os.path.basename(full_module_path) - src_path = os.path.realpath(os.path.join(SRC_BASE_PATH, module, "README.md")) - dest_path = os.path.realpath(os.path.join(DEST_BASE_PATH, module + ".md")) - - # Check if README.md exists before copying - if os.path.exists(src_path): - # Create a symbolic link from src_path to dest_path - os.symlink(src_path, dest_path) - print(f"File linked successfully.") - else: - print(f"ERROR: README.md not found in {full_module_path}") - -# Run man2 command -man2() - -# Run man3 command -man3() \ No newline at end of file +# Test objective: if the translator functionality works. +res_dir = os.path.join(os.getcwd(), "results/docs") +os.makedirs(res_dir, exist_ok = True) +man2_translate("translator.md", res_dir) +man3_translate("translator.txt", res_dir) \ No newline at end of file diff --git a/docs/src/test/translator.txt b/docs/src/test/translator.txt new file mode 100644 index 00000000000..62d09b68dec --- /dev/null +++ b/docs/src/test/translator.txt @@ -0,0 +1,94 @@ +GPL 0002 placerBase.cpp:778 DBU: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L778 +GPL 0003 placerBase.cpp:806 SiteSize: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L806 +GPL 0004 placerBase.cpp:807 CoreAreaLxLy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L807 +GPL 0005 placerBase.cpp:808 CoreAreaUxUy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L808 +GPL 0006 placerBase.cpp:1263 NumInstances: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1263 +GPL 0007 placerBase.cpp:1267 NumPlaceInstances: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1267 +GPL 0008 placerBase.cpp:1268 NumFixedInstances: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1268 +GPL 0009 placerBase.cpp:1269 NumDummyInstances: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1269 +GPL 0010 placerBase.cpp:1270 NumNets: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1270 +GPL 0011 placerBase.cpp:1271 NumPins: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1271 +GPL 0012 placerBase.cpp:1273 DieAreaLxLy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1273 +GPL 0013 placerBase.cpp:1274 DieAreaUxUy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1274 +GPL 0014 placerBase.cpp:1275 CoreAreaLxLy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1275 +GPL 0015 placerBase.cpp:1276 CoreAreaUxUy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1276 +GPL 0016 placerBase.cpp:1282 CoreArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1282 +GPL 0017 placerBase.cpp:1283 NonPlaceInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1283 +GPL 0018 placerBase.cpp:1285 PlaceInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1285 +GPL 0019 placerBase.cpp:1286 Util(%): {:.2f} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1286 +GPL 0020 placerBase.cpp:1288 StdInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1288 +GPL 0021 placerBase.cpp:1289 MacroInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1289 +GPL 0023 nesterovBase.cpp:614 TargetDensity: {:.2f} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L614 +GPL 0024 nesterovBase.cpp:615 AveragePlaceInstArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L615 +GPL 0025 nesterovBase.cpp:616 IdealBinArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L616 +GPL 0026 nesterovBase.cpp:617 IdealBinCnt: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L617 +GPL 0027 nesterovBase.cpp:618 TotalBinArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L618 +GPL 0028 nesterovBase.cpp:648 BinCnt: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L648 +GPL 0029 nesterovBase.cpp:653 BinSize: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L653 +GPL 0030 nesterovBase.cpp:670 NumBins: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L670 +GPL 0031 nesterovBase.cpp:1292 FillerInit: NumGCells: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1292 +GPL 0032 nesterovBase.cpp:1293 FillerInit: NumGNets: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1293 +GPL 0033 nesterovBase.cpp:1294 FillerInit: NumGPins: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1294 +GPL 0034 nesterovBase.cpp:1651 gCellFiller: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1651 +GPL 0035 nesterovBase.cpp:1669 NewTotalFillerArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1669 +GPL 0036 routeBase.cpp:149 TileLxLy: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L149 +GPL 0037 routeBase.cpp:150 TileSize: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L150 +GPL 0038 routeBase.cpp:151 TileCnt: {} {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L151 +GPL 0039 routeBase.cpp:152 numRoutingLayers: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L152 +GPL 0040 routeBase.cpp:174 NumTiles: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L174 +GPL 0045 routeBase.cpp:605 InflatedAreaDelta: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L605 +GPL 0046 routeBase.cpp:606 TargetDensity: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L606 +GPL 0047 routeBase.cpp:624 SavedMinRC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L624 +GPL 0048 routeBase.cpp:625 SavedTargetDensity: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L625 +GPL 0049 routeBase.cpp:637 WhiteSpaceArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L637 +GPL 0050 routeBase.cpp:638 NesterovInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L638 +GPL 0051 routeBase.cpp:639 TotalFillerArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L639 +GPL 0052 routeBase.cpp:640 TotalGCellsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L640 +GPL 0053 routeBase.cpp:644 ExpectedTotalGCellsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L644 +GPL 0054 routeBase.cpp:663 NewTargetDensity: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L663 +GPL 0055 routeBase.cpp:664 NewWhiteSpaceArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L664 +GPL 0056 routeBase.cpp:665 MovableArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L665 +GPL 0057 routeBase.cpp:666 NewNesterovInstsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L666 +GPL 0058 routeBase.cpp:668 NewTotalFillerArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L668 +GPL 0059 routeBase.cpp:669 NewTotalGCellsArea: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L669 +GPL 0063 routeBase.cpp:735 TotalRouteOverflowH2: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L735 +GPL 0064 routeBase.cpp:736 TotalRouteOverflowV2: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L736 +GPL 0065 routeBase.cpp:737 OverflowTileCnt2: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L737 +GPL 0066 routeBase.cpp:792 0.5%RC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L792 +GPL 0067 routeBase.cpp:793 1.0%RC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L793 +GPL 0068 routeBase.cpp:794 2.0%RC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L794 +GPL 0069 routeBase.cpp:795 5.0%RC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L795 +GPL 0070 routeBase.cpp:797 0.5rcK: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L797 +GPL 0071 routeBase.cpp:798 1.0rcK: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L798 +GPL 0072 routeBase.cpp:799 2.0rcK: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L799 +GPL 0073 routeBase.cpp:800 5.0rcK: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L800 +GPL 0074 routeBase.cpp:808 FinalRC: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L808 +GPL 0075 routeBase.cpp:821 Routability numCall: {} inflationIterCnt: {} bloatIterCnt: {} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/routeBase.cpp#L821 +GPL 0100 timingBase.cpp:163 worst slack {:.3g} INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/timingBase.cpp#L163 +GPL 0102 timingBase.cpp:166 No slacks found. Timing-driven mode disabled. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/timingBase.cpp#L166 +GPL 0103 timingBase.cpp:204 Weighted {} nets. INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/timingBase.cpp#L204 +GPL 0114 timingBase.cpp:153 No net slacks found. Timing-driven mode disabled. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/timingBase.cpp#L153 +GPL 0115 replace.tcl:146 -disable_timing_driven is deprecated. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L146 +GPL 0116 replace.tcl:158 -disable_routability_driven is deprecated. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L158 +GPL 0118 placerBase.cpp:797 core area outside of die. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L797 +GPL 0119 placerBase.cpp:840 instance {} height is larger than core. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L840 +GPL 0120 placerBase.cpp:844 instance {} width is larger than core. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L844 +GPL 0121 replace.tcl:118 No liberty libraries found. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L118 +GPL 0122 mbff.cpp:164 {} is not in 2^[0,{}] ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/mbff.cpp#L164 +GPL 0130 replace.tcl:317 No rows defined in design. Use initialize_floorplan to add rows. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L317 +GPL 0131 replace.tcl:419 No rows defined in design. Use initialize_floorplan to add rows. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L419 +GPL 0132 replace.cpp:186 Locked {} instances INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.cpp#L186 +GPL 0133 replace.cpp:203 Unlocked instances INFO https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.cpp#L203 +GPL 0134 placerBase.cpp:109 Master {} is not marked as a BLOCK in LEF but is more WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L109 +GPL 0135 replace.tcl:180 Target density must be in \[0, 1\]. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L180 +GPL 0136 replace.cpp:290 No placeable instances - skipping placement. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.cpp#L290 +GPL 0150 replace.tcl:122 -skip_io will disable timing driven mode. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L122 +GPL 0151 replace.tcl:153 -skip_io will disable routability driven mode. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/replace.tcl#L153 +GPL 0250 initialPlace.cpp:104 GPU is not available. CPU solve is being used. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/initialPlace.cpp#L104 +GPL 0251 initialPlace.cpp:109 CPU solver is forced to be used. WARN https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/initialPlace.cpp#L109 +GPL 0301 placerBase.cpp:1292 Utilization exceeds 100%. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L1292 +GPL 0302 nesterovBase.cpp:1401 Use a higher -density or ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1401 +GPL 0303 nesterovBase.cpp:1633 Use a higher -density or ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovBase.cpp#L1633 +GPL 0304 nesterovPlace.cpp:267 RePlAce diverged at initial iteration with steplength being {}. ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/nesterovPlace.cpp#L267 +GPL 0305 placerBase.cpp:791 Unable to find a site ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/placerBase.cpp#L791 +GPL 9032 mbff.cpp:546 Could not recognize port {} ERROR https://github.com/The-OpenROAD-Project/OpenROAD/tree/master/workspace/src/gpl/src/mbff.cpp#L546 \ No newline at end of file diff --git a/src/ant/test/ant_man_tcl_check.ok b/src/ant/test/ant_man_tcl_check.ok new file mode 100644 index 00000000000..6757efec626 --- /dev/null +++ b/src/ant/test/ant_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/ant 0 0 1 +Command counts do not match. diff --git a/src/ant/test/ant_man_tcl_check.py b/src/ant/test/ant_man_tcl_check.py new file mode 100644 index 00000000000..f3883ff7533 --- /dev/null +++ b/src/ant/test/ant_man_tcl_check.py @@ -0,0 +1,66 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/ant/test/ant_readme_msgs_check.ok b/src/ant/test/ant_readme_msgs_check.ok new file mode 100644 index 00000000000..bb0f872b511 --- /dev/null +++ b/src/ant/test/ant_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 2, Warn: 4, Error: 3 diff --git a/src/ant/test/ant_readme_msgs_check.py b/src/ant/test/ant_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/ant/test/ant_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/ant/test/extract_utils.py b/src/ant/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/ant/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/ant/test/manpage.py b/src/ant/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/ant/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/ant/test/md_roff_compat.py b/src/ant/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/ant/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/ant/test/regression_tests.tcl b/src/ant/test/regression_tests.tcl index 67e264e8a56..5f2a1ae465e 100644 --- a/src/ant/test/regression_tests.tcl +++ b/src/ant/test/regression_tests.tcl @@ -4,4 +4,6 @@ record_tests { check_grt1 ant_check ant_report + ant_readme_msgs_check + ant_man_tcl_check } From 791860d2e15fe7eb2cb99fa49c651d600d173815 Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Tue, 5 Mar 2024 01:55:34 +0000 Subject: [PATCH 82/88] remove old tests Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- docs/src/test/count_outfiles.ok | 143 -------------------------------- docs/src/test/count_outfiles.py | 32 ------- docs/src/test/man_tcl_check.ok | 51 ------------ docs/src/test/man_tcl_check.py | 57 ------------- 4 files changed, 283 deletions(-) delete mode 100644 docs/src/test/count_outfiles.ok delete mode 100644 docs/src/test/count_outfiles.py delete mode 100644 docs/src/test/man_tcl_check.ok delete mode 100644 docs/src/test/man_tcl_check.py diff --git a/docs/src/test/count_outfiles.ok b/docs/src/test/count_outfiles.ok deleted file mode 100644 index 6bd91fd23e8..00000000000 --- a/docs/src/test/count_outfiles.ok +++ /dev/null @@ -1,143 +0,0 @@ -File linked successfully. -ERROR: README.md not found in ../src/cmake -File linked successfully. -ERROR: README.md not found in ../src/dbSta -File linked successfully. -File linked successfully. -ERROR: README.md not found in ../src/dpo -File linked successfully. -ERROR: README.md not found in ../src/dst -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -File linked successfully. -ant.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -cts.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./md/man2/dbSta.md doesn't exist. Continuing -dft.md -Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 -dpl.md -Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 -./md/man2/dpo.md doesn't exist. Continuing -drt.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -./md/man2/dst.md doesn't exist. Continuing -fin.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -gpl.md -Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 -grt.md -Names: 13, Desc: 13, Syn: 13, Options: 13, Args: 13 -gui.md -Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 -ifp.md -Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 -mpl.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -mpl2.md -Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 -pad.md -Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 -par.md -Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 -pdn.md -Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 -ppl.md -Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 -psm.md -Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 -rcx.md -Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 -rmp.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -rsz.md -Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 -stt.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -tap.md -Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 -upf.md -Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 -utl.md -Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 -Processing ../src/ant/messages.txt -Info: 2, Warn: 4, Error: 3 -Processing ../src/cts/messages.txt -Info: 61, Warn: 10, Error: 34 -Processing ../src/dbSta/messages.txt -Info: 0, Warn: 7, Error: 3 -Processing ../src/dft/messages.txt -Info: 1, Warn: 3, Error: 2 -Processing ../src/dpl/messages.txt -Info: 7, Warn: 4, Error: 29 -Processing ../src/dpo/messages.txt -Info: 47, Warn: 7, Error: 11 -Processing ../src/drt/messages.txt -Info: 78, Warn: 114, Error: 171 -Processing ../src/dst/messages.txt -Info: 1, Warn: 18, Error: 9 -Processing ../src/fin/messages.txt -Info: 5, Warn: 1, Error: 4 -Processing ../src/gpl/messages.txt -Info: 70, Warn: 10, Error: 14 -Processing ../src/grt/messages.txt -Info: 29, Warn: 42, Error: 88 -Processing ../src/gui/messages.txt -Info: 1, Warn: 33, Error: 64 -Processing ../src/ifp/messages.txt -Info: 4, Warn: 7, Error: 17 -Processing ../src/mpl/messages.txt -Info: 12, Warn: 7, Error: 8 -Processing ../src/mpl2/messages.txt -Info: 2, Warn: 6, Error: 21 -Processing ../src/odb/messages.txt -Info: 64, Warn: 199, Error: 137 -Processing ../src/pad/messages.txt -Info: 18, Warn: 59, Error: 353 -Processing ../src/par/messages.txt -Info: 13, Warn: 9, Error: 16 -Processing ../src/pdn/messages.txt -Info: 3, Warn: 18, Error: 86 -Processing ../src/ppl/messages.txt -Info: 17, Warn: 17, Error: 66 -Processing ../src/psm/messages.txt -Info: 10, Warn: 18, Error: 39 -Processing ../src/rcx/messages.txt -Info: 90, Warn: 63, Error: 28 -Processing ../src/rmp/messages.txt -Info: 9, Warn: 5, Error: 10 -Processing ../src/rsz/messages.txt -Info: 35, Warn: 21, Error: 25 -Processing ../src/stt/messages.txt -Info: 0, Warn: 0, Error: 7 -Processing ../src/tap/messages.txt -Info: 5, Warn: 4, Error: 9 -Processing ../src/upf/messages.txt -Info: 0, Warn: 44, Error: 8 -Processing ../src/utl/messages.txt -Info: 1, Warn: 2, Error: 7 -Processing ../messages.txt -Info: 3, Warn: 6, Error: 34 -cat/cat1/openroad.1 -Level 1 doc counts are equal to 1. -Level 2 doc counts are equal to 168. -Level 3 doc counts are equal to 2646. diff --git a/docs/src/test/count_outfiles.py b/docs/src/test/count_outfiles.py deleted file mode 100644 index f9679698a27..00000000000 --- a/docs/src/test/count_outfiles.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import sys - -# Test objective: To count the number of expected files in man2/man3 - -# This script mimics the build process and checks expected output. -NUM_CORES = os.cpu_count() -path = os.path.realpath("md_roff_compat.py") -docs_dir = os.path.dirname(os.path.dirname(os.path.dirname(path))) -os.chdir(docs_dir) -os.system("make clean -s && make preprocess -s") -os.system(f"make all -j{NUM_CORES} -s") - -# Check if the files in html1 == cat1, html2 == cat2, html3 = cat3 -for i in range(1, 4): - man_dir = f"man/man{i}" - html_dir = f"html/html{i}" - cat_dir = f"cat/cat{i}" - assert os.path.exists(man_dir), f"{man_dir} does not exist." - assert os.path.exists(html_dir), f"{html_dir} does not exist." - assert os.path.exists(cat_dir), f"{cat_dir} does not exist." - man_count = len(os.listdir(man_dir)) - html_count = len(os.listdir(html_dir)) - cat_count = len(os.listdir(cat_dir)) - - if man_count == html_count == cat_count: - print(f"Level {i} doc counts are equal to {html_count}.") - else: - print(f"Level {i} doc counts are not equal.") - print(f"{html_dir} count: {html_count}\n\ - {cat_dir} count: {cat_count}\n\ - {man_dir} count: {man_count}") \ No newline at end of file diff --git a/docs/src/test/man_tcl_check.ok b/docs/src/test/man_tcl_check.ok deleted file mode 100644 index 7e29e246810..00000000000 --- a/docs/src/test/man_tcl_check.ok +++ /dev/null @@ -1,51 +0,0 @@ -Tool Dir Help count Proc count Readme count -./src/ant 0 0 1 -Command counts do not match. -./src/fin 1 1 1 -Command counts match. -./src/mpl 1 1 1 -Command counts match. -./src/utl 1 1 1 -Command counts match. -./src/ifp 3 3 3 -Command counts match. -./src/tap 5 5 5 -Command counts match. -./src/grt 12 12 13 -Command counts do not match. -./src/gui 7 7 7 -Command counts match. -./src/pdn 8 9 9 -Command counts do not match. -./src/psm 4 4 4 -Command counts match. -./src/stt 1 1 1 -Command counts match. -./src/ppl 11 11 11 -Command counts match. -./src/drt 3 3 3 -Command counts match. -./src/cts 2 2 3 -Command counts do not match. -./src/dpl 6 6 6 -Command counts match. -./src/rmp 1 1 1 -Command counts match. -./src/gpl 2 2 2 -Command counts match. -./src/mpl2 2 2 2 -Command counts match. -./src/par 6 6 6 -Command counts match. -./src/dft 4 4 4 -Command counts match. -./src/upf 11 11 11 -Command counts match. -./src/pad 13 13 13 -Command counts match. -./src/rcx 9 9 9 -Command counts match. -./src/rsz 16 16 17 -Command counts do not match. -./src/odb 13 13 17 -Command counts do not match. diff --git a/docs/src/test/man_tcl_check.py b/docs/src/test/man_tcl_check.py deleted file mode 100644 index d1ba2fcec56..00000000000 --- a/docs/src/test/man_tcl_check.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import glob -import re -from extract_utils import extract_tcl_code, extract_help, extract_proc - -# Test objective: Make sure similar output in all three: help, proc, and readme -path = os.path.realpath("md_roff_compat.py") -or_home = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(path)))) -os.chdir(or_home) - -help_dict, proc_dict, readme_dict = {}, {}, {} - -# Directories to exclude (according to md_roff_compat) -exclude = ["sta"] -include = ["./src/odb/src/db/odb.tcl"] - -for path in glob.glob("./src/*/src/*tcl") + include: - # exclude these dirs which are not compiled in man (do not have readmes). - tool_dir = os.path.dirname(os.path.dirname(path)) - if "odb" in tool_dir: tool_dir = './src/odb' - if not os.path.exists(f"{tool_dir}/README.md"): continue - if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue - - # special handling for pad, since it has 3 Tcls. - if "ICeWall" in path or "PdnGen" in path: continue - - with open(path) as f: - # Help patterns - content = f.read() - matches = extract_help(content) - help_dict[tool_dir] = len(matches) - - # Proc patterns - matches = extract_proc(content) - proc_dict[tool_dir] = len(matches) - -for path in glob.glob("./src/*/README.md"): - if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue - tool_dir = os.path.dirname(path) - - # for gui, filter out the gui:: for separate processing - results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] - readme_dict[tool_dir] = len(results) - - # for pad, remove `make_fake_io_site` because it is a hidden cmd arg - if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 - -print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") - -for path in help_dict: - h,p,r = help_dict[path], proc_dict[path], readme_dict[path] - print(path.ljust(20), - str(h).ljust(15), - str(p).ljust(15), - str(r)) - if h == p == r: print("Command counts match.") - else: print("Command counts do not match.") \ No newline at end of file From a1a339cabc31595e0d61b8e353a3174634d95643 Mon Sep 17 00:00:00 2001 From: Osama <osama21@aucegypt.edu> Date: Sun, 24 Mar 2024 23:55:33 +0200 Subject: [PATCH 83/88] fixes The-OpenROAD-Project/OpenROAD-flow-scripts#1862 Signed-off-by: Osama <osama21@aucegypt.edu> --- src/drt/src/io/io.cpp | 91 +++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/src/drt/src/io/io.cpp b/src/drt/src/io/io.cpp index 5bbb865c5e4..0989e98c661 100644 --- a/src/drt/src/io/io.cpp +++ b/src/drt/src/io/io.cpp @@ -2288,6 +2288,16 @@ void io::Parser::setMasters(odb::dbDatabase* db) const frLayerNum numLayers = tech_->getLayers().size(); std::vector<RTree<frMPin*>> pin_shapes; pin_shapes.resize(numLayers); + auto addPinFig + = [&pin_shapes](const Rect& box, frLayerNum lNum, frMPin* pinIn) { + std::unique_ptr<frRect> pinFig = std::make_unique<frRect>(); + pinFig->setBBox(box); + pinFig->addToPin(pinIn); + pinFig->setLayerNum(lNum); + std::unique_ptr<frPinFig> uptr(std::move(pinFig)); + pinIn->addPinFig(std::move(uptr)); + pin_shapes[lNum].insert(std::make_pair(box, pinIn)); + }; for (auto lib : db->getLibs()) { for (odb::dbMaster* master : lib->getMasters()) { @@ -2321,54 +2331,61 @@ void io::Parser::setMasters(odb::dbDatabase* db) term->setType(_term->getSigType()); term->setDirection(_term->getIoType()); - bool warned = false; int i = 0; for (auto mpin : _term->getMPins()) { auto pinIn = std::make_unique<frMPin>(); pinIn->setId(i++); for (auto box : mpin->getGeometry()) { - frLayerNum layerNum = -1; auto layer = box->getTechLayer(); if (!layer) { - if (!warned) { - logger_->warn(DRT, - 323, - "Via(s) in pin {} of {} will be ignored", - _term->getName(), - master->getName()); - warned = true; - } - continue; - } - std::string layer_name = layer->getName(); - if (tech_->name2layer_.find(layer_name) - == tech_->name2layer_.end()) { - auto type = box->getTechLayer()->getType(); - if (type == odb::dbTechLayerType::ROUTING - || type == odb::dbTechLayerType::CUT) { + if (tech_->name2via_.find(box->getTechVia()->getName()) + == tech_->name2via_.end()) { logger_->warn(DRT, - 122, - "Layer {} is skipped for {}/{}.", - layer_name, - tmpMaster->getName(), + 193, + "Skipping unsupported via {} in macro pin {}/{}.", + box->getTechVia()->getName(), + master->getName(), _term->getName()); } - continue; + int x, y; + box->getViaXY(x, y); + auto viaDef = tech_->name2via_[box->getTechVia()->getName()]; + auto tmpP = std::make_unique<frVia>(viaDef); + tmpP->setOrigin({x, y}); + // layer1 rect + addPinFig( + tmpP->getLayer1BBox(), viaDef->getLayer1Num(), pinIn.get()); + // layer2 rect + addPinFig( + tmpP->getLayer2BBox(), viaDef->getLayer2Num(), pinIn.get()); + // cut rect + addPinFig( + tmpP->getCutBBox(), viaDef->getCutLayerNum(), pinIn.get()); + } else { + std::string layer_name = layer->getName(); + if (tech_->name2layer_.find(layer_name) + == tech_->name2layer_.end()) { + auto type = box->getTechLayer()->getType(); + if (type == odb::dbTechLayerType::ROUTING + || type == odb::dbTechLayerType::CUT) { + logger_->warn(DRT, + 122, + "Layer {} is skipped for {}/{}.", + layer_name, + tmpMaster->getName(), + _term->getName()); + } + continue; + } + frLayerNum layerNum + = tech_->name2layer_.at(layer_name)->getLayerNum(); + + frCoord xl = box->xMin(); + frCoord yl = box->yMin(); + frCoord xh = box->xMax(); + frCoord yh = box->yMax(); + addPinFig(Rect(xl, yl, xh, yh), layerNum, pinIn.get()); } - layerNum = tech_->name2layer_.at(layer_name)->getLayerNum(); - - frCoord xl = box->xMin(); - frCoord yl = box->yMin(); - frCoord xh = box->xMax(); - frCoord yh = box->yMax(); - std::unique_ptr<frRect> pinFig = std::make_unique<frRect>(); - pinFig->setBBox(Rect(xl, yl, xh, yh)); - pinFig->addToPin(pinIn.get()); - pinFig->setLayerNum(layerNum); - std::unique_ptr<frPinFig> uptr(std::move(pinFig)); - pinIn->addPinFig(std::move(uptr)); - pin_shapes[layerNum].insert( - std::make_pair(Rect{xl, yl, xh, yh}, pinIn.get())); } term->addPin(std::move(pinIn)); } From acd9bae9f85b5f2428f8acecd272908510e49fc9 Mon Sep 17 00:00:00 2001 From: Matt Liberty <mliberty@precisioninno.com> Date: Wed, 27 Mar 2024 15:22:09 -0700 Subject: [PATCH 84/88] odb: make Point & Rect work with boost geometry Signed-off-by: Matt Liberty <mliberty@precisioninno.com> --- src/odb/include/odb/geom_boost.h | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/src/odb/include/odb/geom_boost.h b/src/odb/include/odb/geom_boost.h index 966fa20afff..d14035468f2 100644 --- a/src/odb/include/odb/geom_boost.h +++ b/src/odb/include/odb/geom_boost.h @@ -35,6 +35,7 @@ #pragma once +#include <boost/geometry/geometries/register/point.hpp> #include <boost/polygon/polygon.hpp> #include "odb/geom.h" @@ -83,6 +84,16 @@ struct boost::polygon::point_mutable_traits<odb::Point> } }; +// Make odb's Point work with boost geometry + +BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(odb::Point, + int, + boost::geometry::cs::cartesian, + getX, + getY, + setX, + setY); + // Make odb's Rect work with boost polgyon template <> @@ -134,3 +145,65 @@ struct boost::polygon::rectangle_mutable_traits<odb::Rect> high(interval_vertical)); } }; + +// Make odb's Rect work with boost geometry. +// +// Unfortunately BOOST_GEOMETRY_REGISTER_BOX forces a bad API on the class +// and there is not _GET_SET version. Instead we have to go lower to the +// traits to adapt. + +namespace boost::geometry::traits { + +template <> +struct tag<odb::Rect> +{ + using type = box_tag; +}; + +template <> +struct point_type<odb::Rect> +{ + using type = odb::Point; +}; + +template <std::size_t Dimension> +struct indexed_access<odb::Rect, min_corner, Dimension> +{ + using coordinate_type = int; + + static constexpr coordinate_type get(const odb::Rect& b) + { + return (Dimension == 0) ? b.xMin() : b.yMin(); + } + + static void set(odb::Rect& b, const int value) + { + if (Dimension == 0) { + b.set_xlo(value); + } else { + b.set_ylo(value); + } + } +}; + +template <std::size_t Dimension> +struct indexed_access<odb::Rect, max_corner, Dimension> +{ + using coordinate_type = int; + + static constexpr coordinate_type get(const odb::Rect& b) + { + return (Dimension == 0) ? b.xMax() : b.yMax(); + } + + static void set(odb::Rect& b, const int value) + { + if (Dimension == 0) { + b.set_xhi(value); + } else { + b.set_yhi(value); + } + } +}; + +} // namespace boost::geometry::traits From 7c9c24b1e817a7f6042653b890c52611c3e522e8 Mon Sep 17 00:00:00 2001 From: gatecat <gatecat@ds0.me> Date: Thu, 28 Mar 2024 12:10:12 +0100 Subject: [PATCH 85/88] Fix pin acccess for 130BCD IO library The middle of the pin needs to be used even though it intersects two routing tracks, as either track is too close to the blockages around the pin. Signed-off-by: gatecat <gatecat@ds0.me> --- src/drt/src/pa/FlexPA_prep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drt/src/pa/FlexPA_prep.cpp b/src/drt/src/pa/FlexPA_prep.cpp index b16b2feed38..d3e179401f9 100644 --- a/src/drt/src/pa/FlexPA_prep.cpp +++ b/src/drt/src/pa/FlexPA_prep.cpp @@ -157,7 +157,7 @@ void FlexPA::prepPoint_pin_genPoints_rect_genCenter( cnt++; } } - if (cnt >= 2) { + if (cnt >= 3) { return; } From d1ef94b77f850f3cc5dd81d259e47529b667bdba Mon Sep 17 00:00:00 2001 From: Matt Liberty <mliberty@precisioninno.com> Date: Thu, 28 Mar 2024 11:43:35 -0700 Subject: [PATCH 86/88] update sta submodule Signed-off-by: Matt Liberty <mliberty@precisioninno.com> --- src/sta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sta b/src/sta index 073ff2e8c8c..95276f87311 160000 --- a/src/sta +++ b/src/sta @@ -1 +1 @@ -Subproject commit 073ff2e8c8c5469996fed1236f801b0b14064b0c +Subproject commit 95276f87311b63092b8502832f24f784cc516128 From 9741bc497a3d5f434b0dacdc3a05af4ebe78846c Mon Sep 17 00:00:00 2001 From: luarss <39641663+luarss@users.noreply.github.com> Date: Fri, 29 Mar 2024 07:52:04 +0000 Subject: [PATCH 87/88] all local tests for docs done Signed-off-by: luarss <39641663+luarss@users.noreply.github.com> --- src/ant/test/ant_man_tcl_check.py | 1 + src/cts/test/cts_man_tcl_check.ok | 3 ++ src/cts/test/cts_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/cts/test/cts_readme_msgs_check.ok | 3 ++ src/cts/test/cts_readme_msgs_check.py | 19 +++++++ src/cts/test/extract_utils.py | 1 + src/cts/test/manpage.py | 1 + src/cts/test/md_roff_compat.py | 1 + src/cts/test/regression_tests.tcl | 2 + src/dft/test/dft_man_tcl_check.ok | 3 ++ src/dft/test/dft_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/dft/test/dft_readme_msgs_check.ok | 3 ++ src/dft/test/dft_readme_msgs_check.py | 19 +++++++ src/dft/test/extract_utils.py | 1 + src/dft/test/manpage.py | 1 + src/dft/test/md_roff_compat.py | 1 + src/dft/test/regression_tests.tcl | 2 + src/dpl/test/dpl_man_tcl_check.ok | 3 ++ src/dpl/test/dpl_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/dpl/test/dpl_readme_msgs_check.ok | 3 ++ src/dpl/test/dpl_readme_msgs_check.py | 19 +++++++ src/dpl/test/extract_utils.py | 1 + src/dpl/test/manpage.py | 1 + src/dpl/test/md_roff_compat.py | 1 + src/dpl/test/regression_tests.tcl | 2 + src/drt/test/drt_man_tcl_check.ok | 3 ++ src/drt/test/drt_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/drt/test/drt_readme_msgs_check.ok | 3 ++ src/drt/test/drt_readme_msgs_check.py | 19 +++++++ src/drt/test/extract_utils.py | 1 + src/drt/test/manpage.py | 1 + src/drt/test/md_roff_compat.py | 1 + src/drt/test/regression_tests.tcl | 2 + src/fin/test/extract_utils.py | 1 + src/fin/test/fin_man_tcl_check.ok | 3 ++ src/fin/test/fin_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/fin/test/fin_readme_msgs_check.ok | 3 ++ src/fin/test/fin_readme_msgs_check.py | 19 +++++++ src/fin/test/manpage.py | 1 + src/fin/test/md_roff_compat.py | 1 + src/fin/test/regression_tests.tcl | 2 + src/gpl/test/extract_utils.py | 1 + src/gpl/test/gpl_man_tcl_check.ok | 3 ++ src/gpl/test/gpl_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/gpl/test/gpl_readme_msgs_check.ok | 3 ++ src/gpl/test/gpl_readme_msgs_check.py | 19 +++++++ src/gpl/test/manpage.py | 1 + src/gpl/test/md_roff_compat.py | 1 + src/gpl/test/regression_tests.tcl | 2 + src/grt/test/extract_utils.py | 1 + src/grt/test/grt_man_tcl_check.ok | 3 ++ src/grt/test/grt_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/grt/test/grt_readme_msgs_check.ok | 3 ++ src/grt/test/grt_readme_msgs_check.py | 19 +++++++ src/grt/test/manpage.py | 1 + src/grt/test/md_roff_compat.py | 1 + src/grt/test/regression_tests.tcl | 2 + src/gui/test/extract_utils.py | 1 + src/gui/test/gui_man_tcl_check.ok | 3 ++ src/gui/test/gui_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/gui/test/gui_readme_msgs_check.ok | 3 ++ src/gui/test/gui_readme_msgs_check.py | 19 +++++++ src/gui/test/manpage.py | 1 + src/gui/test/md_roff_compat.py | 1 + src/gui/test/regression_tests.tcl | 2 + src/ifp/test/extract_utils.py | 1 + src/ifp/test/ifp_man_tcl_check.ok | 3 ++ src/ifp/test/ifp_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/ifp/test/ifp_readme_msgs_check.ok | 3 ++ src/ifp/test/ifp_readme_msgs_check.py | 19 +++++++ src/ifp/test/manpage.py | 1 + src/ifp/test/md_roff_compat.py | 1 + src/ifp/test/regression_tests.tcl | 2 + src/mpl/test/extract_utils.py | 1 + src/mpl/test/manpage.py | 1 + src/mpl/test/md_roff_compat.py | 1 + src/mpl/test/mpl_man_tcl_check.ok | 5 ++ src/mpl/test/mpl_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/mpl/test/mpl_readme_msgs_check.ok | 3 ++ src/mpl/test/mpl_readme_msgs_check.py | 19 +++++++ src/mpl/test/regression_tests.tcl | 2 + src/mpl2/test/extract_utils.py | 1 + src/mpl2/test/manpage.py | 1 + src/mpl2/test/md_roff_compat.py | 1 + src/mpl2/test/mpl2_man_tcl_check.ok | 3 ++ src/mpl2/test/mpl2_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/mpl2/test/mpl2_readme_msgs_check.ok | 3 ++ src/mpl2/test/mpl2_readme_msgs_check.py | 19 +++++++ src/mpl2/test/regression_tests.tcl | 2 + src/odb/test/extract_utils.py | 1 + src/odb/test/manpage.py | 1 + src/odb/test/md_roff_compat.py | 1 + src/odb/test/odb_man_tcl_check.ok | 3 ++ src/odb/test/odb_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/odb/test/odb_readme_msgs_check.ok | 3 ++ src/odb/test/odb_readme_msgs_check.py | 19 +++++++ src/odb/test/regression_tests.tcl | 2 + src/pad/test/extract_utils.py | 1 + src/pad/test/manpage.py | 1 + src/pad/test/md_roff_compat.py | 1 + src/pad/test/pad_man_tcl_check.ok | 3 ++ src/pad/test/pad_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/pad/test/pad_readme_msgs_check.ok | 3 ++ src/pad/test/pad_readme_msgs_check.py | 19 +++++++ src/pad/test/regression_tests.tcl | 3 ++ src/par/test/extract_utils.py | 1 + src/par/test/manpage.py | 1 + src/par/test/md_roff_compat.py | 1 + src/par/test/par_man_tcl_check.ok | 3 ++ src/par/test/par_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/par/test/par_readme_msgs_check.ok | 3 ++ src/par/test/par_readme_msgs_check.py | 19 +++++++ src/par/test/regression_tests.tcl | 2 + src/pdn/test/extract_utils.py | 1 + src/pdn/test/manpage.py | 1 + src/pdn/test/md_roff_compat.py | 1 + src/pdn/test/pdn_man_tcl_check.ok | 3 ++ src/pdn/test/pdn_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/pdn/test/pdn_readme_msgs_check.ok | 3 ++ src/pdn/test/pdn_readme_msgs_check.py | 19 +++++++ src/pdn/test/regression_tests.tcl | 3 ++ src/ppl/test/extract_utils.py | 1 + src/ppl/test/manpage.py | 1 + src/ppl/test/md_roff_compat.py | 1 + src/ppl/test/ppl_man_tcl_check.ok | 3 ++ src/ppl/test/ppl_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/ppl/test/ppl_readme_msgs_check.ok | 3 ++ src/ppl/test/ppl_readme_msgs_check.py | 19 +++++++ src/ppl/test/regression_tests.tcl | 2 + src/psm/test/extract_utils.py | 1 + src/psm/test/manpage.py | 1 + src/psm/test/md_roff_compat.py | 1 + src/psm/test/psm_man_tcl_check.ok | 3 ++ src/psm/test/psm_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/psm/test/psm_readme_msgs_check.ok | 3 ++ src/psm/test/psm_readme_msgs_check.py | 19 +++++++ src/psm/test/regression_tests.tcl | 2 + src/rcx/test/extract_utils.py | 1 + src/rcx/test/manpage.py | 1 + src/rcx/test/md_roff_compat.py | 1 + src/rcx/test/rcx_man_tcl_check.ok | 3 ++ src/rcx/test/rcx_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/rcx/test/rcx_readme_msgs_check.ok | 3 ++ src/rcx/test/rcx_readme_msgs_check.py | 19 +++++++ src/rcx/test/regression_tests.tcl | 2 + src/rmp/test/extract_utils.py | 1 + src/rmp/test/manpage.py | 1 + src/rmp/test/md_roff_compat.py | 1 + src/rmp/test/regression_tests.tcl | 2 + src/rmp/test/rmp_man_tcl_check.ok | 3 ++ src/rmp/test/rmp_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/rmp/test/rmp_readme_msgs_check.ok | 3 ++ src/rmp/test/rmp_readme_msgs_check.py | 19 +++++++ src/rsz/test/extract_utils.py | 1 + src/rsz/test/manpage.py | 1 + src/rsz/test/md_roff_compat.py | 1 + src/rsz/test/regression_tests.tcl | 2 + src/rsz/test/rsz_man_tcl_check.ok | 3 ++ src/rsz/test/rsz_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/rsz/test/rsz_readme_msgs_check.ok | 3 ++ src/rsz/test/rsz_readme_msgs_check.py | 19 +++++++ src/stt/test/extract_utils.py | 1 + src/stt/test/manpage.py | 1 + src/stt/test/md_roff_compat.py | 1 + src/stt/test/regression_tests.tcl | 2 + src/stt/test/stt_man_tcl_check.ok | 3 ++ src/stt/test/stt_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/stt/test/stt_readme_msgs_check.ok | 3 ++ src/stt/test/stt_readme_msgs_check.py | 19 +++++++ src/tap/test/extract_utils.py | 1 + src/tap/test/manpage.py | 1 + src/tap/test/md_roff_compat.py | 1 + src/tap/test/regression_tests.tcl | 2 + src/tap/test/tap_man_tcl_check.ok | 3 ++ src/tap/test/tap_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/tap/test/tap_readme_msgs_check.ok | 3 ++ src/tap/test/tap_readme_msgs_check.py | 19 +++++++ src/upf/test/extract_utils.py | 1 + src/upf/test/manpage.py | 1 + src/upf/test/md_roff_compat.py | 1 + src/upf/test/regression_tests.tcl | 2 + src/upf/test/upf_man_tcl_check.ok | 3 ++ src/upf/test/upf_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/upf/test/upf_readme_msgs_check.ok | 3 ++ src/upf/test/upf_readme_msgs_check.py | 19 +++++++ src/utl/test/extract_utils.py | 1 + src/utl/test/manpage.py | 1 + src/utl/test/md_roff_compat.py | 1 + src/utl/test/regression_tests.tcl | 2 + src/utl/test/save_ok | 1 + src/utl/test/utl_man_tcl_check.ok | 3 ++ src/utl/test/utl_man_tcl_check.py | 67 +++++++++++++++++++++++++ src/utl/test/utl_readme_msgs_check.ok | 3 ++ src/utl/test/utl_readme_msgs_check.py | 19 +++++++ 194 files changed, 2334 insertions(+) create mode 100644 src/cts/test/cts_man_tcl_check.ok create mode 100644 src/cts/test/cts_man_tcl_check.py create mode 100644 src/cts/test/cts_readme_msgs_check.ok create mode 100644 src/cts/test/cts_readme_msgs_check.py create mode 120000 src/cts/test/extract_utils.py create mode 120000 src/cts/test/manpage.py create mode 120000 src/cts/test/md_roff_compat.py create mode 100644 src/dft/test/dft_man_tcl_check.ok create mode 100644 src/dft/test/dft_man_tcl_check.py create mode 100644 src/dft/test/dft_readme_msgs_check.ok create mode 100644 src/dft/test/dft_readme_msgs_check.py create mode 120000 src/dft/test/extract_utils.py create mode 120000 src/dft/test/manpage.py create mode 120000 src/dft/test/md_roff_compat.py create mode 100644 src/dpl/test/dpl_man_tcl_check.ok create mode 100644 src/dpl/test/dpl_man_tcl_check.py create mode 100644 src/dpl/test/dpl_readme_msgs_check.ok create mode 100644 src/dpl/test/dpl_readme_msgs_check.py create mode 120000 src/dpl/test/extract_utils.py create mode 120000 src/dpl/test/manpage.py create mode 120000 src/dpl/test/md_roff_compat.py create mode 100644 src/drt/test/drt_man_tcl_check.ok create mode 100644 src/drt/test/drt_man_tcl_check.py create mode 100644 src/drt/test/drt_readme_msgs_check.ok create mode 100644 src/drt/test/drt_readme_msgs_check.py create mode 120000 src/drt/test/extract_utils.py create mode 120000 src/drt/test/manpage.py create mode 120000 src/drt/test/md_roff_compat.py create mode 120000 src/fin/test/extract_utils.py create mode 100644 src/fin/test/fin_man_tcl_check.ok create mode 100644 src/fin/test/fin_man_tcl_check.py create mode 100644 src/fin/test/fin_readme_msgs_check.ok create mode 100644 src/fin/test/fin_readme_msgs_check.py create mode 120000 src/fin/test/manpage.py create mode 120000 src/fin/test/md_roff_compat.py create mode 120000 src/gpl/test/extract_utils.py create mode 100644 src/gpl/test/gpl_man_tcl_check.ok create mode 100644 src/gpl/test/gpl_man_tcl_check.py create mode 100644 src/gpl/test/gpl_readme_msgs_check.ok create mode 100644 src/gpl/test/gpl_readme_msgs_check.py create mode 120000 src/gpl/test/manpage.py create mode 120000 src/gpl/test/md_roff_compat.py create mode 120000 src/grt/test/extract_utils.py create mode 100644 src/grt/test/grt_man_tcl_check.ok create mode 100644 src/grt/test/grt_man_tcl_check.py create mode 100644 src/grt/test/grt_readme_msgs_check.ok create mode 100644 src/grt/test/grt_readme_msgs_check.py create mode 120000 src/grt/test/manpage.py create mode 120000 src/grt/test/md_roff_compat.py create mode 120000 src/gui/test/extract_utils.py create mode 100644 src/gui/test/gui_man_tcl_check.ok create mode 100644 src/gui/test/gui_man_tcl_check.py create mode 100644 src/gui/test/gui_readme_msgs_check.ok create mode 100644 src/gui/test/gui_readme_msgs_check.py create mode 120000 src/gui/test/manpage.py create mode 120000 src/gui/test/md_roff_compat.py create mode 120000 src/ifp/test/extract_utils.py create mode 100644 src/ifp/test/ifp_man_tcl_check.ok create mode 100644 src/ifp/test/ifp_man_tcl_check.py create mode 100644 src/ifp/test/ifp_readme_msgs_check.ok create mode 100644 src/ifp/test/ifp_readme_msgs_check.py create mode 120000 src/ifp/test/manpage.py create mode 120000 src/ifp/test/md_roff_compat.py create mode 120000 src/mpl/test/extract_utils.py create mode 120000 src/mpl/test/manpage.py create mode 120000 src/mpl/test/md_roff_compat.py create mode 100644 src/mpl/test/mpl_man_tcl_check.ok create mode 100644 src/mpl/test/mpl_man_tcl_check.py create mode 100644 src/mpl/test/mpl_readme_msgs_check.ok create mode 100644 src/mpl/test/mpl_readme_msgs_check.py create mode 120000 src/mpl2/test/extract_utils.py create mode 120000 src/mpl2/test/manpage.py create mode 120000 src/mpl2/test/md_roff_compat.py create mode 100644 src/mpl2/test/mpl2_man_tcl_check.ok create mode 100644 src/mpl2/test/mpl2_man_tcl_check.py create mode 100644 src/mpl2/test/mpl2_readme_msgs_check.ok create mode 100644 src/mpl2/test/mpl2_readme_msgs_check.py create mode 120000 src/odb/test/extract_utils.py create mode 120000 src/odb/test/manpage.py create mode 120000 src/odb/test/md_roff_compat.py create mode 100644 src/odb/test/odb_man_tcl_check.ok create mode 100644 src/odb/test/odb_man_tcl_check.py create mode 100644 src/odb/test/odb_readme_msgs_check.ok create mode 100644 src/odb/test/odb_readme_msgs_check.py create mode 120000 src/pad/test/extract_utils.py create mode 120000 src/pad/test/manpage.py create mode 120000 src/pad/test/md_roff_compat.py create mode 100644 src/pad/test/pad_man_tcl_check.ok create mode 100644 src/pad/test/pad_man_tcl_check.py create mode 100644 src/pad/test/pad_readme_msgs_check.ok create mode 100644 src/pad/test/pad_readme_msgs_check.py create mode 120000 src/par/test/extract_utils.py create mode 120000 src/par/test/manpage.py create mode 120000 src/par/test/md_roff_compat.py create mode 100644 src/par/test/par_man_tcl_check.ok create mode 100644 src/par/test/par_man_tcl_check.py create mode 100644 src/par/test/par_readme_msgs_check.ok create mode 100644 src/par/test/par_readme_msgs_check.py create mode 120000 src/pdn/test/extract_utils.py create mode 120000 src/pdn/test/manpage.py create mode 120000 src/pdn/test/md_roff_compat.py create mode 100644 src/pdn/test/pdn_man_tcl_check.ok create mode 100644 src/pdn/test/pdn_man_tcl_check.py create mode 100644 src/pdn/test/pdn_readme_msgs_check.ok create mode 100644 src/pdn/test/pdn_readme_msgs_check.py create mode 120000 src/ppl/test/extract_utils.py create mode 120000 src/ppl/test/manpage.py create mode 120000 src/ppl/test/md_roff_compat.py create mode 100644 src/ppl/test/ppl_man_tcl_check.ok create mode 100644 src/ppl/test/ppl_man_tcl_check.py create mode 100644 src/ppl/test/ppl_readme_msgs_check.ok create mode 100644 src/ppl/test/ppl_readme_msgs_check.py create mode 120000 src/psm/test/extract_utils.py create mode 120000 src/psm/test/manpage.py create mode 120000 src/psm/test/md_roff_compat.py create mode 100644 src/psm/test/psm_man_tcl_check.ok create mode 100644 src/psm/test/psm_man_tcl_check.py create mode 100644 src/psm/test/psm_readme_msgs_check.ok create mode 100644 src/psm/test/psm_readme_msgs_check.py create mode 120000 src/rcx/test/extract_utils.py create mode 120000 src/rcx/test/manpage.py create mode 120000 src/rcx/test/md_roff_compat.py create mode 100644 src/rcx/test/rcx_man_tcl_check.ok create mode 100644 src/rcx/test/rcx_man_tcl_check.py create mode 100644 src/rcx/test/rcx_readme_msgs_check.ok create mode 100644 src/rcx/test/rcx_readme_msgs_check.py create mode 120000 src/rmp/test/extract_utils.py create mode 120000 src/rmp/test/manpage.py create mode 120000 src/rmp/test/md_roff_compat.py create mode 100644 src/rmp/test/rmp_man_tcl_check.ok create mode 100644 src/rmp/test/rmp_man_tcl_check.py create mode 100644 src/rmp/test/rmp_readme_msgs_check.ok create mode 100644 src/rmp/test/rmp_readme_msgs_check.py create mode 120000 src/rsz/test/extract_utils.py create mode 120000 src/rsz/test/manpage.py create mode 120000 src/rsz/test/md_roff_compat.py create mode 100644 src/rsz/test/rsz_man_tcl_check.ok create mode 100644 src/rsz/test/rsz_man_tcl_check.py create mode 100644 src/rsz/test/rsz_readme_msgs_check.ok create mode 100644 src/rsz/test/rsz_readme_msgs_check.py create mode 120000 src/stt/test/extract_utils.py create mode 120000 src/stt/test/manpage.py create mode 120000 src/stt/test/md_roff_compat.py create mode 100644 src/stt/test/stt_man_tcl_check.ok create mode 100644 src/stt/test/stt_man_tcl_check.py create mode 100644 src/stt/test/stt_readme_msgs_check.ok create mode 100644 src/stt/test/stt_readme_msgs_check.py create mode 120000 src/tap/test/extract_utils.py create mode 120000 src/tap/test/manpage.py create mode 120000 src/tap/test/md_roff_compat.py create mode 100644 src/tap/test/tap_man_tcl_check.ok create mode 100644 src/tap/test/tap_man_tcl_check.py create mode 100644 src/tap/test/tap_readme_msgs_check.ok create mode 100644 src/tap/test/tap_readme_msgs_check.py create mode 120000 src/upf/test/extract_utils.py create mode 120000 src/upf/test/manpage.py create mode 120000 src/upf/test/md_roff_compat.py create mode 100644 src/upf/test/upf_man_tcl_check.ok create mode 100644 src/upf/test/upf_man_tcl_check.py create mode 100644 src/upf/test/upf_readme_msgs_check.ok create mode 100644 src/upf/test/upf_readme_msgs_check.py create mode 120000 src/utl/test/extract_utils.py create mode 120000 src/utl/test/manpage.py create mode 120000 src/utl/test/md_roff_compat.py create mode 120000 src/utl/test/save_ok create mode 100644 src/utl/test/utl_man_tcl_check.ok create mode 100644 src/utl/test/utl_man_tcl_check.py create mode 100644 src/utl/test/utl_readme_msgs_check.ok create mode 100644 src/utl/test/utl_readme_msgs_check.py diff --git a/src/ant/test/ant_man_tcl_check.py b/src/ant/test/ant_man_tcl_check.py index f3883ff7533..09bfed91e0d 100644 --- a/src/ant/test/ant_man_tcl_check.py +++ b/src/ant/test/ant_man_tcl_check.py @@ -23,6 +23,7 @@ # exclude these dirs which are not compiled in man (do not have readmes). tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue if "odb" in tool_dir: tool_dir = './src/odb' if not os.path.exists(f"{tool_dir}/README.md"): continue if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue diff --git a/src/cts/test/cts_man_tcl_check.ok b/src/cts/test/cts_man_tcl_check.ok new file mode 100644 index 00000000000..a5d9fad3280 --- /dev/null +++ b/src/cts/test/cts_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/cts 2 2 3 +Command counts do not match. diff --git a/src/cts/test/cts_man_tcl_check.py b/src/cts/test/cts_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/cts/test/cts_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/cts/test/cts_readme_msgs_check.ok b/src/cts/test/cts_readme_msgs_check.ok new file mode 100644 index 00000000000..6893d6db79b --- /dev/null +++ b/src/cts/test/cts_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +Info: 62, Warn: 10, Error: 34 diff --git a/src/cts/test/cts_readme_msgs_check.py b/src/cts/test/cts_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/cts/test/cts_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/cts/test/extract_utils.py b/src/cts/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/cts/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/cts/test/manpage.py b/src/cts/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/cts/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/cts/test/md_roff_compat.py b/src/cts/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/cts/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/cts/test/regression_tests.tcl b/src/cts/test/regression_tests.tcl index 6eaa204871b..89ba8e27a9e 100644 --- a/src/cts/test/regression_tests.tcl +++ b/src/cts/test/regression_tests.tcl @@ -18,4 +18,6 @@ record_tests { array_ins_delay insertion_delay dummy_load + cts_readme_msgs_check + cts_man_tcl_check } diff --git a/src/dft/test/dft_man_tcl_check.ok b/src/dft/test/dft_man_tcl_check.ok new file mode 100644 index 00000000000..50ac03b689e --- /dev/null +++ b/src/dft/test/dft_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/dft 4 4 4 +Command counts match. diff --git a/src/dft/test/dft_man_tcl_check.py b/src/dft/test/dft_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/dft/test/dft_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/dft/test/dft_readme_msgs_check.ok b/src/dft/test/dft_readme_msgs_check.ok new file mode 100644 index 00000000000..cf0b187e6e1 --- /dev/null +++ b/src/dft/test/dft_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +Info: 1, Warn: 3, Error: 2 diff --git a/src/dft/test/dft_readme_msgs_check.py b/src/dft/test/dft_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/dft/test/dft_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/dft/test/extract_utils.py b/src/dft/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/dft/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/dft/test/manpage.py b/src/dft/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/dft/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/dft/test/md_roff_compat.py b/src/dft/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/dft/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/dft/test/regression_tests.tcl b/src/dft/test/regression_tests.tcl index 2682ce1ec37..7f62d985454 100644 --- a/src/dft/test/regression_tests.tcl +++ b/src/dft/test/regression_tests.tcl @@ -4,4 +4,6 @@ record_tests { sub_modules_sky130 scan_architect_no_mix_sky130 scan_architect_clock_mix_sky130 + dft_man_tcl_check + dft_readme_msgs_check } diff --git a/src/dpl/test/dpl_man_tcl_check.ok b/src/dpl/test/dpl_man_tcl_check.ok new file mode 100644 index 00000000000..ad740b24be8 --- /dev/null +++ b/src/dpl/test/dpl_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/dpl 6 6 6 +Command counts match. diff --git a/src/dpl/test/dpl_man_tcl_check.py b/src/dpl/test/dpl_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/dpl/test/dpl_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/dpl/test/dpl_readme_msgs_check.ok b/src/dpl/test/dpl_readme_msgs_check.ok new file mode 100644 index 00000000000..b09d5b2abc4 --- /dev/null +++ b/src/dpl/test/dpl_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 +Info: 7, Warn: 4, Error: 29 diff --git a/src/dpl/test/dpl_readme_msgs_check.py b/src/dpl/test/dpl_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/dpl/test/dpl_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/dpl/test/extract_utils.py b/src/dpl/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/dpl/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/dpl/test/manpage.py b/src/dpl/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/dpl/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/dpl/test/md_roff_compat.py b/src/dpl/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/dpl/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/dpl/test/regression_tests.tcl b/src/dpl/test/regression_tests.tcl index f1afb7a1c63..ff2fd531913 100644 --- a/src/dpl/test/regression_tests.tcl +++ b/src/dpl/test/regression_tests.tcl @@ -60,4 +60,6 @@ record_tests { simple08 simple09 simple10 + dpl_man_tcl_check + dpl_readme_msgs_check } diff --git a/src/drt/test/drt_man_tcl_check.ok b/src/drt/test/drt_man_tcl_check.ok new file mode 100644 index 00000000000..f4b07988732 --- /dev/null +++ b/src/drt/test/drt_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/drt 3 3 3 +Command counts match. diff --git a/src/drt/test/drt_man_tcl_check.py b/src/drt/test/drt_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/drt/test/drt_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/drt/test/drt_readme_msgs_check.ok b/src/drt/test/drt_readme_msgs_check.ok new file mode 100644 index 00000000000..9a28d23b531 --- /dev/null +++ b/src/drt/test/drt_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +Info: 78, Warn: 111, Error: 172 diff --git a/src/drt/test/drt_readme_msgs_check.py b/src/drt/test/drt_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/drt/test/drt_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/drt/test/extract_utils.py b/src/drt/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/drt/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/drt/test/manpage.py b/src/drt/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/drt/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/drt/test/md_roff_compat.py b/src/drt/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/drt/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/drt/test/regression_tests.tcl b/src/drt/test/regression_tests.tcl index ee76928f682..6f04f5cc1d1 100644 --- a/src/drt/test/regression_tests.tcl +++ b/src/drt/test/regression_tests.tcl @@ -9,6 +9,8 @@ record_tests { top_level_term top_level_term2 drc_test + drt_man_tcl_check + drt_readme_msgs_check } record_pass_fail_tests { gc_test diff --git a/src/fin/test/extract_utils.py b/src/fin/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/fin/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/fin/test/fin_man_tcl_check.ok b/src/fin/test/fin_man_tcl_check.ok new file mode 100644 index 00000000000..b04371a2745 --- /dev/null +++ b/src/fin/test/fin_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/fin 1 1 1 +Command counts match. diff --git a/src/fin/test/fin_man_tcl_check.py b/src/fin/test/fin_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/fin/test/fin_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/fin/test/fin_readme_msgs_check.ok b/src/fin/test/fin_readme_msgs_check.ok new file mode 100644 index 00000000000..85ebc6fde59 --- /dev/null +++ b/src/fin/test/fin_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 5, Warn: 1, Error: 4 diff --git a/src/fin/test/fin_readme_msgs_check.py b/src/fin/test/fin_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/fin/test/fin_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/fin/test/manpage.py b/src/fin/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/fin/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/fin/test/md_roff_compat.py b/src/fin/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/fin/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/fin/test/regression_tests.tcl b/src/fin/test/regression_tests.tcl index 5685436788d..e73738e2046 100644 --- a/src/fin/test/regression_tests.tcl +++ b/src/fin/test/regression_tests.tcl @@ -1,3 +1,5 @@ record_tests { gcd_fill + fin_man_tcl_check + fin_readme_msgs_check } diff --git a/src/gpl/test/extract_utils.py b/src/gpl/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/gpl/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/gpl/test/gpl_man_tcl_check.ok b/src/gpl/test/gpl_man_tcl_check.ok new file mode 100644 index 00000000000..2fc6ec80604 --- /dev/null +++ b/src/gpl/test/gpl_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/gpl 2 2 2 +Command counts match. diff --git a/src/gpl/test/gpl_man_tcl_check.py b/src/gpl/test/gpl_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/gpl/test/gpl_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/gpl/test/gpl_readme_msgs_check.ok b/src/gpl/test/gpl_readme_msgs_check.ok new file mode 100644 index 00000000000..ea7ba6f6d29 --- /dev/null +++ b/src/gpl/test/gpl_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 +Info: 70, Warn: 10, Error: 14 diff --git a/src/gpl/test/gpl_readme_msgs_check.py b/src/gpl/test/gpl_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/gpl/test/gpl_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/gpl/test/manpage.py b/src/gpl/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/gpl/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/gpl/test/md_roff_compat.py b/src/gpl/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/gpl/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/gpl/test/regression_tests.tcl b/src/gpl/test/regression_tests.tcl index 8b961997ea7..5cd77b5e7d3 100644 --- a/src/gpl/test/regression_tests.tcl +++ b/src/gpl/test/regression_tests.tcl @@ -27,5 +27,7 @@ record_tests { convergence01 nograd01 clust01 + gpl_man_tcl_check + gpl_readme_msgs_check } # clust02 diff --git a/src/grt/test/extract_utils.py b/src/grt/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/grt/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/grt/test/grt_man_tcl_check.ok b/src/grt/test/grt_man_tcl_check.ok new file mode 100644 index 00000000000..85a03d6503a --- /dev/null +++ b/src/grt/test/grt_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/grt 12 12 13 +Command counts do not match. diff --git a/src/grt/test/grt_man_tcl_check.py b/src/grt/test/grt_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/grt/test/grt_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/grt/test/grt_readme_msgs_check.ok b/src/grt/test/grt_readme_msgs_check.ok new file mode 100644 index 00000000000..18475a1e69d --- /dev/null +++ b/src/grt/test/grt_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 13, Desc: 13, Syn: 13, Options: 13, Args: 13 +Info: 29, Warn: 42, Error: 90 diff --git a/src/grt/test/grt_readme_msgs_check.py b/src/grt/test/grt_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/grt/test/grt_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/grt/test/manpage.py b/src/grt/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/grt/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/grt/test/md_roff_compat.py b/src/grt/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/grt/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/grt/test/regression_tests.tcl b/src/grt/test/regression_tests.tcl index 76f6d9e1314..aa04ca25a63 100644 --- a/src/grt/test/regression_tests.tcl +++ b/src/grt/test/regression_tests.tcl @@ -63,4 +63,6 @@ record_tests { tracks3 unplaced_inst upper_layer_net + grt_man_tcl_check + grt_readme_msgs_check } diff --git a/src/gui/test/extract_utils.py b/src/gui/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/gui/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/gui/test/gui_man_tcl_check.ok b/src/gui/test/gui_man_tcl_check.ok new file mode 100644 index 00000000000..f8dbc63bfc4 --- /dev/null +++ b/src/gui/test/gui_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/gui 7 7 7 +Command counts match. diff --git a/src/gui/test/gui_man_tcl_check.py b/src/gui/test/gui_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/gui/test/gui_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/gui/test/gui_readme_msgs_check.ok b/src/gui/test/gui_readme_msgs_check.ok new file mode 100644 index 00000000000..df855d11cbe --- /dev/null +++ b/src/gui/test/gui_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 46, Desc: 46, Syn: 46, Options: 46, Args: 46 +Info: 1, Warn: 33, Error: 64 diff --git a/src/gui/test/gui_readme_msgs_check.py b/src/gui/test/gui_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/gui/test/gui_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/gui/test/manpage.py b/src/gui/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/gui/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/gui/test/md_roff_compat.py b/src/gui/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/gui/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/gui/test/regression_tests.tcl b/src/gui/test/regression_tests.tcl index e125917d335..76955f29577 100644 --- a/src/gui/test/regression_tests.tcl +++ b/src/gui/test/regression_tests.tcl @@ -1,3 +1,5 @@ record_tests { supported + gui_man_tcl_check + gui_readme_msgs_check } diff --git a/src/ifp/test/extract_utils.py b/src/ifp/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/ifp/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/ifp/test/ifp_man_tcl_check.ok b/src/ifp/test/ifp_man_tcl_check.ok new file mode 100644 index 00000000000..ed32b5cea50 --- /dev/null +++ b/src/ifp/test/ifp_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/ifp 3 3 3 +Command counts match. diff --git a/src/ifp/test/ifp_man_tcl_check.py b/src/ifp/test/ifp_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/ifp/test/ifp_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/ifp/test/ifp_readme_msgs_check.ok b/src/ifp/test/ifp_readme_msgs_check.ok new file mode 100644 index 00000000000..ee4adee6b6b --- /dev/null +++ b/src/ifp/test/ifp_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 3, Desc: 3, Syn: 3, Options: 3, Args: 3 +Info: 4, Warn: 7, Error: 17 diff --git a/src/ifp/test/ifp_readme_msgs_check.py b/src/ifp/test/ifp_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/ifp/test/ifp_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/ifp/test/manpage.py b/src/ifp/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/ifp/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/ifp/test/md_roff_compat.py b/src/ifp/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/ifp/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/ifp/test/regression_tests.tcl b/src/ifp/test/regression_tests.tcl index 4d75425151d..b9fe5033613 100644 --- a/src/ifp/test/regression_tests.tcl +++ b/src/ifp/test/regression_tests.tcl @@ -24,5 +24,7 @@ record_tests { tiecells upf_test upf_shifter_test + ifp_man_tcl_check + ifp_readme_msgs_check } diff --git a/src/mpl/test/extract_utils.py b/src/mpl/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/mpl/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/mpl/test/manpage.py b/src/mpl/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/mpl/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/mpl/test/md_roff_compat.py b/src/mpl/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/mpl/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/mpl/test/mpl_man_tcl_check.ok b/src/mpl/test/mpl_man_tcl_check.ok new file mode 100644 index 00000000000..3628f2bff80 --- /dev/null +++ b/src/mpl/test/mpl_man_tcl_check.ok @@ -0,0 +1,5 @@ +Tool Dir Help count Proc count Readme count +./src/mpl 1 1 1 +Command counts match. +./src/mpl2 2 2 2 +Command counts match. diff --git a/src/mpl/test/mpl_man_tcl_check.py b/src/mpl/test/mpl_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/mpl/test/mpl_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/mpl/test/mpl_readme_msgs_check.ok b/src/mpl/test/mpl_readme_msgs_check.ok new file mode 100644 index 00000000000..98d6e205c93 --- /dev/null +++ b/src/mpl/test/mpl_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 12, Warn: 7, Error: 8 diff --git a/src/mpl/test/mpl_readme_msgs_check.py b/src/mpl/test/mpl_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/mpl/test/mpl_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/mpl/test/regression_tests.tcl b/src/mpl/test/regression_tests.tcl index 19ea1c77ce3..de7b70eca10 100644 --- a/src/mpl/test/regression_tests.tcl +++ b/src/mpl/test/regression_tests.tcl @@ -4,4 +4,6 @@ record_tests { east_west1 east_west2 snap_layer1 + mpl_man_tcl_check + mpl_readme_msgs_check } diff --git a/src/mpl2/test/extract_utils.py b/src/mpl2/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/mpl2/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/mpl2/test/manpage.py b/src/mpl2/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/mpl2/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/mpl2/test/md_roff_compat.py b/src/mpl2/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/mpl2/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/mpl2/test/mpl2_man_tcl_check.ok b/src/mpl2/test/mpl2_man_tcl_check.ok new file mode 100644 index 00000000000..c009301ded8 --- /dev/null +++ b/src/mpl2/test/mpl2_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/mpl2 2 2 2 +Command counts match. diff --git a/src/mpl2/test/mpl2_man_tcl_check.py b/src/mpl2/test/mpl2_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/mpl2/test/mpl2_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/mpl2/test/mpl2_readme_msgs_check.ok b/src/mpl2/test/mpl2_readme_msgs_check.ok new file mode 100644 index 00000000000..cd7b603d405 --- /dev/null +++ b/src/mpl2/test/mpl2_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 2, Desc: 2, Syn: 2, Options: 2, Args: 2 +Info: 2, Warn: 6, Error: 21 diff --git a/src/mpl2/test/mpl2_readme_msgs_check.py b/src/mpl2/test/mpl2_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/mpl2/test/mpl2_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/mpl2/test/regression_tests.tcl b/src/mpl2/test/regression_tests.tcl index a89e0946a02..631372da658 100644 --- a/src/mpl2/test/regression_tests.tcl +++ b/src/mpl2/test/regression_tests.tcl @@ -1,3 +1,5 @@ record_tests { macro_only + mpl2_man_tcl_check + mpl2_readme_msgs_check } diff --git a/src/odb/test/extract_utils.py b/src/odb/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/odb/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/odb/test/manpage.py b/src/odb/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/odb/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/odb/test/md_roff_compat.py b/src/odb/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/odb/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/odb/test/odb_man_tcl_check.ok b/src/odb/test/odb_man_tcl_check.ok new file mode 100644 index 00000000000..a077f21570e --- /dev/null +++ b/src/odb/test/odb_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/odb 13 13 17 +Command counts do not match. diff --git a/src/odb/test/odb_man_tcl_check.py b/src/odb/test/odb_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/odb/test/odb_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/odb/test/odb_readme_msgs_check.ok b/src/odb/test/odb_readme_msgs_check.ok new file mode 100644 index 00000000000..06260a07fe6 --- /dev/null +++ b/src/odb/test/odb_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 +Info: 60, Warn: 199, Error: 137 diff --git a/src/odb/test/odb_readme_msgs_check.py b/src/odb/test/odb_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/odb/test/odb_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/odb/test/regression_tests.tcl b/src/odb/test/regression_tests.tcl index 5ff9422150b..73d6426ab68 100644 --- a/src/odb/test/regression_tests.tcl +++ b/src/odb/test/regression_tests.tcl @@ -34,6 +34,8 @@ record_tests { gcd_abstract_lef_with_power abstract_origin write_macro_placement + odb_man_tcl_check + odb_readme_msgs_check } record_pass_fail_tests { diff --git a/src/pad/test/extract_utils.py b/src/pad/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/pad/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/pad/test/manpage.py b/src/pad/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/pad/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/pad/test/md_roff_compat.py b/src/pad/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/pad/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/pad/test/pad_man_tcl_check.ok b/src/pad/test/pad_man_tcl_check.ok new file mode 100644 index 00000000000..6cb57746c10 --- /dev/null +++ b/src/pad/test/pad_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/pad 13 13 13 +Command counts match. diff --git a/src/pad/test/pad_man_tcl_check.py b/src/pad/test/pad_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/pad/test/pad_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/pad/test/pad_readme_msgs_check.ok b/src/pad/test/pad_readme_msgs_check.ok new file mode 100644 index 00000000000..35480008051 --- /dev/null +++ b/src/pad/test/pad_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 14, Desc: 14, Syn: 14, Options: 14, Args: 14 +Info: 18, Warn: 59, Error: 353 diff --git a/src/pad/test/pad_readme_msgs_check.py b/src/pad/test/pad_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/pad/test/pad_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/pad/test/regression_tests.tcl b/src/pad/test/regression_tests.tcl index 2d061a1e494..fa3a1246c78 100644 --- a/src/pad/test/regression_tests.tcl +++ b/src/pad/test/regression_tests.tcl @@ -28,4 +28,7 @@ record_tests { skywater130_caravel skywater130_coyote_tc + + pad_man_tcl_check + pad_readme_msgs_check } diff --git a/src/par/test/extract_utils.py b/src/par/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/par/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/par/test/manpage.py b/src/par/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/par/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/par/test/md_roff_compat.py b/src/par/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/par/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/par/test/par_man_tcl_check.ok b/src/par/test/par_man_tcl_check.ok new file mode 100644 index 00000000000..168f0994f36 --- /dev/null +++ b/src/par/test/par_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/par 6 6 6 +Command counts match. diff --git a/src/par/test/par_man_tcl_check.py b/src/par/test/par_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/par/test/par_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/par/test/par_readme_msgs_check.ok b/src/par/test/par_readme_msgs_check.ok new file mode 100644 index 00000000000..93ce4a0bec6 --- /dev/null +++ b/src/par/test/par_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 6, Desc: 6, Syn: 6, Options: 6, Args: 6 +Info: 13, Warn: 9, Error: 16 diff --git a/src/par/test/par_readme_msgs_check.py b/src/par/test/par_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/par/test/par_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/par/test/regression_tests.tcl b/src/par/test/regression_tests.tcl index 9ff31fb12ba..52b9a2fcc8a 100644 --- a/src/par/test/regression_tests.tcl +++ b/src/par/test/regression_tests.tcl @@ -1,4 +1,6 @@ record_tests { read_part partition_gcd + par_man_tcl_check + par_readme_msgs_check } diff --git a/src/pdn/test/extract_utils.py b/src/pdn/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/pdn/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/pdn/test/manpage.py b/src/pdn/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/pdn/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/pdn/test/md_roff_compat.py b/src/pdn/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/pdn/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/pdn/test/pdn_man_tcl_check.ok b/src/pdn/test/pdn_man_tcl_check.ok new file mode 100644 index 00000000000..43a6876d20c --- /dev/null +++ b/src/pdn/test/pdn_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/pdn 8 9 9 +Command counts do not match. diff --git a/src/pdn/test/pdn_man_tcl_check.py b/src/pdn/test/pdn_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/pdn/test/pdn_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/pdn/test/pdn_readme_msgs_check.ok b/src/pdn/test/pdn_readme_msgs_check.ok new file mode 100644 index 00000000000..204453d5e8b --- /dev/null +++ b/src/pdn/test/pdn_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 +Info: 3, Warn: 20, Error: 99 diff --git a/src/pdn/test/pdn_readme_msgs_check.py b/src/pdn/test/pdn_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/pdn/test/pdn_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/pdn/test/regression_tests.tcl b/src/pdn/test/regression_tests.tcl index 72e4d4ec0a4..6fdf5fa27b5 100644 --- a/src/pdn/test/regression_tests.tcl +++ b/src/pdn/test/regression_tests.tcl @@ -114,4 +114,7 @@ record_tests { sroute_test bpin_removal + + pdn_man_tcl_check + pdn_readme_msgs_check } diff --git a/src/ppl/test/extract_utils.py b/src/ppl/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/ppl/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/ppl/test/manpage.py b/src/ppl/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/ppl/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/ppl/test/md_roff_compat.py b/src/ppl/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/ppl/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/ppl/test/ppl_man_tcl_check.ok b/src/ppl/test/ppl_man_tcl_check.ok new file mode 100644 index 00000000000..94280ca3ef4 --- /dev/null +++ b/src/ppl/test/ppl_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/ppl 11 11 11 +Command counts match. diff --git a/src/ppl/test/ppl_man_tcl_check.py b/src/ppl/test/ppl_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/ppl/test/ppl_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/ppl/test/ppl_readme_msgs_check.ok b/src/ppl/test/ppl_readme_msgs_check.ok new file mode 100644 index 00000000000..5b17c5085ef --- /dev/null +++ b/src/ppl/test/ppl_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 +Info: 17, Warn: 17, Error: 66 diff --git a/src/ppl/test/ppl_readme_msgs_check.py b/src/ppl/test/ppl_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/ppl/test/ppl_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/ppl/test/regression_tests.tcl b/src/ppl/test/regression_tests.tcl index dee3581a45d..b2e247175f3 100644 --- a/src/ppl/test/regression_tests.tcl +++ b/src/ppl/test/regression_tests.tcl @@ -111,4 +111,6 @@ record_tests { write_pin_placement2 write_pin_placement3 write_pin_placement4 + ppl_man_tcl_check + ppl_readme_msgs_check } diff --git a/src/psm/test/extract_utils.py b/src/psm/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/psm/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/psm/test/manpage.py b/src/psm/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/psm/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/psm/test/md_roff_compat.py b/src/psm/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/psm/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/psm/test/psm_man_tcl_check.ok b/src/psm/test/psm_man_tcl_check.ok new file mode 100644 index 00000000000..13d025dbb41 --- /dev/null +++ b/src/psm/test/psm_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/psm 4 4 4 +Command counts match. diff --git a/src/psm/test/psm_man_tcl_check.py b/src/psm/test/psm_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/psm/test/psm_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/psm/test/psm_readme_msgs_check.ok b/src/psm/test/psm_readme_msgs_check.ok new file mode 100644 index 00000000000..c5fb5ffe433 --- /dev/null +++ b/src/psm/test/psm_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 4, Desc: 4, Syn: 4, Options: 4, Args: 4 +Info: 10, Warn: 18, Error: 39 diff --git a/src/psm/test/psm_readme_msgs_check.py b/src/psm/test/psm_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/psm/test/psm_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/psm/test/regression_tests.tcl b/src/psm/test/regression_tests.tcl index d15175a0005..b45bd084dee 100644 --- a/src/psm/test/regression_tests.tcl +++ b/src/psm/test/regression_tests.tcl @@ -23,4 +23,6 @@ record_tests { zerosoc_pads_check_only zerosoc_pads_check_only_disconnected pad_connected_by_abutment + psm_man_tcl_check + psm_readme_msgs_check } diff --git a/src/rcx/test/extract_utils.py b/src/rcx/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/rcx/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/rcx/test/manpage.py b/src/rcx/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/rcx/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/rcx/test/md_roff_compat.py b/src/rcx/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/rcx/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/rcx/test/rcx_man_tcl_check.ok b/src/rcx/test/rcx_man_tcl_check.ok new file mode 100644 index 00000000000..cdc57491838 --- /dev/null +++ b/src/rcx/test/rcx_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/rcx 9 9 9 +Command counts match. diff --git a/src/rcx/test/rcx_man_tcl_check.py b/src/rcx/test/rcx_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/rcx/test/rcx_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/rcx/test/rcx_readme_msgs_check.ok b/src/rcx/test/rcx_readme_msgs_check.ok new file mode 100644 index 00000000000..0429e78c089 --- /dev/null +++ b/src/rcx/test/rcx_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 9, Desc: 9, Syn: 9, Options: 9, Args: 9 +Info: 90, Warn: 63, Error: 28 diff --git a/src/rcx/test/rcx_readme_msgs_check.py b/src/rcx/test/rcx_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/rcx/test/rcx_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/rcx/test/regression_tests.tcl b/src/rcx/test/regression_tests.tcl index 7070cc45fae..ea6b873109e 100644 --- a/src/rcx/test/regression_tests.tcl +++ b/src/rcx/test/regression_tests.tcl @@ -5,6 +5,8 @@ record_tests { gcd 45_gcd names + rcx_man_tcl_check + rcx_readme_msgs_check } record_pass_fail_tests { rcx_unit_test diff --git a/src/rmp/test/extract_utils.py b/src/rmp/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/rmp/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/rmp/test/manpage.py b/src/rmp/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/rmp/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/rmp/test/md_roff_compat.py b/src/rmp/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/rmp/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/rmp/test/regression_tests.tcl b/src/rmp/test/regression_tests.tcl index e9c1e5b3fff..2f0a8ccf84c 100644 --- a/src/rmp/test/regression_tests.tcl +++ b/src/rmp/test/regression_tests.tcl @@ -9,4 +9,6 @@ record_tests { blif_reader blif_reader_const blif_reader_sequential + rmp_man_tcl_check + rmp_readme_msgs_check } diff --git a/src/rmp/test/rmp_man_tcl_check.ok b/src/rmp/test/rmp_man_tcl_check.ok new file mode 100644 index 00000000000..53856c8d948 --- /dev/null +++ b/src/rmp/test/rmp_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/rmp 1 1 1 +Command counts match. diff --git a/src/rmp/test/rmp_man_tcl_check.py b/src/rmp/test/rmp_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/rmp/test/rmp_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/rmp/test/rmp_readme_msgs_check.ok b/src/rmp/test/rmp_readme_msgs_check.ok new file mode 100644 index 00000000000..3c8e366ada5 --- /dev/null +++ b/src/rmp/test/rmp_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 9, Warn: 5, Error: 10 diff --git a/src/rmp/test/rmp_readme_msgs_check.py b/src/rmp/test/rmp_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/rmp/test/rmp_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/rsz/test/extract_utils.py b/src/rsz/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/rsz/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/rsz/test/manpage.py b/src/rsz/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/rsz/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/rsz/test/md_roff_compat.py b/src/rsz/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/rsz/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/rsz/test/regression_tests.tcl b/src/rsz/test/regression_tests.tcl index 9837b9159d7..1c8e361b490 100644 --- a/src/rsz/test/regression_tests.tcl +++ b/src/rsz/test/regression_tests.tcl @@ -109,4 +109,6 @@ record_tests { repair_hold9_verbose set_dont_touch1 set_dont_use1 + rsz_man_tcl_check + rsz_readme_msgs_check } diff --git a/src/rsz/test/rsz_man_tcl_check.ok b/src/rsz/test/rsz_man_tcl_check.ok new file mode 100644 index 00000000000..50dcb44e586 --- /dev/null +++ b/src/rsz/test/rsz_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/rsz 16 16 17 +Command counts do not match. diff --git a/src/rsz/test/rsz_man_tcl_check.py b/src/rsz/test/rsz_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/rsz/test/rsz_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/rsz/test/rsz_readme_msgs_check.ok b/src/rsz/test/rsz_readme_msgs_check.ok new file mode 100644 index 00000000000..64d62d3e267 --- /dev/null +++ b/src/rsz/test/rsz_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 17, Desc: 17, Syn: 17, Options: 17, Args: 17 +Info: 35, Warn: 21, Error: 26 diff --git a/src/rsz/test/rsz_readme_msgs_check.py b/src/rsz/test/rsz_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/rsz/test/rsz_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/stt/test/extract_utils.py b/src/stt/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/stt/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/stt/test/manpage.py b/src/stt/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/stt/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/stt/test/md_roff_compat.py b/src/stt/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/stt/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/stt/test/regression_tests.tcl b/src/stt/test/regression_tests.tcl index 1178615a002..c7df3e4b7ce 100644 --- a/src/stt/test/regression_tests.tcl +++ b/src/stt/test/regression_tests.tcl @@ -6,4 +6,6 @@ record_tests { pd1 pd2 pd_gcd + stt_man_tcl_check + stt_readme_msgs_check } diff --git a/src/stt/test/stt_man_tcl_check.ok b/src/stt/test/stt_man_tcl_check.ok new file mode 100644 index 00000000000..1b804d932f5 --- /dev/null +++ b/src/stt/test/stt_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/stt 1 1 1 +Command counts match. diff --git a/src/stt/test/stt_man_tcl_check.py b/src/stt/test/stt_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/stt/test/stt_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/stt/test/stt_readme_msgs_check.ok b/src/stt/test/stt_readme_msgs_check.ok new file mode 100644 index 00000000000..fa9fe94a58e --- /dev/null +++ b/src/stt/test/stt_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 0, Warn: 0, Error: 5 diff --git a/src/stt/test/stt_readme_msgs_check.py b/src/stt/test/stt_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/stt/test/stt_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/tap/test/extract_utils.py b/src/tap/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/tap/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/tap/test/manpage.py b/src/tap/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/tap/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/tap/test/md_roff_compat.py b/src/tap/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/tap/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/tap/test/regression_tests.tcl b/src/tap/test/regression_tests.tcl index 4e4c1ae9595..eed300908ef 100644 --- a/src/tap/test/regression_tests.tcl +++ b/src/tap/test/regression_tests.tcl @@ -20,4 +20,6 @@ record_tests { gcd_sky130_separate jpeg_gf180 aes_gf180 + tap_man_tcl_check + tap_readme_msgs_check } diff --git a/src/tap/test/tap_man_tcl_check.ok b/src/tap/test/tap_man_tcl_check.ok new file mode 100644 index 00000000000..c37fe8b2621 --- /dev/null +++ b/src/tap/test/tap_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/tap 5 5 5 +Command counts match. diff --git a/src/tap/test/tap_man_tcl_check.py b/src/tap/test/tap_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/tap/test/tap_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/tap/test/tap_readme_msgs_check.ok b/src/tap/test/tap_readme_msgs_check.ok new file mode 100644 index 00000000000..9254f35b001 --- /dev/null +++ b/src/tap/test/tap_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 5, Desc: 5, Syn: 5, Options: 5, Args: 5 +Info: 5, Warn: 4, Error: 9 diff --git a/src/tap/test/tap_readme_msgs_check.py b/src/tap/test/tap_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/tap/test/tap_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/upf/test/extract_utils.py b/src/upf/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/upf/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/upf/test/manpage.py b/src/upf/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/upf/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/upf/test/md_roff_compat.py b/src/upf/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/upf/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/upf/test/regression_tests.tcl b/src/upf/test/regression_tests.tcl index e479311ba42..8722bd909b2 100644 --- a/src/upf/test/regression_tests.tcl +++ b/src/upf/test/regression_tests.tcl @@ -1,4 +1,6 @@ record_tests { levelshifter write + upf_man_tcl_check + upf_readme_msgs_check } diff --git a/src/upf/test/upf_man_tcl_check.ok b/src/upf/test/upf_man_tcl_check.ok new file mode 100644 index 00000000000..b3cfea12f0f --- /dev/null +++ b/src/upf/test/upf_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/upf 12 11 11 +Command counts do not match. diff --git a/src/upf/test/upf_man_tcl_check.py b/src/upf/test/upf_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/upf/test/upf_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/upf/test/upf_readme_msgs_check.ok b/src/upf/test/upf_readme_msgs_check.ok new file mode 100644 index 00000000000..1cacfd10222 --- /dev/null +++ b/src/upf/test/upf_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 11, Desc: 11, Syn: 11, Options: 11, Args: 11 +Info: 0, Warn: 45, Error: 9 diff --git a/src/upf/test/upf_readme_msgs_check.py b/src/upf/test/upf_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/upf/test/upf_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file diff --git a/src/utl/test/extract_utils.py b/src/utl/test/extract_utils.py new file mode 120000 index 00000000000..3a16235d508 --- /dev/null +++ b/src/utl/test/extract_utils.py @@ -0,0 +1 @@ +../../../docs/src/scripts/extract_utils.py \ No newline at end of file diff --git a/src/utl/test/manpage.py b/src/utl/test/manpage.py new file mode 120000 index 00000000000..c39859549f2 --- /dev/null +++ b/src/utl/test/manpage.py @@ -0,0 +1 @@ +../../../docs/src/scripts/manpage.py \ No newline at end of file diff --git a/src/utl/test/md_roff_compat.py b/src/utl/test/md_roff_compat.py new file mode 120000 index 00000000000..43530e421eb --- /dev/null +++ b/src/utl/test/md_roff_compat.py @@ -0,0 +1 @@ +../../../docs/src/scripts/md_roff_compat.py \ No newline at end of file diff --git a/src/utl/test/regression_tests.tcl b/src/utl/test/regression_tests.tcl index 23077baa345..93d46772b96 100644 --- a/src/utl/test/regression_tests.tcl +++ b/src/utl/test/regression_tests.tcl @@ -3,6 +3,8 @@ record_tests { test_error test_suppress_message test_metrics + utl_man_tcl_check + utl_readme_msgs_check #test_error_exception } diff --git a/src/utl/test/save_ok b/src/utl/test/save_ok new file mode 120000 index 00000000000..4f5b707628d --- /dev/null +++ b/src/utl/test/save_ok @@ -0,0 +1 @@ +../../../test/save_ok \ No newline at end of file diff --git a/src/utl/test/utl_man_tcl_check.ok b/src/utl/test/utl_man_tcl_check.ok new file mode 100644 index 00000000000..87d738035ef --- /dev/null +++ b/src/utl/test/utl_man_tcl_check.ok @@ -0,0 +1,3 @@ +Tool Dir Help count Proc count Readme count +./src/utl 1 1 1 +Command counts match. diff --git a/src/utl/test/utl_man_tcl_check.py b/src/utl/test/utl_man_tcl_check.py new file mode 100644 index 00000000000..09bfed91e0d --- /dev/null +++ b/src/utl/test/utl_man_tcl_check.py @@ -0,0 +1,67 @@ +import os +import glob +import re +from extract_utils import extract_tcl_code, extract_help, extract_proc + +# Test objective: Make sure similar output in all three: help, proc, and readme +path = os.getcwd() +module_dir = os.path.dirname(path) +module = os.path.basename(module_dir) + +or_home = os.path.dirname(os.path.dirname(os.path.dirname(path))) +os.chdir(or_home) + +help_dict, proc_dict, readme_dict = {}, {}, {} + +# Directories to exclude (according to md_roff_compat) +exclude = ["sta"] +include = ["./src/odb/src/db/odb.tcl"] + +for path in glob.glob("./src/*/src/*tcl") + include: + # exclude all dirs other than the current dir. + if module not in path: continue + + # exclude these dirs which are not compiled in man (do not have readmes). + tool_dir = os.path.dirname(os.path.dirname(path)) + if module not in tool_dir: continue + if "odb" in tool_dir: tool_dir = './src/odb' + if not os.path.exists(f"{tool_dir}/README.md"): continue + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + + # special handling for pad, since it has 3 Tcls. + if "ICeWall" in path or "PdnGen" in path: continue + + with open(path) as f: + # Help patterns + content = f.read() + matches = extract_help(content) + help_dict[tool_dir] = len(matches) + + # Proc patterns + matches = extract_proc(content) + proc_dict[tool_dir] = len(matches) + +for path in glob.glob("./src/*/README.md"): + # exclude all dirs other than the current dir. + if module not in path: continue + + if re.search(f".*{'|'.join(e for e in exclude)}.*", path): continue + tool_dir = os.path.dirname(path) + + # for gui, filter out the gui:: for separate processing + results = [x for x in extract_tcl_code(open(path).read()) if "gui::" not in x] + readme_dict[tool_dir] = len(results) + + # for pad, remove `make_fake_io_site` because it is a hidden cmd arg + if 'pad' in tool_dir: readme_dict[tool_dir] -= 1 + +print("Tool Dir".ljust(20), "Help count".ljust(15), "Proc count".ljust(15), "Readme count") + +for path in help_dict: + h,p,r = help_dict[path], proc_dict[path], readme_dict[path] + print(path.ljust(20), + str(h).ljust(15), + str(p).ljust(15), + str(r)) + if h == p == r: print("Command counts match.") + else: print("Command counts do not match.") \ No newline at end of file diff --git a/src/utl/test/utl_readme_msgs_check.ok b/src/utl/test/utl_readme_msgs_check.ok new file mode 100644 index 00000000000..a911dce0718 --- /dev/null +++ b/src/utl/test/utl_readme_msgs_check.ok @@ -0,0 +1,3 @@ +README.md +Names: 1, Desc: 1, Syn: 1, Options: 1, Args: 1 +Info: 1, Warn: 2, Error: 7 diff --git a/src/utl/test/utl_readme_msgs_check.py b/src/utl/test/utl_readme_msgs_check.py new file mode 100644 index 00000000000..5f2920c1a42 --- /dev/null +++ b/src/utl/test/utl_readme_msgs_check.py @@ -0,0 +1,19 @@ +import os +import sys +from md_roff_compat import man2_translate, man3_translate + +# Test objective: Check man2/man3 items parsed. + +cur_dir = os.getcwd() +doc_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.dirname(cur_dir))), + "docs" + ) +save_dir = os.path.join(cur_dir, "results/docs") +os.makedirs(save_dir, exist_ok=True) + +readme_path = os.path.join(cur_dir, "../README.md") +messages_path = os.path.join(cur_dir, "../messages.txt") + +man2_translate(readme_path, save_dir) +man3_translate(messages_path, save_dir) \ No newline at end of file From 0c3ea95379996b61b822ab6b7444b2d7f2d50f70 Mon Sep 17 00:00:00 2001 From: Matt Liberty <mliberty@precisioninno.com> Date: Fri, 29 Mar 2024 21:41:21 -0700 Subject: [PATCH 88/88] dpl: drop variable width site code (yagni) Signed-off-by: Matt Liberty <mliberty@precisioninno.com> --- src/dpl/include/dpl/Opendp.h | 32 +++------- src/dpl/src/CheckPlacement.cpp | 5 +- src/dpl/src/Grid.cpp | 48 +++++++-------- src/dpl/src/Opendp.cpp | 81 +++++-------------------- src/dpl/src/Place.cpp | 105 +++++++++++---------------------- 5 files changed, 79 insertions(+), 192 deletions(-) diff --git a/src/dpl/include/dpl/Opendp.h b/src/dpl/include/dpl/Opendp.h index 56a24a92c3b..21471f67246 100644 --- a/src/dpl/include/dpl/Opendp.h +++ b/src/dpl/include/dpl/Opendp.h @@ -386,22 +386,12 @@ class Opendp int getHybridSiteIndex(dbSite* site); int calculateHybridSitesRowCount(dbSite* parent_hybrid_site) const; - Point legalPt(const Cell* cell, - const Point& pt, - int row_height = -1, - int site_width = -1) const; + Point legalPt(const Cell* cell, const Point& pt, int row_height = -1) const; Point legalGridPt(const Cell* cell, const Point& pt, - int row_height = -1, - int site_width = -1) const; - Point legalPt(const Cell* cell, - bool padded, - int row_height = -1, - int site_width = -1) const; - Point legalGridPt(const Cell* cell, - bool padded, - int row_height = -1, - int site_width = -1) const; + int row_height = -1) const; + Point legalPt(const Cell* cell, bool padded, int row_height = -1) const; + Point legalGridPt(const Cell* cell, bool padded, int row_height = -1) const; Point nearestBlockEdge(const Cell* cell, const Point& legal_pt, const Rect& block_bbox) const; @@ -475,42 +465,34 @@ class Opendp Pixel* gridPixel(int grid_idx, int x, int y) const; // Cell initial location wrt core origin. - int getSiteWidth(const Cell* cell) const; int getRowCount(const Cell* cell) const; int getRowCount(int row_height) const; - int gridPaddedWidth(const Cell* cell, int site_width) const; int gridPaddedWidth(const Cell* cell) const; int64_t paddedArea(const Cell* cell) const; int coordinateToHeight(int y_coordinate, GridMapKey gmk) const; int gridNearestHeight(const Cell* cell) const; int gridNearestHeight(const Cell* cell, int row_height) const; int gridNearestWidth(const Cell* cell) const; - int gridNearestWidth(const Cell* cell, int site_width) const; int gridHeight(const Cell* cell) const; GridInfo getGridInfo(const Cell* cell) const; - int gridX(int x, int site_width) const; + int gridX(int x) const; int gridX(const Cell* cell) const; - int gridX(const Cell* cell, int site_width) const; int gridPaddedX(const Cell* cell) const; - int gridPaddedX(const Cell* cell, int site_width) const; int gridY(int y, const Cell* cell) const; int gridY(const Cell* cell) const; pair<int, int> gridY(int y, const dbSite::RowPattern& grid_sites) const; pair<int, int> gridEndY(int y, const dbSite::RowPattern& grid_sites) const; int gridPaddedEndX(const Cell* cell) const; - int gridPaddedEndX(const Cell* cell, int site_width) const; - int gridEndX(int x, int site_width) const; + int gridEndX(int x) const; int gridEndX(const Cell* cell) const; - int gridEndX(const Cell* cell, int site_width) const; int gridEndY(int y, const Cell* cell) const; int gridEndY(const Cell* cell) const; - void setGridPaddedLoc(Cell* cell, int x, int y, int site_width) const; + void setGridPaddedLoc(Cell* cell, int x, int y) const; std::pair<int, GridInfo> getRowInfo(const Cell* cell) const; // Lower left corner in core coordinates. Point initialLocation(const Cell* cell, bool padded) const; bool isStdCell(const Cell* cell) const; static bool isBlock(const Cell* cell); - int paddedWidth(const Cell* cell, int site_width) const; int paddedWidth(const Cell* cell) const; bool isPaddedType(dbInst* inst) const; int padLeft(const Cell* cell) const; diff --git a/src/dpl/src/CheckPlacement.cpp b/src/dpl/src/CheckPlacement.cpp index 0254f70c03e..5f310355bb8 100644 --- a/src/dpl/src/CheckPlacement.cpp +++ b/src/dpl/src/CheckPlacement.cpp @@ -330,9 +330,8 @@ bool Opendp::isPlaced(const Cell* cell) bool Opendp::checkInRows(const Cell& cell) const { auto grid_info = getRowInfo(&cell); - int site_width = getSiteWidth(&cell); - int x_ll = gridX(&cell, site_width); - int x_ur = gridEndX(&cell, site_width); + int x_ll = gridX(&cell); + int x_ur = gridEndX(&cell); int y_ll = gridY(&cell); int y_ur = gridEndY(&cell); debugPrint(logger_, diff --git a/src/dpl/src/Grid.cpp b/src/dpl/src/Grid.cpp index aade9addcd9..2520c9f2de6 100644 --- a/src/dpl/src/Grid.cpp +++ b/src/dpl/src/Grid.cpp @@ -418,8 +418,8 @@ void Opendp::visitCellPixels( Rect rect = obs->getBox(); inst->getTransform().apply(rect); - int x_start = gridX(rect.xMin() - core_.xMin(), site_width_); - int x_end = gridEndX(rect.xMax() - core_.xMin(), site_width_); + int x_start = gridX(rect.xMin() - core_.xMin()); + int x_end = gridEndX(rect.xMax() - core_.xMin()); int y_start = gridY(rect.yMin() - core_.yMin(), &cell); int y_end = gridEndY(rect.yMax() - core_.yMin(), &cell); @@ -447,10 +447,8 @@ void Opendp::visitCellPixels( } } if (!have_obstructions) { - int x_start - = padded ? gridPaddedX(&cell, site_width_) : gridX(&cell, site_width_); - int x_end = padded ? gridPaddedEndX(&cell, site_width_) - : gridEndX(&cell, site_width_); + int x_start = padded ? gridPaddedX(&cell) : gridX(&cell); + int x_end = padded ? gridPaddedEndX(&cell) : gridEndX(&cell); int y_start = gridY(&cell); int y_end = gridEndY(&cell); auto src_gmk = getGridMapKey(&cell); @@ -486,7 +484,6 @@ void Opendp::visitCellBoundaryPixels( void(Pixel* pixel, odb::Direction2D edge, int x, int y)>& visitor) const { dbInst* inst = cell.db_inst_; - int site_width = getSiteWidth(&cell); const GridMapKey& gmk = getGridMapKey(&cell); GridInfo grid_info = grid_info_map_.at(gmk); const int index_in_grid = grid_info.getGridIndex(); @@ -502,8 +499,8 @@ void Opendp::visitCellBoundaryPixels( Rect rect = obs->getBox(); inst->getTransform().apply(rect); - int x_start = gridX(rect.xMin() - core_.xMin(), site_width); - int x_end = gridEndX(rect.xMax() - core_.xMin(), site_width); + int x_start = gridX(rect.xMin() - core_.xMin()); + int x_end = gridEndX(rect.xMax() - core_.xMin()); int y_start = gridY(rect.yMin() - core_.yMin(), grid_sites).first; int y_end = gridEndY(rect.yMax() - core_.yMin(), grid_sites).first; for (int x = x_start; x < x_end; x++) { @@ -596,12 +593,10 @@ void Opendp::groupAssignCellRegions() { for (Group& group : groups_) { int64_t site_count = 0; - int site_width = site_width_; int row_height = row_height_; if (!group.cells_.empty()) { auto group_cell = group.cells_.at(0); - site_width = getSiteWidth(group_cell); - int max_row_site_count = divFloor(core_.dx(), site_width); + int max_row_site_count = divFloor(core_.dx(), site_width_); row_height = getRowHeight(group_cell); int row_count = divFloor(core_.dy(), row_height); auto gmk = getGridMapKey(group_cell); @@ -616,7 +611,7 @@ void Opendp::groupAssignCellRegions() } } } - int64_t site_area = site_count * site_width * row_height; + int64_t site_area = site_count * site_width_ * row_height; int64_t cell_area = 0; for (Cell* cell : group.cells_) { @@ -697,7 +692,6 @@ void Opendp::groupInitPixels() continue; } int row_height = group.cells_[0]->height_; - int site_width = getSiteWidth(group.cells_[0]); GridMapKey gmk = getGridMapKey(group.cells_[0]); GridInfo& grid_info = grid_info_map_.at(gmk); int grid_index = grid_info.getGridIndex(); @@ -716,22 +710,22 @@ void Opendp::groupInitPixels() int row_end = divFloor(rect.yMax(), row_height); for (int k = row_start; k < row_end; k++) { - int col_start = divCeil(rect.xMin(), site_width); - int col_end = divFloor(rect.xMax(), site_width); + int col_start = divCeil(rect.xMin(), site_width_); + int col_end = divFloor(rect.xMax(), site_width_); for (int l = col_start; l < col_end; l++) { Pixel* pixel = gridPixel(grid_index, l, k); pixel->util += 1.0; } - if (rect.xMin() % site_width != 0) { + if (rect.xMin() % site_width_ != 0) { Pixel* pixel = gridPixel(grid_index, col_start, k); pixel->util - -= (rect.xMin() % site_width) / static_cast<double>(site_width); + -= (rect.xMin() % site_width_) / static_cast<double>(site_width_); } - if (rect.xMax() % site_width != 0) { + if (rect.xMax() % site_width_ != 0) { Pixel* pixel = gridPixel(grid_index, col_end - 1, k); - pixel->util -= ((site_width - rect.xMax()) % site_width) - / static_cast<double>(site_width); + pixel->util -= ((site_width_ - rect.xMax()) % site_width_) + / static_cast<double>(site_width_); } } } @@ -740,8 +734,8 @@ void Opendp::groupInitPixels() int row_end = divFloor(rect.yMax(), row_height); for (int k = row_start; k < row_end; k++) { - int col_start = divCeil(rect.xMin(), site_width); - int col_end = divFloor(rect.xMax(), site_width); + int col_start = divCeil(rect.xMin(), site_width_); + int col_end = divFloor(rect.xMax(), site_width_); // Assign group to each pixel. for (int l = col_start; l < col_end; l++) { @@ -765,8 +759,7 @@ void Opendp::erasePixel(Cell* cell) { if (!(isFixed(cell) || !cell->is_placed_)) { auto gmk = getGridMapKey(cell); - int site_width = getSiteWidth(cell); - int x_end = gridPaddedEndX(cell, site_width); + int x_end = gridPaddedEndX(cell); int y_end = gridEndY(cell); debugPrint(logger_, DPL, @@ -794,7 +787,7 @@ void Opendp::erasePixel(Cell* cell) ++layer_y_end; } - for (int x = gridPaddedX(cell, site_width); x < x_end; x++) { + for (int x = gridPaddedX(cell); x < x_end; x++) { for (int y = layer_y_start; y < layer_y_end; y++) { Pixel* pixel = gridPixel(target_grid_info.getGridIndex(), x, y); if (nullptr == pixel) { @@ -860,11 +853,10 @@ void Opendp::paintPixel(Cell* cell, int grid_x, int grid_y) int x_end = grid_x + gridPaddedWidth(cell); int grid_height = gridHeight(cell); int y_end = grid_y + grid_height; - int site_width = getSiteWidth(cell); GridMapKey gmk = getGridMapKey(cell); GridInfo grid_info = grid_info_map_.at(gmk); const int index_in_grid = gmk.grid_index; - setGridPaddedLoc(cell, grid_x, grid_y, site_width); + setGridPaddedLoc(cell, grid_x, grid_y); cell->is_placed_ = true; for (int x = grid_x; x < x_end; x++) { for (int y = grid_y; y < y_end; y++) { diff --git a/src/dpl/src/Opendp.cpp b/src/dpl/src/Opendp.cpp index 501ba0c5d5a..d2fe596eab8 100644 --- a/src/dpl/src/Opendp.cpp +++ b/src/dpl/src/Opendp.cpp @@ -273,10 +273,9 @@ Point Opendp::initialLocation(const Cell* cell, bool padded) const { int loc_x, loc_y; cell->db_inst_->getLocation(loc_x, loc_y); - int site_width = getSiteWidth(cell); loc_x -= core_.xMin(); if (padded) { - loc_x -= padLeft(cell) * site_width; + loc_x -= padLeft(cell) * site_width_; } loc_y -= core_.yMin(); return Point(loc_x, loc_y); @@ -446,26 +445,14 @@ int Opendp::padRight(dbInst* inst) const return 0; } -int Opendp::paddedWidth(const Cell* cell, int site_width) const -{ - return cell->width_ + (padLeft(cell) + padRight(cell)) * site_width; -} - int Opendp::paddedWidth(const Cell* cell) const { - int site_width = getSiteWidth(cell); - return cell->width_ + (padLeft(cell) + padRight(cell)) * site_width; -} - -int Opendp::gridPaddedWidth(const Cell* cell, int site_width) const -{ - return divCeil(paddedWidth(cell), site_width); + return cell->width_ + (padLeft(cell) + padRight(cell)) * site_width_; } int Opendp::gridPaddedWidth(const Cell* cell) const { - int site_width = getSiteWidth(cell); - return divCeil(paddedWidth(cell), site_width); + return divCeil(paddedWidth(cell), site_width_); } int Opendp::coordinateToHeight(int y_coordinate, GridMapKey gmk) const @@ -502,16 +489,9 @@ int64_t Opendp::paddedArea(const Cell* cell) const return int64_t(paddedWidth(cell)) * cell->height_; } -// Callers should probably be using gridPaddedWidth. -int Opendp::gridNearestWidth(const Cell* cell, int site_width) const -{ - return divRound(paddedWidth(cell), site_width); -} - int Opendp::gridNearestWidth(const Cell* cell) const { - int site_width = getSiteWidth(cell); - return divRound(paddedWidth(cell), site_width); + return divRound(paddedWidth(cell), site_width_); } // Callers should probably be using gridHeight. @@ -526,35 +506,24 @@ int Opendp::gridNearestHeight(const Cell* cell) const return divRound(cell->height_, row_height); } -int Opendp::gridEndX(int x, int site_width) const -{ - return divCeil(x, site_width); -} - -int Opendp::gridX(int x, int site_width) const +int Opendp::gridEndX(int x) const { - return x / site_width; + return divCeil(x, site_width_); } -int Opendp::gridX(const Cell* cell, int site_width) const +int Opendp::gridX(int x) const { - return gridX(cell->x_, site_width); + return x / site_width_; } int Opendp::gridX(const Cell* cell) const { - return gridX(cell->x_, getSiteWidth(cell)); + return gridX(cell->x_); } int Opendp::gridPaddedX(const Cell* cell) const { - return gridX(cell->x_ - padLeft(cell) * getSiteWidth(cell), - getSiteWidth(cell)); -} - -int Opendp::gridPaddedX(const Cell* cell, int site_width) const -{ - return gridX(cell->x_ - padLeft(cell) * site_width, site_width); + return gridX(cell->x_ - padLeft(cell) * site_width_); } int Opendp::getRowCount(const Cell* cell) const @@ -625,13 +594,6 @@ GridInfo Opendp::getGridInfo(const Cell* cell) const return grid_info_map_.at(getGridMapKey(cell)); } -int Opendp::getSiteWidth(const Cell* cell) const -{ - // TODO: this is not complete, it is here so that future changes to the code - // are easier - return site_width_; -} - pair<int, int> Opendp::gridY(int y, const dbSite::RowPattern& grid_sites) const { int sum_heights @@ -695,9 +657,9 @@ int Opendp::gridY(const int y, const Cell* cell) const return y / getRowHeight(cell); } -void Opendp::setGridPaddedLoc(Cell* cell, int x, int y, int site_width) const +void Opendp::setGridPaddedLoc(Cell* cell, int x, int y) const { - cell->x_ = (x + padLeft(cell)) * site_width; + cell->x_ = (x + padLeft(cell)) * site_width_; if (cell->isHybrid()) { auto grid_info = grid_info_map_.at(getGridMapKey(cell)); int total_sites_height = grid_info.getSitesTotalHeight(); @@ -726,28 +688,15 @@ void Opendp::setGridPaddedLoc(Cell* cell, int x, int y, int site_width) const cell->y_ = y * getRowHeight(cell); } -int Opendp::gridPaddedEndX(const Cell* cell, int site_width) const -{ - return divCeil(cell->x_ + cell->width_ + padRight(cell) * site_width, - site_width); -} - int Opendp::gridPaddedEndX(const Cell* cell) const { - int site_width = getSiteWidth(cell); - return divCeil(cell->x_ + cell->width_ + padRight(cell) * site_width, - site_width); -} - -int Opendp::gridEndX(const Cell* cell, int site_width) const -{ - return divCeil(cell->x_ + cell->width_, site_width); + return divCeil(cell->x_ + cell->width_ + padRight(cell) * site_width_, + site_width_); } int Opendp::gridEndX(const Cell* cell) const { - int site_width = getSiteWidth(cell); - return divCeil(cell->x_ + cell->width_, site_width); + return divCeil(cell->x_ + cell->width_, site_width_); } int Opendp::gridEndY(const Cell* cell) const diff --git a/src/dpl/src/Place.cpp b/src/dpl/src/Place.cpp index ca90925b9bd..584b820a2ca 100644 --- a/src/dpl/src/Place.cpp +++ b/src/dpl/src/Place.cpp @@ -619,7 +619,6 @@ void Opendp::shiftMove(Cell* cell) int grid_x = grid_pt.getX(); int grid_y = grid_pt.getY(); int row_height = getRowHeight(cell); - int site_width = getSiteWidth(cell); GridMapKey grid_key = getGridMapKey(cell); auto grid_mapped_entry = grid_info_map_.find(grid_key); if (grid_mapped_entry == grid_info_map_.end()) { @@ -629,7 +628,7 @@ void Opendp::shiftMove(Cell* cell) int grid_index = grid_mapped_entry->second.getGridIndex(); // magic number alert int boundary_margin = 3; - int margin_width = gridPaddedWidth(cell, site_width) * boundary_margin; + int margin_width = gridPaddedWidth(cell) * boundary_margin; std::set<Cell*> region_cells; for (int x = grid_x - margin_width; x < grid_x + margin_width; x++) { for (int y = grid_y - boundary_margin; y < grid_y + boundary_margin; y++) { @@ -690,8 +689,7 @@ bool Opendp::swapCells(Cell* cell1, Cell* cell2) bool Opendp::refineMove(Cell* cell) { int row_height = getRowHeight(cell); - int site_width = getSiteWidth(cell); - Point grid_pt = legalGridPt(cell, true, row_height, site_width); + Point grid_pt = legalGridPt(cell, true, row_height); int grid_x = grid_pt.getX(); int grid_y = grid_pt.getY(); PixelPt pixel_pt = diamondSearch(cell, grid_x, grid_y); @@ -707,8 +705,9 @@ bool Opendp::refineMove(Cell* cell) return false; } - int dist_change = distChange( - cell, pixel_pt.pt.getX() * site_width, pixel_pt.pt.getY() * row_height); + int dist_change = distChange(cell, + pixel_pt.pt.getX() * site_width_, + pixel_pt.pt.getY() * row_height); if (dist_change < 0) { erasePixel(cell); @@ -753,15 +752,14 @@ PixelPt Opendp::diamondSearch(const Cell* cell, int y_max = y + scaled_max_displacement_y_; auto [row_height, grid_info] = getRowInfo(cell); - int site_width = getSiteWidth(cell); // Restrict search to group boundary. Group* group = cell->group_; if (group) { // Map boundary to grid staying inside. - Rect grid_boundary(divCeil(group->boundary.xMin(), site_width), + Rect grid_boundary(divCeil(group->boundary.xMin(), site_width_), divCeil(group->boundary.yMin(), row_height), - group->boundary.xMax() / site_width, + group->boundary.xMax() / site_width_, group->boundary.yMax() / row_height); Point min = grid_boundary.closestPtInside(Point(x_min, y_min)); Point max = grid_boundary.closestPtInside(Point(x_max, y_max)); @@ -877,7 +875,7 @@ void Opendp::diamondSearchSide(const Cell* cell, } else { y_dist = abs(y - avail_pt.pt.getY()) * getRowHeight(cell); } - int avail_dist = abs(x - avail_pt.pt.getX()) * getSiteWidth(cell) + y_dist; + int avail_dist = abs(x - avail_pt.pt.getX()) * getSiteWidth() + y_dist; if (best_pt.pixel == nullptr || avail_dist < best_dist) { best_pt = avail_pt; best_dist = avail_dist; @@ -1107,10 +1105,7 @@ bool Opendp::checkPixels(const Cell* cell, // Legalize cell origin // inside the core // row site -Point Opendp::legalPt(const Cell* cell, - const Point& pt, - int row_height, - int site_width) const +Point Opendp::legalPt(const Cell* cell, const Point& pt, int row_height) const { // Move inside core. if (row_height == -1) { @@ -1122,14 +1117,11 @@ Point Opendp::legalPt(const Cell* cell, DPL, 19, "Cannot find grid info for row height {}.", row_height); } auto grid_info = grid_mapped_entry->second; - if (site_width == -1) { - site_width = getSiteWidth(cell); - } int core_x = min(max(0, pt.getX()), - grid_info.getSiteCount() * site_width - cell->width_); + grid_info.getSiteCount() * site_width_ - cell->width_); // Align with row site. - int grid_x = divRound(core_x, site_width); - int legal_x = grid_x * site_width; + int grid_x = divRound(core_x, site_width_); + int legal_x = grid_x * site_width_; int legal_y = 0; if (cell->isHybrid()) { int index(0), height(0); @@ -1155,17 +1147,13 @@ Point Opendp::legalPt(const Cell* cell, Point Opendp::legalGridPt(const Cell* cell, const Point& pt, - int row_height, - int site_width) const + int row_height) const { - if (site_width == -1) { - site_width = getSiteWidth(cell); - } if (row_height == -1) { row_height = getRowHeight(cell); } - Point legal = legalPt(cell, pt, row_height, site_width); - return Point(gridX(legal.getX(), site_width), gridY(legal.getY(), cell)); + Point legal = legalPt(cell, pt, row_height); + return Point(gridX(legal.getX()), gridY(legal.getY(), cell)); } Point Opendp::nearestBlockEdge(const Cell* cell, @@ -1175,7 +1163,6 @@ Point Opendp::nearestBlockEdge(const Cell* cell, const int legal_x = legal_pt.getX(); const int legal_y = legal_pt.getY(); const int row_height = getRowHeight(cell); - const int site_width = getSiteWidth(cell); const int x_min_dist = abs(legal_x - block_bbox.xMin()); const int x_max_dist = abs(block_bbox.xMax() - (legal_x + cell->width_)); const int y_min_dist = abs(legal_y - block_bbox.yMin()); @@ -1185,16 +1172,12 @@ Point Opendp::nearestBlockEdge(const Cell* cell, // left of block return legalPt(cell, Point(block_bbox.xMin() - cell->width_, legal_pt.getY()), - row_height, - site_width); + row_height); } if (x_max_dist <= x_min_dist && x_max_dist <= y_min_dist && x_max_dist <= y_max_dist) { // right of block - return legalPt(cell, - Point(block_bbox.xMax(), legal_pt.getY()), - row_height, - site_width); + return legalPt(cell, Point(block_bbox.xMax(), legal_pt.getY()), row_height); } if (y_min_dist <= x_min_dist && y_min_dist <= x_max_dist && y_min_dist <= y_max_dist) { @@ -1203,15 +1186,13 @@ Point Opendp::nearestBlockEdge(const Cell* cell, Point(legal_pt.getX(), divFloor(block_bbox.yMin(), row_height) * row_height - cell->height_), - row_height, - site_width); + row_height); } // above block return legalPt(cell, Point(legal_pt.getX(), divCeil(block_bbox.yMax(), row_height) * row_height), - row_height, - site_width); + row_height); } // Find the nearest valid site left/right/above/below, if any. @@ -1223,7 +1204,6 @@ bool Opendp::moveHopeless(const Cell* cell, int& grid_x, int& grid_y) const int best_x = grid_x; int best_y = grid_y; int best_dist = std::numeric_limits<int>::max(); - int site_width = getSiteWidth(cell); auto [row_height, grid_info] = getRowInfo(cell); int grid_index = grid_info.getGridIndex(); int layer_site_count = grid_info.getSiteCount(); @@ -1234,7 +1214,7 @@ bool Opendp::moveHopeless(const Cell* cell, int& grid_x, int& grid_y) const // this initialization for (int x = grid_x - 1; x >= 0; --x) { // left if (grid_[grid_index][grid_y][x].is_valid) { - best_dist = (grid_x - x - 1) * site_width; + best_dist = (grid_x - x - 1) * site_width_; best_x = x; best_y = grid_y; break; @@ -1242,7 +1222,7 @@ bool Opendp::moveHopeless(const Cell* cell, int& grid_x, int& grid_y) const } for (int x = grid_x + 1; x < layer_site_count; ++x) { // right if (grid_[grid_index][grid_y][x].is_valid) { - const int dist = (x - grid_x) * site_width - cell->width_; + const int dist = (x - grid_x) * site_width_ - cell->width_; if (dist < best_dist) { best_dist = dist; best_x = x; @@ -1307,20 +1287,18 @@ Point Opendp::pointOffMacro(const Cell& cell) Point init = initialLocation(&cell, false); int init_x = init.getX(); int init_y = init.getY(); - int site_width = site_width_; auto grid_info = getGridInfo(&cell); - Pixel* pixel1 = gridPixel(grid_info.getGridIndex(), - gridX(init_x, site_width), - gridY(init_y, &cell)); + Pixel* pixel1 = gridPixel( + grid_info.getGridIndex(), gridX(init_x), gridY(init_y, &cell)); Pixel* pixel2 = gridPixel(grid_info.getGridIndex(), - gridX(init_x + cell.width_, site_width), + gridX(init_x + cell.width_), gridY(init_y, &cell)); Pixel* pixel3 = gridPixel(grid_info.getGridIndex(), - gridX(init_x, site_width), + gridX(init_x), gridY(init_y + cell.height_, &cell)); Pixel* pixel4 = gridPixel(grid_info.getGridIndex(), - gridX(init_x + cell.width_, site_width), + gridX(init_x + cell.width_), gridY(init_y + cell.height_, &cell)); Cell* block = nullptr; @@ -1366,10 +1344,9 @@ void Opendp::legalCellPos(dbInst* db_inst) // transform to grid Pos for align const Point legal_grid_pt - = Point(gridX(new_pos.getX(), site_width_), gridY(new_pos.getY(), &cell)); + = Point(gridX(new_pos.getX()), gridY(new_pos.getY(), &cell)); // Transform position on real position - setGridPaddedLoc( - &cell, legal_grid_pt.getX(), legal_grid_pt.getY(), site_width_); + setGridPaddedLoc(&cell, legal_grid_pt.getX(), legal_grid_pt.getY()); // Set position of cell on db db_inst->setLocation(core_.xMin() + cell.x_, core_.yMin() + cell.y_); } @@ -1379,10 +1356,7 @@ void Opendp::legalCellPos(dbInst* db_inst) // row site // not on top of a macro // not in a hopeless site -Point Opendp::legalPt(const Cell* cell, - bool padded, - int row_height, - int site_width) const +Point Opendp::legalPt(const Cell* cell, bool padded, int row_height) const { if (isFixed(cell)) { logger_->critical(DPL, 26, "legalPt called on fixed cell."); @@ -1391,14 +1365,11 @@ Point Opendp::legalPt(const Cell* cell, if (row_height == -1) { row_height = getRowHeight(cell); } - if (site_width == -1) { - site_width = getSiteWidth(cell); - } Point init = initialLocation(cell, padded); - Point legal_pt = legalPt(cell, init, row_height, site_width); + Point legal_pt = legalPt(cell, init, row_height); auto grid_info = getGridInfo(cell); - int grid_x = gridX(legal_pt.getX(), site_width); + int grid_x = gridX(legal_pt.getX()); int grid_y, height; int y = legal_pt.getY() + grid_info.getOffset(); std::tie(grid_y, height) = gridY(y, grid_info.getSites()); @@ -1406,7 +1377,7 @@ Point Opendp::legalPt(const Cell* cell, if (pixel) { // Move std cells off of macros. First try the is_hopeless strategy if (pixel->is_hopeless && moveHopeless(cell, grid_x, grid_y)) { - legal_pt = Point(grid_x * site_width, grid_y * row_height); + legal_pt = Point(grid_x * site_width_, grid_y * row_height); pixel = gridPixel(grid_info.getGridIndex(), grid_x, grid_y); } @@ -1434,19 +1405,13 @@ Point Opendp::legalPt(const Cell* cell, return legal_pt; } -Point Opendp::legalGridPt(const Cell* cell, - bool padded, - int row_height, - int site_width) const +Point Opendp::legalGridPt(const Cell* cell, bool padded, int row_height) const { - if (site_width == -1) { - site_width = getSiteWidth(cell); - } if (row_height == -1) { row_height = getRowHeight(cell); } - Point pt = legalPt(cell, padded, row_height, site_width); - return Point(gridX(pt.getX(), site_width), gridY(pt.getY(), cell)); + Point pt = legalPt(cell, padded, row_height); + return Point(gridX(pt.getX()), gridY(pt.getY(), cell)); } ////////////////////////////////////////////////////////////////