Skip to content

Commit

Permalink
copied over content
Browse files Browse the repository at this point in the history
  • Loading branch information
sifferman committed Sep 18, 2023
1 parent bf98d55 commit 61c2cd9
Show file tree
Hide file tree
Showing 31 changed files with 265 additions and 79 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@

# Misc
.DS_Store
build

# LaTeX
*.aux
*.bbl
*.blg
*.log
*.out
*.pdf.tmp
*.toc
.DS_Store

# Verilator
obj_dir

# Icarus
*.vvp
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

BUILD_DIR := $(CURDIR)/build

PDFLATEX := TEXINPUTS=$(CURDIR):$(CURDIR)/src:${BUILD_DIR}/dependencies/ucsb/sty: \
pdflatex -interaction=nonstopmode -halt-on-error -output-directory ${BUILD_DIR}
PDFLATEX := TEXINPUTS=$(CURDIR):$(CURDIR)/tex:${BUILD_DIR}/dependencies/ucsb/sty: \
pdflatex -interaction=nonstopmode -halt-on-error -shell-escape -output-directory ${BUILD_DIR}

BIBTEX := BSTINPUTS=${BUILD_DIR}/dependencies/ucsb: BIBINPUTS=$(CURDIR)/src: \
BIBTEX := BSTINPUTS=${BUILD_DIR}/dependencies/ucsb: BIBINPUTS=$(CURDIR)/tex: \
bibtex

JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ethan Sifferman Thesis</title>
<title>Ethan Sifferman Masters Thesis</title>
<style>
html, body {
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion figures/dc_vs_synplify.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\caption{Differences in SystemVerilog Support in DC vs. Synplify-Pro [ref]}
\caption{Differences in SystemVerilog Support in DC vs. Synplify-Pro \cite{sutherland}}
\includegraphics[width=\linewidth]{figures/dc_vs_synplify.pdf}
\label{fig:dc_vs_synplify}
13 changes: 0 additions & 13 deletions src/chapters/1_introduction.tex

This file was deleted.

7 changes: 0 additions & 7 deletions src/chapters/2_open_source_tools.tex

This file was deleted.

11 changes: 0 additions & 11 deletions src/chapters/3_digital_design.tex

This file was deleted.

Empty file removed src/chapters/4_resources.tex
Empty file.
Empty file removed src/chapters/5_scalability.tex
Empty file.
Empty file removed src/chapters/6_autograders.tex
Empty file.
Empty file removed src/chapters/7_labs_with_cva6.tex
Empty file.
Empty file removed src/chapters/8_conclusion.tex
Empty file.
12 changes: 0 additions & 12 deletions src/preliminary/abstract.tex

This file was deleted.

26 changes: 0 additions & 26 deletions src/thesis.bib

This file was deleted.

29 changes: 29 additions & 0 deletions tex/chapters/1_introduction.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

\chapter{Introduction}
\label{chapter:introduction}

At the end of Dennard scaling, it may be tempting to think that VLSI and digital design are becoming less-important engineering fields. However, the United States government wouldn't agree, considering they are investing \$280 billion over the next ten years into the CHIPS Act. [ref] Similarly, TSMC, the world's leading semiconductor manufacturer, is expecting to open three new advanced-node fabs in 2024. [ref] In addition, in 2020, Google started a partnership with GlobalFoundries, SkyWater Technology, and Efabless to provide fully open-source Process Design Kits (PDKs) and toolchains to lower the barrier of entry for new Silicon engineers. [ref] Investments like these have created a never-ending demand for chip developers, and Universities should be working to meet this demand.

In the semiconductor industry, the process of designing an application-specific integrated circuit (ASIC) follows a well-defined sequence, where each step requires training and practice. The following presents an abbreviated flow tailored for students and open-source tool usage, as illustrated in [fig]. This process begins with the design phase, where engineers specify the functionality and requirements of the finished integrated circuit (IC). Then, they use hardware description languages (HDLs) like SystemVerilog to detail the circuit's operations and verify its correctness through simulation. After the HDL implementation passes a series of behavioral simulations, it is synthesized for the standard cell library of the target and paired with additional digital and mixed-signal IP blocks. Further testing can include running logical equivalence checks (LECs) to ensure the synthesized netlist is correct, rerunning the behavioral simulations on the synthesized netlist to check for reset behavior, or by running intensive simulations on an FPGA. Once these circuit-level tests pass, layout is completed according to timing constraints and design rule checks (DRC). If timing cannot be met, the layout or HDL implementation may need to be adjusted. Finally, after the layout and simulations checks pass, the design is converted into a Graphic Data Stream (GDS) file which is sent to a semiconductor foundry for mass-production.

Because of how many skills are required to create an ASIC design it is crucial for Universities to offer a strong foundation for writing and working with HDLs to design hardware. Nevertheless, HDLs come with a formidable learning curve, partly due to the difficulties of distinguishing between what code is synthesizable (able to be converted into hardware) and what should be used solely for verification purposes. Additionally, the prevalence of bugs in common HDL tools, the extraordinary inaccessibility of proprietary tools, and the lack of reliable online educational resources are a major deterrent for students and hobbyists who wish to experiment with digital design on their own. Another factor contributing to the complexity is the interdisciplinary nature of ASIC design. For many students, especially those with a software background, this may be their first experience with hardware design, while hardware students must also transition into a more software-centric environment. Bridging this gap and understanding both aspects is vital in today's world of using computer-aided design (CAD) software to design hardware. Universities must recognize the formidable learning curve associated with HDLs and provide comprehensive educational resources, practical hands-on experiences, and interdisciplinary exposure to prepare students for the intricate realm of ASIC design.

To aid educators in combating the intrinsic difficulty in teaching digital design, this thesis presents a collection of methods and resources for Verilog education that will adequately prepare students for writing synthesizable Verilog in industry.

\begin{itemize}

\item \autoref{chapter:open_source_tools} delves into the accessibility of open-source tools, highlighting how they provide a cost-effective alternative for students, unlike proprietary tools burdened with high licensing fees. It also discusses the ease of installation and the unique features offered by open-source tools, emphasizing their ability to foster a more exciting and accessible learning environment.

\item \autoref{chapter:digital_design} shifts the focus to teaching SystemVerilog from a synthesis perspective, and how SystemVerilog can be effectively used for digital design education. It argues that a synthesis-oriented approach to teaching SystemVerilog can bridge the gap between abstract syntax and tangible hardware implementations, providing students with a deeper understanding of digital circuits.

\item \autoref{chapter:resources} explores the best resources for learning synthesizable SystemVerilog, emphasizing resources dedicated to synthesis. It argues the significance of SystemVerilog style guides in ensuring code quality and adherence to industry standards while warning against relying solely on popular yet misleading Verilog tutorial websites.

\item \autoref{chapter:scalability} emphasizes the importance of teaching students how to efficiently work on large-scale Verilog projects, discussing features in SystemVerilog that aid in code organization and the significance of version control and in-module verification.

\item \autoref{chapter:autograders} argues for the incorporation of autograders in Verilog/SystemVerilog education, demonstrating their value in providing instant, high-quality feedback to students. It also discusses how autograders can facilitate remote testing of Verilog designs and foster a sense of community and collaboration among students.

\item \autoref{chapter:labs_with_cva6} culminates the thesis by showcasing a series of assignments I created that provide hands-on experience with advanced computer architecture concepts using the open-source CVA6 RISC-V core.

\item Finally, \autoref{chapter:future_classes} explores how ideas presented in this thesis could enhance advanced Verilog courses such as verification with Universal Verification Methodology (UVM) and SystemVerilog Assertions (SVA) for verification, embedded system and System-on-Chip (SoC) design, and ASIC and VLSI projects.

\end{itemize}
23 changes: 23 additions & 0 deletions tex/chapters/2_open_source_tools.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

\chapter{Advantages of Open-Source Tools in Education}
\label{chapter:open_source_tools}

Although proprietary Verilog tools are predominant in industry and often boast a wide assortment of features, I argue that they can be one of the biggest deterrents for those first learning digital design. Whether students become aghast at the preposterous licensing fees or become hung up on the steep learning curve of the interfaces, the most popular Verilog tools often have trouble exciting students into furthering their Verilog education. Fortunately, there are several open-source Verilog tools that are praised for their accessibility and ease-of-use. A valuable resource for open-source hardware tools, generators, and reusable designs can be found in the curated list provided here: \url{https://github.com/aolofsson/awesome-opensource-hardware}. For example, a common collection of tools include the simulators Icarus [ref] and Verilator [ref], the waveform viewer GTKWave [ref], the synthesis tool Yosys [ref], the FPGA place and route tools Nextpnr [ref] and VTR [ref], the ASIC flow OpenLane [ref], and the hardware package manager and build system FuseSoC [ref]. In this section, I will explain why open-source tools excel over proprietary tools in introducing Verilog and digital design to students.

\section{Proprietary tool prices deter students.}

Many students choose to pursue a degree in computer engineering due to the plethora of creative outlets that it introduces them to. Consider the hands-on process of purchasing affordable components and assembling circuits on breadboards. Likewise, platforms like Arduinos and Raspberry Pis are often explored alongside the utilization of programming languages such as C++, Python, and JavaScript. The accessibility and low cost of these mediums often foster self-directed learning. Similarly, introductory Verilog courses can serve as yet another avenue for creative expression, particularly when orchestrated using free and open-source tools. However, a significant obstruction emerges when proprietary alternatives such as Questa, VCS, and Xcelium, coupled with licensing fees over \$5,000, [ref] become the focal point of a student's introduction to Verilog. Such financial barriers can easily deter enthusiasm for self-guided learning, particularly when students anticipate losing access to the software upon graduation. This is likely the reason why several students in UC Santa Barbara's Verilog courses choose to disobey the requirement of using ModelSim, and instead use Icarus and GTKWave. Students don't want to feel like their time is wasted learning a tool if they lose access to it upon graduation.

\section{Open-source tools are easy to install.}

Even if students aren't hoping to expand their arsenal of tools for expressing their creativity, it is still important to keep Verilog tools accessible by improving students' first-time user experience. For example, Vivado is infamous for its tedious and complex installation process while taking up over 16-60GB when installed. This is contrasted with the overall positive first-time user experience that open-source tools offer. For example, with the ``OSS CAD Suite" project [ref], you can download all the latest binaries of the most popular open-source Verilog tools in under a minute. This beats Vivado's complicated installation process by a mile and is more-likely to remain on student's computers after the course is over since all the tools only take up half a gigabyte, as opposed to the 16-60GB that Vivado requires.

\section{Unique benefits and features of open-source tools.}

Undoubtedly, proprietary tools offer a multitude of functionalities for advanced users that open-source tools cannot offer. However, open-source tools offer many unique features that are more desired by beginners. For example, Icarus runs short simulations much faster than proprietary simulators, making it perfect for receiving instant feedback as students are still learning the language syntax. Similarly, Yosys and Nextpnr perform synthesis and layout significantly faster than tools such as Vivado and Design Compiler, allowing for more rapid prototyping. Also, while ModelSim may happily parse and simulate un-synthesizable code, Verilator will give much more strict warnings, helping to demonstrate the syntax and features that should be allowed in synthesizable designs. (This is further discussed in Section III.) Finally, open-source tools get updates every day, and instructors are able to report bugs and request new features. Depending on the difficulty of the request, the tool maintainers may complete the request within a few months. Multiple of my courses have directly benefited from this [appx]. Instructors may even decide they want to do a pull-request themselves; I personally have contributed two new warnings to Verilator in hopes of teaching best-practices. [appx] This is contrasted with the fact that many universities are not always running the most up-to-date proprietary software. For example, as of 9/10/23, UC Santa Barbara's Engineering Computing Infrastructure's latest version of ModelSim is 10.7d (from April 2019), which does not support width-casting from parameters, which affected the UCSB Spring 2023 ECE 152A course experience. Bugs in tools will undoubtedly happen, but the only solution Siemens offers is to pay for an updated version with the bug fixed. Contrast this with submitting a GitHub issue with Verilator, and having the bug fixed by the next time the course is offered. Open-source tools are often simply the better choice for instructors.

\section{Avoid graphical user interfaces.}

One of the most important ways to make Verilog more accessible is by guiding students to use command line interfaces (CLIs). Nearly all large-scale Verilog designs are paired with user-friendly build scripts and Makefiles for running simulation and synthesis. [ref] This is contrasted with the complex graphical user interfaces in tools like Vivado, ModelSim, VCS, and Quartus, which can feel daunting for beginners due to the number of options that users have direct access to. UC Santa Cruz Professor Dustin Richmond compares learning Vivado to being stuck in a ``point-and-click adventure game" in his talk ``So, you want to be an open sourcerer?" [ref]. By using CLIs, you can abstract away and decouple tool-specifics from digital design concepts.

To aid in the usually lengthy crafting of TCL scripts and Makefiles, an extremely powerful pair of open-source tools named FuseSoC and Edalize [ref] attempt to standardize build files for all Verilog tools with a central \mintinline{bash}{.core} file. The \mintinline{bash}{.core} file, interpretable by FuseSoC, contains the ``run" specifications, which are then seamlessly communicated to Edalize for the automated generation and execution of build scripts with the designated tool. FuseSoC is compatible with nearly every Verilog tool, so switching simulators is often as easy as changing one line of code. While TAing for UCSB's ECE 152A, 154A, and 154B, I capitalized on the utility of FuseSoC and Edalize to substantially accelerate assignment setup time. I could provide students with the Makefile automatically generated by Edalize, or I could provide the \mintinline{bash}{.core} file for students to run themselves with FuseSoC. Either option was effective in simplifying the build process so students could better focus on the learning-goals of the assignments.
Loading

0 comments on commit 61c2cd9

Please sign in to comment.