Including Verilog Code Block in Latex

include packages for code block and coloring \usepackage{listings} \usepackage{xcolor} insert following codes for defining verilog code coloring tactic. It should be inserted at the head field of the latex file (before \begin{document}). % for verilog code coloring \definecolor{vgreen}{RGB}{104,180,104} \definecolor{vblue}{RGB}{49,49,255} \definecolor{vorange}{RGB}{255,143,102} \lstdefinestyle{verilog-style} { language=Verilog, basicstyle=\small\ttfamily, keywordstyle=\color{vblue}, identifierstyle=\color{black}, commentstyle=\color{vgreen}, numbers=left, numberstyle=\tiny\color{black}, numbersep=10pt, tabsize=8, moredelim=*[s][\colorIndex]{[}{]}, literate=*{:}{:}1 } \makeatletter \newcommand*\@lbracket{[} \newcommand*\@rbracket{]} \newcommand*\@colon{:} \newcommand*\colorIndex{% \edef\@temp{\the\lst@token}% \ifx\@temp\@lbracket \color{black}% \else\ifx\@temp\@rbracket \color{black}% \else\ifx\@temp\@colon \color{black}% \else \color{vorange}% \fi\fi\fi } \makeatother \usepackage{trace} Insert your verilog code block using following codes:...

November 26, 2021 · 1 min · Andyliu

Verilog with vscode

linting using vscode extension Verilog-HDL/SystemVerilog/Bluespec SystemVerilog. using iverilog go to extension settings and set verilog > linting : linter = iverilog then the linting function should work for verilog files. Notice: the dir to verilog file should not contain chinese characters and spaces. if you imported module from other file without include command, iverilog willl report an error. As it is always the case when using vivado, add -i to extention setting Verilog › Linting › Iverilog: Arguments to ignore this error....

November 24, 2021 · 1 min · Andyliu