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.
- Select the project Minimal in
the Package Explorer.
- Select the menu item File > New > File.
- 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.
- The StreamIt Development Tool
has an editor capable of editing StreamIt files. A StreamIt editor is automatically opened
on the newly created file.
- 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());
}
}
- In the Workbench window’s
toolbar, click the Save button
to save your work.
- 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:
- Regular
comments
- Keywords
- Strings.


StreamIt syntax highlighting

Creating a new StreamIt file
Using the StreamIt editor
Modifying StreamIt syntax highlighting