Using Python for FPAA Programming
This tutorial introduces the fundamental steps to program the FPAA using Ashes. This tutorial assumes that you have already installed all the necessary dependencies in an existing Python interpreter.
- Open VSCode (or your desired IDE)
- Navigate to
/ashes/ashes_fg/examples.py, which contains the definition of some basic example circuits. - Do not modify the
examples.pyfile. Instead, create a copy or another file and adjust the CABs location and IO pins. For this tutorial, we will only program theors_buffer. - Reprogram
ors_bufferas follows: - Open
/ashes/ORS_run_me.py. This is the run file to compile and program the circuit on the FPAA. - Modify
ORS_run_me.py:- Ensure you import
ors_bufferfrom your copy ofexample.py. - Change circuit name to the desired circuit and change the project name to whatever you desire. The project name dictates the name of the folder that will store all the intermediary output files. Also update the chip number so that it corresponds to the board you are programming
- Ensure you import
- You should end up with something similar to the following for
ORS_run_me.py: - Run the file via terminal
- Navigate directory to
ashes - Run
ORS_run_me.py - Input password for sudo access if inquired.
- When the routing app window from vpr pops up, confirm the correct CAB location has been chosen, then close the pop-up to continue the process.
- Navigate directory to
- Use waveforms and Analog Discovery to check buffer functionality
- Connect wavegen 1 to IOpad_5 (input)
- Connect scope 1+ to IOpad_6 (output)
- Ground the Analog Discovery and scope wires to FPAA GND
- Set the wavegenerator to generate the following input wave:
- Sinewave
- Amplitude: 350 mV
- Offset: 1.2 V (increase the offset to 1.4 V if the bottom of the signal is distorted)
- Frequency: 1 kHz
- You should expect the output wave to look as follows:
