From 74d0de3b74cdf5d41eacd588d69488290549fd7e Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 28 Dec 2013 12:14:47 +0100 Subject: [PATCH] Updated manual/command-reference-manual.tex --- backends/ilang/ilang_backend.cc | 2 +- manual/command-reference-manual.tex | 142 ++++++++++++++++++++++++++-- 2 files changed, 137 insertions(+), 7 deletions(-) diff --git a/backends/ilang/ilang_backend.cc b/backends/ilang/ilang_backend.cc index 66775b2a5..924e316bc 100644 --- a/backends/ilang/ilang_backend.cc +++ b/backends/ilang/ilang_backend.cc @@ -402,7 +402,7 @@ struct DumpPass : public Pass { log("ilang format.\n"); log("\n"); log(" -m\n"); - log(" also dump the module headers, even if only parts of a single"); + log(" also dump the module headers, even if only parts of a single\n"); log(" module is selected\n"); log("\n"); log(" -n\n"); diff --git a/manual/command-reference-manual.tex b/manual/command-reference-manual.tex index 1c91cb66e..54fec542a 100644 --- a/manual/command-reference-manual.tex +++ b/manual/command-reference-manual.tex @@ -131,6 +131,13 @@ first run this pass and then map the logic paths to the target technology. Write the selected parts of the design to the console or specified file in ilang format. + -m + also dump the module headers, even if only parts of a single + module is selected + + -n + only dump the module headers if the entire module is selected + -outfile Write to the specified file. \end{lstlisting} @@ -146,6 +153,12 @@ inputs. -set set the specified signal to the specified value. + -set-undef + set all unspecified source signals to undef (x) + + -table + create a truth table using the specified input signals + -show show the value for the specified signal. if no -show option is passed then all output ports of the current module are used. @@ -423,6 +436,10 @@ needed. use the specified top module to built a design hierarchy. modules outside this tree (unused modules) are removed. + when the -top option is used, the 'top' attribute will be set on the + specified top module. otherwise a module with the 'top' attribute set + will implicitly be used as top module, if such a module exists. + In -generate mode this pass generates blackbox modules for the given cell types (wildcards supported). For this the design is searched for cells that match the given types and then the given port declarations are used to @@ -440,6 +457,16 @@ This pass ignores the current selection and always operates on all modules in the current design. \end{lstlisting} +\section{history -- show last interactive commands} +\label{cmd:history} +\begin{lstlisting}[numbers=left,frame=single] + history + +This command prints all commands in the shell history buffer. This are +all commands executed in an interactive session, but not the commands +from executed scripts. +\end{lstlisting} + \section{iopadmap -- technology mapping of i/o pads (or buffers)} \label{cmd:iopadmap} \begin{lstlisting}[numbers=left,frame=single] @@ -469,11 +496,17 @@ the resulting cells to more sophisticated PAD cells. \section{ls -- list modules or objects in modules} \label{cmd:ls} \begin{lstlisting}[numbers=left,frame=single] - ls + ls [pattern] -When no active module is selected, this prints a list of all module. +When no active module is selected, this prints a list of all modules. When an active module is selected, this prints a list of objects in the module. + +If a pattern is given, the objects matching the pattern are printed + +Note that this command does not use the selection mechanism and always operates +on the whole design or whole active module. Use 'select -list' to show a list +of currently selected objects. \end{lstlisting} \section{memory -- translate memories to basic cells} @@ -761,6 +794,10 @@ Verilog-2005 is supported. don't perform basic optimizations (such as const folding) in the high-level front-end. + -ignore_redef + ignore re-definitions of modules. (the default behavior is to + create an error message.) + -Dname[=definition] define the preprocessor symbol 'name' and set its optional value 'definition' @@ -800,9 +837,29 @@ and additional constraints passed as parameters. -max like -all, but limit number of solutions to + -enable_undef + enable modeling of undef value (aka 'x-bits') + this option is implied by -set-def, -set-undef et. cetera + + -max_undef + maximize the number of undef bits in solutions, giving a better + picture of which input bits are actually vital to the solution. + -set set the specified signal to the specified value. + -set-def + add a constraint that all bits of the given signal must be defined + + -set-any-undef + add a constraint that at least one bit of the given signal is undefined + + -set-all-undef + add a constraint that all bits of the given signal are undefined + + -set-def-inputs + add -set-def constraints for all module inputs + -show show the model for the specified signal. if no -show option is passed then a set of signals to be shown is automatically selected. @@ -821,6 +878,17 @@ The following options can be used to set up a sequential problem: set or unset the specified signal to the specified value in the given timestep. this has priority over a -set for the same signal. + -set-def-at + -set-any-undef-at + -set-all-undef-at + add undef contraints in the given timestep. + + -set-init + set the initial value for the register driving the signal to the value + + -set-init-undef + set all initial states (not set using -set-init) to undef + The following additional options can be used to set up a proof. If also -seq is passed, a temporal induction proof is performed. @@ -829,6 +897,10 @@ is passed, a temporal induction proof is performed. induction proof it is proven that the condition holds forever after the number of time steps passed using -seq. + -prove-x + Like -prove, but an undef (x) bit in the lhs matches any value on + the right hand side. Useful for equivialence checking. + -maxsteps Set a maximum length for the induction. @@ -1108,6 +1180,15 @@ to a graphics file (usually SVG or PostScript). stretch the graph so all inputs are on the left side and all outputs (including inout ports) are on the right side. + -pause + wait for the use to press enter to before returning + + -enum + enumerate objects with internal ($-prefixed) names + + -long + do not abbeviate objects with internal ($-prefixed) names + When no is specified, SVG is used. When no and is specified, 'yosys-svgviewer' is used to display the schematic. @@ -1115,6 +1196,20 @@ The generated output files are '~/.yosys_show.dot' and '~/.yosys_show.', unless another prefix is specified using -prefix . \end{lstlisting} +\section{simplemap -- mapping simple coarse-grain cells} +\label{cmd:simplemap} +\begin{lstlisting}[numbers=left,frame=single] + simplemap [selection] + +This pass maps a small selection of simple coarse-grain cells to yosys gate +primitives. The following internal cell types are mapped by this pass: + + $not, $pos, $bu0, $and, $or, $xor, $xnor + $reduce_and, $reduce_or, $reduce_xor, $reduce_xnor, $reduce_bool + $logic_not, $logic_and, $logic_or, $mux + $sr, $dff, $dffsr, $adff, $dlatch +\end{lstlisting} + \section{splitnets -- split up multi-bit nets} \label{cmd:splitnets} \begin{lstlisting}[numbers=left,frame=single] @@ -1131,6 +1226,20 @@ This command splits multi-bit nets into single-bit nets. also split module ports. per default only internal signals are split. \end{lstlisting} +\section{stat -- print some statistics} +\label{cmd:stat} +\begin{lstlisting}[numbers=left,frame=single] + stat [options] [selection] + +Print some statistics (number of objects) on the selected portion of the +design. + + -top + print design hierarchy with this module as top. if the design is fully + selected and a module has the 'top' attribute set, this module is used + default value for this option. +\end{lstlisting} + \section{submod -- moving part of a module to a new submodule} \label{cmd:submod} \begin{lstlisting}[numbers=left,frame=single] @@ -1202,7 +1311,7 @@ The following commands are executed by this synthesis command: clean map_cells: - techmap -map /xilinx/cells.v + techmap -share_map xilinx/cells.v clean clkbuf: @@ -1214,7 +1323,7 @@ The following commands are executed by this synthesis command: iopadmap -outpad OBUF I:O -inpad IBUF O:I @xilinx_nonclocks edif: - write_edif -top synth.edif + write_edif synth.edif \end{lstlisting} \section{tcl -- execute a TCL script file} @@ -1246,12 +1355,26 @@ file. transforms the internal RTL cells to the internal gate library. + -share_map filename + like -map, but look for the file in the share directory (where the + yosys data files are). this is mainly used internally when techmap + is called from other commands. + + -D , -I + this options are passed as-is to the verilog frontend for loading the + map file. Note that the verilog frontend is also called with the + '-ignore_redef' option set. + When a module in the map file has the 'techmap_celltype' attribute set, it will -match cells with a type that match the text value of this attribute. +match cells with a type that match the text value of this attribute. Otherwise +the module name will be used to match the cell. + +When a module in the map file has the 'techmap_simplemap' attribute set, techmap +will use 'simplemap' (see 'help simplemap') to map cells matching the module. All wires in the modules from the map file matching the pattern _TECHMAP_* or *._TECHMAP_* are special wires that are used to pass instructions from -the mapping module to the techmap command. At the moment the following spoecial +the mapping module to the techmap command. At the moment the following special wires are supported: _TECHMAP_FAIL_ @@ -1273,6 +1396,13 @@ wires are supported: wire to start out as non-constant and evaluate to a constant value during processing of other _TECHMAP_DO_* commands. +In addition to this special wires, techmap also supports special parameters in +modules in the map file: + + _TECHMAP_CELLTYPE_ + When a parameter with this name exists, it will be set to the type name + of the cell that matches the module. + When a module in the map file has a parameter where the according cell in the design has a port, the module from the map file is only used if the port in the design is connected to a constant value. The parameter is then set to the