Virtual Platform - 2021.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
Release Date
2021.2 English

A virtual platform specification helps to connect the data flow graph written with external I/O mechanisms specific to the chosen target for testing or eventual deployment. The platform could be specified for a simulation, emulation, or an actual hardware execution target.

Current release support is only for a simulation platform, which implies that you can execute a data flow graph in a software simulation environment. This is the specification.

simulation::platform<#inputs, #outputs> platform-name(port-attribute-list);

The #inputs and #outputs specify how many input and output ports are needed in the platform to connect to the data flow graph. The platform object is pre-populated with src and sink arrays of output and input ports (respectively) to make the connection. The simpleGraph example from Introduction to AI Engine Programming is used in this example.

simpleGraph mygraph;
simulation::platform<1,1> platform("input.txt","output.txt");
connect<> net0(platform.src[0],;
connect<> net1(mygraph.out, platform.sink[0]);

The port-attribute list within the platform declaration is an enumeration of attributes of each platform port starting with all the inputs and followed by the outputs. These are described in the following sections.