From 278b54227339099faf93301cfd4a6b566651441b Mon Sep 17 00:00:00 2001 From: Robert Baruch Date: Tue, 24 Nov 2020 15:27:30 -0800 Subject: [PATCH] Cleans up some descriptions and syntax Now all rules ending in "-stmt" end in eol. --- manual/CHAPTER_TextRtlil.tex | 68 +++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 25 deletions(-) diff --git a/manual/CHAPTER_TextRtlil.tex b/manual/CHAPTER_TextRtlil.tex index e84235398..720fe8fa1 100644 --- a/manual/CHAPTER_TextRtlil.tex +++ b/manual/CHAPTER_TextRtlil.tex @@ -87,33 +87,35 @@ A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end o \section{File} -A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement. +A file consists of zero or more modules, attribute statements, and auto-index statements. All statements terminate in an end-of-line. Because of this, statements cannot contain end-of-lines. -Note that in general, statements are terminated by an end of line. +Attributes at the file level are applied to the following module. \begin{indentgrammar}{} - ::= $*$ - - ::= | | + ::= ( | | )$*$ \end{indentgrammar} \subsection{Modules} -A module consists of zero or more module statements. +Declares a module consisting of zero or more attributes, wires, memories, cells, processes, and connections. + +\begin{indentgrammar}{} + ::= -\begin{indentgrammar}{} - ::= "module" $*$ "end" + ::= "module" - ::= - + ::= +( \alt \alt \alt - \alt - \alt - \alt + \alt + \alt + \alt )$*$ \end{indentgrammar} + ::= "end" + \subsection{Signal specifications} A signal is anything that can be applied to a cell port, i.e. a constant value, all bits or a selection of bits from a wire, or concatenations of those. @@ -138,7 +140,7 @@ Declares a connection between the given signals. \subsection{Attribute statements} -Declares an attribute with the given identifier and value for the following non-attribute statement. +Declares an attribute with the given identifier and value. Attributes at the file level apply to the following module. Attributes within a module apply to the following non-attribute statement. \begin{indentgrammar}{} ::= "attribute" @@ -198,14 +200,16 @@ See Sec.~\ref{sec:rtlil_memory} for an overview of memory cells, and Sec.~\ref{s \alt "offset" \end{indentgrammar} -\subsection{Cell statements} +\subsection{Cells} Declares a cell with the given identifier in the enclosing module. See Chap.~\ref{chapter:celllib} for a detailed list of cell types. \begin{indentgrammar}{} - ::= "cell" "end" + ::= + + ::= "cell" ::= @@ -214,6 +218,8 @@ See Chap.~\ref{chapter:celllib} for a detailed list of cell types. ::= "parameter" ("signed" | "real")$?$ \alt "connect" + + ::= "end" \end{indentgrammar} \subsection{Process statements} @@ -222,22 +228,34 @@ Declares a process with the given identifier in the enclosing module. See Sec.~\ref{sec:rtlil_process} for an overview of processes. -\begin{indentgrammar}{} - ::= "process" $*$ $*$ "end" +\begin{indentgrammar}{} + ::= $*$ + + ::= "process" - ::= | | + ::= "end" - ::= "switch" $*$ $*$ "end" + ::= ( | | )$*$ - ::= "case" $?$ $*$ + ::= $*$ $*$ + + := "switch" + + ::= "end" + + ::= + + ::= "case" $?$ ::= ("," )$*$ + ::= $*$ + ::= -"sync" $*$ - \alt "sync" "always" $*$ - \alt "sync" "global" $*$ - \alt "sync" "init" $*$ +"sync" + \alt "sync" "always" + \alt "sync" "global" + \alt "sync" "init" ::= "low" | "high" | "posedge" | "negedge" | "edge" -- 2.30.2