Creating a StreamIt file

 

In this section, you will learn how to create a StreamIt file.  You will also learn about some of the basic StreamIt editor features.

 

  1. Select the project Minimal in the Package Explorer.
  2. Select the menu item File > New > File.
  3. In the New File wizard, type “Minimal.str” in the File name field and click Finish.  Streamit files must have “str” as their file extension.
  4. The StreamIt Development Tool has an editor capable of editing StreamIt files.  A StreamIt editor is automatically opened on the newly created file.
  5. In the StreamIt Editor, type in the following twenty lines:

 

void->void pipeline Minimal {

add IntSource();

add IntPrinter();

}

void->int filter IntSource {

int x;

init {

x = 0;

}

work push 1 {

push(x++);

}

}

int->void filter IntPrinter {

      init {

}

work pop 1 {

print(pop());

}

}

  1. In the Workbench window’s toolbar, click the Save button Save Button to save your work.
  2. Notice the syntax highlighting.  Different kinds of elements in the StreamIt source are rendered in unique colors.  Examples of StreamIt source elements that are rendered differently are:

 

 

Related concepts

StreamIt syntax highlighting

 

Related tasks

Creating a new StreamIt file

Using the StreamIt editor

Modifying StreamIt syntax highlighting