From f2d51ed7c24918da2b4ad75c077f46f2f5e6feee Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:42:06 -0800 Subject: [PATCH 1/8] Update README.mdx --- docs/DAV/README.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DAV/README.mdx b/docs/DAV/README.mdx index c15ca08..8dad003 100644 --- a/docs/DAV/README.mdx +++ b/docs/DAV/README.mdx @@ -7,4 +7,6 @@ import DocCardList from "@theme/DocCardList"; Welcome to DAV! DAV aims to teach students the process of designing, building, and testing digital logic. Students can choose one of two tracks - the Digital Audio Visualizer track, with a capstone project involving displaying frequency levels on a VGA; and the Digital Design, Architecture, and Verification track, with a capstone project revolving around implementing a game that uses external peripherals. Along the way, students will learn about sequential logic, communication protocols, and graphics controllers. Additionally, DAV will introduce students to industry practices and prepare them for digital design and verification interviews. +Solutions to the labs can be found [here.](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + From 6293e1efb182285148144ea3d12574437e722bc8 Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:44:00 -0800 Subject: [PATCH 2/8] Update lab-1.md --- docs/DAV/lab-1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DAV/lab-1.md b/docs/DAV/lab-1.md index 9826c61..39b019f 100644 --- a/docs/DAV/lab-1.md +++ b/docs/DAV/lab-1.md @@ -27,6 +27,8 @@ Welcome to DAV! By this point, you’ve probably attended or watched the first l [Verilog Docs and FAQ](https://docs.google.com/document/d/1_8ruatZIb3sZb-3Kk3WOYC8Jzv4HvdwrTPZUGVupdVE/edit) +[Solution](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + ## Contact Us You can contact the DAV leads on Discord. From 606fa1e758e1d7720c008470511080e1f92dbd44 Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:46:16 -0800 Subject: [PATCH 3/8] Update lab-2.md --- docs/DAV/lab-2.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DAV/lab-2.md b/docs/DAV/lab-2.md index 1318072..c7a3970 100644 --- a/docs/DAV/lab-2.md +++ b/docs/DAV/lab-2.md @@ -27,6 +27,8 @@ In Lecture 2, you learned about all of the components behind sequential logic. Y [Verilog Docs and FAQ](https://docs.google.com/document/d/1_8ruatZIb3sZb-3Kk3WOYC8Jzv4HvdwrTPZUGVupdVE/edit) +[Solution](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + ## Contact Us You can contact the DAV leads on Discord. From 48553ae183d7546640c41cead58eb9a183cc452a Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:48:05 -0800 Subject: [PATCH 4/8] Update lab-3.md --- docs/DAV/lab-3.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/DAV/lab-3.md b/docs/DAV/lab-3.md index 4e1199d..be4364c 100644 --- a/docs/DAV/lab-3.md +++ b/docs/DAV/lab-3.md @@ -18,9 +18,13 @@ Ah yes, the FFT. In lecture 3, we covered how the Fast Fourier Transform (FFT) w ## Resources and Reference Material [Link to Lecture 3](https://drive.google.com/file/d/1ZpZNq0DCSLgWa0FdoBjDLQwYdLYMBiAf/view?usp=sharing) + [Pin Sheet](https://docs.google.com/spreadsheets/d/1jTgphR61ozrNZlr9dLvId5t3o0FrikxSZWwAvhXF0Yo/edit#gid=0) + [Verilog Docs](https://docs.google.com/document/d/1_8ruatZIb3sZb-3Kk3WOYC8Jzv4HvdwrTPZUGVupdVE/edit) +[Solution](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + ## Contact Us You can contact the DAV leads on Discord. From 30b9a2e58cae2476b37a272cc6507b1a53e43cc5 Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:48:26 -0800 Subject: [PATCH 5/8] Update lab-4.md --- docs/DAV/lab-4.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DAV/lab-4.md b/docs/DAV/lab-4.md index c1a0e7c..b3ac78b 100644 --- a/docs/DAV/lab-4.md +++ b/docs/DAV/lab-4.md @@ -24,6 +24,8 @@ Link to Lecture 5 [Verilog Docs and FAQs](https://docs.google.com/document/d/1_8ruatZIb3sZb-3Kk3WOYC8Jzv4HvdwrTPZUGVupdVE/edit) +[Solution](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + ## Contact Us You can contact the DAV leads on Discord. From fad162d26054d2bbd280c727dbde37339a3fb4ec Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:48:39 -0800 Subject: [PATCH 6/8] Update lab-5.md --- docs/DAV/lab-5.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/DAV/lab-5.md b/docs/DAV/lab-5.md index 4c08f3f..2bc131b 100644 --- a/docs/DAV/lab-5.md +++ b/docs/DAV/lab-5.md @@ -14,6 +14,8 @@ This lab, well, is not really a lab. It’s a guided walkthrough of how your mic [Pin Sheet](https://docs.google.com/spreadsheets/d/1jTgphR61ozrNZlr9dLvId5t3o0FrikxSZWwAvhXF0Yo/edit#gid=0) +[Solution](https://github.com/amidthestars/DAV-Outreach-Module-Solutions) + ## Contact Us You can contact the DAV leads on Discord. From 1dad9e3ceca72b856cd7732d85154d83f5c81a0f Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 04:59:13 -0800 Subject: [PATCH 7/8] Update lab-1.md --- docs/DAV/lab-1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/DAV/lab-1.md b/docs/DAV/lab-1.md index 39b019f..b82e225 100644 --- a/docs/DAV/lab-1.md +++ b/docs/DAV/lab-1.md @@ -72,7 +72,7 @@ Remember that testbenches are less like digital circuit modules and more like si Now that you’ve verified your design in simulation, it’s time to upload it to the FPGA and see if it really works. Set `miniALU_top.sv` as the top level and run Synthesis again. -Now, open the Pin Planner. It should list your top-level I/O ports at the bottom below a large grid of colors and shapes. Ignore the grid and refer to the [Pin Sheet]([Pin Sheet](https://docs.google.com/spreadsheets/d/1jTgphR61ozrNZlr9dLvId5t3o0FrikxSZWwAvhXF0Yo/edit#gid=0)) to map your pins. More detailed instructions are provided in the workshop. +Now, open the Pin Planner. It should list your top-level I/O ports at the bottom below a large grid of colors and shapes. Ignore the grid and refer to the [Pin Sheet](https://docs.google.com/spreadsheets/d/1jTgphR61ozrNZlr9dLvId5t3o0FrikxSZWwAvhXF0Yo/edit#gid=0) to map your pins. More detailed instructions are provided in the workshop. Once you’ve done that, run the Fitter and Assembler, then program your FPGA. If all is well, each switch should be able to control the LED above it! @@ -86,7 +86,7 @@ In this module, you’ll implement a very **basic ALU **that performs two operat Your ALU will **use the switches** as indicated below: -![alt_text](images/image12.png "image_tooltip") +![An image of ten switches on an FPGA. The first four from the left are underlined in red as operand1, a 4 bit number. The next four are underlined as operand2, also 4 bits. The next switch (second from the right) is marked as the select switch.] (images/image12.png "image_tooltip") The select switch will dictate whether the ALU operation is an **addition** (i.e. when `select` is HIGH, output **operand1 + operand2**) or a left-shift (when `select` is LOW, output **operand1 \<\< operand2**). There’s a commonly used hardware block (and a related Verilog construct) that allows you to select between two or more values based on a boolean condition; do you remember what it is? (Hint: It was mentioned in the lecture!) @@ -116,7 +116,7 @@ In this part of the lab, you will implement a seven-segment decoder. In other wo Each digit of the seven-segment display of the FPGA requires 8 bits to drive: 7 bits for the segments and an additional bit for the decimal point. This module, which we’ll call `sevenSegDigit`, accepts a **4-bit number** and a **1-bit on/off switch as input** and **output an 8-bit number** for the segments. -![alt_text](images/image11.png) +![A picture of a seven-segment display unit in the shape of an 8. 0 represents the top segment, 1 represents the top right segment, 2 represents the bottom right segment, 3 represents the bottom segment, 4 represents the bottom left segment, 5 represents the bottom right segment, and 6 represents the middle segment.](images/image11.png) The segments in each digit are represented by the picture shown here. In other words, “bit 0” (i.e. the LSB) in your 8-bit number should represent the top segment, bit 1 should represent the top-right, etc. Pay careful attention to your indexing when you assign to these segments. From 8ce02b117c22200214d3e83aa8a14171c21ffa72 Mon Sep 17 00:00:00 2001 From: Claire Huang <60304457+amidthestars@users.noreply.github.com> Date: Mon, 1 Jan 2024 05:09:28 -0800 Subject: [PATCH 8/8] Update lab-2.md --- docs/DAV/lab-2.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/DAV/lab-2.md b/docs/DAV/lab-2.md index c7a3970..dafead1 100644 --- a/docs/DAV/lab-2.md +++ b/docs/DAV/lab-2.md @@ -57,7 +57,7 @@ All that being said, here’s the “spec” for your clock divider: - We tend to use this clock divider module for slower clocks where accuracy isn’t a high concern, so your speed input should only have enough bits to indicate a clock speed of at most **1 MHz**. You should think about how much that is in Hz and calculate the number of bits appropriately. (There’s a neat trick to finding that number of bits – see if you can find it in [Verilog Docs and FAQ](https://docs.google.com/document/d_8ruatZIb3sZb-3Kk3WOYC8Jzv4HvdwrTPZUGVupdVE/edit)!) - As we discussed in lecture, the clock divider uses a counter to determine when to flip the clock. The counter’s maximum value is simply your division ratio – if your base clock is 16 Hz and your output speed is 4 Hz, your counter should increment every clock cycle but never exceed **3** , i.e. **`(BASE_SPEED / speed) - 1`**. - We subtract 1 here because the counter range starts at 0, meaning that a clock period spans 0 to 3 – a total of 4 clock cycles. -- This module will require both a sequential block and a combinational block. +- This module will require both a sequential block and a combinational block. Recall that when we write sequential circuits, we try to keep our logic contained in the combinational block as much as possible, and we reserve the sequential block for synchronously assigning values. - In the **combinational block**, you will determine what the value of your output clock will be for the next clock cycle. If the reset button is pressed, set the output clock to 0. If the counter is less than halfway up to the maximum value, i.e. less than or equal to 1 in the example above, also set the output clock to 0. Otherwise, set it to 1. This will ensure a **50% duty cycle**; most of our peripherals (including the buzzer) are only happy at 50%, so in general you should pick that as your output clock’s duty cycle of choice. - :::note A common industry standard naming convention is `regName_d` to indicate the value of `regName` on the following clock cycle. @@ -109,7 +109,7 @@ For those who have never touched a breadboard, here’s a quick introduction. Here’s a picture of a breadboard. For our purposes, we can ignore the areas between the - and + on either side. (If you’re curious, those would be for if you wanted to attach batteries or power sources.) -![alt_text](images/image2.png) +![A diagram of a breadboard.](images/image2.png) What we want to observe is the pins in the middle. We’ll refer to the A-J lines as “columns” and the 1-30 lines as “rows.” (A2 would be column A, row 2). Notice the yellow lines connecting everything row-wise? If we want to connect something in series, we would want to connect them using pins in the same row. That’s all we’ll need for the purposes of DAV. (For reference, connecting things across columns would be connecting them in parallel.) @@ -155,7 +155,7 @@ So how do we get started? We’re going to provide you with a block diagram for the alarm clock. A block diagram is essentially a bird’s-eye view of all the modules in the stopwatch and how they go together. This is a simplified version, i.e. not everything is connected up and **the buzzer is missing** – if it were complete, you wouldn’t have very much to figure out yourself :-) -![alt_text](images/image1.png) +![A semi-complete block diagram of an alarm clock, with each block representing a module. The first module, "clockDivider," is clocked by the 50 megahertz clock from the FPGA, takes in a speed switch as input, and outputs a new clock at the desired speed. This divided clock becomes the clock for the alarmController module, which also takes in the buttons as input. The output of this module goes into the alarmClock top module, which contains the seven segment display and seven segment digit modules. The alarmClock top module outputs six buses that go into the FPGA's seven segment displays.](images/image1.png) - Each rectangle is a “block,” or a module with the given name. (You can choose your own names if you’d like.) - The wires coming from within `FPGA` are pins on the FPGA that you will route into your top level module, `alarmClock_top`.