Skip to main content

Tool for running mixed-signal emulations on FPGAs

Project description

anasymod

BuildKite Status Code Coverage License:BSD-3-Clause

anasymod is a tool for running FPGA emulations of mixed-signal systems. It supports digital blocks described with Verilog or VHDL and synthesizable analog models created using msdsl and svreal.

Installation

> 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.

Windows

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.

Linux

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

macOS

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.

  1. To start, make sure that your board is set up correctly:
    1. Jumper JP4 should be set for "JTAG"
    2. Jumper "JP5" should be set for "USB"
  2. Plug the Pynq board into your computer using a micro USB cable.
  3. Move the Pynq board power switch to "ON"
  4. 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
  1. Run the emulation with the following command:
> anasymod -i buck --emulate
  1. View the results with the following command:
> anasymod -i buck --view
  1. 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

Contributing

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for anasymod, version 0.1.9
Filename, size File type Python version Upload date Hashes
Filename, size anasymod-0.1.9.tar.gz (66.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page