profile
viewpoint

openrisc/newlib 20

newlib OpenRISC development

stffrdhrn/adc_interface 7

Verilog ADC interface for adc128s022 found in De0 Nano

stffrdhrn/ac97 5

opencores ac97 controller verilog core

stffrdhrn/adc_preamp 2

Kicad schematic for opamp based microphone preamp circuit used with my adc_interface project

stffrdhrn/binutils-gdb 2

Binutils and gdb fork for OpenRISC

stffrdhrn/de0_nano-multicore 2

OpenRISC multicore SoC for De0 Nano

stffrdhrn/berkeley-softfloat-2 1

Berkeley Softfloat 2c - with updates

stffrdhrn/cgen 1

architecture code generation used by binutils

stffrdhrn/digi-recorder 1

A digital recorder for fpga in verilog, tested on de0 nano.

pull request commentYosysHQ/yosys

Adds appendix on RTLIL text format

I finally managed to review this PR top to bottom! Seems good overall; apart from what we've already discussed, I think the only thing I'd change is the way <attr-stmt> is represented for non-modules. (Same issue there.)

Refactored.

RobertBaruch

comment created time in 2 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++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.++Attributes at the file level are applied to the following module.++\begin{indentgrammar}{<design>}+<file> ::= (<module> | <attr-stmt> | <autoidx-stmt>)$*$+\end{indentgrammar}++\subsection{Modules}++Declares a module consisting of zero or more attributes, wires, memories, cells, processes, and connections.++\begin{indentgrammar}{<module-body-stmt>}+<module> ::= <module-stmt> <module-body> <module-end-stmt>++<module-stmt> ::= "module" <id> <eol>++<module-body> ::= +(<param-stmt>+  \alt <attr-stmt>+  \alt <wire-stmt>+  \alt <memory-stmt>+  \alt <cell>+  \alt <process>+  \alt <conn-stmt>)$*$+\end{indentgrammar}++<module-end-stmt> ::= "end" <eol>++\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.++See Sec.~\ref{sec:rtlil_sigspec} for an overview of signal specifications.++\begin{indentgrammar}{<sigspec>}+<sigspec> ::=+<constant>+    \alt <wire-id>+    \alt <sigspec> "[" <integer> (":" <integer>)$?$ "]"+    \alt "\{" <sigspec>$*$ "\}"+\end{indentgrammar}++\subsection{Connection statements}++Declares a connection between the given signals.++\begin{indentgrammar}{<conn-stmt>}+<conn-stmt> ::= "connect" <sigspec> <sigspec> <eol>+\end{indentgrammar}++\subsection{Attribute statements}++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}{<attr-stmt>}+<attr-stmt> ::= "attribute" <id> <constant> <eol>++<constant> ::= <value> | <integer> | <string>

Noted in document.

RobertBaruch

comment created time in 2 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

Done!

RobertBaruch

comment created time in 2 hours

startedjimcrayne/jhc

started time in 3 hours

push eventrth7680/qemu

Elena Afanasova

commit sha f9b49088952ddb6de6e9c2e5822a5e15434abc3b

accel/kvm: add PIO ioeventfds only in case kvm_eventfds_allowed is true Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Elena Afanasova <eafanasova@gmail.com> Message-Id: <20201017210102.26036-1-eafanasova@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

view details

Elena Afanasova

commit sha e6ffd757829a0dcff649c99e6304a287cc6d0d27

softmmu/memory: fix memory_region_ioeventfd_equal() Eventfd can be registered with a zero length when fast_mmio is true. Handle this case properly when dispatching through QEMU. Signed-off-by: Elena Afanasova <eafanasova@gmail.com> Message-id: cf71a62eb04e61932ff8ffdd02e0b2aab4f495a0.camel@gmail.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha dc0b4d94d49a37751b37184fc891a86af3cc72e5

MAINTAINERS: Cover "block/nvme.h" file The "block/nvme.h" header is shared by both the NVMe block driver and the NVMe emulated device. Add the 'F:' entry on both sections, so all maintainers/reviewers are notified when it is changed. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Message-Id: <20200701140634.25994-1-philmd@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 8526e39e9974228f937d04e8eae140add8b17b43

block/nvme: Use hex format to display offset in trace events Use the same format used for the hw/vfio/ trace events. Suggested-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-3-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 58ad6ae0cbad626bd574bc1347f210a35a8316eb

block/nvme: Report warning with warn_report() Instead of displaying warning on stderr, use warn_report() which also displays it on the monitor. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-4-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 15b2260bef333762904535affa7fb30390b3fb98

block/nvme: Trace controller capabilities Controllers have different capabilities and report them in the CAP register. We are particularly interested by the page size limits. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-5-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 1c914cd1208fcf7fc61edb043f091b9412642ec8

block/nvme: Trace nvme_poll_queue() per queue As we want to enable multiple queues, report the event in each nvme_poll_queue() call, rather than once in the callback calling nvme_poll_queues(). Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-6-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 51e98b6d21dbaf0c6adcbf00b76bfbe0a0537c02

block/nvme: Improve nvme_free_req_queue_wait() trace information What we want to trace is the block driver state and the queue index. Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-7-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 6e1e9ff2d3709bb89156ea8e42239b6ee96a2a49

block/nvme: Trace queue pair creation/deletion Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-8-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 3214b0f0948d5e01ccca62730e60a69e2ded8774

block/nvme: Move definitions before structure declarations To be able to use some definitions in structure declarations, move them earlier. No logical change. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-9-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 1b539bd6dbe1459f160e25610ec2fc3388f700e8

block/nvme: Use unsigned integer for queue counter/size We can not have negative queue count/size/index, use unsigned type. Rename 'nr_queues' as 'queue_count' to match the spec naming. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-10-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 7a5f00dde39c0120b1653f189de9bbd551a6b1d8

block/nvme: Make nvme_identify() return boolean indicating error Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Directly pass errp as the local_err is not requested in our case. Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20201029093306.1063879-11-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha dfa9c6c65666d431b20f6ae3f18ee1e729f80f19

block/nvme: Make nvme_init_queue() return boolean indicating error Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Directly pass errp as the local_err is not requested in our case. This simplifies a bit nvme_create_queue_pair(). Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-12-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 54248d4d73ddbce38e240056dacf582f92da872d

block/nvme: Introduce Completion Queue definitions Rename Submission Queue flags with 'Sq' to differentiate submission queue flags from command queue flags, and introduce Completion Queue flag definitions. Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20201029093306.1063879-13-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 76a24781cc82d99251f933c399d78af52e1d9b0e

block/nvme: Use definitions instead of magic values in add_io_queue() Replace magic values by definitions, and simplifiy since the number of queues will never reach 64K. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-14-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 3c363c073e024fae7b09cad916e63dae89ed46cc

block/nvme: Correctly initialize Admin Queue Attributes From the specification chapter 3.1.8 "AQA - Admin Queue Attributes" the Admin Submission Queue Size field is a 0’s based value: Admin Submission Queue Size (ASQS): Defines the size of the Admin Submission Queue in entries. Enabling a controller while this field is cleared to 00h produces undefined results. The minimum size of the Admin Submission Queue is two entries. The maximum size of the Admin Submission Queue is 4096 entries. This is a 0’s based value. This bug has never been hit because the device initialization uses a single command synchronously :) Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-15-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 52b75ea8ec4f6cd8028bd8406ebcf2e80ffc6e05

block/nvme: Simplify ADMIN queue access We don't need to dereference from BDRVNVMeState each time. Use a NVMeQueuePair pointer on the admin queue. The nvme_init() becomes easier to review, matching the style of nvme_add_io_queue(). Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-16-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha 08d5406798f7729de8344ef0ed16d8bad8cdfc84

block/nvme: Simplify nvme_cmd_sync() As all commands use the ADMIN queue, it is pointless to pass it as argument each time. Remove the argument, and rename the function as nvme_admin_cmd_sync() to make this new behavior clearer. Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20201029093306.1063879-17-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha c8228ac35541564c46bf1c91ebe7951f367e2ce6

block/nvme: Set request_alignment at initialization Commit bdd6a90a9e5 ("block: Add VFIO based NVMe driver") sets the request_alignment in nvme_refresh_limits(). For consistency, also set it during initialization. Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-18-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

Philippe Mathieu-Daudé

commit sha a652a3ec697d5b4cfce44599d3540aae535b9545

block/nvme: Correct minimum device page size While trying to simplify the code using a macro, we forgot the 12-bit shift... Correct that. Fixes: fad1eb68862 ("block/nvme: Use register definitions from 'block/nvme.h'") Reported-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-19-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>

view details

push time in 4 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++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.++Attributes at the file level are applied to the following module.++\begin{indentgrammar}{<design>}+<file> ::= (<module> | <attr-stmt> | <autoidx-stmt>)$*$+\end{indentgrammar}++\subsection{Modules}++Declares a module consisting of zero or more attributes, wires, memories, cells, processes, and connections.++\begin{indentgrammar}{<module-body-stmt>}+<module> ::= <module-stmt> <module-body> <module-end-stmt>++<module-stmt> ::= "module" <id> <eol>++<module-body> ::= +(<param-stmt>+  \alt <attr-stmt>+  \alt <wire-stmt>+  \alt <memory-stmt>+  \alt <cell>+  \alt <process>+  \alt <conn-stmt>)$*$+\end{indentgrammar}++<module-end-stmt> ::= "end" <eol>++\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.++See Sec.~\ref{sec:rtlil_sigspec} for an overview of signal specifications.++\begin{indentgrammar}{<sigspec>}+<sigspec> ::=+<constant>+    \alt <wire-id>+    \alt <sigspec> "[" <integer> (":" <integer>)$?$ "]"+    \alt "\{" <sigspec>$*$ "\}"+\end{indentgrammar}++\subsection{Connection statements}++Declares a connection between the given signals.++\begin{indentgrammar}{<conn-stmt>}+<conn-stmt> ::= "connect" <sigspec> <sigspec> <eol>+\end{indentgrammar}++\subsection{Attribute statements}++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}{<attr-stmt>}+<attr-stmt> ::= "attribute" <id> <constant> <eol>++<constant> ::= <value> | <integer> | <string>

It is worth noting that plain integer constants have a really weird, unintuitive behavior: whatever integer you have in the text is silently truncated to 32 bits and converted to unsigned. I had a PR to improve this (https://github.com/YosysHQ/yosys/pull/2066) but it got rejected in favor of a different approach... one we have yet to determine.

RobertBaruch

comment created time in 4 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

Now you got it! Although I'd probably use something like...

<file> ::= <autoidx-stmt>? <module>*
<module> ::= <attr-stmt>* <module-stmt> <module-body> <module-end-stmt>

since attributes are all the same in RTLIL no matter what they are attached to.

RobertBaruch

comment created time in 4 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

Ah, ok, I can document that. I could also again refactor the grammar so that autoidx only appears at the beginning of the file?

<file> ::= <autoidx-stmt>? <module>*
<module> ::= <module-attr-stmt>* <module-stmt> <module-body> <module-end-stmt>
<module-attr-stmt> := <attr-stmt>
RobertBaruch

comment created time in 5 hours

create barnchrth7680/qemu

branch : tgt-arm-align

created branch time in 5 hours

pull request commentYosysHQ/yosys

Adding latch tests for shift&mask AST dynamic part-select enhancements

Can we merge this? This PR only adds tests and they pass.

dh73

comment created time in 5 hours

push eventYosysHQ/yosys

William D. Jones

commit sha 296a23f489b4534e581d887a08d6a0326efc8dd6

Makefile: Add disabled-by-default ENABLE_SCCACHE config option.

view details

William D. Jones

commit sha 9431033921286c20af594e1dfba96be96a88eb9c

Makefile: Update ABCREV to bring in sccache fixes.

view details

whitequark

commit sha c6b5b18a30278637dcea4f9867631540b818716c

Merge pull request #2442 from cr1901/sccache Makefile: Add disabled-by-default ENABLE_SCCACHE config option.

view details

push time in 5 hours

PR merged YosysHQ/yosys

Makefile: Add disabled-by-default ENABLE_SCCACHE config option.

sccache is a ccache-like tool that supports distributed compilation and more languages. While it can be used as a ccache-replacement, I've found a few edge cases where symlinking sccache to ccache can choke. This includes on Windows where the symlink just plain doesn't work, and incompatibility with mixed C/C++ projects on all systems (yosys is unaffected by the latter).

Considering edge cases, along with using a completely separate cache and its extra distributed compilation capabilities, I think it's reasonable to add an ENABLE_SCCACHE option disabled by default. Like ENABLE_EDITLINE and ENABLE_READLINE, this option is mutually-exclusive with ENABLE_CCACHE; the former takes priority.

Two caveats:

  • I can't speak for ccache, but abc doesn't currently play all that nice with sccache, even though the build succeeds. I filed a PR to fix this upstream, and will get it into the YosysHQ fork once it's accepted.
  • Compiler configs that requires special CC Makefile var handling in ABCMKARGS do not have ccache/sccache support yet. My feeling is that this should be fixed as part of #2011; this mostly affects Windows anyway and not the "typical" case of *nix.
+7 -2

3 comments

1 changed file

cr1901

pr closed time in 5 hours

push eventYosysHQ/yosys

Chris Dailey

commit sha cdc802e4b77e6fecd250850c99469b81c2c7f104

Add rewrite_filename for sim -vcd argument.

view details

whitequark

commit sha 2a39c785a210be8c0386e6f6d1a2cf2e4fc67589

Merge pull request #2450 from nitz/sim-vcd-filename Add rewrite_filename for sim -vcd argument.

view details

push time in 5 hours

PR merged YosysHQ/yosys

Add rewrite_filename for sim -vcd argument.

I've added a call to rewrite_filename on a local copy of the argument value passed with -vcd to the sim pass. I kept having an issue with my build scripts where it wouldn't generate the vcd file, but worked fine if I did it by hand. Turns out it was quotes on the filename string, which rewrite_filename tidies up, among other things.

+3 -1

0 comment

1 changed file

nitz

pr closed time in 5 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

those auto-index statements, whose function I don't know

Practically, an autoidx statement should always appear only at the very start of an RTLIL file (if at all), and only once. This isn't enforced but perhaps should be.

The function of them is simple. Sometimes Yosys needs to generate an unique name. It picks e.g. $flatten$N. The N part is the value of the autoidx global, which is subsequently incremented. This global has to be dumped into RTLIL, otherwise e.g. dumping and running a pass would have different properties than just running a pass on a warm design.

RobertBaruch

comment created time in 7 hours

pull request commentYosysHQ/yosys

Makefile: Add disabled-by-default ENABLE_SCCACHE config option.

Or should I do it as part of this PR?

Please do this as a part of this PR.

cr1901

comment created time in 8 hours

startedmigamake/homplexity

started time in 8 hours

push eventYosysHQ/yosys

Yosys Bot

commit sha 88c47a380bdd62b633b11d1e763e7bcfd54ef423

Bump version

view details

push time in 8 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

For example, a possible refactor that might make this clearer is:

<file> ::= ((<autoidx-stmt> | <attr-stmt>)* <module>)*

RobertBaruch

comment created time in 8 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

I can make that more explicit using the grammar, although those auto-index statements, whose function I don't know, appear to be able to be interspersed with module attributes and modules. In any case, I've also elaborated a bit on what attributes apply to in the attributes section.

RobertBaruch

comment created time in 9 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.

Done. I've fiddled with the grammar so that rules ending in "-stmt" all terminate consistently in eol.

RobertBaruch

comment created time in 9 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.

Done. I cleaned things up a bit.

RobertBaruch

comment created time in 9 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.++\begin{indentgrammar}{<design>}+<file> ::= <design>$*$++<design> ::= <module> | <attr-stmt> | <autoidx-stmt>+\end{indentgrammar}++\subsection{Modules}++A module consists of zero or more module statements.++\begin{indentgrammar}{<module-stmt>}+<module> ::= "module" <id> <eol> <module-stmt>$*$ "end" <eol>

I said it before, but attributes really ought to be attached to the module here.

RobertBaruch

comment created time in 11 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.

Also "design statement", like "module statement", would be a lot better.

RobertBaruch

comment created time in 11 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.++Note that in general, statements are terminated by an end of line.

I would say that all statments are terminated by EOL (so not the weasely "in general"), but some statements have bodies (and end) which continue on the following lines.

RobertBaruch

comment created time in 11 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$+\end{indentgrammar}++\subsection{Values}++A \textit{value} consists of a width in bits and a bit representation, most significant bit first. Bits may be any of:+\begin{itemize}+    \item \texttt{0}: A logic zero value+    \item \texttt{1}: A logic one value+    \item \texttt{x}: An unknown logic value (or don't care in case patterns)+    \item \texttt{z}: A high-impedance value (or don't care in case patterns)+    \item \texttt{m}: A marked bit (internal use only)+    \item \texttt{-}: A don't care value+\end{itemize}++An \textit{integer} is simply a signed integer value in decimal format.++\begin{indentgrammar}{<binary-digit>}+<value> ::= <decimal-digit>$+$ \texttt{\textbf{'}} <binary-digit>$*$++<binary-digit> ::= "0" | "1" | "x" | "z" | "m" | "-"++<integer> ::= "-"$?$ <decimal-digit>$+$+\end{indentgrammar}++\subsection{Strings}++A string is a series of characters delimited by double-quote characters. Within a string, certain escapes can be used:++\begin{itemize}+    \item \texttt{\textbackslash n}: A newline+    \item \texttt{\textbackslash t}: A tab+    \item \texttt{\textbackslash \textit{ooo}}: A character specified as a one, two, or three digit octal value+\end{itemize}++All other characters may be escaped by a backslash, and become the following character. Thus:++\begin{itemize}+    \item \texttt{\textbackslash \textbackslash}: A backslash+    \item \texttt{\textbackslash \"}: A double-quote+    \item \texttt{\textbackslash r}: An 'r' character+\end{itemize}++\subsection{Comments}++A comment starts with a \texttt{\textbf{\#}} character and proceeds to the end of the line. All comments are ignored.++\section{File}++A file consists of zero or more designs. A design may be a module, an attribute statement, or an autoindex statement.

This... is not really true. The attributes are attached to the following module, so they are not standalone.

RobertBaruch

comment created time in 11 hours

Pull request review commentYosysHQ/yosys

Adds appendix on RTLIL text format

+\chapter{RTLIL Text Representation}+\label{chapter:textrtlil}++% Stolen from stackexchange: calculate indent based on given keyword,+% with some nice hrules added in.+\newlength{\myl}++\newenvironment{indentgrammar}[1]+    {\vspace{0.5cm}\hrule+    \setlength{\myl}{\widthof{#1}+2em}+    \grammarindent\the\myl+    \begin{grammar}}+    {\end{grammar}+    \hrule}++This appendix documents the text representation of RTLIL in extended Backus-Naur form (EBNF).++The grammar is not meant to represent semantic limitations. For example, processes must contain exactly one switch statement, but the grammar allows zero or more than one. That is, the grammar is "permissive", and later stages of processing perform more rigorous checks.++The grammar is also not meant to represent the exact grammar used in the RTLIL frontend, since that grammar is specific to processing by lex and yacc, and is somewhat less understandable than simple EBNF notation.++\section{Lexical elements}++\subsection{Identifiers}++There are three types of identifiers in RTLIL:++\begin{itemize}+    \item Publically visible identifiers+    \item Auto-generated identifiers+    \item Dotted numeric identifiers+\end{itemize}++\begin{indentgrammar}{<autogen-id>}+<id> ::= <public-id> | <autogen-id> | <dotted-id>++<public-id> ::= "\textbackslash" <nonws>$+$++<autogen-id> ::= "\textdollar" <nonws>$+$++<dotted-id> ::= "." <decimal-digit>$+$

Wait. What? Why are these a thing?? They are definitely not legal and cannot even be used:

ERROR: Assert `p[0] == '$' || p[0] == '\\'' failed in ./kernel/rtlil.h:165.

@clairexen These date back to the initial commit. What's up with them?

RobertBaruch

comment created time in 11 hours

PR opened YosysHQ/yosys

Add rewrite_filename for sim -vcd argument.

I've added a call to rewrite_filename on a local copy of the argument value passed with -vcd to the sim pass. I kept having an issue with my build scripts where it wouldn't generate the vcd file, but worked fine if I did it by hand. Turns out it was quotes on the filename string, which rewrite_filename tidies up, among other things.

+3 -1

0 comment

1 changed file

pr created time in 12 hours

push eventrth7680/qemu

Alex Williamson

commit sha cf254988a50d4164c86a356c80b8d3ae0ccaa005

vfio: Make migration support experimental Support for migration of vfio devices is still in flux. Developers are attempting to add support for new devices and new architectures, but none are yet readily available for validation. We have concerns whether we're transferring device resources at the right point in the migration, whether we're guaranteeing that updates during pre-copy are migrated, and whether we can provide bit-stream compatibility should any of this change. Even the question of whether devices should participate in dirty page tracking during pre-copy seems contentious. In short, migration support has not had enough soak time and it feels premature to mark it as supported. Create an experimental option such that we can continue to develop. [Retaining previous acks/reviews for a previously identical code change with different specifics in the commit log.] Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

view details

Kirti Wankhede

commit sha bb0990d1740f6dced5b50a923677034c9399c213

vfio: Change default dirty pages tracking behavior during migration By default dirty pages tracking is enabled during iterative phase (pre-copy phase). Added per device opt-out option 'x-pre-copy-dirty-page-tracking' to disable dirty pages tracking during iterative phase. If the option 'x-pre-copy-dirty-page-tracking=off' is set for any VFIO device, dirty pages tracking during iterative phase will be disabled. Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

view details

Peter Maydell

commit sha 23895cbd82be95428e90168b12e925d0d3ca2f06

Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20201123.0' into staging VFIO update 2020-11-23 * Enable pre-copy dirty page tracking by default (Kirti Wankhede) * Mark migration as experimental (Alex Williamson) # gpg: Signature made Mon 23 Nov 2020 17:10:58 GMT # gpg: using RSA key 239B9B6E3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full] # gpg: aka "Alex Williamson <alex@shazbot.org>" [full] # gpg: aka "Alex Williamson <alwillia@redhat.com>" [full] # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" [full] # Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B 8A90 239B 9B6E 3BB0 8B22 * remotes/awilliam/tags/vfio-update-20201123.0: vfio: Change default dirty pages tracking behavior during migration vfio: Make migration support experimental Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

view details

LemonBoy

commit sha afae37d98ae991c0792c867dbd9f32f988044318

ppc/translate: Implement lxvwsx opcode Implement the "Load VSX Vector Word & Splat Indexed" opcode, introduced in Power ISA v3.0. Buglink: https://bugs.launchpad.net/qemu/+bug/1793608 Signed-off-by: Giuseppe Musacchio <thatlemon@gmail.com> Message-Id: <d7d533e18c2bc10d924ee3e09907ff2b41fddb3a.1604912739.git.thatlemon@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

view details

Prasad J Pandit

commit sha c2cb511634012344e3d0fe49a037a33b12d8a98a

hw/net/e1000e: advance desc_offset in case of null descriptor While receiving packets via e1000e_write_packet_to_guest() routine, 'desc_offset' is advanced only when RX descriptor is processed. And RX descriptor is not processed if it has NULL buffer address. This may lead to an infinite loop condition. Increament 'desc_offset' to process next descriptor in the ring to avoid infinite loop. Reported-by: Cheol-woo Myung <330cjfdn@gmail.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Jason Wang <jasowang@redhat.com>

view details

Paolo Bonzini

commit sha ad6f932fe8d1fc7f37ec17c7520aec68d3ee3706

net: do not exit on "netdev_add help" monitor command "netdev_add help" is causing QEMU to exit because the code that invokes show_netdevs is shared between CLI and HMP processing. Move the check to the callers so that exit(0) remains only in the CLI flow. "netdev_add help" is not fixed by this patch; that is left for later work. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>

view details

Yuri Benditovich

commit sha d2abc563e4ba4057b9cb5c04dd203b8c3a949115

net: purge queued rx packets on queue deletion https://bugzilla.redhat.com/show_bug.cgi?id=1829272 When deleting queue pair, purge pending RX packets if any. Example of problematic flow: 1. Bring up q35 VM with tap (vhost off) and virtio-net or e1000e 2. Run ping flood to the VM NIC ( 1 ms interval) 3. Hot unplug the NIC device (device_del) During unplug process one or more packets come, the NIC can't receive, tap disables read_poll 4. Hot plug the device (device_add) with the same netdev The tap stays with read_poll disabled and does not receive any packets anymore (tap_send never triggered) Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>

view details

yuanjungong

commit sha f012bec8909820390936f1cf68b3e73a2d4ac966

tap: fix a memory leak Close fd before returning. Buglink: https://bugs.launchpad.net/qemu/+bug/1904486 Signed-off-by: yuanjungong <ruc_gongyuanjun@163.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jason Wang <jasowang@redhat.com>

view details

Keqian Zhu

commit sha 9925990d01a92564af55f6f69d0f5f59b47609b1

net: Use correct default-path macro for downscript Fixes: 63c4db4c2e6d (net: relocate paths to helpers and scripts) Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> Signed-off-by: Jason Wang <jasowang@redhat.com>

view details

Peter Maydell

commit sha d536d9578ec3ac5029a70b8126cb84bb6f2124a4

Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging # gpg: Signature made Tue 24 Nov 2020 02:41:01 GMT # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: net: Use correct default-path macro for downscript tap: fix a memory leak net: purge queued rx packets on queue deletion net: do not exit on "netdev_add help" monitor command hw/net/e1000e: advance desc_offset in case of null descriptor Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

view details

Greg Kurz

commit sha 558f5c42efded3e0d0b20a90bce2a9a14580d824

tests/9pfs: Mark "local" tests as "slow" The "local" tests can fail on some automated build systems as reported here: https://lists.nongnu.org/archive/html/qemu-devel/2020-11/msg05510.html This will need to be investigated and addressed later. Let's go for a workaround in the meantime : mark the "local" tests as "slow" so that they aren't executed with a simple "make check" like in the case above. Reported-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Message-Id: <160620382310.1423262.7364287092069513483.stgit@bahia.lan> Signed-off-by: Greg Kurz <groug@kaod.org>

view details

Peter Maydell

commit sha 82d469e13990dbe579aca316f697bfc4d3cbe659

Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-5.2-20201124' into staging ppc patch queue for 2020-11-24 One final update for qemu-5.2, implementing an instruction that we already should have, given the ISA version we claim to support. Sorry for the lateness, I've been on holiday. This isn't a regression, obviously, so if it misses qemu-5.2 it's not a disaster, but it would be nice to have. The risk is low that it would break any existing instructions. # gpg: Signature made Tue 24 Nov 2020 05:50:29 GMT # gpg: using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full] # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full] # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full] # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown] # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dg-gitlab/tags/ppc-for-5.2-20201124: ppc/translate: Implement lxvwsx opcode Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

view details

Peter Maydell

commit sha cef64a0b347b8fda1a6f8b65ce435d4569c3969e

Merge remote-tracking branch 'remotes/gkurz-gitlab/tags/9p-fix-2020-11-24' into staging Mark "local" qtests as slow to avoid unwanted breakage of "make check" with some configurations (eg. Fedora's Copr automatic build system). # gpg: Signature made Tue 24 Nov 2020 11:45:14 GMT # gpg: using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full] # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" [full] # gpg: aka "[jpeg image of size 3330]" [full] # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz-gitlab/tags/9p-fix-2020-11-24: tests/9pfs: Mark "local" tests as "slow" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

view details

push time in 12 hours

push eventYosysHQ/nextpnr

William D. Jones

commit sha 996b4100b9f33696e8c2771b62dab591efd171de

Update netlist.md Add information about how top-level ports and connected nets differ from other ports and nets.

view details

David Shah

commit sha 89552307121099c247f0a953462849cbf5ec6d3e

Merge pull request #519 from cr1901/patch-1 Update netlist.md

view details

push time in 13 hours

more