This repository implements the design published in Design of a Software-Defined Multi-Channel Function Generator which demonstrates the design of a multi-channel function generator. The pattern generators are fully software defined allowing maximum flexibility. Four different patterns are chosen as examples to demonstrate the ability to generate any desired waveform using simple software implementation. The design is built on an embedded FPGA/SoC platform (AMD Zynq Ultrascale+) which proves feasibility to deploy this design in a real-world product.
This design was tested on an Ubuntu 20.04 build machine.
- Xilinx ZCU102
- Micro USB cable
- Second Micro USB cable or other JTAG debugger
- Xilinx Vitis 2021.2
- Xilinx Vivado 2021.2
Execute the following steps to build the design
Prior to running the Makefile to build this design, you must first source the Vitis and Petalinux settings script to set up your environment properly
source <xilinx_install>/Vitis/2021.2/settings64.sh
- Clone the repository
git clone https://github.com/bwiec/ece554_proj
- Run
make
make
Upon successful completion of the build, a directory called ws
will be created. This directory is a Vitis workspace.
Once the build is complete, follow these steps to run the design on the target.
- Connect the 6-pin power connector to the ZCU102
- Connect a micro USB cable from the USB UART connector on the board to a host PC
- On the host PC, open a serial terminal connection to this UART COM port at 115200 baud rate
- Connect another micro USB cable from the host PC to the USB JTAG connector on the board. Alternatively, connect a debugger to the JTAG port
- Set the boot mode swtich SW6 to JTAG
- Power on the board
Having successfully powered up the board and connected to it, follow these steps to launch the two R5 applications
- Launch Vitis and select to the
ws
directory - Replace the contents of both
lscript.ld
files in this project with the ones in thesrc
directories - Build the project
- Right-click one of the r5_* applications and select
Debug Configurations
then create a newTCF Single Application Debug
configuration - Select the
Application
tab then make sure both boxes are checked for thepsu_cortexr5_0
andpsu_cortexr5_1
cores and ensure thatpsu_cortexr5_0
is being loaded withr5_ui.elf
and thatpsu_cortexr5_1
is loaded withr5_function_generator.elf
. - Click
Debug
. This will program the FPGA bitstream, load the elf files, and start the debugger.
At this point, both applications are running and you should see the main menu printed in the UART terminal
Now that the applications are up and running, view the output waveforms by:
- Launch Vivado
- Select
Open Hardware Manager
thenOpen Target
and connect to your JTAG cable - Open the
hw_ila_1
window - In the
Trigger Setup
tab, add the signalsaxi_fifo_mm_s_0_AXI_STR_TXD_TREADY
andaxi_fifo_mm_s_0_AXI_STR_TXD_TVALID
, set both theirValues
to1
, and set the trigger condition toand
- In the
Settings
tab, change theNumber of Windows
to50
- Arm the ILA
At this point, the ILA window will capture samples and update the waveform. Initially, all the waveforms (i.e. all the axi_fifo_mm_s_0_AXI_STR_TXD_TDATA
signals) will be blank because no channels have been turned on yet.
Next, turn on the waveforms and make any desired changes via the UART menu. Updated waveforms can again be captured by running step 6 above to arm the ILA.