Tool for running mixed-signal emulations on FPGAs
> pip install anasymod
If you get a permissions error when running one of the pip commands, you can try adding the --user flag to the pip command. This will cause pip to install packages in your user directory rather than to a system-wide location.
Check to see if the anasymod command-line script is accessible by running:
> anasymod -h
If the anasymod script isn't found, then you'll have to add the directory containing it to the path. On Windows, a typical location is C:\Python3*\Scripts, while on Linux or macOS you might want to check ~/.local/bin (particularly if you used the --user flag).
Prerequites to run the examples
The examples included with anasymod use Icarus Verilog for running simulations, Xilinx Vivado for running synthesis and place-and-route, and GTKWave for viewing the simulation and emulation results. The instructions for setting up these tools are included below for various platforms.
Install Xilinx Vivado by going to the downloads page. Scroll to the latest version of the "Full Product Installation", and download the Windows self-extracting web installer. Launch the installer and follow the instructions. You'll need a Xilinx account (free), and will have to select a license, although the free WebPACK license option is fine you're just planning to work with small FPGAs like the one on the Pynq-Z1 board.
GTKwave and Icarus Verilog can be installed at the same time using the latest Icarus binary here.
Install Xilinx Vivado by going to the downloads page. Scroll to the latest version of the "Full Product Installation", and download the Linux self-extracting web installer. Then, in a terminal:
> sudo ./Xilinx_Vivado_SDK_Web_*.bin
A GUI will pop up and guide you through the rest of the installation. Note that you'll need a Xilinx account (free), and that you can select the free WebPACK license option if you're planning to work with relatively small FPGAs like the one on the Pynq-Z1 board.
Next, the Xilinx cable drivers must be installed (AR #66440):
> cd <YOUR_XILINX_INSTALL>/data/xicom/cable_drivers/lin(32|64)/install_script/install_drivers > sudo ./install_drivers
Finally, some permissions cleanup is required (AR #62240)
> cd ~/.Xilinx/Vivado > sudo chown -R $USER * > sudo chmod -R 777 * > sudo chgrp -R $USER *
Installing GTKWave and Icarus Verilog is much simpler; just run the following in a terminal:
> sudo apt-get install gtkwave iverilog
Unfortunately Xilinx Vivado does not run natively on macOS. But running Windows or Linux through a virtual machine on macOS should work.
Running the Simulation Example
From within the folder anasymod/tests, run
> anasymod -i buck --models --sim --view
This will generate a synthesizable model for a buck converter, run a simulation, and display the results.
Running the Emulation Example
For this test, you'll need a Pynq-Z1 board.
- To start, make sure that your board is set up correctly:
- Jumper JP4 should be set for "JTAG"
- Jumper "JP5" should be set for "USB"
- Plug the Pynq board into your computer using a micro USB cable.
- Move the Pynq board power switch to "ON"
- Go to the folder anasymod/tests and run the following command. It will take ~10 min to build the bitstream.
> anasymod -i buck --models --build
- Run the emulation with the following command:
> anasymod -i buck --emulate
- View the results with the following command:
> anasymod -i buck --view
- Note that you can adjust the emulation time using the --start_time and/or --stop_time options:
> anasymod -i buck --emulate --start_time 1.23e-6 --stop_time 4.56e-6
To improve the quality of the software, users are encouraged to share modifications, enhancements or bug fixes with Infineon Technologies AG under Gabriel.Rutsch@infineon.com.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size anasymod-0.3.9.tar.gz (96.5 kB)||File type Source||Python version None||Upload date||Hashes View|