Extended Functionality

In this chapter, you are introduced to the possibilities and functions VisualApplets offers to the advanced user. This comprises, amongst other options, a clear structuring of larger designs, creating your own libraries, creating multiple-process designs, defining settings for design and build, and working with different program versions.

Hierarchical Boxes

The HierarchicalBox operator is a special operator in VisualApplets that allows to structure designs. As the name implies, the operator has the function of a box. You can mark a part of your design and make it the content of a hierarchical box.

The hierarchical box is visible in the design as an operator instance (of operator HierarchicalBox). The content of the hierarchical box you can see and edit in an individual design window.

A hierarchical box contains a combination of operators and links and can connect them to an arbitrary number of input and output links. The use of HierarchicalBox modules allows you to

  • structure your design very clearly, and to

  • administrate groups of modules.

In the design panel, the HierarchicalBox module is displayed as an M-type operator (oval shape); nevertheless, its behavior depends on the operators inside the hierarchical box.

The following figure shows an example of a HierarchicalBox. As you can see, the operators included in the hierarchical box are displayed in a separate design window. Depending on the window settings, both diagrams can be viewed at the same time as shown in the example. See 'Main Program Window' for more information on how to arrange diagram windows.

Example of a Hierarchical Box

Figure 114. Example of a Hierarchical Box


Creating a Hierarchical Box

There are several ways to add a hierarchical box:

  • Making a part of your design a hierarchical box:

    1. Select the modules of your design you want to assemble as hierarchical box. (Press the STRG key on your keypad and click on the modules you want to assemble.)

    2. Keep the STRG key pressed and right-click on an empty part of the design window to open the context menu.

    3. From the context menu, select Move to Hierarchical Box.

      A new hierarchical box is created that contains all selected modules and the according in- and out links.

    4. Double-click on a hierarchical box to open the diagram window that shows the hierarchical box implementation.

  • Defining an empty hierarchical box:

    1. Select the HierarchicalBox operator from the Base library and add it to your design, or

      Right-click on an empty area in a diagram and select Insert → Hierarchical Box, or

      select Design → Hierarchical Box from the main menu, or

      Select the icon in the Edit toolbar.

    2. In the window that occurs, define the number of input and output links of your new HierarchicalBox.

    3. Click OK.

      The HierarchicalBox module is inserted into your diagram; it has the number of input and output ports you just specified.

    4. Double-click on the hierarchical box module to open its design window.

    5. Add the operators you want to have in your hierarchical box.

    6. Connect the design in the box to the input and output ports of the box via links.

Navigating between Design Windows

To go back to the design window of the process that contains the hierarchical-box module:

  1. Click on the window tab in the design window:

    Window tabs of the design window

    Figure 115. Window tabs of the design window


To step back in the hierarchy:

  1. Select View → Window Up ( Backspace ) or click the Window Up button in the View toolbar.

Editing Module Properties

To open the module properties:

  1. Right-click on a hierarchical box and from the context menu, select "Properties". Here, you can see and edit the parameters of the hierarchical box that are available for parametrization.

For information how to make parameters deeply nestled within a protected hierarchical box (or within a protected hierarchical box that is part of another protected hierarchical box) visible and available at this level, see the Operator Reference, library "Parameters".

Re-use of Hierarchical Boxes

You can use hierarchical boxes more than once by copy & paste. Each instance of a hierarchical box is independent from its siblings,i.e., if you make changes to one of the copied hierarchical boxes, this has no impact on the others.

For information on how to use hierarchical boxes as library elements and protected library elements, see section 'Creating a User Library Element'.

Inserting Additional Ports to Hierarchical Boxes

You can add further input and output ports to your hierarchical box anytime. To add a port:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go to an input port (if you want to insert an input port), or to an output port (if you want to insert an output port) so that the port is highlighted.

    Highlighting a Port

    Figure 116. Highlighting a Port


  3. Right-click on the port.

  4. From the context menu, select Insert Port Above or Insert Port Below.

The new port is inserted. It is given a default name. To give an individual name to the port, use context menu item Rename Port (see below).

Deleting a Port of a Hierarchical Box

You can delete input or output ports of your hierarchical box anytime. To delete a port:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go to the port you want to delete so that it is highlighted.

  3. Right-click on the port.

  4. From the context menu, select Remove Port.

The port is deleted.

Re-naming the Ports of Hierarchical Boxes

To enhance the readability of your design, you can give names to the input ports and output ports of a hierarchical box:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go on the port you want to re-name so that it is highlighted.

    Highlighting a Port

    Figure 117. Highlighting a Port


  3. Right-click on the port you want to re-name.

  4. From the context menu, select Rename Port.

  5. In dialog Rename Port, enter a name for the port.

    Entering a port name

    Figure 118. Entering a port name


  6. Click OK.

The new name is visible, for example, in the design window of the hierarchical box module:

Renamed ports of a hierarchical box

Figure 119. Renamed ports of a hierarchical box


Re-ordering the Ports of Hierarchical Boxes

In quite the same manner as renaming, you can re-order the ports of a hierarchical box module:

  1. Navigate to the design window that shows the hierarchical box module.

  2. With the mouse pointer, go on the port you want to change the position of so that it is highlighted.

    Highlighting a port

    Figure 120. Highlighting a port


  3. Right-click on the port you want to re-order.

  4. From the context menu, select Move Port Up or Move Port Down.

The order of the ports is swapped. This is visible, for example, in the design window of the hierarchical box module:

Reordered input ports of a hierarchical box

Figure 121. Reordered input ports of a hierarchical box


The re-arrangement of port order has no impact on the functionality of the hierarchical box. The re-arranged ports are linked to the same inner and outer design elements as before.

User Libraries

In user libraries, you can encapsulate a combination of modules which you need more than once and store this combination for later re-use.

You can define as many user libraries as you want. Each user library can contain as many user library elements as you want.

A user library element contains a specific combination of modules and links. After you create them, library elements are available in the library panel (tab User Library) and can be used like operators.

A user library element is pretty much the same as a hierarchical box (see 'Hierarchical Boxes'). The difference is that user library elements are stored in a (user-defined) user library and can be inserted into different designs and projects, just as operators from the operator libraries.

User Libraries with Elements in the Library Panel

Figure 122. User Libraries with Elements in the Library Panel


The instances of a user library element are independent from each other, that is, if you make changes to one of the instances, this has no impact on the other instances of the same user library element.

User libraries are saved as *.vl files. These files are not part of a particular project. Thus, they can also be used in other projects.

In the System Settings of VisualApplets, you can specify where you want the *.vl files to be stored on your system (see 'System Settings').

When you have inserted the instance of a user library element into a design, you do not need the *.vl file for loading the project or for building the applet (*.hap file).

Creating a New User Library

To create a new user library, proceed as follows:

  1. In the library panel, click the User Library tab.

  2. Right-click in the user library window.

  3. From the context menu, select Create New User Library.

    (Alternatively, you can also use the main menu Library → Create New User Library.)

  4. Give a name to your new user library and click OK.

Now, an empty user library (functioning like a container) has been created which you can fill now with your user library elements.

Creating a User Library Element

There are two ways to create a new user library element. You can either

Saving a Hierarchical Box as a User Library Element

  1. Right-click on a hierarchical box to open the context menu of the module.

  2. Select Save to User Library.

    A Save dialog pops up:

    Saving a Hierarchical Box as a User Library Element

    Figure 123. Saving a Hierarchical Box as a User Library Element


  3. Select the user library you want to save the new element in (or, alternatively, click on New User Library and define a new library).

  4. Enter a name (under Element Type) for your new user library element.

  5. Optionally: If you want to add information on your element (version number, short description, individual GUI Icon, documentation in form of HTML help files):

    1. Click on Details. A new dialog opens:

      Adding documentation, version information, short description, and/or individual GUI Icon

      Figure 124. Adding documentation, version information, short description, and/or individual GUI Icon


    2. Enter a version number for your library element if you want to.

    3. Enter a short description for your library element if you want to.

    4. To specify a specific icon to be displayed together with the library element on the VisualApplets GUI, in field Icon File specify the path to the PNG file or use the navigation button on the right hand side of the field.

    5. To add documentation describing your user library element, click the plus button under HTML Help Files and navigate to the HTML file that holds the text of your documentation.

      You may specify multiple HTML and image files. If you add multiple HTML files, the first HTML file in the list will be the starting page of your documentation. The starting page is displayed as documentation of your user library element (in the information panel, tab Help). The additional files may contain images or further HTML files that are linked by the starting page.

      [Note] Naming and Storage of Help Files

      When you save your user library element later on, all the files you specify here will be copied to the VisualApplets installation directory, sub-directory LibraryCache. The starting page of your documentation (first HTML file in the list) will be renamed and will have the name of the user library element:<elementname>.html

      To unlink an HTML file from the library element, select the file and click on the delete button. The HTML file will be unlinked, but remains in your file system.

    6. Confirm the details specification of your new user library element with OK.

  6. If you want to protect your user library element, select the Protection option. This way, the user library element is made a “black box”. (For details on element protection, see 'Protecting User Library Elements'.)

  7. Click Save.

    The optional PNG and HTML files are copied to the VisualApplets installation directory, sub-directory LibraryCache.

    If you activated the Protection option, an additional dialog Protect User Library Element appeares.

    1. Make sure protection mode Password is activated.

    2. Enter your password and click OK.

      Providing a password for a library element

      Figure 125. Providing a password for a library element


    All User libraries and their contents are available in the library panel (see 'Main Program Window'). Click on the User Library tab to display the User Library window.

    The icon you selected is visible together with the library element.

    Detailed information on an individual element is displayed in the tooltip:

    Tooltip Information on User Library Element

    Figure 126. Tooltip Information on User Library Element


    If you select the new user library element, the according help information is displayed in the information panel under tab Help.

    The display within the design window has changed: Instead of "HierarchicalBox", the name of the user library element is displayed. The icon for hierarchical boxes has been replaced by the icon you selected for the library element. The name of the instance within the design (below the icon) has remained the same.

    Display of Your Library Element in Design

    Figure 127. Display of Your Library Element in Design


You can change your user library element any time later on (see section 'Editing User Library Elements'. However, these changes will not be promoted to the instances of the element. You have various options for updating the instances of a user library element if you want to (see section 'Updating Instantiated User Library Elements'.

[Note] Analysis of User Library Elements

Design Rules Check Level 1 is possible.

Resource analysis, build, and simulation are not possible.

Creating a New User Library Element from Scratch

Alternatively, you can create new user library elements from scratch. For defining and/or changing user library elements, you use the User Library Editor.

To define a new user library element from scratch:

  1. From the main menu, select Library → Edit User Library → New User Library Element.

    Now, the design editor closes. Together with the design editor, also the design you have been working on is closed.

    The user library editor opens. The user library editor behaves like the normal design editor.

  2. Define a name for your new user library element.

  3. Select the target hardware platform.

    (However, the platform is only relevant if you include operators in your element that are dependent on hardware issues, such as camera operators.)

  4. Click OK.

  5. As soon as you click OK, a dialog box opens where you have to specify the number of input and output ports of your element. Make sure you specify the right number of input and output links since it is not possible to change these numbers later on.

    1. Specify the number of input ports you need.

    2. Specify the number of output ports you need.

    [Caution] Define necessary number of links

    Make sure you specify the right number of input and output links since it is not possible to change these numbers later on.

  6. Confirm the port definition with OK.

    The user library editor opens with an empty element design containing only the imput and output ports you just specified.

  7. Edit the design of your user library element as you want.

  8. When you are finished, save your element by selecting from the main menu File → Save As.

    Saving New User Library Element

    Figure 128. Saving New User Library Element


  9. Select the user library you want to save the new element in (or, alternatively, click on New User Library and define a new library).

  10. Optionally: If you want to add information on your element (version number, short description, individual GUI Icon, documentation in form of HTML help files):

    1. Click on Details. A new dialog opens:

      Adding documentation, version information, short description, and/or individual GUI Icon

      Figure 129. Adding documentation, version information, short description, and/or individual GUI Icon


    2. Enter a version number for your library element if you want to.

    3. Enter a short description for your library element if you want to.

    4. To specify a specific icon to be displayed together with the library element on the VisualApplets GUI, in field Icon File specify the path to the PNG file or use the navigation button on the right hand side of the field.

    5. To add documentation describing your user library element, click the plus button under HTML Help Files and navigate to the HTML file that holds the text of your documentation.

      You may specify multiple HTML and image files. If you add multiple HTML files, the first HTML file in the list will be the starting page of your documentation. The starting page is displayed as documentation of your user library element (in the information panel, tab Help). The additional files may contain images or further HTML files that are linked by the starting page.

      [Note] Naming and Storage of Help Files

      When you save your user library element later on, all the files you specify here will be copied to the VisualApplets installation directory, sub-directory LibraryCache. The starting page of your documentation (first HTML file in the list) will be renamed and will have the name of the user library element:<elementname>.html

      To unlink an HTML file from the library element, select the element and click on the delete button. The HTML file will be unlinked, but remains in your file system.

    6. Confirm the details specification of your new user library element with OK.

  11. If you want to protect your user library element, select the Protection option. This way, the user library element is made a “black box”. (For details on element protection, see 'Protecting User Library Elements'.)

  12. Click Save.

    The optional PNG and HTML files are copied to the VisualApplets installation directory, sub-directory LibraryCache.

    If you activated the Protection option, an additional dialog Protect User Library Element appears.

    1. Make sure protection mode Password is activated.

    2. Enter your password and click OK.

      Providing a password for a library element

      Figure 130. Providing a password for a library element


    All User libraries and their contents are available in the library panel (see 'Main Program Window'). Click on the User Library tab to display the User Library window.

    The icon you selected is visible together with the library element.

    Detailed information on an individual element is displayed in the tooltip:

    Tooltip Information on User Library Element

    Figure 131. Tooltip Information on User Library Element


    If you select the new user library element, the according help information is displayed in the information panel under tab Help.

  13. If you want to proceed working on your design, close the user-library-element design and the user library editor: From the main menu, select File → Close.

    [Caution] Close element design via File->Close

    It is not enough to close the element design by closing the tab of the design. You need to close the user library editor, too.

    To close both, click File → Close. Only after closing the design of your user library element (and thus the library editor) in this way, you can re-open the normal design editor and thus your overall applet design.

  14. To continue working on your design, open your design.

You can change your user library element any time later on (see section 'Editing User Library Elements'. However, these changes will not be promoted to the instances of the element. You have various options for updating the instances of a user library element if you want to (see section 'Updating Instantiated User Library Elements'.

[Note] Analysis of User Library Elements

Design Rules Check Level 1 is possible.

Resource analysis, build, and simulation are not possible.

Using the User Library

Inserting User Library Elements into Your Design

You can create an instance of an element by a simple drag & drop into your design (as you do with operators).

The instantiated module behaves like a hierarchical box, but knows it descends from the user library.

Adapting Element Instances to Your Design

You can adapt instances of user library elements to fit your overall design. You may need to

  • modify individual operator parameters

  • modify the layout (adding and deleting of operators and links)

[Tip] Changing Link Properties

Changed link properties do not change the implementation of the library element instance. Example: If a library element has been saved with a parallelism of 4, but its instance is connected to a parallelism of 8, this of course has an influence on the links inside the instance. However, this is not a change of the implementation of the instance as no operator parameters are influenced by a change of the link properties.

After you changed an instance of a user library element - either by modifying individual operator parameters, or by modifying the layout (adding and deleting of operators and links), the instance is no more a mere copy of the user library element.

To keep you informed which instance contains changes, the modified user library element instance is marked:

Figure 132.


This is very important for you to know, as updating the instances of a user library element (see section 'Updating Instantiated User Library Elements') overwrites the changes you made to an instance. You should always carefully consider the pros and cons before selecting an automatic update for an instance that contains changes.

Protecting User Library Elements

You can protect user library elements. After protection has been enabled, the user library element is made a “black box”.

There are two ways to protect a user library element:

  • Protection via password: The user library element can afterwards be opened and edited via password. Users that do not have the password will not even be able to see which operators are used in the user library element (black box).

  • Irreversible protection: The user library element is made a black box for ever and cannot be re-opened, not even by yourself.

To protect a user library element via password:

  1. Right-click on the element.

  2. From the context menu, select Protect User Library Element.

    Protecting a user library element

    Figure 133. Protecting a user library element


  3. Make sure protection mode Password is activated.

  4. Enter your password.

    Entering password for protected user library element

    Figure 134. Entering password for protected user library element


  5. Click OK.

[Caution] "One-Way" Protection Irreversible

If you select protection mode One Way (instead of Password), the user library element can never be re-opened, not even by yourself. If you plan to enhance the element at a later point of time, make sure you select protection mode Password instead. Alternatively, you can save a copy of the element (as a hierarchical box or a non-protected operator) before enabling this protection mode.

Editing User Library Elements

You can make changes to your user library elements. You can do this by either

  • editing the library element itself in an library editor, or by

  • overwriting it with a changed instance or a hierarchical box.

However, these changes are not propagated automatically. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

Editing User Library Elements in the User Library Editor

You can edit your user library elements in the user library editor. To open the user library editor:

  1. Save the design you are currently working on.

  2. In the library pane, go to tab User Library.

  3. Right-click the element you want to edit.

  4. From the context menu of the element, select Edit.

    Opening the User Library Editor

    Figure 135. Opening the User Library Editor


Now, the design editor closes. Together with the design editor, also the design you have been working on is closed.

The user library editor opens. The user library editor behaves like the normal design editor.

  1. Make your changes.

  2. Save your changes.

If you want to edit the element description and version number:

  1. From the main menu, select Library → Element Details.

  2. Save the edited element.

Analysis of User Library Elements: You can carry out Design Rules Check Level 1. However, bandwidth analysis, resource analysis, build, and simulation are not possible.

[Important] Updating Instances

When you make changes to user library elements, the instantiated elements in your designs are not updated with these changes. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

Editing a User Library Element via Overwriting

Alternatively, you can edit a user library element by simply overwriting it. To do so:

  1. Save a hierarchical box or an instantiated user library element under the name of an already existing user library element (as described in 'Saving a Hierarchical Box as a User Library Element').

[Important] Updating Instances

When you make changes to user library elements, the instantiated elements in your designs are not updated with these changes. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

In the following sections you get information on how to update instantiated user library elements.

Updating Instantiated User Library Elements

In the normal workflow, it happens that user library elements need to be updated. The changes you make to an element, however, have no influence on the instances of this element. To update the instances of an element in your design(s), you can either add your changes manually, or use one of the two update mechanisms provided by VisualApplets (see below).

Updating Manually

If you decide to update the instances of the changed element manually, you can select multiple instances of the element in your design and change them all simultaneously in one step.

[Caution] No Hierarchical Update

Hierarchical update of user library elements is not supported. If you select more than one module of a hierarchy for updating, only the highest module of the hierarchy is updated.

Replacing Modules via Quick Update

You can update the instances of a user library element in a design via the function Quick Update.

[Caution] Updating Overwrites Changes within Instances

Updating the instances of a user library element overwrites all changes you made to an instance (parameter settings, or adding/deleting operators). You should always carefully consider the pros and cons before selecting an automatic update for an instance that contains changes.

To keep you informed which instance contains changes, modified instances of a library element are marked:

To update the instance of a library element via Quick Update:

  1. Select the instance you want to update.

  2. From the main menu, select Library → Quick Update from User Library.

The selected instance of the element is replaced by a new one that reflects the changes you made to the element in the library.

Quick Update is only possible if the instances you want to update have the same number of input and output ports as the edited user library element. It is not possible to use Quick Update for replacing the instance of a user library element type A by an instance of user library element type B.

Via Quick Update, you can update multiple instances of an element at once:

  1. Press the Ctrl key and hold it pressed while you select all instances you want to update.

  2. From the main menu, select Library → Quick Update from User Library.

    All selected instances of the element are replaced by new ones.

Replacing an instance via Update from User Library

When you select this option, the instances you want to replace do not have to be of the same type as the library element they are updated with. Thus, you can use this option to replace instances of user library elements or hierarchical boxes by the instance of another user library element. For example, you can replace the instance of a user library element type A by an instance of user library element type B (in contrast to option “Quick Update”). Nevertheless, also Update from User Library is only possible if if the instances you want to replace have the same number of input and output ports as the user library element you want them to replace with.

To replace one or more instances of an element by instances of another user library element:

  1. Select the modules you want to replace (holding the Ctrl key).

  2. From the main menu, select Library → Update from User Library.

    The dialog window Update User Library Elements opens. The left-hand panel shows the module(s) you have chosen for update. The right-hand panel shows your user libraries.

    Replacement of Instances

    Figure 136. Replacement of Instances


  3. In the right-hand panel, select the user library element you need. In the left-hand panel, all modules which can be replaced as you desire are highlighted in green (if not, check if the numbers of inputs and outputs fit).

  4. Click Replace Modules.

    Instantaneously, all listed modules with matching numbers of nodes are replaced by instances of the new user library element.

Example above: The numbers of inputs and outputs do not fit in two cases. Module 28 has only 1 input and 1 output port, whereas USRLibraryELement5 has three inputs and three outputs. Replacement of modules 32, 31, and 33 by USRLibraryELement5 is possible as they have exactly the same number of input and output ports as USRLibraryELement5.

Transforming a User Library Module into a Hierarchical Box

Sometimes you might find it helpful to unlink an element instance from the user library. To do so, you can transform instances of user library elements into hierarchical boxes.

  1. Select the module you want to transform in your design. (If you want to transform more than one module, press the Ctrl key and select all modules you want to transform.)

  2. From the main menu, select Library → Change to Hierarchical Box.

Instantaneously, all selected modules are transformed into completely independent hierarchical boxes.

Custom Operator Libraries

Into the Custom Library, operators designed and provided by a user of the VisualApplets extension VisualApplets Expert can be imported.

You can create an instance of a custom operator by a simple drag and drop into your design as usual.

Custom Library with operators designed with VisualApplets Expert

Figure 137. Custom Library with operators designed with VisualApplets Expert


Creating Custom Operators Libraries (Expert edition only)

Step-by-step instructions for creating new custom operators and custom libraries, see Custom Operator User Guide

This document also contains a detailed description of the custom operator mechanism and all related files.

Multiple Processes

VisualApplets projects may include multiple processes. A process is the top level of a diagram and can include an arbitrary number of operators and hierarchical boxes. Each process can be started and stopped individually.

A good example where two processes are used is a two camera application. Have a look at the following figure. It shows two processes with a camera, a buffer and a DMA operator in each of the processes.

Applet with Two Processes

Figure 138. Applet with Two Processes


When the applet is used, both processes, i.e., both cameras can be started and stopped individually. If both cameras are in the same process, they have to be started and stopped simultaneously, as all DMAs of a process have always to be started.

To learn more about the usage of VisualApplets applets on hardware, see section 'Running Your Applet on Hardware', and/or the runtime documentation.

Managing Processes

To add a new process, click Design → New Process or choose the icon in the Edit toolbar.

Creating a New Process

Figure 139. Creating a New Process


To remove a process first select any digram window belonging to the process and afterwards select Design → Remove Process or choose the icon in the Edit toolbar.

Processes always start with index 0 and have to be in ascending order. If a process is removed, processes with higher indices are shifted to fill the gap.

Processes without DMAs / Trigger Processes

As mentioned, an applet process can only be used on the hardware after all DMAs of the respective process have been started. However, if a process does not contain any DMA channels, it will be immediately started after initialization of the applet. This is useful for trigger and signal processing applications as they are used before the image acquisition is started.

To learn more about initialization and usage of VisualApplets applets on hardware, see section 'Running Your Applet on Hardware', and/or the runtime documentation.

Process Intercommunication

Image data between processes cannot be interchanged. However, using operators TxSignalLinks and RxSignalLinks, an interprocess communication for signals can be established.

Target Hardware Porting

A VisualApplets project is always based on a hardware platform, such as the microEnable IV VD4-CL, microEnable 5 VQ8-CXP6D etc. VisualApplets offers a powerful hardware porting system. The hardware platform can simply be changed. VisualApplets performs the porting to the new FPGA, DMA interfaces, memory, camera ports, etc. automatically. To perform a hardware porting open the design and select Design → Change Platform from the main menu. VisualApplets will then ask for the new file name and allows the selection of the new hardware platform. A design rule check and the build of the new design file can immediately be performed.

Target Hardware Porting

Figure 140. Target Hardware Porting


Limitations

Of course, the new platform has to be capable of implementing the design. In the following cases, you may need to adapt your design to match the new platform:

  • A smaller FPGA might result in a logic overmap.

  • A project cannot be ported if the device resources are not available. For example, the number of DMA channels or digital output ports might not be available on the new platform.

  • Not all operators from the Platform libraries exist for each platform. For example, a Camera Link camera operator cannot be ported to a gigabit Ethernet camera operator. In this case, the missing operator is replaced by a Dummy operator.

  • Also operators from other libraries (e.g., EventToHost) may not be available for the new platform. In this case, DRC1 delivers an according error message:

Error message in case an operator is not applicable for new hardware platform

Figure 141. Error message in case an operator is not applicable for new hardware platform


PixelPlant Designs

The PixelPlant hardware is an add-on board family for microEnable IV. At the moment, two boards are available: PixelPlant100 and PixelPlant200 which differ in FPGA and RAM size.

PixelPlant Projects

To develop an applet for using the PixelPlant Px100 / Px200 hardware, two separate design parts have to be created:

  1. A base design for the microEnable IV board

  2. A design for PixelPlant

Both parts need to be handled in two separate VisualApplets design files. Both designs, PixelPlant and microEnable IV, have to be build, so that two HAP files are generated. Finally, both parts (HAP files) have to be merged into one hardware applet (HAP file).

For data transfer between the microEnable IV applet and the PixelPlant applet, operators TxLink and RxLink have to be used. TxLink operators transmit the data to a PixelPlant board, RxLink operators receive data from the PixelPlant. The PixelPlant part has to contain the corresponding RxLink and TxLink operators to pick the data from the microEnable IV and transmit it back. Each RxLink / TxLink operator has a channel ID parameter which selects the corresponding RxLink / TxLink operator on microEnable IV. Theses channel ID parameters as well as the link formats have to match on both, PixelPlant and microEnable IV.

The merging of two applets is explained in the next section.

HAP Merger

Merging PixelPlant and microEnable IV designs can be done by using the HAP Merger utility. Access it by Build → Hardware Applet Merger. The utility dialog asks for the microEnable IV HAP file and its corresponding PixelPlant HAP file. Pressing the "Merge" button generates a HAP file containing both design parts. This merged HAP file is used to be loaded on the frame grabber.

Please note: The channel ID of corresponding RxLink / TxLink pairs have to match on both applets as well as the link formats. The hardware applet merger will not merge the HAPs if a mismatch is detected.

System Settings

Even if VisualApplets comes along with a useful basic configuration, it can be adapted individually to fit the user’s needs in the best way. The configuration of the program can be changed and stored on the local computer. You can change your settings in several setting dialogs which are accessible over the user interface of VisualApplets.

You can define global settings for all users, personal settings for the current user, or local settings for a certain installation.

All configurations are stored in one configuration file (VisualApplets.ini). During the installation process, you have already selected the location of this file.

The following sections describe the setting options.

You can access the dialogs where you can specify your system settings as follows:

  1. Select menu item Settings → System Settings.

The System Settings window opens where you can choose between different setting categories. For each category, a settings dialog is displayed.

Path Settings

This dialog allows configuring the default locations of different types of files.

[Note] Default Path Settings

If Visual Applets is installed on your system in a folder that requires administrator rights (e.g., C:\Programs), you have to start VisualApplets with administrator rights in order to use the default paths.

Alternatively, you can adapt the path settings under System Settings / Path Settings. Also adapt the path under 'System Settings' / Global Build Settings / Generation of Hardware Applets / Path for storage of hardware applets (*.hap) in this case.

Temporary files

Path for temporary files: While running, VisualApplets needs to generate temporary files. Usually, these files will be deleted when VisualApplets is closed. Select the directory where these files should be created.

Use the system’s temporary directory: If you check this option, VisualApplets retrieves this location from the operating system. This is the recommended setting. If you want to use another directory for this purpose, un-check this box, specify an alternative directory in the field above and make sure it is not write-protected.

User libraries

Path for storage of user libraries: User libraries are containers for modules created by the user himself. (See the according chapter for further details.) In this field you can specify the directory where the user-defined modules are to be saved to and loaded from. Change this directory to another directory (e.g., to one on a network drive) when you are sharing these libraries with other team members or on different PCs. Make sure this directory is not write-protected.

Custom libraries

Path for storage of custom libraries: Custom libraries are containers for custom operators created by the user himself. (For creating custom operators, a VisualApplets Expert license is required.) In this field, you can specify the directory where the custom operators are to be saved to and loaded from. Change this directory to another directory (e.g., to one on a network drive) when you are sharing the custom operators with other team members or on different PCs. Make sure this directory is not write-protected.

Script collection

Path for storage of your Tcl script collection: VisualApplets allows you to create Tcl scripts and to make use of the individual Tcl procedures as library elements. In this field, you can specify the directory where your Tcl scripts are to be saved to and loaded from. Change this directory to another directory (e.g., to one on a network drive) when you are sharing the your Tcl script collection with other team members or on different PCs. Make sure this directory is not write-protected.

VisualApplets designs

Path for VisualApplets designs: Here, you can define the default location where VisualApplets saves design files (*.VA) and loads them from. Make sure this directory is not write-protected, and clear the Use previously selected directory option.

Use previously selected directory: If the box is checked, VisualApplets suggests to save the *.va file into the directory you used last time for this purpose. If unchecked, VisualApplets suggests the directory specified in the field Path for VisualApplets designs for saving/loading design files.

SDK projects

Path for storing SDK projects: Select here the default location of the automatically generated source code („SDK project“) that demonstrates the usage and parametrization of the generated applet inside the runtime. The SDK project is generated after the build of the hardware applet or on demand when you choose from the menu Build → Generate SDK Example.

Help

Path to help: Points to the base directory where the files for operator and context help are installed. You can change this path to a central location in order to share the help files among different installations. Make sure the help files are available in the directory you specify.

[Note] Where to store the hardware applets (*.hap files created during the build process)

The directory for storing your final hardware applets (*.hap files) you define under 'System Settings' in the category Global Build Settings and here under Generation of Hardware Applets / Path for storage of hardware applets (*.hap).

Dialog window for Path Settings

Figure 142. Dialog window for Path Settings


Simulation Settings

These settings affect the default behaviour of the simulation functionality of VisualApplets.

Simulation Sources

Location of images for simulation: Specify here the directory where VisualApplets should get the images for simulation. VisualApplets comes along with some sample images for demonstration. But in a real world, you will have your own images, similar to those which have to be processed. Specify the directory where your test images are.

Use previously selected directory: If the box is checked, VisualApplets first suggests the directory where you selected an image for simulation from last time. If unchecked, VisualApplets always suggests the directory specified above for loading images.

Simulation Probes

Path for destination images: Storage location of image files which are created at simulation probes while the simulation is running. This setting comes up as suggested path when the user is saving the collected simulation results of a certain simulation probe.

Temporary Image Files

Path for temporary image files: Storage location of temporary files which are created while the simulation is running by modules processing simulation data. The specification of this location allows VisualApplets to pick up these files automatically, e.g. at a certain module, and to put them as a source to another part of the design or to another module within the same design.

Use VisualApplets’ temporary directory: If you clear this option, make sure the directory you specify is not write-protected. If write-protected, VisualApplets cannot simulate data at all.

The results of the simulation are saved in a binary file format. Two different formats are available:

  • Save Raw Data as *.rsd : Files are saved in the „RSD“ file format (image data and descriptive data).

  • Save Raw Data as *.raw: Files are saved in the „Raw“ file format (image data only).

Normally, the user doesn’t need to edit any of these settings.

Simulation Options

VisualApplets (version 3.2 and higher) is equipped with a new simulation Engine. The new engine gives a very realistic depiction of the data flow and allows simulating blocked image data streams. The new engine is enabled per default. You can disable the new engine here in cases where you prefer the old simulation engine.

I/O Image Library

Here, you have the choice between two libraries: You can define to use either the Image Magick libary for loading and saving images, or the native implementation of VisualApplets. The Image Magick library is selected per default.

Below, you can set the compression parameters for saving probe images.

Dialog window for Simulation Settings

Figure 143. Dialog window for Simulation Settings


Settings for New Designs

These settings allow the user to define the default target platform the applets created in VisualApplets (target hardware applets) will run on. To set this settings is helpful when a developer’s work is focused on certain framegrabbers („Hardware platform“) or certain operating systems of the Runtime („Operating system platform“).

Default platform for target hardware applets

Hardware platform: The hardware platform selection shows all available hardware platforms (frame grabber types) which are currently available at the installation of VisualApplets. The platform you specify here will by suggested by the program as the default platform when you create a new design by using the menu item File → New.

Example: If you create a project based on a microEnable IV – VD4-CL frame grabber, you can set this hardware platform here as the default platform. It will be suggested by the program when you create a new applet design.

Example: If you always create applets for a Win64 system, you can set this operating system platform here as the default platform

Figure 144. Example: If you always create applets for a Win64 system, you can set this operating system platform here as the default platform


Example: Win64 will be suggested by the program when you create a new applet design

Figure 145. Example: Win64 will be suggested by the program when you create a new applet design


Operating system platform: The operating system platform selection shows all available operating systems for which applets can be created. The platform you specify here will by suggested by the program as the default platform when you create a new design by using the menu item File → New.

[Tip] Tip

Please note that the settings you enter here will come up as suggestions only. You can change both platforms any time, while creating a new applet, during the design process, or even when you are already done with the applet design. The information about target hardware and target operating system is stored in the according *.VA design file.

Diagram Settings

This set of settings is related to the design window of VisualApplet.

Extended Link Capture

Defines the size of the capture area around the input or output ports of selected modules. Increasing the capture area allows an easier and faster creation of links for individual module ports since the user doesn’t need to hit the small ports exactly.

Layout presettings for new designs

Defines the default layout dimensions for new VisualApplets designs. This setting comes into effect when a new VisualApplets design is created via File/New. Please note that the layout dimensions of an existing design can be changed anytime via menu item Design/Diagram Layout Settings/ and are stored for each VisualApplets design individually.

Grid

Defines the default distances of grid lines in the design panel. This setting comes into effect when a new VisualApplets design is created via File/New. Please note that the grid line distance of an existing design can be changed anytime via menu item Design/Diagram Layout Settings/ and is stored for each VisualApplets design individually.

Link Appearance

These settings define the visualization of the connection links which are combining different modules at a design. Changes of these settings take effect immediately if you have a design file opened.

Link Tool Tip

Defines the information which is displayed at the tool tip when the user moves the mouse cursor over a link. Changes of these settings take effect immediately if you have a design file opened.

Dialog window for Diagram Settings

Figure 146. Dialog window for Diagram Settings


Global Build Settings

The settings of this category allow customizing the process of creating applets.

Specific Synthesis Directory

Here, you can specify the directory where temporary files created during the build process will be generated. These files will be deleted after the applet is generated. (See also Build trace files below)

Generation of Hardware Applets

Here, you can specify the location where generated hardware applets (*hap files) will be stored.

Create subdirectories for hardware platforms: Generates an additional subdirectory according to the platform name.

Copy applets to runtime directories: Copies the resulting files to the runtime (if installed) in order to load the files immediately to a present Framegrabber.

Build Trace Files

Keep build trace files: Here, you can specify a directory where the intermediate files (which will be generated during the build process) can be copied into for detailed analysis of these files or for traceability reasons.

Special Settings

Style of synthesized design netlists: Select here the style for netlist generation:

  • Use Optimized when building timing-critical designs to try to achieve a better timing closure in the build flow. VisualApplets will generate the FPGA netlist with an alternative naming scheme which in some cases helps the Xilinx tool flow to generate a better distribution of logic on the FPGA. The setting of environment variable VA_NETLIST_STYLE has no influence.

  • If set to Default, the environment variable VA_NETLIST_STYLE is consulted:

    • If the environment variable set to value 2, the alternative naming scheme is used for FPGA netlist generation. The alternative naming scheme in some cases helps the Xilinx tool flow to generate a better distribution of logic on the FPGA.

    • If the environment variable set to value 1, the legacy naming scheme (VisualApplets 3.1 and lower) will be used.

  • If set to Legacy, the legacy naming scheme (VisualApplets 3.1 and lower) will be used. The setting of environment variable VA_NETLIST_STYLE has no influence.

Dialog window for Global Build Settings

Figure 147. Dialog window for Global Build Settings


Common Settings

Here, you can select your preferred language for displaying the user interface of VisualApplets.

Dialog window for common settings

Figure 148. Dialog window for common settings


Design Settings

Besides the program settings it is possible to define default settings for each VisualApplets project. These setting will be stored in the *.va file and comprise the target runtime, project details as well as diagram layout settings.

Target Runtime

A VisualApplets hardware applet (HAP) can only be run on a single target runtime e.g. Windows 32Bit, Windows64Bit, Linux 32Bit, Linux 64Bit or QNX 32 Bit. When a VisualApplets project is build i.e. transformed into a HAP (See 'Build') the HAP can only be used on the previously selected target runtime. The build step allows the selection of the target runtime. However, a default target runtime can be defined for each project individually.

To set the default target runtime of a project select Design → Change Target Runtime. From the list, one of the supported target runtimes can be selected as shown in the next figure. This target runtime is now used for your project. Keep in mind to save your project file.

Target Runtime Project Setting

Figure 149. Target Runtime Project Setting


The default setting for new projects can be changed in the system settings. See 'System Settings' for more information.

Project Properties

For each project, a project name, a version number (string) and a description can be added. To edit these attributes of your project, click Design → Properties Enter any string values as shown in the next figure. Do not forget to save your design after modification. The entered values are shown in the project info dock window. After Build, this information is included in the applet and displayed in microDisplay as parameter values under "Applet Properties".

Editing the Design Properties

Figure 150. Editing the Design Properties


Diagram Layout Settings

To change the diagram layout settings of a project click on Design → Diagram Layout Settings (see next figure). You can change the design area size of a project. By default, the size is 2048 by 2048 pixel. Moreover it is possible to enable or disable the grid and change its step size. The grid can also be enabled and disabled from the icon in the View toolbar. Do not forget to save your design after modification.

Diagram Layout Settings

Figure 151. Diagram Layout Settings


Build Settings

To actually generate (build) the hardware applets (see 'Build'), VisualApplets uses a whole tool chain that works in the background.

For each hardware platform, VisualApplets provides a default build setup that is optimized for the specific hardware platform.

Based on the hardware platform you selected for your design in the design settings, the according default setup for build is proposed by VisualApplets. This setup cannot be changed by the user, but can be replaced by a user-defined setup.

[Note] You have to replace the default build setup by own settings if ...
  • You create designs for a microEnable 5 (ironman and marathon) or LightBridge platform.

  • You work with Xilinx Vivado.

  • You work with a Xilinx ISE version higher than 9.2.

[Note] Recommended Xilinx Tools

See Which Xilinx Toolchain and Version for Which Frame Grabber Platform? for detailed information about which Xilinx tool is required to build applets for which hardware platform.

mE5 marathon and LightBridge: Although applet build for mE5 marathon and LightBridge is possible with ISE 14.7, Basler recommends to use Xilinx Vivado since applet build (synthesis) with Vivado is much faster for these platforms.

Defining Build Settings

Using one Parameter Set as Active Configuration

Each time the program performs the build steps, a certain set of build parameters will be used.

There are several sets of build parameters that come with VisualApplets. You can add additional sets.

For building an applet, one of these sets has to be specified as the “Active configuration”. This configuration will be used and the tool chain will be controlled accordingly.

All setting information is stored in the file “SynthesizeSettings.xml” at your local installation.

[Note] Activated and Current Parameter Set

To open the Build Settings dialog, click Settings → Build Settings.

The Dialog opens. The activated parameter set displayed:

  • The activated parameter set is indicated by a green tick in the left-hand panel of the Build Settings dialog.

  • The activated parameter set is used for build.

  • The activated parameter set stays activated even if you select another parameter set to be displayed. (To display a parameter set, click on its name in the left-hand panel of the Build Settings dialog. The selected parameter set will be displayed in the right-hand panel of the Build Settings dialog.)

  • The parameter set displayed you can edit, copy, save, or delete (see below).

In the following, we will refer to the parameter set displayed as the "current parameter set".

Defining New Parameter Sets

The set of parameters itself consists of parameters for starting the external applications (Xilinx tools) that perform certain steps of the workflow, and of parameters for controlling these tools. You can define a certain set to be the default configuration (for starting a build of the current design) by checking “Active configuration”, and you can add a comment to describe the purpose of this specific set.

  1. To open the Build Settings dialog, click menu Settings → Build Settings.

    The Dialog opens. The activated parameter set is displayed.

    [Note] Before Adding the First Alternative Parameter Set

    As long as no additional parameter set for the target hardware of your design has been created, the default build settings are displayed.

    You cannot make any changes to these default settings, therefore, all input fields are deactivated.

    You also cannot uncheck “Active configuration” as there is no alternative to the default yet.

  2. Click Add to create a new set of parameters.

    You will be asked for hardware platform information. You can specify here which parameter set you want to load as a basis for creating your own parameter set. In most cases, it is quite sensible to select here the target hardware of your design.

    Selection of Hardware Platform

    Figure 152. Selection of Hardware Platform


  1. Klick on Ok in the Hardware Platform selection box.

    Now, you can edit the first fields.

Build Settings Window

Figure 153. Build Settings Window


  1. Name: Give a name to your new set of properties for identification. This name will show up in the configuration dialog and in the build protocols.

  2. Active configuration: If you want to use this set of parameters when building your applet, check the box Active Configuration.

    [Important] Active Configuration

    The set of parameters you define as Active configuration will be used as often as you execute a build.

    When you change the hardware platform you selected as target hardware platform of the design: Define new build settings for this new platform.

  3. Precondition Check: In default mode, the Precondition Check is activated. The Precondition Check verifies that the FPGA type on the target hardware of your design is supported by your Xilinx tool chain. In addition, in all designs for mE5 or LightBridge platforms: When this check box is activated, the information in operator AppletProperties is updated at each build, namely the fields BuildTime and AppletUid. Therefore, after a build has been completed, the design is in "unsaved" mode, since the parameter values in the operator AppletProperties have been changed during build.

    [Note] Avoiding the Update of AppletProperties

    Under specific circumstances you might not want to update the AppletProperties operator by a build. In this case, simply de-activate the check box Preconditions Check.

  4. Xilinx ISE/Xilinx Vivado: Select the Xilinx tool chain you are going to use. Vivado is supported by all marathon and LightBridge platforms. If Vivado is not supported by the target hardware of the open design, this is stated directly in the GUI:

    Vivado Supported by Target Hardware Design

    Figure 154. Vivado Supported by Target Hardware Design


    Vivado not Supported by Target Hardware Design

    Figure 155. Vivado not Supported by Target Hardware Design


  5. Build Environment:

    • When using a newer Xilinx tool (i.e., when developing with Xilinx Vivado or with Xilinx ISE in a version higher than 9.2):

      • De-activate the “Use system environment” checkbox, and

      • from your file system, select the Xilinx settings batch file that sets the environment to launch the external tools.

      Please follow the Xilinx documentation to make the best choice.

      You find the batch file in the Xilinx installation folder:

      • ISE: \Xilinx\14.7\ISE_DS\settings64.bat.

      • Vivado: \Xilinx\Vivado\2016.1\settings64.bat.

      Basler recommends to use the 64-bit Windows operating system when developing applets for microEnable 5 platforms. Make sure you select the batch file that matches the operating system you are using, e.g., "settings64.bat" which is the file for the 64-bit Windows OP.

    • If you use an older Xilinx ISE version (version 9.2 or older) and all environment variables are set at the operating system, activate the “Use system environment” checkbox.

  6. Build Flow: Activate all options under Build Flow. Normally, all steps should be activated.

    Basler recommends to set the system under Multi place and route to 20 iterations.

    Keep the Command Mode at Use platform default value.

  7. Applet Generation: Activate Applet Generation.

  8. Comment: Enter a comment that describes the set of parameters you just created. The entries you make here have no effect on the actual build process.

  9. Click the OK button.

Example: When developing for microEnable 5 or LightBridge, the following parameter values need to be set:

Parameter Set Example: Developing for microEnable 5 or LightBridge

Figure 156. Parameter Set Example: Developing for microEnable 5 or LightBridge


[Important] Disabling Build Flow Steps

Per default, all build flow steps (translation, mapping, ...) are activated:

Defaut: All Build Flow Steps Activated

Figure 157. Defaut: All Build Flow Steps Activated


You can de-select individual steps. However, the build steps depend on each other. They are listed in the order of their dependence:

  • Translation is the first step that can always be executed.

  • Mapping can only be executed if the step Translation has been executed before.

  • Place and route can only be executed if the step Mapping has been executed before, and so on.

Subsequent Build Steps Deactivated

Figure 158. Subsequent Build Steps Deactivated


However, a previous step doesn't need to be executed within the same build run. It might as well have been executed in an earlier build run. As long as the files (trace files) that have been generated during an earlier build run are still available, it is possible to deactivate steps that come earlier in the "Build Flow" list and to activate steps that come later in the list.

To keep trace files of earlier build runs: Go to menu Settings → System Settings → Global Build. Under Build Trace Files, activate Keep build trace files. Deactivate Compress build trace files.

Keeping Build Files of the Individual Build Steps

Figure 159. Keeping Build Files of the Individual Build Steps


If you keep the build trace files, and you have carried out all previous build flow steps once before, you can also activate only subsequent steps, e.g.:

Keeping Build Files of the Individual Build Steps

Figure 160. Keeping Build Files of the Individual Build Steps


[Important] Command Mode Options (VisualApplets Expert Only)

Go to Command Mode at the right upper corner of the Build Flow area.

Command Mode Options

Figure 161. Command Mode Options


In the list, you have three different options:

  • Use platform default value (Default)

  • Append to platform default value

  • Overwrite platform default value

----------

Use platform default value (Default):

If you keep or select this option, VisualApplets displays the default values recommended for the hardware platform you specified as target platform for the open design.

VisualApplets also uses these default values when running the Xilinx tools (i.e., when the actual applet is build (synthesized) out of the open design).

Since default sets cannot be modified, it is not possible to edit the Arguments fields in the Use platform default value mode.

Command Mode "Use platform default value"

Figure 162. Command Mode "Use platform default value"


Append to platform default value:

If you select this option, you can add information for the Mapping and Place and route tools to the basic arguments provided by VisualApplets.

During build, VisualApplets adds the parameters you defined in the Arguments fields to the platform default values when calling the tool. This setting is for experienced users only.

Command Mode "Append to platform default value"

Figure 163. Command Mode "Append to platform default value"


Overwrite platform default value:

If you select this option, VisualApplets displays the default arguments for Mapping and Place and route for the target hardware platform you selected directly after creating the new applet set. You can define (overwrite) the Mapping and Place and route arguments stated here. VisualApplets now uses only the parameters you specify in these Arguments fields when calling the tools. This setting is for experienced users only.

Command Mode "Overwrite platform default value"

Figure 164. Command Mode "Overwrite platform default value"


Re-Using Parameter Sets

In the Build Settings window, you have some options for handling parameter sets:

Handling Options

Figure 165. Handling Options


Clicking on

  • Add creates a new parameter set which you can modify as you want (based on the hardware platform you select).

  • Copy copies the parameters of the current set, creates a new set and pastes the parameters of the copied set into the new set.

  • Import allows to import a certain set of parameters into the current installation of VisualApplets.

  • Export selected saves the current parameter set to a file. The file can be used for transporting the data to a different PC or installation or for backup reasons. A dialog is displayed where you can specify a file name and location.

  • Delete deletes the current set of parameters.

Experienced users only: Creating *.hap Files for Different Operating Systems Using the Same Build (mE 5 ironman, mE5 marathon and LightBridge)

For mE 5 ironman, mE5 marathon and LightBridge, the checkbox Precondition Check offers a specific function:

  • If Precondition Check is activated, at each start of synthesis (build) the entries for BuildTime and AppletUid are updated. If you want to start a complete build (from netlist generation through to applet generation) you need to activate Precondition Check. Otherwise, later on (when using the applet on the frame grabber) the loaded applet cannot be reliably validated by the runtime environment.

  • Specific option: If you have already completely built an applet, but decide you need another *.hap file for another target operating system: You can build a new OS-specific hap file out of the complete build to make your design usable on other target operating systems (i.e., for another target runtime). Proceed as follows:

    1. In menu Settings, select System Settings.

    2. In the window that opens, select category Global Build.

    3. Here, under Build Trace Files, activate the option Keep build trace files and specify a path.

    4. Go to menu Settings, menu item Build Settings.

    5. Deactivate option Precondition Check.

    6. Deactivate all other options under Xilinx Build Flow.

    7. Activate Applet Generation.

    8. Under Defaults, activate Active Configuration.

    9. Start the build of the OS specific *.hap file.

    Especially with complex designs, this option allows you to save time.

Tcl Scripting

Tcl provides the power of a programming language while being easy-to-learn. Using it can be as simple as calling commands in a shell. At the same time advanced programming techniques can be used to set up sophisticated processing schemes. 

To combine VisualApplets with the power of a scripting language allows for an enormous increase of productivity.

You can

  • Automatize the creation of designs:

    Use scripts to assemble components of your design controlled by parameters. Set up libraries of processing pipelines and create bunches of different designs automatically.

  • Automatize the simulation of designs:

    Tcl allows you to define very extensive simulation runs: You can, for example, specify series of simulation runs over thousands of images stored somewhere in your file system. Or, you can define various simulation runs where different sets of design parameters are used for simulation.

[Tip] Documentation

You find information on how to use the VisualApplets Tcl console and an extensive command reference at TCL Documentation.

[Note] Availability

The VisualApplets TCL scripting feature is part of VisualApplets Expert.

To use TCL scripting, you need to hold a VisualApplets Expert license.

Script Collection (Tcl)

You can make the individual procedures in your Tcl scripts available directly in the VisualApplets GUI.

VisualApplets allows you to define a script collection (library) containing sorted commands that each call a specific procedure in a specified Tcl script. The commands are graphically available directly on the VisualApplets GUI. As soon as you start a command via mouse click or per Drag and Drop, the underlying procedure is carried out. You can monitor what happens in the Tcl console of the VisualApplets program window.

You can define a script collection either in a graphical way, using the VisualApplets GUI, or creating/editing an XML file that defines the script collection.

As all information regarding your script collection is stored in XML files, you can use version control systems not only for the individual Tcl scripts, but also for the structure and content definition of your script collection.

The commands are available in pane Script Collection:

Script Collection in the VisualApplets program window

Figure 166. Script Collection in the VisualApplets program window


[Tip] Documentation

You find information on how to use the VisualApplets Tcl console and an extensive command reference at Creating Script Collections (Script Libraries) and at Command Reference.

[Note] Availability

The VisualApplets TCL scripting feature is part of VisualApplets Expert.

To use TCL scripting, you need to hold a VisualApplets Expert license.

Tcl Export

VisualApplets allows you to export VisualApplets designs as Tcl script (*.tcl).

You can use the script format for the following purposes:

  • revision control

  • comparing versions automatically (by creating "diffs")

However, some information is lost during export to Tcl script. Therefore, you should always save your design in *.va format. The Tcl file is not qualified to be used as the primary data format.

[Warning] Save Design in *.va Format

Use the *.va file format as primary data format for your VisualApplets designs.

The Tcl script does not contain the full design information.

Exporting to Tcl

The following information is lost during export to Tcl script:

  • The local modifications you made in a user library element instance (to adapt the instance to the surrounding design) are lost. If you re-import a Tcl script into VisualApplets, the instance is inserted as a fresh copy of the user library element. The content of the instance in your design has not been saved in Tcl.

  • The content of info boxes is kept in Tcl format. However, the formatting of info boxes is lost.

You should always save your design in *.va format, too. The Tcl file is not qualified to be used as the primary data format.

To export your design to a Tcl file (*.tcl):

  1. From the menu, select File → Export → Design to Script....

    Exporting a Design

    Figure 167. Exporting a Design


  2. Select a location for the *.tcl file containing your design, and click on Save.

Now you can check in the Tcl file into your version control system, or find differences between different versions of the design using a "diff" tool.

Importing from Tcl

To import your *.tcl design file into VisualApplets:

  1. From the menu, select File → Import → Design from Script....

    Importing a Design

    Figure 168. Importing a Design


  2. Browse to the location of the *.tcl file containing your design, and select the *.tcl file.

  3. Click on Open.

Now your design is opened in VisualApplets, and you can

  • continue editing your design within VisualApplets,

  • save your design file as *.va file.

[Warning] Always use *.va File Format as Primary Data Format

Always use the *.va file format as primary data format for your VisualApplets designs.

Never use the Tcl script format as primary data format, as the Tcl script does not contain the full design information.

Tcl Import/Export Command Reference

In the generated Tcl source file the following VisualApplets-specific commands are used.

[Important] Syntax

Optional parameters: The notation of optional parameters follows the Wirth Syntax Notation (brackets).

Parameter FullModuleName: Hierarchical path starting at process level. The hierarchies are separated by a slash.

Command

Parameters

Description

Creating, Loading, and Saving Designs

CreateDesign

Name

Platform

Command for creating a new design with the name "Name" for a hardware platform "Platform". For specifying the target platform of the design, you can either use

  • the VisualApplets library name for the platform (e.g., "mE4VQ4-GE"), or

  • the full name of the platform (e.g., "microEnable IV VQ4-GE").

Using capitals in the names has no effect.

SetDesignProperty

Key Value

Use this command to enter design properties. There are tree values you can use as key:

  • ProjectName (the name you want the project to give)

  • Version (version of the design)

  • >Description (description of the project).

SetDesignClock

NewFrequency

Command for setting the basic clock frequency of the FPGA (in MHz).

Setting up a Design

CreateProcess

-

Creates a new process

CreateModule

OperatorType

FullModuleName

[ InPortMultiplicity

[ OutPortMultiplicity

{NamedPortMultiplicity}

] ]

xPos

yPos

Creates an instance (Module) of an operator (OperatorType).

The position of the module in the design window you define via parameters xPos and yPos.

With FullModuleName you define the module's hierarchical position within the design and it's name after instantiation (e.g., Process0/branch).

Optionally, you can use the value pair InPortMultiplicity and OutPortMultiplicity to specify the multiplicity of the vector inputs and vector outputs of the module.

If you use this value pair, you define the number of ports (in operators with variable port numbers, like BRANCH) for the module (which is a specific instance of an operator).

In addition, you can specify the multiplicity of individual vector ports (NamedPortMultiplicity). You can use NamedPortMultiplicity multiple times in one command line.

The format is PortGroup:Number.

Example: CreateModule BRANCH Process0/branch 0 0 O:3 100 100

ConnectModules

FromModule

FromModulePort

ToModule

ToModulePort

[ x1 [y2 x3] ]

Command for connecting modules. For FromModule and ToModule, use hierarchical names (names containing the hierarchical position of a module within a design plus actual module name, e.g., (e.g., Process0/branch).

Nodes within hierarchical boxes are identified via the prefix "INBOUND#" or "OUTBOUND#". Example: "OUTBOUND#O001".

The optional parameters x1, y2 and x3 you use to define the geometry of the connecting polygon (horizontal line from FromModuleOutputPort to x1, vertical line to y2, horizontal line to x3, vertical line up to the height of ToModulePort, horizontal line to ToModulePort).

CreateComment

FullModuleName

Text

xPos

yPos

The content of Text can contain Unicode characters. If you use characters that are not part of ASCII, use the according Tcl syntax to represent Unicode, for example:

[encoding convert from utf-8 "A-Umlaut: \xc3\x84"]

SetParamInt

FullModuleName

ParameterName

Value

Command for setting an integer parameter.

SetParamFloat

FullModuleName

ParameterName

Value

Command for setting a floating point parameter.

SetParamEnum

FullModuleName

ParameterName

Value

Command for setting an addressed enum parameter. Value is the string of the enum value.

Example: Process0/module1 (SetSignalStatus), "SetParamEnum Process0/module1 Mode High" sets parameter Mode to High.

SetParamString

FullModuleName

ParameterName

Value

Command for setting a string parameter.

SetParamIntField

FullModuleName

ParameterName

Index

Value1

{OtherValues}

Command for setting integer field entries starting with index "Index" for the following values.

SetParamFloatField

FullModuleName

ParameterName

Index

Value

{OtherValues}

Command for setting float field entries starting with index "Index" for the following values.

SetParamStatic

FullModuleName

ParameterName

If a parameter can be static as well as dynamic, in the vast majority of cases the parameter is set to dynamic per default. Use this command to set such a parameter to static.

SetParamDynamic

FullModuleName

ParameterName

You can use this function to set a parameter to dynamic (if the parameter can be can be dynamic at all).

SetLinkParam

FullModuleName

PortName

ParameterName

Value

{ OtherParameterName

OtherParameterValue }

Command for configuring links. The connection is identified via the connection node of a module.

SetResourceMapping

FullModuleName

ResourceName

[Index]

NewMapping

Command for changing the mapping of resources to a module. The resource ResourceName will be mapped to the new index NewMapping. In case the module allocates multiple resources of the same type, use the optional parameter Index for selecting the resource.

Further Editing Commands

Move

FullModuleName

[HierNodeName]

PosX

PosY

Command for re-positioning a module, a H-Box node, a comment box, or a simulation module to a new position within the design window.

Use parameter [HierNodeName] only for selecting an H-Box node. Nodes within hierarchical boxes are identified via the prefix "INBOUND#" or "OUTBOUND#"(like you do when using command ConnectModules), for example, "INBOUND#I000".

CreateSimSource

FullSimModuleName

xPos

yPos

Command for creating a simulation source on the indicated position.

CreateSimProbe

FullSimModuleName

xPos

yPos

Command for creating a simulation probe on the indicated position.

ConnectSimModule

FullSimModuleName

TargetModuleName

TargetModulePortName

[ xPos yPos ]

Command for connecting a simulation module with a link. The connection is identified via the specified module (TargetModuleName) and port (TargetModulePortName). TargetModuleName must be located in the same hierarchy as FullSimModuleName. Optionally, you can define the position of the connection on the link via the parameters xPos and yPos.

SetSimModuleProperty

FullSimModuleName

Key

Value

{OtherValue}

Command for configuring a simulation module. The following parameters can be set (in the list below, the key word Key is followed by the parameter values Value):

PixelAligmentOffset BITS

ImageFileSubPixels NUMBER

ImageFilePixelBits BITS

ImageFileNormalize CHOICE

where CHOICE = "1" | "0" | "yes" | "no" | "on" | "off" | "true" | "false"

CropRect [imageNr] X Y WIDTH HEIGHT

CurrentImage INDEX

AddImage

FullSimSourceName

ImageFileName1

{OtherImageFileName}

[ImageLibrary]

Command for adding an image to a simulation source. If the number of kernel elements on the link is > 1, you need to specify as many images as there are kernel elements on the link. Optionally, you can specify the image library you want to be used ( ImageLibrary = "Native" | "ImageMagick").

User Libraries

InstUserLibOperator

LibName

OperatorName

FullModuleName

XPos

YPos

Command for instantiating a user library element.

Custom Library Handling

InstCustomLibOperator

LibName

OperatorName

FullModuleName

XPos

YPos

Command for instantiating a custom library element.

Table 3. Commands for Creating and Editing a VA Design in Tcl


Print / Screenshot

VisualApplets offers the possibility to print a diagram window or copy its content as an image into the system clipboard. The printing / screenshot is applied to the currently selected diagram window. The full window including all operators and links will be selected for output even if parts of the content cannot be fit into the current screen due to the limited resolution.

To start printing select the required diagram window and select File → Print ( Ctrl+P ). The design will automatically be resized.

To generate a screenshot and copy the content into clipboard select the required diagram window and click on Edit → Screenshot to clipboard. If you prefer to directly save the screenshot in an image file select Edit → Screenshot to file.

Migration from Older Versions

In VisualApplets version 3, files from version 1.2 and higher can be loaded.

Loading of files from previous versions might result in incomplete designs. Some names, functionality and parameters of some links and operators might have changed. VisualApplets will adapt, add, and transform most of the module settings to the new parameter sets. However, in some cases, an automatic transformation cannot be performed. In any case, you should verify your implementation if migrated from a previous version.

Migration from older versions can result in one of the following:

  • “Update to Current Version” Window

    When a design using operators from an older VisualApplets version is opened, VisualApplets might ask for an update of the design to the current version.

  • Open Input Links at Signal Operators

    If you do not use the auto update function “Update to Current Version”, the inputs of some signal operators might not be connected. VisualApplets offers a function to automatically connect Reset inputs to operator Gnd and Tick inputs to operator Vcc. Simply right click on the respective operator and select Connect to ground or Connect to Vcc.

  • Missing Operators

    If an operator which was previously used does not exist in the current version anymore, it is replaced by operator Dummy. The missing operator has to be replaced. For most missing operators a replacement is available. Read the documentation of the operator in detail in 'Dummy'.

[Tip] Release Notes

Check the VisualApplets release notes to get more information about changes.