Test Engine FPGA IP User Guide: Agilex™ 5 and Agilex™ 7 FPGAs

ID 817758
Date 7/08/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.2. Python library

Compiler for Test Engine IP.

Contents

This library provides the software compiler for the Test Engine drivers.

The Test Engine is essentially a multi-processor system, where each "processor" (i.e. driver) requires its own software program.

Requirements

This library is compatible with the quartus_py executable provided with the Quartus(R) Prime software installations. quartus_py is a Python 3 compiler with access to Python libraries of the Quartus(R) Prime software.

Usage

The following is a sample of how to compile software programs:
# Import the Python library for Test Engine IP

from pyhydra.runtime import HydraRuntime

from pyhydra.ipkits import HydraIpkit



# List of filepaths of .qsys and .ip files for the design containing Test Engine IP

files = [...]



# Instantiate the compiler for a specific Test Engine IP configuration

compiler = HydraIpkit(config=HydraRuntime(files).get_config(), ip_name="my_test_engine")



# Get a list of available drivers

drivers = compiler.get_drivers()



# Define the programs for each driver

prog0 = ...

prog1 = ...



# Link the programs to the drivers

compiler.attach(prog=prog0, driver=drivers[0])

compiler.attach(prog=prog1, driver=drivers[1])



# Compile the programs and dump the binary

compiler.dump("bin")
Place the compiled binary folder in the following locations:
  • For simulation, place the folder in the same folder as the simulator script

  • For the Quartus(R) Prime software compilation, place the folder in the same folder as the .qpf project file

  • For System Console library, provide the binary folder path to the library APIs