Audio Mapping Tool

Presentation

The Audio Mapping Tool is a complementary tool in the Audio Framework toolchain.

Its role is to transform an unsolved input audio graph into a resolved one by filling it with audio graphs from libraries and applying generators to populate parametric graphs.

It takes high-level functional graph description provided by frontend applicatons and produces an elaborated graph that contains all details needed so that it can be deployed on GAP platform.

Currently it performs followging functions:

  • loads library components

  • generates dynamic components

Functions that are being developed:

  • inserts intermediate utility and interfacing nodes

  • automatize mapping of the graph on GAP9 resources (mainly FC and Cluster cores, and SFU module) to achieve optimal performance and resource usage

  • calculate optimal buffer types and sizes between nodes

  • calculate optimal scheduling

The Mapping Tool will optimize the mapping according to multiple constraints:

  • real-time constraints

  • latency

  • power consumption

  • hardware constraints (for example the number of hardware blocks)

  • software constraints

  • user-defined constraints

Operation

AMT processes the graph in several steps.

Firstly, black-box nodes that reference library components (by “template” property) are expanded and replaced with full description that includes internal topology of the node, ports and parameters.

If a component has “generator” property, AMT will load referenced dynamic link library (.so) that contains various generators for that component.

If a component has “dynamic” property set, AMT will invoke “create” handler from component .so with user parameters to generate topology of the node. Example of this component in the library is mixer, which can be created with various number of input ports. Otherwise, if “dynamic”=false, component is considered static and fully described by its .comp file.

Then AMT overrides default parameter and descriptor values with ones from the input graph. This also includes overriding of properties of individual ports of the node. If a components supports multiple implementations, AMT takes one (selected by the user) and drops all others.

With resolved node-level parameters, AMT then invokes “get_implem_params” handler from component .so with full set of functional parameters in order to convert functional parameters to parameters specific for selected implementation. For example, it may convert floating-point filter coefficients to fixed-point and bit-shift amounts relevant for SFU filters. btained converted parameters are then placed in “implementations” section of the node object.

When a node is fully resolved, AMT descends into subnodes and recursively repeats the process until all nodes of the graph are resolved.

Finally a .json file is produced containing expanded graph with all parameters converted to implementaion-specific format. This file serves as input for RTG (Runtime Generator) tool.

Arguments

Command

Short

Type

Explanation –

-input

-i

str

Input graph file to map. –

-outputdir

-o

str

Output directory. If left unset, the output file will be written as the same location as the input graph. –

-include

-I

str

Add include directories. –

-lib

-L

str

Set the library root path –

-no_mem

-m

bool

If set, the graph will not be adapted for SFU by inserting mem_in/mem_out where required. (not implemented) –

-no_ffc

-f

bool

If set, the graph will not be adapted by inserting FFC converters. (not implemented) –

-no_fanout

-n

bool

If activated, the graph will not be adapted by fanning out unconnected ports to the root boundary. (not implemented)–

-verbosity

-v

int

Set verbosity level. (not implemented) –

-debug_dump

-d

bool

Activate debug dump (not implemented) –

Examples

See tests/inputs for examples of unmapped graphs, and tests/refs for mapped ones.

Usage

To run the Mapping Tool on a given graph, use the -i command:

./audio_mapping_tool -i tests/inputs/fft_ifft.graph

Test

To test the Mapping Tool, run the run_tests.py script:

./run_tests.py