One of the most powerful features of DesignLab is creating your own customized ZPUino System on Chip circuit. This tutorial shows you all the steps needed to make your own custom SOCs.
Initial Circuit Setup
Starting with an existing example
Before starting, make sure the board (Papilio DUO FPGA ZPUino is selected. Go to Tools>Board>PapilioFPGA Boards>Papilio DUO FPGA ZPUino.
Open DesignLab, under the table of contents, you will find several sections with links. Under Hardware>Audio Wing, look for example://WING_Audio/examples/Audio_YM2149_simple/Audio_YM2149_simple.ino and click on it:
This will open a new window with the circuit example.
After you delete the #define circuit Audio_Wing, click on the Edit button. This will bring up the Xilinx ISE WebPack software with the circuit we want to edit.
In the ISE Project Navigator, go to the top level file and double click on Papilio_DUO_LX9 (Papilio_DUO_LX9.sch)
Analysing the schematic
Let’s take a look at the schematic file. We have a ZPUino Soft Processor and 3 different audio chips: Audio Passthrough, YM2149 Audio Chip and C64 SID Audio Chip connected to the Wishbone slots 5,6 and 8 respectively. All three Audio Chips feed into an Audiomixer which mixes together the audio from the three different chips and presents it out on one signal. That signal goes to a splitter that will feed both left and right side of the Audio Wing.
Video Clip of Schematic Analysis
Adding an Audio Wing
We’re gonna add a new Audio Wing connector so we can output audio to both Wings at the same time. First of all, delete the place holder from the CL Wing.
Make sure you also delete the remaining wires.
Then go ahead and delete the 2 way splitter:
Now add an Audio Wing by either selecting it from the Symbol Library or by copying the existing Audio Wing and dragging it in the CL Wing.
Go back to the Symbol Library and select a 4 way splitter. Add it to the circuit.
Then draw connections
Disabling the ATmega AVR Chip
Since we won’t be using the ATmega AVR Chip with this circuit design, we’ll be disabling it.
Then replace the DUO_SW1 with a Pullup to disable the ATmega AVR chip. In order to do that, go to Symbols, search pullup, then select it and connect it to the ATmega AVR Chip.
Synthesizing the circuit
To synthesize the circuit, go to Design, make sure the top level is selected and then double click on Generate Programming File.
If you run into any problem, you can do the following:
Go to Project>Cleanup Project Files
Double click on Generate Programming File
Click on Toggle Transcript View to track the progress of the process.
After a few moments of processing, the message: Process “Generate Programming File Completed Successfully”
Loading the circuit and playing the audio
Make sure the board is connected and that you can connect to the FPGA port.
Click on Load Circuit
The message Done burning bitfile should be displayed as follows
We need to load a sketch to the ZPUino soft processor before hearing audio output from the CH and CL Wing connections
First go to Tools and make sure the correct port is selected. It should be COM5. It should corresponds with the port we see in the Windows device manager.
then click on Upload
This will upload the YM file and the code to play that file.
Now you should be able to hear the audio file playing.
Going back to the camera view, we’re gonna add an Audio Wing in the CL slot and plug it on.
Full Video Walkthrough
Full Walkthrough Video