Subsections


3 Automatic Design Space Explorer (explore)

Automatic Design Space Explorer automates the process of searching for target processor configurations with favourable cost/performance characteristics for a given set of applications by evaluating hundreds of processor configurations.

Input: ADF (a starting point architecture), TPEF, HDB

Output: ExpResDB (Section 2.2.8)

1 Explorer Application format

Applications are given as directories that contain the application specific files to the Explorer. Below is a description of all the possible files inside the application directory.

file name Description
program.bc The application byte code.
description.txt The application description.
simulate.ttasim TTASIM simulation script piped to the TTASIM to produce ttasim.out file. If no such file is given the simulation is started with "until 0" command.
correct_simulation_output Correct output of the simulation used in verifying.
max_runtime The applications maximum runtime.
setup.sh Simulation setup script, if something needs to be done before simulation.
verify.sh Simulation verify script for additional verifying of the simulation, returns 0 if OK. If missing only correct_simulation_output is used in verifying.

Below is an example of the file structure of HelloWorld application. As The maximum runtime file is missing application is expected not to have a maximum runtime requirement.

HelloWorld/program.bc
HelloWorld/correct_simulation_output
HelloWorld/description.txt

2 Command Line Options

The exploration result database <output_dsdb> is required always. The database can be queried applications can be added into and removed from the database and the explored configurations in the database can be written as files for further examination.

The possible options of the application are as follows:

Short Name Long Name Description
d add_app_dir Path(s) of the test application(s) to be added into the DSDB.
a adf ADF to add into the DSDB.
n conf_count Print the number of machine configurations in the DSDB.
c conf_summary Print the summary of machine configurations in the DSDB ordered by: Ordering may be one of the following: I ordering by configuration Id, P ordering by application path, C ordering by cycle count, E ordering by energy estimate.
e explorer_plugin Design Space Explorer plugin to be used.
b hdb HDB to use with exploration.
i idf IDF to add into the DSDB, needs also ADF.
l list_apps List the applications in the DSDB.
g list_plugins List loadable explorer plugins.
p plugin_info Get information about a plugin.
u plugin_param Parameter to the explorer plugin in form 'name=value'. If parameter value is boolean, use 'true', 'false', 1 or 0.
r rm_app ID(s) of the test program path(s) to be removed from the DSDB.
s start Starting point configuration ID in the DSDB.
w write_conf export the ADF and IDF files from the DSDB with given configuration id. Does not remove the configuration from the DSDB.

Depending on the exploration plugin, the exploring results machine configurations in to the exploration result database dsdb. The best results from the previous exploration run are given at the end of the exploration:

explore -e RemoveUnconnectedComponents -a data/FFTTest -hdb=data/initial.hdb data/test.dsdb

Best result configurations:
 1
Exploration plugins may also estimate the costs of configurations with the available applications. If there are estimation results for the configuratios those can be queried with option -conf_summary by giving the ordering of the results.

The Explorer plugins explained in chapters below can be listed with a command:

explore -g

And their parameters with a command:

explore -p <plugin name>

These commands can help if, for some reason, this documentation is not up-to-date.

3 Explorer Plugin: SimpleICOptimizer

SimpleICOptimizer is an explorer plugin that optimizes the interconnection network of the given configuration by removing the connections that are not used in the parallel program.

This is so useful functionality especially when generating ASIPs for FPGAs that there's a shortcut script for invoking the plugin.

Usage:

 minimize-ic unoptimized.adf program.tpef target-ic-optimized.adf

However, if you want more customized execution, you should read on.

Parameters that can be passed to the SimpleICOptimizer are:

Param Name Default Value Description
tpef no default value name of the scheduled program file
add_only false Boolean value. If set true the connections of the given configuration won't be emptied, only new ones may be added
evaluate true Boolean value. True evaluates the result config.

If you pass a scheduled tpef to the plugin, it tries to optimize the configuration for running the given program. If multiple tpefs are given, the first one will be used and others discarded. Plugin tries to schedule sequential program(s) from the application path(s) defined in the dsdb and use them in optimization if tpef is not given.

Using the plugin requires user to define the configuration he wishes optimize. This is done by giving -s <configuration_ID> option to the explorer.

Let there be 2 configurations in database.dsdb and application directory path app/. You can optimize the first configuration with:

explore -e SimpleICOptimizer -s 1 database.dsdb

If the optimization was succesfull, explorer should output:

Best result configuration:
 3
Add_only option can be used for example if you have an application which isn't included in application paths defined in database.dsdb but you still want to run it with the same processor configuration. First export the optimized configuration (which is id 3 in this case):

explore -w 3 database.dsdb

Next schedule the program:

schedule -t 3.adf -o app_dir2/app2.scheduled.tpef app_dir2/app2.seq

And then run explorer:

explore -e SimpleICOptimizer -s 3 -u add_only=true -u tpef=app_dir2/app2.scheduled.tpef database.dsdb

The plugin now uses the optimized configuration created earlier and adds connections needed to run the other program. If the plugin finds a new configuration it will be added to the database, otherwise the existing configuration was already optimal. Because the plugin won't remove existing connections the new machine configuration is able to run both programs.

4 Explorer Plugin: RemoveUnconnectedComponents

Explorer plugin that removes unconnected ports from units or creates connections to these ports if they are FUs, but removes FUs that have no connections. Also removes unconnected buses. If all ports from a unit are removed, also the unit is removed.

You can pass a parameter to the plugin:

Param Name Default Value Description
allow_remove false Allows the removal of unconnected ports and FUs

When using the plugin you must define the configuration you wish the plugin to remove unconnected components. This is done by passing -s <configuration_ID> to explorer.

If you do not allow removal the plugin will connect unconnected ports to some sockets. It can be done with:
explore -e RemoveUnconnectedComponents -s 3 database.dsdb
or
explore -e RemoveUnconnectedComponents -s 3 -u allow_remove=false database.dsdb
if you wish to emphasise you do not want to remove components. This will reconnect the unconnected ports from the configuration 3 in database.dsdb.

And if you want to remove the unconnected components:
explore -e RemoveUnconnectedComponents -s 3 -u allow_remove=true database.dsdb

5 Explorer Plugin: GrowMachine

GrowMachine is an Explorer plugin that adds resources to the machine until cycle count doesn't go down anymore.

Parameters that can be passed to the GrowMachine are:

Param Name Default Value Description
superiority 2 Percentage value of how much faster schedules are wanted until cycle count optimization is stopped

Using the plugin requires user to define the configuration he wishes optimize. This is done by giving -s <configuration_ID> option to the explorer.

Example of usage:

explore -e GrowMachine -s 1 database.dsdb

6 Explorer Plugin: ImmediateGenerator

ImmediateGenerator is an Explorer plugin that creates or modifies machine instruction templates. Typical usage is to split an instruction template slot among buses.

Parameters that can be passed to the ImmediateGenerator are:

Param Name Default Value Description
print false Print information about machines instruction templates.
remove_it_name no default value Remove instruction template with a given name
add_it_name no default value Add empty instruction template with a given name.
modify_it_name no default value Modify instruction template with a given name.
width 32 Instruction template supported width.
width_part 8 Minimum size of width per slot.
split false Split immediate among slots.
dst_imm_unit no default value Destination immediate unit.

Example of adding a new 32 width immediate template named newTemplate that is splitted among busses:

explore -e ImmediateGenerator -s 1 -u add_it_name="newTemplate" -u width=32 -u split=true database.dsdb

7 Explorer Plugin: ImplementationSelector

ImplementationSelector is an Explorer plugin that selects implementations for units in a given configuration ADF. It creates a new configuration with a IDF.

Parameters that can be passed to the ImmediateGenerator are:

Param Name Default Value Description
ic_dec DefaultICDecoder Name of the ic decoder plugin.
ic_hdb asic_130nm_1.5V.hdb name of the HDB where the implementations are
selected.    
adf no default value An ADF for the implementations are selected if no
database is used.    

Example of creating implementation for configuration ID 1, in the database:

explore -e ImplementationSelector -s 1 database.dsdb

8 Explorer Plugin: MinimizeMachine

MinimizeMachine is an Explorer plugin that removes resources from a machine until the real time requirements of the applications are not reached anymore.

Parameters that can be passed to the ImmediateGenerator are:

Param Name Default Value Description
min_bus true Minimize buses.
min_fu true Minimize function units.
min_rf true Minimize register files.
frequency no default value Running frequency for the applications.

Example of minimizing configuration ID 1, in the database, with a frequency of 50 MHz:

explore -e MinimizeMachine -s 1 -u frequency=50 database.dsdb

Pekka Jääskeläinen 2010-05-28