TGFF (Task graphs for free)

Benchmarks and case studies which contain task information but possibly no code
Post Reply
syed
Posts: 4
Joined: Tue Jul 14, 2015

TGFF (Task graphs for free)

Post by syed » Thu Jul 16, 2015

Task Graphs For Free (TGFF)

Documentation and published papers can be found on the link provided above.


Short summary:

Generate reproducible task graphs with homo/heterogeneous processors, with/without communication messages and much more.


Pros:
  • Easy to understand/use.
  • Reproducible task sets.
  • Wide range of parameters can be generated.

Cons:
  • No direct control over utilization.
  • Utilization distribution: Only Gaussian. (not written in the documentation, but found experimentally)
  • No support for conditional checks between same parameters (e.g. Sum of Utilization <= 1) or multiple parameters (e.g. Sum of WCET of longest chain <= deadline of that chain)

Usage:

Each task defines a type (unique or not) instead of all possible parameters (WCET, criticality levels, etc.). Once the type table is generated, corresponding tables for parameters (WCET, criticality levels, etc.) can be generated.

Sample input file:

Code: Select all

seed 1 # Specifies uniqueness of the taskset. Reproduce using same seed.
tg_cnt 1 # Number of task graphs
task_cnt 20 5 # Number of tasks: Average, +- Range
task_degree 2 2 # Predecssors and successors per task
task_trans_time 200 # Hyperperiod Control
period_mul 0.1, 0.5, 1, 2 # Multiples for 'task_trans_time' to be used as Periods
period_g_deadline 1 # Implicit deadlines
task_unique 1 # Task types become unique
tg_write
eps_write
table_label PROC # New table called PROC
table_cnt 1 # Types of tables (i.e. processors, homogeneous in this case)
table_attrib # Number of values per table
type_attrib  WCET 50 40 # 'WCET': Average, +- Range
pe_write # Create processor table
table_label COMMUN
table_cnt 1
table_attrib
type_attrib  Mess_Len 5 4 # Message length: Average, +-Range
trans_write # Create message table
Last edited by syed on Thu Jul 16, 2015, edited 2 times in total.

syed
Posts: 4
Joined: Tue Jul 14, 2015

Re: TGFF (Task graphs for free)

Post by syed » Thu Jul 16, 2015


Script

Generate multiple graphs and convert them to our own format (e.g. XML)


The script assumes that there is no seed command in the input tgffopt file.

Code: Select all

#!/bin/bash
# --------------------------------------------------------- Functions -------------------------------------------------------------------
function printUsage {
	echo "Usage: $0 <TGFF path> <TGFFConverter path> <tgffopt input file> <number of tasksets to generate> <required cores> <output folder>"
	echo "1) Generates <number of tasksets to generate> tasksets in <output folder> from <TGFF path> using the initial file as <tgffopt input file> and seeds them from 0 to <number of tasksets to generate>."
	echo "2) Converts generated tasksets to desired format using <TGFFConverter>"
}
# --------------------------------------------------- Check command line arguments -------------------------------------------------------
if [ ! $# == 6 ]
then
	printUsage
exit
fi
TGFF=$1
TGFFConverter=$2
START_FILE=$3
NUMBER_OF_TASKSETS=$4
CORES_REQUIRED=$5
OUTPUT_FOLDER=$6
if [ ! -e "$TGFF" ]
then
	echo Unable to find TGFF
	exit 2
elif [ ! -e "$TGFFConverter" ]
then
	echo Unable to find $TGFFConverter
	exit 2
elif [ ! -e "$START_FILE" ]
then
	echo Unable to find $START_FILE
	exit 2
elif [ $NUMBER_OF_TASKSETS -eq 0 ]
then
	echo Please define valid number of tasksets and cores
	exit 2
fi

# Remove previous tasksets (if exist)
rm -rf $OUTPUT_FOLDER
# Create folder
mkdir $OUTPUT_FOLDER
for (( c=0; c<NUMBER_OF_TASKSETS; c++ ))
do
	# Copy START_FILE
	TEMP_NAME="$OUTPUT_FOLDER/${START_FILE%.tgffopt}$c.tgffopt"
	cp $START_FILE $TEMP_NAME

	# Add seed to the start of the file
	sed -i "1iseed $c" $TEMP_NAME

	# Run TGFF
	$TGFF ${TEMP_NAME%.tgffopt}

	# RUN TGFFConverter
	$TGFFConverter ${TEMP_NAME%opt} $CORES_REQUIRED
done

rm $OUTPUT_FOLDER/*.vcg $OUTPUT_FOLDER/*.tgff $OUTPUT_FOLDER/*.tgffopt $OUTPUT_FOLDER/*.eps
Feel free to modify.

Post Reply