Overivew
This lab has 4-parts:
- FPGA File I/O
- Divider with Cache
- Gray-code counter
- Chipscope Lab (Not assigned Su 2025)
Task 1: File I/O - UART Assistant
See subfolder Labs/Lab02/FileIO-UART.
Prelab
- You can watch the linked
prelab/File_IO_with_UART.mp4video (recording date: 5/29/2022). - Review the
prelab/File_IO_with_UART_protocol_2020.pdfdocument regarding serial (UART) communications and how our FPGA based UART transmitter/receiver works.
Procedure
- Start by reading the
uartAssistant_Install_Megatest.pdfdocument fully to get an overview. - For Windows users: Install the uARTAssistant tool that is in the
UARTAssistantInstallsubfolder linked on the shared folder. Follow the instruction in theuartAssistant User Guide.pdfin that subfolder. Note: Windows may flag this setup program as “not trusted”. Install it anyways. - For non-Windows users: You will need to run the tool via the VDI.
- Download and extract the
Conatenation_FileIO_2024.zipfile which has a fully complete Vivado project for theconcatenation_mem_3_A7exercise. - Follow the directions in the
Concatenate_FileIO_ReadMe.pdfto run themem_3_A7exercise, going slowly to ensure you do not miss a step. Note: If you are trying to use the provide project in a newer version of Vivado, say yes to the various prompts to upgrade the project to a new folder structure and version of Vivado. - Continue to follow the instructions to create a new Vivado project for the
mem_8_A7exercise and ensure you can run the uARTAssistant tool successfully. - Demo this to your TA.
- Answer the questions in the
Assignment_FILE_IO_2021.pdf/docxand submit the resulting annotated or exported PDF to Gradescope.
Submission
- Demo your working
mem_8_A7project and the ability to run uARTAssistant to your TA. - Review question: Individually complete and submit your annotated or exported PDF answers in the
Assignment_FILE_IO_2021.pdfvia Gradescope (also linked via Brightspace).
Task 2: Divider with Cache (Part 1 only)
All source code and background files are located in the Google Folder under the appropriate lab folder.
See subfolder Labs/Lab02/DivCache.
For this assignment, you only need to complete Part 1 described in the writeup and this should be done in your team of 2. Also, beware that some filenames may have changed, but the changes should be self-explanatory. You only need to modify two files: cam_generic.vhd and lru_generic.vhd.
Prelab
Review the CAM Lecture slides and lecture recording on Brightspace.
Procedure
- Go through the assignment
EE560_divider_with_cache_su24.pdf. There are a few changes to beware of: - You only need to do part 1.
- We have already updated the “top” files, so no change is necesssary there.
- We refer to the uART Assistant to send and receive data to the FPGA for input/output. This was covered in part 1 of the lab. Notice: In this lab we do not use the
MegaTest/.arkfile but just send it data values via the GUI. - Submission of the answers to the questions at the end of the document should be made on Gradescope.
- The file paths (folder structure) has been updated so you do not need to use paths like:
C:\xilinx_projects\divider_with_cache. - Use the updated submission instructions that are provided on this website (i.e. this website supercedes the PDF documentation for submission.)
- Download the source files.
- This semester we are using the Artix-A7 boards. The
.zipfile below contains the source VHDL files for the divider with cache design, simulation/testbench files, a top-level, FPGA design with supporting files for uART Assistant as well as.xdcfiles, and solution/TA.bitfiles. - Complete tasks 1-3 described in
cam_generic.vhd - Complete tasks 4-5 described in
lru_generic.vhd. - Simulate the design by creating a simulation project in the
simfolder and utilize the provided.dofiles. Iterate on your design until it simulates correctly. - (Note: We want you to try to create your own Xilinx project but if you have trouble you can use the
syn/div_cache.tclscript we provide to create the project.) In Vivado, create a Xilinx project in a subfolder underneath thesynfolder (e.g. name the project and, thus, subfolder something likexlnx-div-cache…making a subfolder is nice so we can easily delete it and not pollute other folders). Add the files from thefpgaanddesfolders as well as the.xdcfile for the A7 board. - In Vivado, use the Hardware Manager to download the TA’s
.bitfile on to the board and make sure the design behaves using the UART Assistant. - Close hardware manager and synthesize, implement and generate your design in Vivado. Open Hardware Manager and download your
.bitfile and ensure the behavior is similar. Demo this behavior to the course staff to get full credit. - Use the
uARTAssistanttool to send data values to your FPGA and then usebtnLandbtnU(holding it down) to start and then step through the operation of the design as outlined in the PDF writeup. - Answer the questions on the last two pages using the parts of this lab using the
EE560_divider_with_cache_su24_extract.pdf. You will submit this on Gradescope. This step is an INDIVIDUAL paper-submission task.
Submission
- Online Submission: Submit the following files
cam_generic.vhd(fromsrc/desfolder)lru_generic.vhd(fromsrc/desfolder)div_cache_results.vhd(fromsimfolder…produced by your simulation)names.txt
submit -user ee560 -tag div-cache-p1 cam_generic.vhd lru_generic.vhd div_cache_results.txt names.txt
- Demo your working project and the ability to run uARTAssistant to your TA.
- Review questions: Individually complete and submit your annotated or scanned answers in the
EE560_divider_with_cache_su24_extract.pdfvia Gradescope (also linked via D2L..Lab-Review-Submissionmodule).
Task 3: Gray Code Counter
All source code and background files are located in the Google Folder under the appropriate lab folder.
See subfolder Labs/Lab02/GrayCode.
This lab may be done in teams.
You will use Verilog to build a 7-bit Gray code counter by cascading a less significant 3-bit Gray code counter to a more significant 4-bit Gray code counter. You only need to modify the 3-bit counter.
This lab is easy to complete, but there is a lot to learn to prepare for a question on the midterm exam!
Prelab
Review the Gray Code Lecture slides and lecture recording on D2L (as part of FIFO w/ BRAM topic).
Procedure
- Download the source files:
lab2-gray-cntr.zip - You only need to finish the
TODOparts ingray-cntr3.vThe other files are already complete. - Create a simulation project in the
simfolder and use the givengray-cntr7-tb.do - If you get the following in your transcript window you have finished this lab and can celebrate!
#
# 1745.00 ns Gray Counter is at 127 now. Clk_cnt = 174
#
# Congratulations. No errors until now.
#
Submission
- Online Submission: Submit the following files
gray-cntr3.v(fromsrc/desfolder)names.txt
submit -user ee560 -tag gray-cntr gray-cntr3.v names.txt
Task 4: Chipscope (Optional - Not assigned in 2025)
See subfolder Labs/Lab02/Chipscope.
- Individual-only lab (NO TEAMS).
- This is a paper submission only lab (no demo or code submission).
Prelab
- You can watch the linked
Chipscope_Detour_Lab_Recording.mp4video . - Review the three HP and Xilinx reference documents provided in the shared folder:
HP_logic_analyzer.pdfpg172-ila.pdfug936-vivado-tutorial-programming-debugging.pdf
- Review the lab presentation:
Chipscope_intro_2020.pdfand supplemental material (Chipscope_Intro_Part1_r4_supplement.pdf) in the shared folder.
Procedure
- Download the source files (
cscope_detour_trigger.zip) in the shared folder. - Please make sure to understand the Chipscope instantiation workflow and try it on the FPGA board. The completed demo design has the
.tsmfile (trigger state machine)detour_sw1_sw2_sw3.tsmspecifying a trigger of: SW1 ON - SW1 OFF - SW2 ON - SW2 OFF - SW3 ON - SW3 OFF. - Make a copy of this
.tsmfile with the namedetour_sw1_sw2_sw3_sol.tsmand revise the trigger state machine to specify a trigger of: SW1 ON - SW2 ON - SW3 ON - SW1 OFF - SW2 OFF - SW3 OFF. - Run the ILA for a left (note left) detour signal with the new trigger state machine and capture the resulting waveform.
- Complete the paper submission (
lab02-cscope-detour-questions.pdf/docx) and include a snip of the waveform in your PDF report.
Submission
- Review question: Individually complete and submit your annotated or exported PDF answers in the
lab02-cscope-detour-questions.pdfvia Gradescope (also linked via D2L..Lab-Review-Submissionmodule).
