Flow Description Language (FDL)

While it is always possible to build flows by executing one tool at a time, the normal way to use FlowTracer is to:
  • Write a description of the flow using the Flow Description Language
  • Pass the description to vovbuild to import the flow into FlowTracer
  • Execute the flow using parallel retracing

This chapter introduces FDL, the Flow Description Language, which is an extension to Tcl. Common uses of the language are demonstrated. For an introduction to Tcl, you can check out the Tcl quick guide.

For information about using Makefile to FDL utility, refer to Makefile to FDL Utility.

With FDL, you can concentrate on the flow description. Compared to traditional methods using scripts or makefiles, you do not have to worry about setting up the environment, representing dependencies, deciding the job scheduling, checking the proper completion of each job, capturing stdout and stderr, because FlowTracer takes care of all of that. Instead, you can concentrate on the "recipe" for the flow.

FDL consists of single letter procedures such as J, T, E, R, I, O, N and a few others.

Examples of Flows

This is an example of a very simple flow description:
J vw cp aa bb

The J means that we want a job with command line vw cp aa bb. The environment for the job will be BASE by default, and the working directory is the current directory.

FDL gives you control on the environment in which the jobs are executed by means of the procedure E, which must be invoked before the J.
J vw cp aa bb
Similarly, you can control the resources required by a job by means of the procedure R, which must also be called before the J:
R "linux"
J vw cp aa bb   

In alternative to J, you can use the procedure T to add a job to the flow. In this case, however, it is also important to add explicit dependencies to the flow, using I and O. Both I and O must be called after T. For a detailed description of the difference between J and T, check the appropriate section.

T vw cp aa bb
I aa
O bb 
Since FDL is an extension to Tcl, you can use all Tcl constructs such as for, while, foreach to build arbitrarily complex flows. Here is an example of a for loop:
for { set i 0 } { $i < $numberOfBlocks } { incr i } {
    J vw runSynthesis $block($i)

Simple conditionals can be handled with if and switch:

foreach block $listOfBlocks {
    set type $blockType($block)

    switch $type {
        "memory" {
            J vw genMemory $block
        "gates"  {
            J vw runSynthesis $block
        default {
            VovFatalError "Unknown block type '$type' for '$block'"

Also fundamental in Tcl is the ability to create procedures that can be used to make your flow definition more modular:

proc compile { cfile } {
    global CASE
    set cc    $CASE(cc)
    set flags $CASE(flags)
    J "vw $cc -c $flags $cfile"

set CASE(cc) gcc
set CASE(flags) "-I../include -g"

compile aa.c
compile bb.c
compile cc.c 

Also in this Section