⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindoc.tex

📁 TGFF省城程序
💻 TEX
📖 第 1 页 / 共 2 页
字号:
\documentclass[english]{article}\usepackage[T1]{fontenc}\usepackage[latin1]{inputenc}\usepackage{geometry}\usepackage{graphics}\geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}\usepackage{babel}\usepackage{pslatex, xspace}\newcommand{\cpp}{\mbox{C\raisebox{0.25ex}[0cm][0cm]{++}}\xspace}\begin{document}\title{Task Graphs for Free (TGFF v3.0)}\author{Keith Vallerio}\maketitle\tableofcontents{}\renewcommand{\bottomfraction}{0.9} \renewcommand{\topfraction}{0.8}\section{Introduction}TGFF was originally developed in 1998 by R.P.\ Dick and D.L.\ Rhodesto facilitate standardized random benchmarks for scheduling and allocationresearch, in general, and hardware-software co-synthesis research, inparticular.  TGFF is suitable for many applications that require generatingpseudo-random graphs.  K. Vallerio subsequently updated and enhanced the codeand documentation. The latest version (3.0) expands on TGFF features,providing a highly configurable random graph generator capable of generatingseveral types of random graphs. This document includes installationinstructions as well as a list of features.\section{Installation}Installation of TGFF should be rather straightforward. \begin{enumerate}\item Download package\item \textbf{\emph{mkdir}} (target dir)\item \textbf{\emph{cd}} (target dir)\item \textbf{\emph{tar -xzvf}} (filename)\item Read \textbf{README} \item \textbf{\emph{make}}\item Enjoy.\end{enumerate}\subsection{Requirements}The only requirement should be a \cpp compiler. There may be complicationssince the code has been extended to be more compliant with the ANSI \cppstandard. Windows users may also have difficulty in porting themakefile. Installing the graph viewing program VCG adds to the usefulness ofTGFF as well.  Note that VCG output is not available for the packed schedulesbecause the packed schedules routines are independent from the main sourcecode.\subsubsection{\label{sec:vcg}Supplemental requirements (VCG)}TGFF can generate visual graphs in both EPS and VCG formats. The EPSfiles should be readable by any postscript viewing program. The VCGformat files require the graph visualization program VCG to view thefiles, but provides color and better zoom ability. VCG is a very usefulgraph visualization program which can be found at:\begin{itemize}\item http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html.\end{itemize}TGFF is still useful without this program, but I highly recommendusing it. If you are unfamiliar with VCG, the basic keys you needto know are:\begin{itemize}\item `=': Zoom in \item `-': Zoom out\item `q': Quit\item Arrows: Move the graph left, right, up and down\end{itemize}\section{Algorithms}TGFF 3.0 is able to generate a variety of graph types based on thecommands found in the source (*.tgffopt) file.  In addition tosupporting the orginal TGFF algorithm\footnote {The traditionalalgorithm can be found in ``TGFF: Task Graphs for Free'' byR.P. Dick, D.L. Rhodes, and W.  Wolf, in \textbf{Proc.Int. Workshop Hardware/Software Codesign}, pp. 97-101, Mar. 1998.},a new, highly configurable graph generation method has been added.The new algorithm generates random graphs in a much different mannerthan the original algorithm.  Although the new algorithm is highlyconfigurable, the old algorithm was retained since there are somegraph types, such as trees, that are much easier to generate usingthe old algorithm.  The algorithms differ in the method they use toconnect nodes in the graph, but they share several common features.\subsection{General features}TGFF allows users to determine the type and number of graphs thatwill be generated based on the set of parameters in the source file.This allows users to easily create several different graphs withsimilar characteristics.  Some parameters, such as the number ofstart (source) nodes, may be specified directly by the user.  Otherparameters may not be specified directly.  (The number of nodes inthe graph is a lower bound.)  Depending on the connectivity of thegraph, TGFF will generate one or multiple sink nodes.  However,currently, TGFF is limited to generating directed acyclic graphs(DAGs).Task graph labels (default is TASK\_GRAPH) and starting index numbercan be set via parameters as well.  This allows users to generatemultiple sets of task graphs with unique IDs.  A set of task graphscan be generated using one set of parameters and writen using\emph{tg\_write}, then change the parameters and generate a anotherset of task graphs.\subsubsection{Periods and deadlines}Each graph is assigned a period and a deadline based on the lengthof the maximum path in the graph and the \emph{task\_trans\_time}parameter.  The \emph{task\_trans\_time} is the average time pernode and edge traversal.  The parameter list, \emph{period\_mul}, isused to scale the graphs relative to each other.  Each time a graphis generated a number in the \emph{period\_mul} list is selectedrandomly.  This value is used to stretch or shrink the graphsrelative to each other.  Thus, graphs generated using the values 0.5and 2 for \emph{period\_mul} would result in some graphs containingapproximately 4x as many nodes as others.  A hyperperiod isgenerated based on the LCM of the periods of the taskgraphs.\footnote {Those interested in reading more about this topicare referred to ``Scheduling periodically occurring tasks onmultiple processors'' by E. L. Lawler and C. U. Martel, in\textbf{Information Processing Letters}, vol. 7, pp. 9-12,Feb. 1981.}\subsubsection{Tables}Each node and edge generated by TGFF is given a type.  Those typesmay be used directly.  However, some users have found it valuable touse the node/edge type to index into a table.  As a result, thereare two types of tables that TGFF will generate.  The first is thetransmission (edges) table and the second is the pe (node) table.The difference between these two tables is that the transmissiontable, generated by \emph{trans\_write}, will create one entry peredge type and the pe table, generated by \emph{pe\_write}, willcreate one entry per node type.The name and starting index number can be set via parameters.  Thethree most common commands used with tables are: \emph{table\_cnt},\emph{table\_attrib}, and \emph{type\_attrib}.  \emph{table\_cnt}sets the number of tables to be generated.  \emph{table\_attrib}sets parameters to be listed for the whole table.\emph{type\_attrib} sets parameters for each entry in the table. For example, Table~\ref{sampletable} presents a table generated forby \emph{pe\_write}.  Since \emph{table\_cnt} was set to two, thereare two tables that were generated.  The first line contains thetable label and the index of the first table.  The next line is acomment, because it starts with a ``\#'' character.  The linefollowing it has 3 values.  These values were set by the\emph{table\_attrib} command.  The following line contains anothercomment.  The next four lines are set by the \emph{type\_attrib}.Note, the first item in each line is the type number.  Thus, thesetables had two parameters listed for \emph{table\_attrib} and twolisted for \emph{type\_attrib}.\begin{table*}\centering%\renewcommand{\arraystretch}{1.3}\caption{Processor table example}\label{sampletable}\begin{tabular}{|l l l|} \hline\@PROCESSOR 0 \{ && \\ ~~~\# price (USD) & power (W) & area (sq. mm) \\~~~~~~14 & 0.533 & 7.5 \\ ~~~\# type & run time (ms) & memory (KB) \\ ~~~~~~0 & 291428 & 348 \\ ~~~~~~1 & 36265 & 256 \\ ~~~~~~2 & 19323 & 312 \\ ~~~~~~3 & 43251 & 724 \\ \} && \\ && \\\@PROCESSOR 1 \{ && \\ ~~~\# price (USD) & power (W) & area (sq. mm) \\~~~~~~11 & 0.648 & 6.9 \\ ~~~\# type & run time (ms) & memory (KB) \\ ~~~~~~0 & 260032 & 380 \\ ~~~~~~1 & 36463 & 212 \\ ~~~~~~2 & 38269 & 340 \\ ~~~~~~3 & 26035 & 792 \\ \} && \\ \hline\end{tabular}\end{table*}\subsection{Original algorithm}The original algorithm iteratively adds nodes to construct a graph usinglimits on the maximum in and out degrees of each node. The file,\textbf{\emph{origin1.eps}}, contains a task graph generated usingthe old algorithm with ``in'' and ``out'' degree maximum value equalto two. By setting the ``in'' degree to one and the ``out'' degreeto a higher value, a tree can be generated such as the one in\textbf{\emph{tree1.eps}}.  These two files,\textbf{\emph{origin1.eps}} and \textbf{\emph{tree1.eps}}, aredisplayed in Figures \ref{oldalg}(a) and (b), respectively.\begin{figure}{\centering \resizebox*{5in}{3.5in}{{\includegraphics{origin1}}{\includegraphics{tree1}}} \par}\caption{\label{image:oldalg} Using the old algorithm to generate  graphs.  (a) In/Out degree 2 2 (b) In/Out degree 1 2}\label{oldalg}\end{figure}\subsection{New algorithm}The new method is capable of generating several types of random graphsincluding series-parallel chains. \textbf{\emph{sp\_rand1.eps}} isan example of a random graph that is generated using the new method.The file, \textbf{\emph{sp\_simple.eps}}, shows a simple example ofa series-parallel task graph.The series-parallel algorithm generates a root node that isconnected to a set of chains of nodes.  A chain of nodes is one ormore nodes that are linked together in series to form a chain.  Thealgorithm gets its name, series-parallel, since the root node isattached to an arbitrary number of these chains of nodes.  Thenumber of chains and length of each chain are set by the TGFFcommands \emph{series\_wid} and \emph{series\_len}.  Anotherparameter, \emph{series\_must\_rejoin}, will generate an extra (sink)node that will connect to the end of each chain.  If that parameteris set to zero, \emph{series\_subgraph\_fork\_out} allows the user todefine the probability that these chains will not rejoin at the end.A root node connected to a set of chains of nodes along with thecorresponding sink node (if it is generated) is called anseries-parallel unit (SPU).The algorithm defined above is good for creating a few chains ofnodes, but generates simple graphs.  To make the algorithm moreapplicable, it is performed recursively.  The series-parallelalgorithm first generates one SPU.  If the graph has less than therequired number of nodes, one node inside the SPU is designated theroot of a new SPU.  This process is repeated until the graph has therequested number of nodes.To increase the generality of the task graphs generated using thismethod, parameters were added to generate arcs between chains ofnodes within a SPU and across SPUs.  These commands are\emph{series\_local\_xover} and \emph{series\_global\_xover}.  Usedalone, these commands allow the user to generate a random graph thatdoes not have series-parallel structure.  By setting the length andwidth of each SPU to 0 and using \emph{series\_global\_xover}, arandom graph will be generated with only the number of edgesspecified by \emph{series\_global\_xover}.  An example based on thismethod, \textbf{\emph{sp\_rand.tgff}}, can be found in the examplesfile.  (Note that this is different from the\textbf{\emph{sp\_rand1.tgffopt}} found in this directory).By combining the random graph generation method with theseries-parallel method, a wide variety of graphs can be generated.The two files created using the new algorithm,\textbf{\emph{sp\_rand1.eps}} and \textbf{\emph{sp\_simple.eps}},are displayed in Figures \ref{newalg}(a) and (b), respectively.\begin{figure}{\centering \resizebox*{5in}{3.5in}{{\includegraphics{sp_rand1}}{\includegraphics{sp_simple}}} \par}\caption{\label{image:newalg} Using the new algorithm to generate  graphs.  (a) Random graph  (b) Series-parallel graph}\label{newalg}\end{figure}\textbf{Note:} The original algorithm is currently the default. To use the new algorithm, use the command \emph{gen\_series\_parallel}.\section{How TGFF works}In general, TGFF accepts input parameters from a \textbf{\emph{tgffopt}}file. A list of features TGFF currently supports are listed below.It is recommended that new users examine the examples in Section\ref{examples} to get a basic understanding of how TGFF commands work.\subsection{Usage}To invoke TGFF, use the following comand:\begin{itemize}\item tgff {[}filename{]}\end{itemize}\subsubsection{Key}\begin{enumerate}\item A `\textbackslash{}' can be used to enter multi-line commands.\item A `\#' at the start of a line comments out the line.\item Average and Multipliers: These multiplier indicate a value that isused to scale a random number {[}-1, 1) and added to the average toobtain pseudo-random values. For example, an average of 4 with a multiplierof 2 ranges from {[}2, 6).\item Tasks and nodes are used interchangeably\item Transmits and arcs are used interchageably\end{enumerate}\subsubsection{Datatypes}The following is a list of data types used for TGFF's parameters:\begin{itemize}\item <string>: a string of characters\item <int>: an integer number

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -