Basic Functionality

This chapter outlines the fundamental ideas and functions of VisualApplets. First, you get an overview over the basic principles of VisualApplets, the typical workflow of the design process, and the graphical user interface you will use for creating your designs. Afterwards (starting with 'Entering a Design'), all functions vital to generate VisualApplets designs are explained in detail. This includes operator insertion, module and link parametrization, verification, simulation and, finally, the build process.

A detailed description of the extended functions of VisualApplets you will find in Extended Functionality. If you prefer a step-by-step introduction into the program, we recommend reading Tutorial and Examples in detail.

Basic Principles

The basic principles of VisualApplets are very simple.

  • Image processing or signal processing functions are represented by abstract operators.

  • Operators are selected in accordance with the intended functionality of the applet. They can be chosen from extensive libraries.

  • The operators are inserted into the user's design. The instance of an operator in a design is called module.

  • A data flow model which represents the processing chain is build by linking modules.

  • All modules and links can be parametrized to meet the requirements of the user's application and make the implementation fast and efficient.

  • After successful offline verification, the design is built into a hardware applet file which can be loaded onto the hardware devices.

The following figure shows a screen shot of a simple VisualApplets design. As you can see, the modules in the design window are combined via links which are represented by arrows. The order of the modules define the functionality of the final applet. In this example, we acquire images from a camera (module Camera), buffer the images in an on-board memory (Buffer), and output the result to the host PC using the operator DmaToPC.

Simple VisualApplets Design

Figure 9. Simple VisualApplets Design


After all operators have been placed into a design, have been connected using links and parametrized, the design has to be verified. The program offers multiple functionalities to check consistency, bandwidth, and resources. One very important part of the verification is the functional simulation. Here, the design can be simulated with data from image files without the need of any target hardware.

Finally, the design is build to become a hardware applet file (HAP) which can be used on the target hardware devices. The next section will outline the workflow in detail.

Workflow

The required steps to generate or modify a VisualApplets project are the same for each project:

  1. Design Entry:

    The design is build by using operators from the operator libraries and inserting them into the design. This way, the operators become instanciated. The instance of an operator within a design is called module. The modules of a design are connected via links. The order of the operators determine the functionality of design.

  2. Design Parameterization:

    All modules and links of a design can be parameterized to define correct behavior, processing speed, and resource efficiency.

  3. Design Verification:

    The verification of the design is a very important part of the design process. Two levels of design rule checks (DRC) verify the consistency of the design and show errors in parameterization and link formats, or resource conflicts.

    A functional simulation is used to verify the behavior of the implementation. Image files serve as source data. The simulation is performed completely offline, without the need of any target hardware.

  4. Build:

    During the build process, the design is transformed into the binary hardware applet file (HAP) which can be directly loaded onto the hardware.

  5. SDK Generator:

    To ease the integration of the applet into user applications, VisualApplets includes an SDK generator tool which generates a C++ project. The project can be immediately loaded and compiled and will provide examples on how to use and parameterize the new applet.

  6. Applet Run:

    The applet can now be included and used in your application. To run applets, the runtime is required.

Figure 10, 'The Design Workflow' illustrates the steps described above. As you can see, during the design time of the applet, a *.va file is edited. After the build process, the final *.hap file is integrated into the user application.

The Design Workflow

Figure 10. The Design Workflow


Main Program Window

VisualApplets offers a graphical user interface for applet design. No scripting, no programming code is required to be edited. The user interface is very simple and especially designed for easy learning by users. No technical background in programming is required.

The VisualApplets main program window consists of several bars and panels:

Main Program Window

Figure 11. Main Program Window


The main menu bar provides direct access to the program features. Different toolbars can be used for quick access to important functions.

Three panels provide different information and possibilities:

  • Design panel: The design panel shows your VisualApplets project. You always have one main design window, but, depending on the structure of your project, you may additionally work with several sub windows. In the Window menu, multiple views can be selected (Tile, Cascade, Tabbed View). Using the menu entries you find in Window → Diagram Windows ( Ctrl+F8 ), you can easily select the design diagram window you want to work on at the moment.

  • Information panel: In default setting of the main program window, the information panel is always displayed. It offers different information windows in tabbed view:

    • Project Info

    • Module Info

    • DRC Log

    • Build Log

    • Help

    (For details on each information window, see below.)

  • Library panel: In default setting of the main program window, the library panel is always displayed. It offers three library windows in tabbed view:

    • Operator Library: The Operator Library is a collection of sublibraries that contain VisualApplets operators, i.e. the individual image processing functions.

    • User Library: The User Library can include custom libraries with user-defined combinations of operators (hierarchical boxes). For more information see 'User Libraries'.

    • Custom Library: Into the Custom Library, operators provided by a user of VisualApplets Expert can be imported.

[Tip] Specific Operators

Some operators displayed in the operator library may not be available for the platform you are currently designing for. If not available for the platform you selected, the operator is grayed-out.

Operator not available for currently selected target hardware platform

Figure 12. Operator not available for currently selected target hardware platform


The Windows of the Information Panel

Project Info

The Project Info window summarizes information on the current project.

Project Info

Figure 13. Project Info


The following information is provided:

  • Name: Name of project (=file name)

  • Creation Date: Date of creation

  • Last Modified: Date of last modification

  • Version: Version number of the project; this entry can be edited from the Design → Project Details menu (see 'Project Properties')

  • Description: Verbal description of the project; this entry can be edited from the Design → Project Details menu (see 'Project Properties')

  • Type: Displays the FPGA type currently used on the target hardware (see 'Target Hardware Porting')

  • Target Runtime: Displays the target runtime (see 'Target Runtime')

  • Design Rules Check Level 1: Indicates found errors or successful performance (see 'Design Rules Check')

  • Hardware Applet: Indicates the existence of a hardware applet. The entry is checked if VisualApplets previously generated a HAP file of the project.

  • Resources: Shows the results of the resource estimation (VisualApplets Expert feature; see also 'FPGA Resource Estimation').

  • System: Displays the found XILINX version, the available runtime version, and the runtime directory. This information is used by VisualApplets to build a HAP and for the final HAP output. See 'Build' for more information.

Module Info

The Module Info window shows a list of all modules used in the project (as long als the input field of the window is empty). The list is structured by the hierarchy of the project.

Module Search

Figure 14. Module Search


In the Module Info window, you can easily search for a certain module or module type. This is very helpful when working in large designs. Before you start your search, you should define the filter settings:

  • If you want to search for the individual name you gave to the module, activate "Names".

  • If you want to search for the module type (the name of the operator the instance of which you are currently searching for), activate "Types".

Module Search

Figure 15. Module Search


You can now enter your search string. It is sufficient to enter only part of a name. A click on one of the modules listed in the Module Info window will bring the respective design window into focus (in the design panel), with the module selected and highlighted.

DRC Log

The DRC Log window displays the results of the last Design Rules Check. A click on one of the module names listed under a warning/error message will bring the respective design window into focus (in the design panel), with the module selected and highlighted.

DRC Log Information

Figure 16. DRC Log Information


Build Log

The Build Log window displays the results of the last Build.

Build Log Information

Figure 17. Build Log Information


Help

The Help window offers context-sensitive help on individual operators.

To open the context-sensitive help you can either:

  1. Select the operator you want information on directly in you design and press F1 to open and display the corresponding information in the Help window.

  2. Select a operator from the Operator Library window. The Help window will always show the help for the current selection.

Example: Displaying Information on the MergeKernel Operator

Figure 18. Example: Displaying Information on the MergeKernel Operator


If you press F1 in any other window or click on a help button, the context sensitive user manual help for the current selected window or function will open. Of course, you can access the operator help directly form this user documentation, too. See Operator Reference.

The Windows of the Library Panel

The library panel displays the Operator Library window, the User Library window and the Custom Library window in tabbed view.

All libraries (Operator Library, User Library, and Custom Library with all their sublibraries) are organized in a tree structure. Each library contains operators.

The visualization of the structure can be changed by selecting either "Tree", "List", or "Icon" view.

Library Panel with Operator Library on Display

Figure 19. Library Panel with Operator Library on Display


In the search field, a search string can be entered to filter the list for only the required operators. Camera for example will list all operators containing camera in their name.

Operator Library

The Operator Library is a collection of sublibraries that contain VisualApplets operators, i.e. the individual image processing functions.

You can get detailed information on each operator by clicking on the operator name in the Operator Library window and clicking on the Help tab in the information panel.

Library Panel with Operator Library on Display

Figure 20. Library Panel with Operator Library on Display


See 'Inserting Operators' on how to add new operators to a diagram. A detailed documentation of all operators is given in Operator Reference.

User Library

The User Library can include custom libraries with user-defined combinations of operators (hierarchical boxes). For more information see 'User Libraries'.

Custom Library

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

Adapting the Main Program Window

You have various options to adapt the main program window of VisualApplets to your personal preferences:

Adapting Toolbars

Toolbars can be rearranged by drag and drop or added/removed by a right click.

Restoring the Default Setting of the Main Program Window

If you accidentally arranged the windows or toolbars in a way you didn't want to, you can restore the default setting by Window → Reset Dock Windows ( Ctrl+O ) or by clicking the corresponding icon in the View toolbar.

Number of Files under File -> Recent Designs

Under File → Recent Designs VisualApplets offers you a list of recently opened VisualApplets files (*.va). You can configure the actual number of files displayed.

To define how many recently opened files are displayed:

  1. Go to menu Settings → System settings and select category Common.

  2. Under Recent designs, define the number of files you want to have displayed (up to 24).

  3. Confirm with Ok.

Configuring the number of displayed recent designs

Figure 21. Configuring the number of displayed recent designs


Entering a Design

VisualApplets offers a graphical user interface for applet design. No scripting, no programming-code is required to be edited. The user interface is very simple and especially designed for easy learning by users. No technical background in programming is required.

Creating a New Project

To create a new VisualApplets project file:

  1. Click on File → New ( Ctrl+N ) or use the icon New from the file icon bar in the main window. A New Project window will open which allows you to specify a project name.

  2. Enter the project name. The project name will be the suggested file name later on.

  3. You also have to specify the target hardware platform and the target runtime. If you are not sure which platform and runtime will be used, you can always change these settings later on ( Design → Change Platform and Design → Change Target Runtime ). Finalized applets can only be used in a runtime which corresponds to the target runtime defined in the applet.

Start of a new Project

Figure 22. Start of a new Project


For each project, a version number (string) and a project description can be added.

  1. Click on Properties to open the Project details window. Here, you can enter the version of your design project and a project description. This information will be displayed in the Project Info window of the information panel.

Edit Project Details

Figure 23. Edit Project Details


After all settings have been made:

  1. Click on OK to close all windows and to start the new project. VisualApplets will now open your new project.

[Tip] Tip

Only one project can be loaded at a time. If you want to open several projects at the same time, simply use a second VisualApplets instance.

Opening an Existing Project

To open an existing project:

  1. Click on File → Open ( Ctrl+O ) or use the icon Open from the file icon bar.

  2. Select the VisualApplets project file from your file system an click on Open.

[Tip] Opening Designs created in older VisualApplets versions

If you are opening a project file which has been edited with a previous version of VisualApplets, the program might ask you to convert the file to the new version. For more information on migrating from previous versions, see 'Migration from Older Versions'.

Alternatively, you can select a project you have currently worked on directly:

  1. Go to File → Recent Designs. VisualApplets offers you a list of recently opened VisualApplets files (*.va).

  2. Select the project file you want to proceed working on.

[Tip] Number of displayed files

You can configure the actual number of files displayed. How to do that, see section 'Number of Files under File -> Recent Designs'.

Defining the FPGA Clock (mE5 marathon only)

If you are designing for another hardware platform than mE5 marathon, skip this section and proceed with the following one.

If you are designing for a mE5 marathon hardware platform, you can specify the FPGA clock frequency. You can select any value between 125 MHz and 312.5 MHz.

To define the FPGA clock:

  1. In menu Design, select menu item Change FPGA Clock.

    Menu Design, menu item Change FPGA Clock

    Figure 24. Menu Design, menu item Change FPGA Clock


  2. Specify the desired frequency via slider or spin box.

Slider and spin box for selecting FPGA clock frequency

Figure 25. Slider and spin box for selecting FPGA clock frequency


The selected clock frequency (Design Clock) is displayed in operator AppletProperties.

Inserting Operators

Inserting new operators into a project is very easy:

  1. Select the required operator in the library panel (see 'The Windows of the Library Panel' if you want to know how to find the operator you are looking for).

Operator Libraries

Figure 26. Operator Libraries


  1. To add an operator from the library list into your diagram window, simply drag and drop the operator into the design window. The selected operator is now added to your project.

[Tip] Operator Instances in Your Design

As soon as you drag and drop an operator into your design, the operator gets instantiated and you work with an instance of the chosen operator. This instance in your design we call a design module. You can give an individual name to each module of your design (the module name). This way, you can even give an individual name to each of several instances of the same operator.

  1. Move the modules in your design into the right position by using drag and drop.

[Tip] Quick Insertion of New Modules

There is an alternative method to add operators into a project. You can use the Add Operator window which you open via Design → Add Operator ... ( Ctrl+I ). This window is especially useful you need to add a series of operators you know by name. The shortcut for accessing the window, in combination with the window's search field facilitate the efficient and fast insertion of multiple operators. The operator you chose in this window is added to the design window currently in focus.

Deleting Modules

If you want to delete a module:

  1. Select the module and press the DEL key, or right click on the module and select Delete from the menu.

Adding Links

The modules of a project have to be connected via links. To connect your modules using links:

  1. Click on the output port of a module and hold the mouse button.

  2. Move the mouse to the input port of the next module and release the mouse button.

Now, the link will be established. You can also connect modules from an output port to an input port, i.e. draw in reverse direction.

There are two alternative ways to connect modules which you might find efficient:

  • Click on the output port of the first module you want to connect. Then, click on the input port of the module you want to connect to the first module. Now, the link will be established. Or,

  • drag one of the modules you want to connect shortly that close to the other one that the respective ports "touch". This will generate a link between the touching ports.

[Note] Some Linking Rules

  • It is not possible to add more than one link to a single port.

  • An input port always has to be connected to an output port. It is not possible to connect two input ports or two output ports.

  • Loops are generally not allowed in projects. See 'Rules of Links' for more information.

A drag and drop of an existing link to another port can change the connection. The link path of an established link can be changed by moving the line using drag and drop. However, new edges can't be inserted.

[Tip] Tip

You can delete a link by selecting it and pressing the DEL key (or, right-clicking it and selecting Delete).

Clipboard

Modules and links in a project can be copied and pasted to and from the clipboard.

  1. Select the operators and links to be copied, for example by drawing a rectangular selection area.

  2. Copy the selection via Edit → Copy ( Ctrl+C ) or from the context menu, select Copy.

  3. To insert, select Edit → Copy ( Ctrl+V ) or from the context menu, select Paste.

If you use the context menu, the inserted modules and links will be positioned at the current mouse position. Otherwise, the inserted modules and links are positioned in the center of the currently visible part of the design window currently in focus.

Modules are copied with all their parameter settings. Links between modules are copied, too. However, a link which is not connected to two copied modules can't be copied as it is not allowed to have single-sidedly connected links. This can result in a changed output link format of a copied module. Verify the parametrizations after using the clipboard.

[Note] Copying & Pasting to Other Projects

You can copy parts of a project to other projects in different program instances. However, you should not use the clipboard between different versions of VisualApplets.

Some operators (e.g., EventToHost) are available only for specific platforms. If you copy such an operator to a design for a target hardware platform that does not support this operator, DRC1 delivers an according error message:

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

Figure 27. Error message in case an operator is not applicable for another hardware platform


Undo / Redo

Undo and redo operations are possible in VisualApplets.

If you want to undo your last action:

  • Select Edit → Undo ( Ctrl+Z ).

If you want to redo your last action:

  • Select Edit → Redo ( Ctrl+Shift+Z ).

The operations require some seconds to be processed.

Saving a Project

The project is not automatically saved.

  1. To save your design, use File → Save ( Ctrl+S ) or File → Save As... (or use the according menu options / toolbar buttons).

[Note] File Name and Project Name

If you save your design for the first time, or if you use the Save as... option, the Save/Save as... dialog will offer the project name as the name for your design file.

Navigating Your Design

A design might consist of a large network of modules in several design windows. Therefore, it is very helpful to have some navigation tools which facilitate to keep track with the details of your design.

These are the most important ones:

  • Changing design windows

    To change between the windows in a design, you can use Window → Diagram Windows ( Ctrl+F8 ).

  • Finding a module in your design

    To find a specific module in your design, you have two possibilities:

    • You can use the search options of the Module Info window. Click on the the Module Info tab in the information panel, and enter your search string. You don't have to enter a full module or operator name. Entering a few characters is often enough. Make sure you use the right filter for your search: Use the Name filter if searching for an individual module name. Use the Type filter if searching for the name of the operator your looked-for module is an instance of.

    • Alternatively, you can also use the Search Module window which you open via Design → Search Module... ( Ctrl+F ). Enter your search string. You don't have to enter a full module or operator name. Entering a few characters is often enough. Make sure you use the right filter for your search: Use the Name filter if searching for an individual module name. Use the Type filter if searching for the name of the operator your looked-for module is an instance of.

  • Selecting a module:

    To select a module in a design window, just click on the module.

  • Using the module menu:

    To use the available menu for a module, right-click on the module and choose the option you need from the menu.

Data Flow

In 'Basic Principles' the VisualApplets idea of building FPGA applications using operators and links was explained. This chapter will explain the data flow model of FPGA data processing.

FPGA implementations differ from software programs run on a microprocessor. All implemented functionalities of an FPGA implementation exist and can be used at the same time (i.e., in parallel) while the functions of a microprocessor program are executed sequentially. This is a very important difference and one of the tremendous advantages of FPGA implementations. As everything is working in parallel, data is processed in a pipeline structure. As mentioned, modules (instantiated operators) are connected by links. Each module starts the processing of image or signal data as soon as data is available. The results are forwarded to the next module via link. Most modules do not buffer the input image data. They output the calculated results as soon as the information is available. Let's have a look on our project from the Getting Startedguide once again:

Simple VisualApplets Design

Figure 28. Simple VisualApplets Design


The project consists of three modules; namely, the camera, a buffer, and a DMA operator. The camera operator is an image source module. It receives the images sent from the camera. But instead of collecting a full frame and outputting the image after full acquisition, the module will forward the pixels to the next module as soon as they arrive. The buffer module ImageBuffer is a buffer which can store image data but will output available data as soon as the output is not blocked. The DMA module transfers the images to the host PC.

The result of this pipeline structure is that image pixels are transferred to the host PC while other pixels of the same image are still transferred from the camera. Thus, no images are stored inside the modules. The advantage of this non-buffered pipeline is that all modules can run in parallel and are efficiently used. Furthermore, the latency (the time a pixel needs until it is fully processed) is reduced to a minimum.

[Note] Note

Always keep in mind that all modules can run in parallel and output their results as soon as they are available and the output is not blocked. Imagine the pipeline like a water pipeline with valves, branches, and small and wide tubes.

In difference to a microprocessor program the number of operations, i.e., the number of operators, will not influence the processing speed as everything is running in parallel. However, the more operators are used in an applet, the more hardware resources are required.

Bandwidth of an Applet

The bandwidth of a pipeline in an applet depends on the processing speed of the operators and on the connecting links. A link has several “link properties” (see 'Link Properties'). One of them is the parallelism which defines the bandwidth. The parallelism defines how many pixels are transferred in parallel between two operators in one design clock cycle. The higher the parallelism, the higher the bandwidth. Operators are automatically adapted to meet the required bandwidth of a link; if this is not possible, they redefine the bandwidth.

Let's assume a simple example. A parallelism of four will result in four pixels being transferred in parallel. This means the first four consecutive pixels of an image are transferred from the camera module to its successive module (in our case the buffer) in parallel. Next, the next four pixels are transferred from the camera module to the buffer module. Meanwhile, the first four pixels have been processed in the buffer module and are forwarded to the next module in the image processing chain.

As mentioned before, the parallelism defines the number of pixels transferred in parallel in one clock cycle of the design clock frequency. The frequency depends on the used hardware device. For example, the frame grabbers of the microEnable IV series use a design clock frequency of 62.5MHz.

[Tip] Calculating the Bandwidth

The bandwidth b of a link is determined by the product of the parallelism p and the frequency f:

A parallelism of four will therefore result in a bandwidth of . If we assume a bit width of 8 bit per pixel, this will result in a bandwidth of 250MB/s. A list of the basic design clock frequencies for all hardware platforms can be found in Appendix. Device Resources.

Operators may change the parallelism between the input and the output link. Thus, the bandwidth is not constant throughout the design. That's because the required bandwidth might change. Suppose an operator reduces the image size. Thus, the required output bandwidth is reduced, too.

The bandwidth calculated with the formula above is a theoretic value. The actual bandwidth is slightly less than the theoretic value.

[Important] Important

Some operators cannot process the full bandwidth given at the input link. You will find detailed information for all operators concerned in the Operator Reference.

Note the difference between the bandwidth and the latency. The latency is defined individually by each operator and mostly depends on the algorithmic implementation.

[Tip] Visualization on GUI

For visualization of the according link properties, VisualApplets provides two GUI buttons in the toolbar of the program window:

Display Link Info displays the bit width and the parallelism for every link in the diagram:

Display Link Throughput displays the maximum pixel throughput in megapixels per second for every link in the diagram:

Pixel Order

As previously explained, in VisualApplets, pixels are transferred through the pipeline one after another. If a link parallelism is greater than one, multiple pixels are transferred in parallel. The order of the transfer of pixels in images or lines is the following: In general, pixels of frames (two-dimensional images) are transferred from a camera starting with the first pixel at the upper left corner, and finishing with the last pixel at the bottom right corner. If VisualApplets operators require the pixel position for their processing, the same order, that is, left -> right and top -> down, is expected. The following figure illustrates this order:

Pixel Order

Figure 29. Pixel Order


However, some sources like cameras do not comply with this order. In these cases, VisualApplets operators and designs can be used to correct the pixel order. To do this, you should have some knowledge on the protocol of a pixel transfer. You get the according information in the section 'Image Protocols, Image Dimensions and Data Structure'.

Image Protocols, Image Dimensions and Data Structure

The Image Protocol defines the image dimension and data structure of the transfered pixel and data. The Image Protocol is another link property besides the previously mentioned link property Parallelism.

There are three types of image protocols:

  • “2D” VALT_IMAGE2D

    The 2D image protocol is used for the transfer of images, mostly used with area scan cameras. A link transports the information

    • when a pixel is transferred (pixel valid signal)

    • when a line is completed (end-of-line signal)

    • when a frame is completed (end-of-frame signal)

    Thus, a 2D image can have:

    • an arbitrary number of pixels in a line

    • an arbitrary image height

    Model of a 2D Image Protocol

    Figure 30. Model of a 2D Image Protocol


    The pixel position itself within a line or row is not transfered. The position results out of the number of antecedent lines and antecendent pixels within the current line. It is not possible to have gaps between the pixels in a line. It is possible to have arbitrary line lengths. A line may have no pixels, i.e., empty lines are possible. As a minimum, a frame has to consist of one empty line.

  • “1D” VALT_LINE1D

    The 1D image protocol is used to transfer lines, mostly used with line scan cameras. A link transports the information

    • when a pixel is transfered (pixel valid signal)

    • when a line is completed (end-of-line signal)

    Thus, a 1D image can have:

    • an arbitrary number of pixels in a line

    • an unlimited image height

    Model of a 1D Image Protocol

    Figure 31. Model of a 1D Image Protocol


    Again, the pixel position itself within a line is not transfered. The position results out of the number of antecedent lines and antecendent pixels within the current line. It is not possible to have gaps between the pixels in a line. It is possible to have arbitrary line lengths. A line may have no pixels, i.e., empty lines are possible.

  • “0D” VALT_PIXEL0D

    In the 0D image protocol, no information on image dimensions is preserved. It is simply a stream of pixels. Still, time-gaps between pixels may exist, i.e., a pixel comes with a valid signal. The 0D protocol is mostly used for data transfers such as measurement results.

    Model of an 0D Image Protocol

    Figure 32. Model of an 0D Image Protocol


  • “Signal” VALT_SIGNAL

    In the signal protocol, transfers are reduced to single bit data transfers which are always valid (valid at every clock cycle). Thus, the protocol does not include any control signals such as pixel valid or line/frame completed. The signal protocol is used for signal operators used in trigger and signal processing systems.

The image protocol is a link property. Each operator decides individually which link properties are accepted at its inputs and available at its outputs. See 'Link Properties' for more information about link parameterization.

Flow Control

In the previous sections, the pipeline structure of VisualApplets designs was explained. As mentioned before, data is transferred between the modules of a project via links. As soon as a module has processed an input pixel and is finished with calculating the output value, the result is output at the output link(s). However, the next module might not be able to process the data as it is still processing another pixel. In this case, the flow control of VisualApplets is applied and the pipeline is blocked. Thus, modules can block their inputs. In this case the antecedent module will not output its results and will propagate the blocking state backwards in the pipeline.

Let's have a look at the simple example shown in Figure 28, 'Simple VisualApplets Design'. Suppose a slow PC is used which cannot process the bandwidth generated by the camera. In this case, the DmaToPC module will not be able to transfer the data to the host PC. Thus, it will block its input from time to time. The blocking signal is propagated in the design up to the image buffer module. Now, the image buffer will not output any data while the blocking is active. As the ImageBuffer module is a buffer, all further incoming data will be buffered and the fill level of the buffer will increase. When the camera stops sending data, no new input data is transfered to the buffer and data will be output until it is empty.

[Tip] Tip

Again, you can imagine the flow control like a pipeline of water. If a valve is closed, no more water can be transported. A buffer operator is like a reservoir which is filled with water if the drain cannot consume the input stream.

Rules of Links

Any diagram created in VisualApplets is a network of operator instances (modules). It may combine several sub-networks.

Like other programming languages, the diagrams you create in VisualApplets are subject to a set of rules with allowed, not allowed, and limited constructs. The following sections define the basic rules of connecting modules.

Operator Types

At first, let us have a look at the different types of operators you are working with.

In VisualApplets, you have three types of operators:

The universal type “O” (round shape):
The more complex type “M” (square shape): In older versions of
VisualApplets and some examples
in documentation oval shape:
The special type “P” (square shape): In older versions of
VisualApplets and some examples
in documentation oval shape:

Table 1. Operator Types


You can see by the shape of an operator if it belongs to the universal “O” type or to one of the more complex “M” or “P” types. (For information on the type of a specific operator, check the documentation for that operator in Operator Reference.)

The functionality of O-type operators is rather simple. Therefore,

  • O-type operators do not change the number of pixels/data between input and output. The number of input pixels/data of all input links is equal to the number of output pixels/data, i.e. for each input value, the operator will output a value.

  • O-type operators do not add a delay between input and output.

  • O-type operators can be linked as desired in series or in parallel.

The functionality of M-type operators is more complex:

  • They can change the number of pixels/data between input and output.

  • They may delay the output.

  • Linking of M-type operators requires attention to the rules of links and to the functionality of the linked operators.

  • M-type operators may block the input.

  • Every source operator in a diagram (such as e.g. CameraGrayAreaBase) is an M-type operator.

  • Every final-destination operator in a diagram (such as e.g. DmaToPC) is an M-type operator.

P-type operators are similar to M-type operators, but

  • P-type operators do not reduce the bandwidth. (For more information on this issue, see 'Infinite Sources / Connecting Cameras'.)

  • P-type operators will not generate more data than given at the input(s).

  • P-type operators never block the input actively. (See 'P-Type Operators' for detailed information on the blocking behavior of P-type operators.)

In the following, all rules defined for M-type operators also apply for P-type operators if no exception for P-type operators is mentioned.

O-Type Networks

An O-type network is a combination of O-type modules. In an O-type network, modules may be combined in series as well as in parallel. An O-type network always starts and ends with M-type or P-type modules. On the basis of this definition, an important rule can be defined:

[Tip] O-Type Network Rule

In an O-type Network, no matter how complex it might be, each O-type module has to be sourced by the same M-type or P-type module. It may be connected to this source via other O-type modules or even O-type (sub)networks. (Please note that this rule does not apply to signal links.)

The following figure shows an O-type network including parallel and serial connection of modules. As you see, all O-type modules are sourced by the same M-type module (M_source).

O-Type Network

Figure 33. O-Type Network


In contrast, the next figure shows an O-type network which violates the O-Type Network Rule as the ADD module is sourced by different M-type modules (M_source_0 and M_source_1).

Failing O-Type Network

Figure 34. Failing O-Type Network


VisualApplets (version 2.2 and higher) reliably indicates directly in the design diagram whenever a synchronization rule is violated. The respective links are highlighted in purple. The links are highlighted from the operator that receives not correctly synchronized data back to the according M operator sources.

Display of not correctly synchronized data flow in VisualApplets 2.2 and higher

Figure 35. Display of not correctly synchronized data flow in VisualApplets 2.2 and higher


DRC 1 and DRC 2 display according warnings.

For example, for the above design, DRC 1 creates the following warning:

[Important] Exception: Signal Links

The O-type network rule does not apply for O-type operators transporting signal links (see 'Differing Rules for Signal Links').

M-Type Networks

Any network of modules that contains M-type modules not only as source and destination, but also in between for image processing purposes, is called an M-type network. In M-type networks, M-type modules can be linked in parallel as well as in series. M-type modules can also be branched without limitations. M-type networks may turn out pretty complex, as parallel linking of M-type modules may demand synchronization of image dimensions and synchronization of timing. (Remember: M-type modules can change the number of pixels/data between input and output; they also may delay the output.)

The following figure shows a very simple example of an M-type network. The M-type modules of this diagram are only connected in series, or branched. Since the only O-type network in the diagram is sourced by the same M-type module (ImageBuffer), the diagram follows all diagram rules we know so far:

M-type and O-type Network

Figure 36. M-type and O-type Network


In most cases, M-type networks are much more complex. If, in contrast to the example above, M-type modules are linked in parallel (i.e., the merging paths are sourced by different M-type sources), we have to synchronize the timing and the image dimensions. This is done by M-type operators using multiple inputs.

M-type Operators with Multiple Inputs

If you want to merge networks sourced by different M-type sources, you have to use M-type operators with multiple inputs. (You can't use O-type operators with multiple inputs as this would violate the rules for O-type networks as described above.) But before going into detail on synchronization, let's have a look at M-type operators with multiple inputs in general.

M-type operators with multiple inputs can have two kinds of inputs:

  • Synchronous inputs

  • Asynchronous inputs

Synchronous Inputs and Synchronous-Input Groups

If some inputs of a module are synchronous, these synchronous inputs form together one synchronous-input group. Thus, an synchronous-input group is a set of synchronous inputs. The inputs of an synchronous-input group always have to be sourced by the same M-type source through an arbitrary network of O-type operators. An M-type operator can have an arbitrary number of synchronous-input groups.

On the picture below, you see an example of the use of an M-type operator with a synchronous-input group. Both inputs of the RemoveImage operator are sourced by the same M-type operator (ImageBuffer). The two inputs together form the group of synchronous inputs. The operator RemoveImage does not allow to use different M-type sources at its input ports.

M-type Operator with One Synchronous Input Group

Figure 37. M-type Operator with One Synchronous Input Group


Asynchronous Inputs

Asynchronous inputs are not synchronous. They may be sourced by different M-type operators through an arbitrary network of O-type operators. Moreover, some M-type operators with multiple inputs actually have to be sourced by different M-type operators. Whether an M-type operator with multiple inputs has to be sourced by different M-type operators or not depends on the features of the operator itself. You find detailed information on all operators in Operator Reference. An M-type operator can have an arbitrary number of asynchronous inputs.

The following screenshot shows a typical example of an M-type operator with two asynchronous inputs. Both inputs of the SYNC module are sourced by different M-type sources, namely DRAM0 and DRAM1.

M-type Operator with Asynchronous Inputs

Figure 38. M-type Operator with Asynchronous Inputs


The SYNC module is followed by a MergePixel operator. This operator can't be used to merge the two M-type sources without the SYNC operator in-between.

[Important] M-Type Operator Inputs

The inputs of M-type modules may be sourced by different M-type sources.

However, the inputs of a synchronous-input group have to be sourced by the same M-type source through an arbitrary network of O-type operators.

The documentation for each M-type operator with multiple inputs explains the possible or required inputs for the operator in great detail. For a comprehensive description of all operators, see Operator Reference.

Synchronization of Different Image Dimensions

M-type operators may synchronize different image dimensions at their inputs. One important example is the operator SYNC. See Operator Reference for a detailed description of this operator.

Timing Synchronization

For O-type networks, VisualApplets automatically performs timing synchronizations.

For M-type networks, the synchronization has to be carried out by M-type operators.

If a timing synchronization is not designed correctly,

  • a so called deadlock-condition will occur,

  • the bandwidth is not sufficient, or

  • data will get lost.

[Warning] Ensure correct timing synchronization

Since the timing synchronization depends on the behavior of the algorithm you implement in VisualApplets, you have to make sure the timing synchronization in your diagram is correct.

In the following examples, we will have a closer look at timing synchronization.

  1. Synchronization of Independent Sources

    Let's have a look at a simple two-camera stitching example which is shown in Figure 39, 'Synchronization of Independent Sources'. In the example, two cameras are used as a source. The ImageBuffer operators will buffer the data. Finally, the M-type operator InsertLine will multiplex the lines of both cameras into one output link. This operator merges the two parallel links.

    Synchronization of Independent Sources

    Figure 39. Synchronization of Independent Sources


    Imagine what happens if the two cameras are not synchronous. Suppose the frame rate of one camera is higher than the framerate of the other. The InsertLine operator will strictly multiplex the lines, i.e. will use the inputs one after another. Due to the different frame rates, one of the DRAM buffers will need to actually buffer data. Its fill level will be constantly increasing. As soon as an overflow condition occurs, no more data can be buffered, and data will get lost.

    [Important] Ensure Equal Data Rate

    Thus, if asynchronous streams are merged together, ensure that the line rate/frame rate/pixel rate is equal and can be synchronized.

  2. Synchronization of Data from the Same Source

    Some M-type operators create a delay until they can output their results. A prominent example is the operator FIRkernelNxM which is used in the diagram we explore in the following figures. This operator outputs a pixel together with its surrounding neighbors to form a kernel. To output the neighbored pixels, the operator has to wait until they (the required neighbored pixels) are available at the input. It will store the intermediate results. In our example, the FIRkernelNxM operator can output the first results only after four full lines have been fed into the operator. Thus, the operator generates a delay of four image lines in its current configuration.

    Let's have a closer look at this example.

    Precondition

    The first pixels are send from a camera through the buffer into the branch. Here, data is duplicated and forwarded to the SYNC and FIRkernelNxM modules. As explained, the FIRkernelNxM has a delay of four lines and therefore is not able to output the first pixels immediately:

    Deadlock at SYNC, figure a

    Figure 40. Deadlock at SYNC, figure a


    Deadlock

    The SYNC operator tries to synchronize both inputs. As no data is coming from the second input, it generates a STOP-signal at the first input. This STOP-signal is propagated backwards in the pipeline up to the buffer. Now, we have the deadlock condition: The kernel operator requires more data until it is able to output data, but no new data are available because the SYNC blocks all further inputs.

    Deadlock at SYNC, figure b

    Figure 41. Deadlock at SYNC, figure b


    Fixing the Deadlock

    To solve the deadlock, we have to add a buffer to the upper path, so that the delay of the kernel operator can be compensated as shown in the following:

    Fixed Deadlock

    Figure 42. Fixed Deadlock


    Avoiding the Deadlock

    The best solution is to avoid synchronization at all. This is often possible. In the solution example below, there is only a serial pipeline of M-type operators in the diagram and therefore, no synchronization at the merge is required.

    Deadlock Avoided

    Figure 43. Deadlock Avoided


Bandwidth Bottlenecks

Another important phenomenon in M-type networks is the reduction of bandwidth in an operator together with a possible propagation of this limitation backwards in the network of modules. The following figure shows a diagram which will generate a bandwidth limitation.

Bandwidth Limitation

Figure 44. Bandwidth Limitation


In this diagram, the combination of ModuloCount and RemoveLine operator will delete every second line. As we know from 'Bandwidth of an Applet', the maximum bandwidth depends on the used parallelism. After the RemoveLine operator, the required bandwidth has been reduced by a factor of two. Therefore, we can reduce the parallelism by a factor of two using operator PARALLELdn ("Parallel down"). However, this will also reduce the bandwidth in the upper path by factor two for every second line.

While a line is deleted at the RemoveLine operator, no pixels are fed into the PARALLELdn module. The full parallelism as given at the input of the diagram can be used in both paths. In contrast, when a line is not removed by the RemoveLine operator, the pixels of the current line are forwarded to the input of the PARALLELdn. PARALLELdn will now reduce the parallelism by two, i.e., it requires the double number of cycles to output a value compared to the input. Thus, the PARALLELdn operator will block its input every second clock cycle. As no buffer is used between the first Branch and the PARALLELdn operator, this blocking signal is propagated backwards in the pipeline. Therefore, the upper path is blocked every second clock cycle, too.

A solution to this problem is to add an extra FIFO before the PARALLELdn operator which is able to buffer a minimum of one line and thus compensates the peak and idle periods. The following figure shows this solution:

Bandwidth Limitation Compensated

Figure 45. Bandwidth Limitation Compensated


P-Type Operators

P-type operators are similar to M-type operators, with one exception: They can not block the input actively.

Nevertheless, when a module further up the processing pipeline blocks its input, the input blocking is propagated backwards the line. If a P-type operator is positioned further down the line, the P-type operator`s input port gets blocked, too (passively). P-type operators propagate the blocking information backwards to the next module down the processing line.

Example: The M-type operator PARALLELdn requires more time to output the results compared to the time the data is fed into the operator. Therefore, it will block the input from time to time. In contrast, a P-type operator PARALLELup will always have a higher bandwidth at the output compared to the input bandwidth. This behavior is very important when connecting infinite sources with P-type and M-type operators. A detailed description of infinite sources is presented next in 'Infinite Sources / Connecting Cameras'.

Infinite Sources / Connecting Cameras

Infinite sources are operators which cannot be stopped by the VisualApplets flow control. One example are the camera operators. On their input link, these operators receive data from the camera. On their output link, they forward this data to the successive module in the diagram. As there is no buffer within the camera operators, and as they are not able to tell the cameras to stop the transfer, these operators are infinite sources.

Infinite sources can only be connected to M-type operators which accept infinite sources. Whether an individual M-type operator can be connected to an infinite source or not is described in the respective documentation for this operator (see Operator Reference). If an infinite source is connected to an M-type operator which does not accept infinite sources, the DRC level 2 will generate an error:

Infinite Source Connection Error

Figure 46. Infinite Source Connection Error


All P-type and O-type operators can be connected to infinite sources. The infinite source information will propagate through operators until an operator in the pipeline will convert the infinite source data stream into a controllable data stream. Usually, these conversion operators are buffers. A buffer operator is able to use the flow control at its output and buffers the input data stream without the need to block the input.

Thus, if we swap the operators of the previous example, the DRC level 2 will not generate an error:

Infinite Source Connection OK

Figure 47. Infinite Source Connection OK


The behavior of some of the conversion operators can be changed to whether they accept infinite sources or not. These operators include a parameter called InfiniteSource which can be set to Enabled or Disabled.

A conversion operator which is not connected to an infinite source must be set to Disabled.

Infinite source conversion module (Buffer1) connected to a non-infinite source

Figure 48. Infinite source conversion module (Buffer1) connected to a non-infinite source


[Warning] Warning

If the parameter InfiniteSource of an respective module is set to Enabled, the module must be connected to an infinite source.

A conversion operator which is not connected to an infinite source must be set to Disabled.

[Tip] Tip

Always set the parameter to Disabled if you are not sure, and change the failing modules after the DRC level 2 check.

For a detailed description of the parametrization of modules, see 'Module Properties'.

Differing Rules for Signal Links

Signal links transport one-bit signal data which is valid at every clock cycle. The rules of links for modules with signal transporting input links differ in two ways from the rules of links described so far:

  • All O-type and M-type modules with signal link inputs may be sourced by different M-type sources.

  • Modules with signal link inputs may always be connected to infinite sources.

O-type module with signal link inputs, sourced by different M-type modules

Figure 49. O-type module with signal link inputs, sourced by different M-type modules


Find more information on signal links in 'Image Protocols, Image Dimensions and Data Structure'.

Summary

In this chapter you have been introduced to the rules of links. The rules of links are most important when implementing a VisualApplets application.

O-type networks always start and end with an M-type module. Each O-type module has to be sourced by the same M-type or P-type module through an arbitrary network of other O-type modules. Merges of different M-type sources can only be performed by M-type modules.

M-type networks may be arbitrarily linked in a serial sequence as well as they may be branched arbitrarily. Merging of different M-type sources in a module requires timing synchronization and image dimension synchronization. M-type modules with multiple inputs can have synchronous-input groups. Synchronous-input groups have to be sourced by the same M-type source through an arbitrary O-type network.

Timing synchronization will synchronize different sources which are timely delayed. Timing synchronization requires knowledge of the user implementation. A bad timing synchronization will result in deadlocks or buffer overflows.

An infinite source cannot be controlled by the integrated flow control. Only M-type operators which are allowed to be connected to infinite sources may be connected to infinite sources.

To modules with signal link inputs, the general synchronization rules apply with two modifications: The signal link inputs (of M-type and O-type modules) may be sourced by different M-type sources. Modules with signal link inputs may always be connected to infinite sources.

[Warning] Warning

VisualApplets cannot detect logic synchronization errors as they depend on the user project implementation. Read the documentation of each M-type operator carefully to learn about its behavior in timing and delay.

Diagram Parametrization

In the previous sections, the data flow model, the layout and the rules of links of VisualApplets projects were explained. This chapter will outline the parametrization of diagram modules and links.

Application behavior and bandwidth do not only depend on the operators you use in your design, but also quite strongly on the parametrization of the modules and links. Module properties define the behavior of each module, while link properties describe the protocol between the modules. Module and link properties directly depend on each other and mutually influence their availability or ranges.

Module Properties

Module properties are changed in the Module Properties dialog window.

  1. To access this window, double-click on a module, or right-click on a module and select Properties.

The Module Properties window lists all required settings of a module. Note that for each module a different set of parameters is available (depending on the operator that has been instantiated for creating the module).

The following figure shows the parameters of an ImageBuffer operator:

Module Properties Window

Figure 50. Module Properties Window


The Module Properties window lists all available parameters of a module. In this context, each parameter represents a module property. The parameters are displayed with entries in the following columns:

  • Parameter Name:

    The name of the parameter.

    When adding a parameter to a module (see below), you can enter a name for the new parameter here.

  • Parameter Value

    The actual value of an parameter.

    You can edit this field to change a value.

  • Parameter Unit

    The unit of a parameter. Can be pixel, seconds, lines, etc.

  • Parameter Type

    Here, you can set a parameter to static or dynamic. Static parameters cannot be changed after the build process of an applet, while dynamic parameters can be changed when the applet is already in use on the frame grabber hardware. Mostly, static parameters will require less FPGA resources than dynamic parameters.

  • Parameter Flag

    The flag of a parameter indicates whether a parameter is

    • read only (Read), or has

    • read & write access (Write).

  • Value Type

    The type of the parameter value. There are four different types of parameter values:

    • String

      Any string, e.g., file names.

    • Values

      Values of different types (unsigned, signed, double) and ranges.

    • Enumerations

      A list of enumeration values such as Disabled or Enabled.

    • Field Parameters

      A field parameter consists of an array, a list, or a matrix of values. It is mostly used for kernel coefficients, lookup tables and other lists. Value ranges and size of list can be dynamic. Note that the displayed bit width is not equal to the actual parameter range. Moreover, a parameter is always unsigned, even if it is declared as a signed value in the column.

[Note] Differences Between Modules

How many parameters and which parameters are available for a certain module is different from module to module (depending on the underlying operator). Nevertheless, each module will possess at least one parameter called Name.

Parameter Editing

[Warning] No Undo option

It is not possible to cancel a change. All changes are immediately applied.

To edit a parameter:

  1. Click on a parameter value and type in the new value.

    Some value types have special editing options:

    String: A string parameter you can edit by simply typing in the new string. Some string parameters are file name parameters. In this case, a file selection dialog will open.

    Values: For editing a value, use the spin box next to the parameter value to increase or decrease the value. The step size of the parameter defines the minimal increase/decrease.

    Fields: With field parameters, a new window will open for editing which shows all field elements of the parameter. The following figure shows the fields of a FIRoperatorNxM operator:

    Field Parameter Edit Window

    Figure 51. Field Parameter Edit Window


    There are three different ways you can edit the field parameter values of a module:

    1. You can simply edit each field element individually.

    2. Alternatively, you can use a list from file to fill the field parameter values.

      • You can import the file by clicking on the File button.

      • You can also export the current field parameter setting to file by clicking the Export button.

      [Note] File Format of Import File
      • The import file has to contain a list of ASCII values.

      • Each value has to be stated in a separate line.

      • The lines have to be separated by carriage return (CR) and line feed (LF).

      • The file has to be in text only format ([NameOfFile].txt).

      If the file contains more values than there are in the field, the first values of the file are used (as many as are required to fill the field). The following values in the file have no effect.

      If the file contains less values than there are in the field, all values of the file are used exactly one time. The last positions of the field (for which there are no values in the file) will remain unchanged.

    3. A third possibility to edit the elements of a filed is the Parameter function dialog.

      • Click on Function to open the function dialog (see next figure).

        Using this dialog, a linear function can be used to edit the elements. A linear function consists of the elements a = slope, b = offset, and x = index of field element. In the dialog, a and b can be edited.

      • Enter values for a and b.

        The first element of a filed has index 0. For matrix elements, the elements are consecutively numbered row by row.

      Function Dialog to Edit Field Parameters

      Figure 52. Function Dialog to Edit Field Parameters


[Important] Disabled Parameters

Some parameters are disabled and cannot be edited. Whether a parameter is disabled or enabled depends on the settings of other parameters, the input format, or the output format. Check the respective operator reference for more information. The following screenshot shows two disabled parameters. In this case, the y parameters are disabled because the input link has image protocol VALT_LINE1D (this means, the image is one-dimensional (just a line of pixels) and thus, there is no y-coordinate).

Disabled Parameters

Figure 53. Disabled Parameters


After a parameter has been edited, it has to be applied.

  1. Click on Apply in the Module properties window to apply the settings.

    A new parameter value is discarded if it is not within the allowed parameter value range.

[Note] Click Apply before closing the window

It is recommended to click on Apply before closing the parameter. This way, you will see warnings if the value you entered is not accepted.

  1. Close the Module properties window by clicking on Close.

Illegal Parameter Value States

The allowed value range of a parameter might change when link properties or by the setting of other properties. If this happens, the old parameter value might be in an illegal state. In this case, the parameter is marked red, to indicate, that the current setting will not pass the design rule check. You have to correct the parameter value until it is in the valid range.

Parameters in Illegal States

Figure 54. Parameters in Illegal States


The previous figure showed an example of parameters in an illegal state. In this case, the parameter value is not within the allowed range, as the XLength + XOffset is greater than the parametrized maximum image width of the input link.

Metadata

For each module, metadata parameters can be added. Metadata parameters are string parameters. To add a metadata parameter click on the Add Metadata button in the module properties window. A new parameter is now added to the parameter list. By clicking the name and the value, both can be edited. Metadata parameters are read / write parameters. To delete a metadata parameter, simply select the parameter and click on Delete Metadata.

Metadata parameters are often used for versioning and commenting.

Metadata Parameter

Figure 55. Metadata Parameter


Link Properties

Each link between modules is defined by its link properties. You access link properties via double click on a link or via right click and selection Properties.

Each link has the following link properties:

  • Bit Width

    Defines the bit width of the link for one pixel. Thus if color links are used, the bit width represents all color planes. For image protocol VALT_SIGNAL the bit width is always one bit.

  • Arithmetic

    The arithmetic of a link. Can be signed or unsigned. If set to signed, a two's complement signed arithmetic is used. The sign bit is included in the bits specified with property bit width. For image protocol VALT_SIGNAL the arithmetic is always set to unsigned.

  • Parallelism

    Specifies the number of pixel which are transferred in parallel between two modules within one design clock cycle. For image protocol VALT_SIGNAL the parallelism is always set to one. More information about the parallelism can be found in 'Bandwidth of an Applet'.

  • Kernel Columns

    Defines the number of kernel columns. For image protocol VALT_SIGNAL the number of kernel columns is always set to one.

  • Kernel Rows

    Defines the number of kernel rows. For image protocol VALT_SIGNAL the number of kernel rows is always set to one.

  • Image Protocol

    The image protocol defines which protocol to transfer data is used by the link. The following protocols are available:

    • VALT_IMAGE2D: Two-dimensional images, e.g., area scan cameras.

    • VALT_LINE1D: One-dimensional images, i.e., images with an unlimited image height, e.g., line scan cameras.

    • VALT_PIXEL0D: A simple stream of pixels with no image dimension information.

    • VALT_SIGNAL: One bit signals which are valid at every clock cycle. Used for signal processing such as trigger systems.

    More information on image protocols is presented in 'Image Protocols, Image Dimensions and Data Structure'.

  • Color Format

    The color format can either be VAF_GRAY, VAF_COLOR or VAF_NONE. For image protocol VALT_SIGNAL the color format is always set to FL_GRAY.

  • Color Flavor

    Defines the flavor of the color format. For image protocol VALT_SIGNAL the color flavor is always set to FL_GRAY.

  • Max. Image Width

    Defines the maximum image width of a link. Images transported on the link must not exceed this value but may be less than the value. The Max. Image Width has no influence on links with Image Protocol VALT_PIXEL0D and VALT_SIGNAL. For these image protocols the Max. Image Width is ignored. More information can be found in 'Data Flow ' and in 'Image Protocols, Image Dimensions and Data Structure'.

  • Max. Image Height

    Defines the maximum image height of a link. Images transported on the link must not exceed this value but may be less than the value. The Max. Image Height has no influence on links with Image Protocol VALT_LINE1D, VALT_PIXEL0D and VALT_SIGNAL. For these image protocols the Max. Image Height is ignored. More information can be found in 'Data Flow ' and in 'Image Protocols, Image Dimensions and Data Structure'.

[Tip] Visualization on GUI

For visualization of the according link properties, VisualApplets provides two GUI buttons in the toolbar of the program window:

Display Link Info displays the bit width and the parallelism for every link in the diagram:

Display Link Throughput displays the maximum pixel throughput in megapixels per second for every link in the diagram:

Properties Ranges and Disabled Properties

Each module defines the ranges of the link properties at its output itself. Some properties cannot be modified, some properties can only be modified in a specified range while others can arbitrarily be modified. A detailed explanation of the allowed output link formats is given in the respective operator reference in Operator Reference.

Parameter Editing

To edit a parameter, simply click on a parameter in the "Value" column of the link properties window.

The link properties dialog consists of three columns:

  • Value

    This is your editing column. Edit your link property values in this column by clicking on the values. If the edited value is not within the allowed parameter range or step size, the edited value is discarded or cannot be inserted. Confirm the new value by leaving the focus of the field or by pressing the Enter key.

  • Source Port

    After a new value has been entered in the Value column and has been confirmed, the source operator checks if the new value is accepted. If the new value is not accepted, the parameter and the link will get a red color to show a link property conflict. Thus, if a link property in column source port is dyed red, the source operator does not allow the settings. The values in this column cannot be modified!

  • Destination Port

    A click on Apply or Close or Window Close (X) or pressing Esc will apply the new settings for the link. If the new settings are not accepted by the destination operator input port, the link as well the parameter in column Destination Port will be dyed red to indicate the conflict. The values in this column cannot be modified!

A change of a link property can cause the change of another link property or a module parameter value. Canceling changes is not possible. Each change will immediately be applied.

Let's have a look at some examples. The following figure shows a conflict at the source port. The source operator, in this case a CastParallel operator, does not accept a parallelism of three at its output because of the bit width. After the output parallelism has been changed to four, two or one, the conflict is solved.

Invalid Source Port Link Properties

Figure 56. Invalid Source Port Link Properties


Screenshot Figure 57, 'Invalid Destination Port Link Properties' shows a conflict at the destination port. The destination operator, in this case a DmaToPC operator, does not accept RGB images with this parallelism and bit width. After the parallelism has been reduced to four or five, the conflict is solved.

Invalid Destination Port Link Properties

Figure 57. Invalid Destination Port Link Properties


Propagation and Dependencies of Operator Parameters and Link Properties

The link properties are defined by the operator. Some link properties can directly be changed at the operator output links, while others are fixed or are defined by the operator parameters. Moreover, most operators define their link properties in addition from the input link properties. This can result in a link property modification chain through multiple modules. Thus, if a link property has been changed, the parameters and link properties of successive module might change, too.

This propagation chain can result in three results:

  • The modification has been accepted by all successive modules and links. VisualApplets will display all links which have been changed in green, to inform the user about modified link properties.

  • The link modification is not accepted at the link of some module. In this case, check the link for the error. Read the documentation of the source or destination operator to learn about the allowed link formats.

  • The modification causes a conflict with a module parameter. In this case, the module is dyed red as well as the respective module parameter. Check the operator reference for link and parameter dependencies to resolve the conflict.

Allocation of Device Resources

Applets and included modules require resources. The required resources differ for each project. Mostly, the FPGA internal resources are used. An explanation of the internal resources is given in 'FPGA Resource Estimation'.

Besides the FPGA internal resources, applets require external frame grabber hardware resources as well as logic resources. Some of these resources are listed and allocated in the Device Resources dialog window, which you can open via Design → Device Resources.

Device Resource Allocation Window

Figure 58. Device Resource Allocation Window


The following table lists all types of resources.

Type Description Listed in Device Resources Window
CAM The camera port index yes
RAM Index of frame grabber RAM yes
DMA The DMA channel index. Both, DmaToPC and DmaFromPC operators use this resource. yes
CameraControl For Camera Link frame grabbers: The camera port index of the four camera control outputs. yes
TriggerOut Frame grabber digital outputs no
TxLink / RxLink Links between a pixelPlant hardware and the frame grabber. no
Signal Channel (operators TxSignalLink/RxSignalLink) Used for arbitrary signal links which are not shown in the diagram. no
Image Channel (operators TxImageLink/RxImageLink) Used for implementing loops into a design. no
Event Logic Event Name (Bit). no
EventSource Event source e.g. an operator. no

Table 2. List of Device Resources


[Note] Display of Device Resources

Not all of these device resources are listed in the Device Resources window. Some of them are automatically assigned, while others are set in the modules which use the device resource.

Some operators for microEnable 5 marathon designs use resources that are displayed, but cannot be set in the Device Resources dialog since they are controlled by the operator. These resources are grayed-out in the dialog:

Grayed-out resource CameraControl

Figure 59. Grayed-out resource CameraControl


All resources indices must only be used once. Moreover, some resources have to be in ascending order, starting from zero. If these conditions are not given, the design rules check will fail and the allocation has to be changed. The Device Resources window marks conflicts in red. Change the allocation until all conflicts are solved. The following figure shows an example.

Device Resource Conflict

Figure 60. Device Resource Conflict


Instead of manually solving the conflicts, VisualApplets can automatically solve conflicts. Click on OK in the Device Resources window. If a remaining conflict exists, VisualApplets will automatically resolve the conflict. You can either click on Apply to accept all changes without verification and close the window. Or you can click on Show Details... to see what has been changed (next figure). If you do not want to accept the changes, click on Retry to undo changes and go back to the Device Resources window.

Auto Correction of Device Resource Conflicts

Figure 61. Auto Correction of Device Resource Conflicts


Please note that an automatic change might not always result in the desired solution. For example, an automatic change might change the camera allocation.

[Tip] List of Device Resources for all Supported Hardware Devices

In Appendix. Device Resources a detailed list of the available device resources for all supported hardware devices is listed.

[Note]

Device resources are used for interfacing the FPGA environment (Camera, DRAM etc.)

Design Rules Check

The design rules check (DRC) is an elementary function of VisualApplets. A design rules check checks if a VisualApplets project does not contain any design errors. Projects which do not pass the DRC can not be build or some functions are disabled.

The DRC log window which is part of the dock, lists the progress and results of the DRCs. It shows important information on design errors and resource usage estimations. Some windows include a DRC log as a sub-window. The DRC log can be saved in a HTML file using a right click in the text and the selection of Save to file on the pop-up menu.

In VisualApplets includes two levels of design rules checks. DRC level 1 and DRC level 2 which are explained in detail in the following sections.

DRC Level 1

The DRC level 1 checks the integrity of the project. Click on Analysis → Design Rules Check Level 1 ( Ctrl+F7 ) or use the icon Design Rules Check Level 1 from the Build icon bar to start the DRC level 1. Besides the direct access, the DRC level 1 is automatically started by other VisualApplets functions such as simulation, resource estimation, or build process. The DRC level 1 checks amongst others whether

  • no open ports exist in a design.

  • no link is in conflict state.

  • no operator parameter is in conflict state.

  • no conflicts for device resources exist.

The following figure shows four errors reported by the DRC level 1. In this example, three device resource conflicts of the resources CAM, RAM, and DMA are shown as well as a resource index conflict of Cam0 and Cam1. You can simply click on the module name to highlight the module in the diagram which causes the error. This is very useful in complex projects with many diagram windows.

DRC Level 1 Error

Figure 62. DRC Level 1 Error


DRC Level 2

The DRC level 2 can only be started after a successful DRC level 1. However, starting the DRC level 2 by a click on Analysis → Design Rules Check Level 2 ( Ctrl+F8 ) or a click on the icon Design Rules Check Level 2 from the Build icon bar will automatically start DRC level 1, too. Besides the direct access, the DRC level 2 is automatically started by other VisualApplets functions such as the resource estimation and build process. The DRC level 2 performs a low level design rules check and estimates the required FPGA resources.

Simulation

VisualApplets provides powerful, functional simulation features for simulating designs. You can use simulation for a first test of the implemented image processing algorithm, and for its verification. You can start a simulation directly after editing the design without the need to build a *.hap file.

The simulation in VisualApplets is functional, i.e., it emulates the behavior of the hardware implementation. This makes it very fast compared to low level simulations. A side effect of the functional simulation is that timing is not considered. The simulation behavior of operators is 100% equal to the image processing of the final applet on real hardware.

To simulate the behavior of a design in VisualApplets, two kinds of simulation elements are provided:

  • simulation sources, and

  • simulation probes.

Simulation sources are used for data input. You can load one image or a whole image sequence into a simulation source (from image files). You can place one simulation source or one simulation probe at any link in your design. Thus, data transport along those links is overwritten by the connected source module or inspected by the respective probe module.

[Note] Note

Some operators can function as an image source, too; e.g., operator CreateBlankImage.

You can save the resulting images of the simulation probes to image files.

Due to visualization optimizations, the VisualApplets simulation is based on 2D images.

Nevertheless, you can also simulate if the link the simulation source is connected to is 0D (stream of pixels), 1D (stream of lines), or 2D (stream of frames), as long as the simulation source contains at least one 2D image (see 'Image Protocols, Image Dimensions and Data Structure').

Limitations

Simulation has the following limitations:

  • The simulation of the SIGNAL image protocols is not possible. This is so, because the simulation of the SIGNAL image protocols emulates the functionality, but not the timing of a design. However for simulation of the SIGNAL image protocols, it would be necessary to simulate the timing, too.

  • The simulation of the 0D image protocol is limited to exactly one simulation step. This is so, because for simulation all pixel data of one source is aggregated to a single 2D frame. However, subsequent steps can be simulated for the remaining design, but operators generating 0D content will only emit data once during the first step.

  • The operator PseudoRandomNumberGen does not return the same result in a simulation as on the hardware. This is so, because the operator is non-deterministic. This exceptions is also described at Operator Reference.

  • The operator Blob Analysis 1D does not return the same result in a simulation as on the hardware. This is so, because the operator has the port FlushI, but as the flush is asynchronous to the image data, it cannot be simulated to reflect the same behavior as in hardware. This exception is also described at Operator Reference.

  • BMPs and TIFFs with indexed color palette are not supported.

Supported Image Formats

The following image formats are supported for simulation in VisualApplets for source images as well as for saving the output images:

Bitmap

BMP 1 bit black/white (row length has to be a multiple of 8)

BMP 8 bit gray

BMP 24 bit (R8 G8 B8) sRGB color space

Compression like RLE is not supported.

TIFF (Tagged Image File Format)

TIFF 1 bit black/white (row length has to be a multiple of 8)

TIFF 8 bit gray

TIFF 24 bit color sRGB color space

TIFF 48 bit color sRRB color space

Compression: None, LZW, or PackBits

[Note] Limitations

BMPs and TIFFs with indexed color palette are not supported.

Simulation Workflow

Simulating image data processing in your design comprises the following steps:

  1. Inserting the simulation sources and probes you need into your design.

  2. Loading the image file(s) you want to use for simulation to your simulation source(s).

  3. Optimizing your image input via parameters, such as pixel merge and pixel alignment.

  4. Setting the number of processing cycles for the simulation in the main simulation window and starting the simulation.

  5. Evaluating the simulation results.

  6. Saving the simulation results.

In the following sections, these steps are be described in detail.

Inserting Sources and Probes into your Design

To prepare a simulation, you must first insert your simulation source(s) and probe(s) into your design:

  1. From the main menu, select Analysis → New Simulation Source / New Simulation Probe or use the corresponding icons in the toolbar to insert your source(s) and probe(s) into the current design window.

Creating New Simulation Sources and Probes

Figure 63. Creating New Simulation Sources and Probes


Simulation sources and simulation probes are both displayed as small image frames with a magnetic anchor:

Simulation Sources Are Gray Image Frames, Simulation Probes Are Green Image Frames

Figure 64. Simulation Sources Are Gray Image Frames, Simulation Probes Are Green Image Frames


  1. Use the anchor to connect the source or probe to a link in the design. You can easily distinguish simulation sources from simulation probes as sources are of gray, probes of green color.

  2. Use drag and drop to position your source(s) and probe(s).

  3. Use drag and drop to connect your source(s) and probe(s) to links in your design. If the anchor icon changes to blue, the connection is valid.

[Caution] Connecting Simulation Sources and Probes to a Link Transporting Kernels or Signals

You can connect a simulation source to a link that transports kernels, but the simulation source needs to provide exactly one input image per kernel. You can connect a simulation probe to a link that transports signals, but this simulation probe then doesn't provide any data.

Loading the Image File(s) to your Simulation Source(s)

The Simulation Source Viewer

In the Simulation Source Viewer, you can load test images or test image sequences and make them available for simulation.

At first, let’s have a quick look at the Simulation Source Viewer.

  1. To open the Simulation Source Viewer, double-click a source in your design.

The Simulation Source Viewer opens up:

Simulation Source Viewer

Figure 65. Simulation Source Viewer


Directly under the menu, you find the toolbars. The icons of the toolbars offer the following options (left to right):

  • File toolbar for opening and saving image files.

  • View toolbar offering different options for image display. These are the same as the first options of the View menu:

    Viewing Options

    Figure 66. Viewing Options


  • The arrows for navigating through image sequences.

  • Display of details on the image currently visible in the display panel of the main viewer window (and magnifier): Displays the position of the image in the image sequence loaded to the simulator, and the path to the image file

On the left hand side, you have the settings panel with two tabs:

Image File – Mapping

Here, you can adjust the settings for simulation, e.g. enter a value for pixel merge, or define the offset for pixel alignment.

Display Properties

Here, you can define the settings for displaying the test images on your own screen. Due to the fact, that monitors always use 8 bit color display, at times you have to decide which part of a pixel you want to see on screen for evaluating your test images. None of the settings you define under Display Properties have influence on the simulation or its results.

In addition, you find here the color values of a selected pixel listed, together with the display value. The display value is the mapped value for display on the user monitor.

Pixel Values

Figure 67. Pixel Values


On the right hand side, you have the display panel displaying the image currently selected.

You can zoom in and out on the image displayed in the display channel by either using the corresponding icons in the toolbar, or by using CTRL+MouseWheelUp to zoom in and CTRL+MouseWheelDown to zoom out.

If you choose a very high zooming factor, a pixel grid is displayed for better orientation and hex/dec values per pixel are displayed.

On the bottom of the simulation viewer, you have another panel: This is the Sequence viewer. If you use more than one image in a source, here you can see all images of the image sequence, make changes to the image order of the sequence, or select an image for display in the display panel and magnifier.

The Magnifier is actually a second window of the Source Viewer which you can easily loosen from the main Source Viewer window via drag & drop. The Magnifier always shows the same image as is displayed in the display panel of the main Source Viewer. Its pointer is always in the center of the Magnifier window and positioned exactly on the pixel you point at in the display panel. The great advantage of the Magnifier window is that you can display a selection of the image with a completely different zooming factor:

Zooming in the Magnifier

Figure 68. Zooming in the Magnifier


If you want to change the zooming factor of the Magnifier:

  1. Activate the Tools → Magnifier window.

  2. Use CTRL+MouseWheelUp to zoom in and CTRL+MouseWheelDown to zoom out.

If you choose a very high zooming factor, a pixel grid is displayed for better orientation.

Loading Images into the Source

To load test images or test image sequences into your source,

  1. Open the Simulation Source Viewer by double-clicking the source in your design.

  2. From the main menu of the Simulation Source Viewer, select File → Open or click the corresponding icon in the toolbar. In the following dialog, select the simulation input image file and click Open.

[Note] Note

You find some useful test images in the VisualApplets installation folder under \Testimages.

[Tip] Tip

Alternatively, you can simply drag & drop image files either from your Windows Explorer into the viewer, or from your Windows Explorer onto the source in your diagram.

The input image is now displayed in the Simulation Source Viewer.

After closing the Simulation Source Viewer, you see a thumbnail of the image in the preview frame of the corresponding source:

Thumbnail Display in Source

Figure 69. Thumbnail Display in Source


As soon as you connect a source to a link, the source takes over the parameter settings of the link (such as maximal image dimension, bit width, and color format). If you load an image that is bigger than the maximal image dimension of the link, a green rectangle is displayed on the image, enclosing the part of the image that will be used for simulation:

Highlighted Image Section Used for Simulation

Figure 70. Highlighted Image Section Used for Simulation


[Caution] Convert your Images

It is not possible to load a color picture on a one-channel gray link and vice versa. If your test image does not fit the properties of the link the source is connected to, you need to convert the image. Use any image processing program that offers the necessary functions to convert your test image. Use an image format supported by VisualApplets. For information on supported image formats, see 'Supported Image Formats'.

Loading an Image Sequence into your Simulation Source

As soon as you load a new image to the source, the image shows up in the display panel of the Simulation Source Viewer and is added to the image sequence of your source. You can see all images of your image sequence in the Sequence Viewer, which is located at the bottom of the Simulation Source Viewer.

Only the selected image displayed in the display channel is stored in the RAM of the computer. The other images of the sequence are loaded into the RAM when necessary. Thus, loading long image sequences onto a source has nearly no impact on RAM usage.

If you load an image sequence, you can change the order of images after load. In the Sequence Viewer, use drag & drop to position an image to where you want it to be in the sequence.

You can easily delete one or more images of a sequence:

  1. Press CTRL and select the images you want to delete.

  2. Press DEL or select from the menu Edit → Remove Selected.

In the Sequence Viewer, sim[x] indicates the image that is being simulated during the next simulation step. You can reset sim[x] to the first image of the sequence in the Simulation dialog by clicking the Reset button. If you want to know more about simulation steps and reset, see 'Setting the Number of Processing Cycles and Starting the Simulation'. The simulation order is not influenced by the image currently displayed in the display panel.

sim[x] Indicates the Image that Is Simulated in a Sequence

Figure 71. sim[x] Indicates the Image that Is Simulated in a Sequence


If you change the image properties by mapping (see 'Image File Mapping '), the thumbnails are not refreshed automatically. By default, the Sequence Viewer displays the thumbnails of the original images.

You have two possibilities to adapt the thumbnail display. From the menu, select either

  • View → Mapped Thumbs to get a preview on how your images will look after applying the current mapping settings in a simulation, or

  • View → Refresh to have thumbnails displayed that reflect the current look of your images.

Optimizing your Image Input via Parameters

You can now optimize your image input via parameters. All parameters are displayed in the Simulation Source Viewer.

Pixel Values

On each pixel in the display panel, actually two crosshair cursors are displayed If you can’t see the two crosshair cursors, zoom in on the picture in the display panel:

Crosshair Cursors in Display Window and Magnifier

Figure 72. Crosshair Cursors in Display Window and Magnifier


The white/black crosshair cursor shows the position of your mouse cursor.

The colored one is positioned in the center of the pixel the mouse cursor points to. This crosshair cursor is also displayed in the Magnifier on exactly the same pixel.

In the settings panel tab Display Properties the corresponding pixel values are displayed:

Pixel Values

Figure 73. Pixel Values


You can choose whether you want to see the pixel values as decimal unsigned, decimal signed or hex figures.

Display shows the value(s) displayed on your screen. This value/these values might be different from the actual color values (or gray value) if a 16 bit or 48 bit image is loaded to your source, since on screen, only 8 bit can be displayed per color channel.

Image Dimension

In the Simulation Source Viewer tab Image File – Mapping, you find a table with the image dimensions of the current image (as it is loaded from file) on the left hand side and the image dimensions of the link on the right hand side:

Image Dimensions

Figure 74. Image Dimensions


The column Merged Pixels is described at 'Pixel Spitting and Merging'.

If an image file has a dimension smaller than the dimension of the link, the image is transferred onto the link on the scale 1:1.

If the image file has a dimension that exceeds the dimension of the link, only part of the picture is used for simulation. You can see in the display panel in the green rectangle which picture part is going to be used for simulation. Also, the corresponding values are highlighted in yellow:

Exceeded Image Dimensions

Figure 75. Exceeded Image Dimensions


[Tip] Tip

If you cannot see the green rectangle in your display screen, set your viewing options to View → Fit to Window.

Image File Mapping

In the Simulation Source Viewer tab Image File – Mapping, you also find information on the bit width of your test image (file) and on the bit width of the link the source is connected to:

Bit Widths of Image and Link

Figure 76. Bit Widths of Image and Link


The column Merged Pixels is described at 'Pixel Spitting and Merging'.

If you want to load an image that has a bit width higher than that of the link, you can choose which bits of your image you want to use for simulation. You can make your selection by using a slider:

Defining Offset for Image Bits to Use

Figure 77. Defining Offset for Image Bits to Use


The bit width of the selection slider is the same as the bit width of the link. With the slider you can define a new position for the offset. The offset is the starting point of your bit selection on the bit width of your image. Based on these settings, the Simulation Source Viewer immediately calculates the altered image and displays it in the display panel. In the screen shot above, the 4 upper bits have been chosen out of the 8 bit of the 8-bit image. Thus, the test image used for the simulation will only have 16 instead of 256 gray-scale values.

[Note] Visualization of Altered Test Image in the Simulation Source Viewer

Since the display on PC monitors is based on 8-bit information per pixel, an image with only 16 gray-scale values cannot be displayed properly. Thus, for visualization on screen the 16 gray-scale values of the test image are mapped to the 256 gray-scale values of the 8-bit monitor display. This mapping doesn’t change the number of shades of gray displayed (16), but enhances the contrast between them (0 = black, 15 = white).

Display Properties for 4-bit Image

Figure 78. Display Properties for 4-bit Image


If you, on the contrary, load an image that has a smaller bit width than the link it is loaded on (i.e. the source module is connected to), you can use the same slider in tab Image File – Mapping to define an offset for the bits of the image on the bit width of the link. The remaining bits of the link are set to NULL.

The picture below shows an example where an 8-bit gray-scale image has been loaded onto a link with a bit width of 12 bit:

Defining Offset for Link Bits to Use

Figure 79. Defining Offset for Link Bits to Use


Display Alignment

You can define some settings for visualizing the altered test image in the Simulation Source Viewer via display alignment:

If the bit width of a link is higher than 8 bit, you have to define which 8 bits out of the link bit width you want to have displayed in the display panel. Since the display on PC monitors is limited to 8 bit per color channel, a higher bit width cannot be displayed.

In the Simulation Source Viewer tab Display properties, you can define which 8 bits out of the bits of a link you want to have displayed in the display panel. Use the slider to choose the offset for the displayable 8 bits. This display alignment setting has no influence on the simulation.

In the example below, the link has a bit width of 12 bit. With the slider, you can decide which bits out of the 12 you want to have displayed.

Display Alignment

Figure 80. Display Alignment


Pixel Spitting and Merging

The BMP file format allows a maximum of 8 bit per color channel of a pixel. The TIFF format allows a maximum of 16 bit per color channel. A higher bit width cannot be simply saved in standard image file formats.

VisualApplets offers the possibility of pixel splitting to get around these limitations.

To store an image with a high pixel bit width in a standard image file format, each pixel is split into multiple image file pixels. Thus, it is possible to store up to 64 bit per color channel in BMP or TIFF file format, e.g., in 8 x 8-bit pixels. These images can be viewed in regular image file viewers or image processing programs. Of course, the VisualApplets generated pixel-split-images will be displayed horizontally expanded. Thus, in VisualApplets, pixel splitting is a mere storing option for images with a high bit width (color depth).

To load an image with high bit width that has been stored as a BMP or TIFF file into your simulation source, you have to merge the adjacent pixels that share the color information for one original pixel back to one pixel. Thus, simulation source viewers can merge the pixel-split-images for correct mapping. The splitting can be done in the Simulation Probe Viewer (see 'Evaluating the Simulation Results'). You can define the settings for pixel merge in the Simulation Source Viewer tab Image File – Mapping:

Pixel Merge

Figure 81. Pixel Merge


In the following example, a 2048x1024 BMP file with a bit width (color depth) of 8 bit has been loaded into the source. It is to be interpreted as a 16 bit 1024x1024 image.

If you enter 2 in the Merge N pixel into 1 pixel field, the bit width of the image in your source changes from 8 bit to 16 bit per color channel, whereas the row length of the image in your source will be only half as long, thus changing from 2048 to 1024 pixel.

Before merge:

Merging Factor = 1, Image Properties Do Not Fit Link Properties

Figure 82. Merging Factor = 1, Image Properties Do Not Fit Link Properties


After merge:

Merging Factor = 2, Properties of Merged Image Fit Link Properties

Figure 83. Merging Factor = 2, Properties of Merged Image Fit Link Properties


Setting the Number of Processing Cycles and Starting the Simulation

After you have loaded a test image or test image sequence to your source and defined all settings for the image, you can start the simulation.

[Caution] Use Simulation Probes

Make sure you inserted (and connected) simulation probes on all positions where you want to check image processing results (see ' Inserting Sources and Probes into your Design').

  1. From the main menu, select Analysis → Start Simulation, or click the toolbar icon Start Simulation. Now, VisualApplets automatically triggers a Design Rules Check 1.

    The Simulation window opens up:

    Simulation Window

    Figure 84. Simulation Window


    In the upper pane, all simulation sources and simulation probes currently active in the design are listed. The list serves only information purposes.

    In the lower pane of the window, you see the results of Design Rules Check 1.

    You can change the display of the list via a drop-down list box:

    • Simulation Sources and Simulation Probes display only the sources and probes you have set for simulation.

    • All Sources and All Probes display all data sources and data destinations within your design.

    Changing Source and Probe Display

    Figure 85. Changing Source and Probe Display


[Caution] Influence of Errors and cautions

A simulation can only be started if no error was detected during Design Rules Check 1. Warnings created by Design Rules Check 1 do not prevent starting the simulation.

[Note] Note

Single operators cannot be selected for simulation. A simulation will always run through all operators of a design.

If the list in the main simulation window shows a simulation source or probe marked by a yellow warning triangle, this source/probe is not connected to a link of your design and will be ignored during simulation.

Non-connected Simulation Modules

Figure 86. Non-connected Simulation Modules


[Note] Note

Camera operators do not emit data during simulation. One needs to connect a simulation source to the output link to provide data for the simulation.

In the Processing Cycle field, you can specify how many processing cycles you want the program to carry out.

You can also configure the simulation and the processing cycles via the System Settings menu: Settings → System Settings → Simulation:

Simulation Settings

Figure 87. Simulation Settings


Simulate data flow synchronization cleared: Each source in your design, e.g. simulation sources and operators like CreateBlankImage, or CoefficientBuffer, emits one data set per cycle. The cycle ends, if no more data is to be processed or transported. A simplified data management allows operators to divert from the behavior of the corresponding entity in hardware. This means, instead of storing incoming data inside the input ports, an operator might implement unrealistically large internal buffers.

Simulate data flow synchronization selected: The design as a whole is simulated once per cycle from source(s) to sink(s). The focus is on precise modeling of dependencies and accurate data management. Sources are permitted to provide one or more data sets per cycle. The simulation might prevent sources from emitting data if previously generated data is still to be processed. Therefore, operators leave incoming data inside their input ports until data processing requires it to be collected. As long as valid data is stored in the incoming port, upstream operators are prevented from producing data. This causes congestions and corresponds to the concept of inhibits in hardware and allows for the detection of deadlocks.

Simulate 1D line by line: 1D data can be processed by aggregating several lines to one 2D frame and simulates it like any other 2D data. This is fast and robust but limits the simulation to exactly one simulation cycle. If you select Simulate 1D line by line, each line is processed individually and thus allows multi-step simulations, e.g., to deal with 1D loops. This feature relies on data flow synchronization, this means you can only select this option, if Simulate data flow synchronization is selected.

[Note] Behavior of Simulation Probes During Simulate 1D line by line

For simulation probes connected to 1D links, incoming line data is appended to the last frame in the simulation probe. After each processing cycle, the respective lines are finalized and a new frame is started. While the simulation dialog is open, the Sequence Viewer is locked.

After selecting the desired amount of Processing Cycles in the Simulation view, the simulation can be run by clicking the Start button. As the internal status of all operations is maintained, consecutive runs can be launched from the same window, as long as the simulation dialog is kept open. Once the dialog is closed, all operators are reset to their initialization state.

Example: A given AppendImage operator expects three input images for concatenation. A connected source provides one image per processing cycle. The simulation is run for two cycles, a simulation probe connected to the output link of AppendImage does not show any data yet, since AppendImage still lacks one additional image to start the processing.

Second Simulation Step

Figure 88. Second Simulation Step


While the simulation dialog is still open, one can perform an additional (third) simulation cycle which in turn provides data at the connected simulation probe.

Third Simulation Step

Figure 89. Third Simulation Step


If the dialog was closed and reopened in the meantime, the additional simulation cycle would be executed after initializing the design and therefore would provide the first of the three required images for AppendImage.

[Note] Processing Order of Images within a Source Module

In a new processing cycle, always the next image of the image sequence loaded to the source is processed. When all images of the sequence have been processed, the first image of the sequence is processed again.

If only one image is loaded to the source, this image is processed again and again with each processing cycle. For example, if you specify four processing cycles, the one image of the source is being processed up to four times.

Depending on your design, the number of images fed into the design might differ from the number of images you get as an output, for example when you use the operators SplitImage or RemoveImage. Thus, for one processing cycle, you might get more or less images as result(s) in a probe than you have source modules in your design. See also the example ' Multiple DMA Channel Designs ' in the VisualApplets tutorial.

To clear the simulation and reset it to the start-up condition, use the Reset button.

A reset produces the following effects:

  • The image sequence in all simulation sources is reset, that is, a new simulation will start with the first image of the sequence again.

  • The content of all probes is deleted.

  • All operators are reset to their start-up condition (e.g., image counters, uncollected data in input ports).

Now, you are ready to start the simulation of data processing as defined in your design.

  1. Click Start to start the simulation.

The current simulation status is displayed in a progress bar at the bottom of the Simulation view. Warnings and errors are displayed in the Log panel, which you can open or close by clicking the Show Details/Hide Details button. As soon as warnings or errors occur, the Log panel is displayed automatically.

[Tip] Tip

If you want to, you can keep the viewer windows of your simulation modules open during simulation. However, this will slow down simulation.

Successful Simulation

Figure 90. Successful Simulation


While a simulation is in progress, the simulation probe modules are filled with the resulting images. Thumbnails of the simulation results are displayed in the preview image frames. After opening the simulation viewer window of a simulation probe, the result(s) will be displayed in full size.

[Note] Automatic Simulation Reset

The simulation will automatically reset when you change your design. On reset, all simulation probes are cleared, too.

Evaluating the Simulation Results

After the simulation, you find the simulation results in the probes.

[Note] Some Images Are Not Displayed in Probes

When simulation probes contain very large images, VisualApplets may fail to display these images correctly due to memory limitations. In that case, a gray image (i.e. all pixels have the value 205 (0xCD)) is shown. If this happens, use smaller images for your simulation.

Double-click a probe in your design to open the Simulation Probe Viewer.

It looks similar to a Simulation Source Viewer (see 'Loading the Image File(s) to your Simulation Source(s) '): The settings channel is located at the left hand side, the display channel on the right hand side, and the Sequence Viewer at the bottom of the Simulation Probe Viewer window.

In the Simulation Probe Viewer, you get the simulation results displayed for a first evaluation. You can alter the display options by pixel alignment, and save the images to file. For saving, there are several options available, like, e.g., pixel splitting.

You can zoom in and out on the image displayed in the display channel by either using the corresponding icons in the toolbar, or by using CTRL+MouseWheelUp to zoom in and CTRL+MouseWheelDown to zoom out.

If you choose a very high zooming factor, a pixel grid is displayed for better orientation and the corresponding pixel values are textually represented.

Pixel Values

Like in the Simulation Source Viewer, on each pixel in the display panel two crosshair cursors are displayed. If you can’t see the two crosshair cursors, zoom in on the picture in the display panel. The white/black crosshair cursor shows the current position of the cursor of your mouse, whereas the colored one is positioned in the center of the pixel the mouse cursor points on. This crosshair cursor is also displayed in the Magnifier on exactly the same pixel.

In the settings panel, the corresponding pixel values are displayed:

Pixel Values Probe

Figure 91. Pixel Values Probe


You have different options to adjust the interpretation of color values for the selected pixel:

  • You can choose whether you want to see them as hexadecimal numbers or as signed or unsigned decimal numbers.

  • You can set the number of fractional bits for an interpretation as fixed-point numbers.

  • Additionally, you can define a scaling factor which is multiplied to the values. This is useful for performing linear conversions like radiant to degree.

Display shows the value(s) displayed on your screen. This value/these values might be different from the actual color values (or gray-shade value) if a 16 bit or 48 bit image is in your probe, since on screen, only 8 bit can be displayed per color channel.

You may select a color map which performs tone mapping between the values in Display and the shown color in the image window. This is especially useful when dealing with signed image data or when the contained image characteristics are poorly visible in a grey-scale representation.

If the simulation probe is connected to a link which transports kernels, you can select the individual kernel images in the kernel Row and kernel Column spin boxes in the Kernel panel.

Image Sequence

Once an image is simulated, it is instantaneously displayed in the Simulation Probe Viewer and added to the Sequence Viewer.

You cannot change the order of images in the Simulation Probe Viewer.

However, you can delete one or more images of a sequence:

  1. Press CTRL and select the images you want to delete.

  2. Press DEL or select from the menu Edit → Remove Selected.

If you change the image properties by mapping (for example, when you save 16-bit images in BMP files), the thumbnails are not refreshed automatically. By default, the Sequence Viewer displays the thumbnails of the original simulation results.

Varying Row Length

VisualApplets is not limited to processing and displaying rectangular images with homogeneous row length. It can also display images with rows that are of different length.

The image size for such images is calculated by VisualApplets as follows:

[Tip] Calculating Image Size for Images with Inhomogeneous Row Lengths

Image size = number of pixels of longest row * number of rows

Rows with row length NULL are counted as well. The undefined areas of the image are represented in the display by a blue-to-cyan color gradient:

Display of Undefined Image Areas

Figure 92. Display of Undefined Image Areas


Empty images are displayed by the symbol Empty Image and cannot be saved.

Empty Image Symbol

Figure 93. Empty Image Symbol


Display Alignment

The display panel of the Simulation Probe Viewer offers two ways of displaying the same image:

  • If you activate Link View, the image is displayed as it looked like when it was passed to the probe by the link.

  • If you activate File View, the image is displayed as it will look when you save it with the current settings to file.

Since monitors always use 8 bit per color channel, images with higher or lower bit width cannot be displayed without further ado.

If a simulation result has a bit width higher than 8 bit, you can use the offset slider to select the 8 bit you want to have displayed in the display panel:

Link View

Figure 94. Link View


In this example, the upper 8 bits of a 16-bit gray scale are chosen for display.

If the bit width of the image is smaller than 8 bit, the gray-scale values of the test image are automatically mapped to the 256 gray-scale values of the 8-bit monitor display. This mapping doesn’t change the number of shades of gray displayed, but enhances the contrast between them. Without this mapping, the human eye might not be able to see an image at all. Take, for example, 1-bit images: If the values 0 and 1 are used for monitor display without mapping, both are interpreted as black by the human eye. In this case, the automatic bit width mapping of VisualApplets interprets 0 as 0 (black) and 1 as 255 (white).

Line Profile

The Line Profile view shows the individual color values or gray values of a line. You can open the Line Profile via the menu Tools.

There are two output areas:

  • Overview: The individual color values or gray values of the entire line are displayed.

  • Detail: Enlarges an area marked in the Overview view. The area that is currently displayed in the Detail view is highlighted in the Overview view with a white background. You can move the area displayed in the Detail view with the scroll bar under the Detail view.

Line Profile View

Figure 95. Line Profile View


With the spin box Line Index, you can select a certain line in the image and the line is marked in the Display panel.

For color images, you can switch the individual color channels on or off with the checkboxes R, G, B, and Y. Y stands for brightness. In addition, you can select a specific pixel position in the line via the spin box Position X or with the cyan marker. To use the cyan marker, just move the mouse into the Detail view. The values are then displayed in R, G, B, and Y.

Line Histogram

The Line Histogram view is a representation of the distribution of color values or gray values only of the selected line in an image. You can open the Line Histogram via the menu Tools.

Line Histogram View

Figure 96. Line Histogram View


The histogram view is scaled so it always spans the full height of the diagram.

With the spin box Line Index, you can select a certain line in the image. As in the Line Profile view, the line is then marked in the Display panel.

For color images, you can switch the individual color channels on or off with the checkboxes R, G, B, and Y. Y stands for brightness. In addition, you can select a specific color value via the spin box Value or with the cyan marker. To use the cyan marker, set the mouse cursor into the output view.

For larger color depths, for example 16-bit images, the spin box Bin is displayed instead of the spin box Value and the bin ranges are displayed next to it:

For a selected Value or Bin number, the number of pixels with values in the corresponding range are shown in Count. You can manually enter the number in Value or Bin or select the number by pointing the mouse to the diagram.

For color images, the output is split into the basic color values RGB and the brightness value Y.

Displaying Statistical Data

The Line Histogram view also displays the following statistical values, which are calculated for the selected line:

  • Mean value

  • Standard Deviation (St. Dev.)

  • Minimal (Min.) value

  • Maximum (Max.) value

Image Histogram

The Image Histogram view is a representation of the distribution of color values or gray values in an image. You can open the Image Histogram via the menu Tools.

Image Histogram View

Figure 97. Image Histogram View


The histogram view is scaled so it always spans the full height of the diagram.

For color images, you can switch the individual color channels on or off with the checkboxes R, G, B, and Y. Y stands for brightness. In addition, you can select a specific color value via the spin box Value or with the cyan marker. To use the cyan marker, set the mouse cursor into the output view.

For larger color depths, for example 16-bit images, the spin box Bin is displayed instead of the spin box Value and the bin ranges are displayed next to it:

For a selected Value or Bin number, the number of pixels with values in the corresponding range are shown in Count. You can manually enter the number in Value or Bin or select the number by pointing the mouse to the diagram.

For color images, the output is split into the basic color values RGB and the brightness value Y.

Displaying Statistical Data

The Image Histogram view also displays the following statistical values, which are calculated for the selected image:

  • Mean value

  • Standard Deviation (St. Dev.)

  • Minimal (Min.) value

  • Maximum (Max.) value

Saving Simulation Results

You can save your simulation results in two image file formats, TIFF and BMP. The TIFF format offers native support of 8 and 16 bit per color channel, whereas BMP offers only 8 bit per channel.

Before you actually save your image, you should define all saving settings in the Save Options dialog.

  1. To open the dialog, from the main menu of the Simulation Probe Viewer select File → Save Options. As a result, the Save Options panel opens up on the right hand side of the Simulation Probe Viewer.

Save Options Dialog

Figure 98. Save Options Dialog


In Destination File Format, you can define the format in which you want to save the image:

File Format Options for Saving

Figure 99. File Format Options for Saving


If you want to save a 1-bit simulation result in an 8-bit file format, check the box Normalize gray values. Normalizing in this context means mapping 0 to 0 (black) and 1 to 255 (white).

Pixel Alignment

If the bit width of the image (= the bit width of the link) is the same as the bit width of the file format you have chosen for saving, you can save the image 1:1.

If the bit width of the image is smaller than the bit width of the file format, you can change the pixel alignment offset using the slider. This way, you can save the bits of the simulation result on a certain location within the (larger) pixel of the file format. For example, save the bits of a 12-bit link on the lowest 12 bits or the highest 12 bits of a 16 bit TIFF image.

If the bit width of the image is larger than the bit width of the file format, you can use the slider for choosing which bits out of an image pixel you want to save to file and which bits can be discarded.

To get a preview on the (stripped) image as it will be saved to file: In the main window of the Simulation Probe Viewer, set the radio button on top of the settings panel to File View.

Pixel Splitting

If you want to use the pixel splitting option of VisualApplets, you can define to how many pixels you want to split the color information of one pixel (see also 'Pixel Spitting and Merging') .

If you want to save, for example, a 16-bit simulation result in a 8-bit BMP file, set Split 1 Pixel into to 2 pixels. Now, the 16-bit pixel of the image is split into two 8-bit pixels.

Setting the Splitting Factor in the Save Options Dialog

Figure 100. Setting the Splitting Factor in the Save Options Dialog


By splitting, the row length is doubled, tripled, etc. (depending on the splitting factor). In our example, the row length is doubled. Regular image visualization/processing programs can display these split images. But since they assume a bit width of 8 bit, the image display is expanded horizontally.

[Note] Reconversion of Split Image

You can load a split image in a simulation source and re-convert it to its original bit width by using the pixel merge option (see 'Pixel Spitting and Merging').

Saving

[Important] Important

When selecting File → Save from the main menu, all settings you have defined in the Save Options dialog are applied.

For saving your simulation results to file, proceed as follows:

  1. Select from the main menu File → Save.

  2. Define saving location and file name.

  3. Click Save.

[Tip] Saving an Image Sequence

You can also save a whole image sequence. To save an image sequence, select all images you want to save in the Simulation Viewer. To do so, hold CTRL pressed and click on the images. Then, select from the main menu File → Save. The saved images are automatically numbered.

Frequently Asked Questions

Q: I converted a color image to a gray-scale image and tried loading it to a simulation source. However, VisualApplets denies loading the image onto a one-channel link. What is the problem?

A: The image still uses 3 channels (with 0% saturation) for color information. Just convert your image to a one-channel image.

Q: My simulation probes do not include any results after simulation. What is the problem?

A: You might not have simulated enough simulation cycles. Increase the number of cycles. Moreover, your algorithm might not generate any output images. Check the respective operator restrictions in the operator references. Also, simulation probes connected to signal links never show output data.

Q: My simulation probes are cleared automatically. Why?

A: Each time the design is modified, the simulation probes might get cleared. This does not occur for minor changes of your design like moving modules or modifying internal parameters of operators that do not affect current ports. Probes are invalidated for changes that alter the topology of the design or parameter changes that are propagated through links to connected operators.

FPGA Resource Estimation

FPGAs contain a fix number of resources. These resources are components like BlockRAM, FlipFlops, LUTs, etc. An application design must be mapped into these resource components.

FPGA resources:

  • BlockRAM is an FPGA-integrated memory used for saving FPGA internal data.

  • FlipFlops are electronic circuits used for storing logical state information.

  • LUTs (look-up-tables) are used for implementation of logic functions (AND, OR, XOR, etc.).

  • RAM LUTs are LUTs-related FPGA internal memories.

  • Embedded arithmetic logic units (ALUs or "embedded multipliers"") are hardware multipliers integrated into the FPGA.

How many resources you can use for implementing a design depends on the type of the FPGA.

[Tip] Resources of Supported Hardware Platforms

In Appendix. Device Resources, you find information on all supported hardware platforms.

Every module of a VisualApplets design (except branch, trash, etc.) uses part of the available resources exclusively. Therefore, it is of utmost importance that you are informed about the current state of all resources in use while you are creating your design.

[Important] No extra resources

You can only use the resources available.

Information on resource usage of individual operators you find in the operator reference (see, for example, MULT or DIV in the Operator Reference, Arithmetics library).

Resource Usage Estimation on Design Level

The current resource usage of a design is in part calculated exactly and in part estimated by VisualApplets. Calculation and estimation are executed in Design Rule Check 2 (DRC2) (see 'Design Rules Check').

Exact calculation of resource usage during Design Rule Check 2:

  • BlockRAM

  • Arithmetic logic units (hardware multipliers)

Estimation of resource usage during Design Rule Check 2:

  • LUT

  • RAM-LUT

  • FlipFlops

Information on the exact resource usage of LUTs, RAM-LUTs and FlipFlops is only available after a successful build of an applet.

After Design Rule Check 2, the absolute result of the FPGA resource usage (followed by the percentage usage) for the complete design is displayed in the information panel, tab Project Info, section Project/Resources (see 'Project Info').

Project Info Window

Figure 101. Project Info Window


The resource usage of a design depends on the parallelism (link parameter) used in the design, and on the number and complexity of the modules deployed.

[Important] Keep Parallelism Low

In order to save resources, you should always try to keep the parallelism of a design as low as possible when defining the settings for the required band width (see description of operator PARALLELdn in Operator Reference).

[Important] Estimated Values and Successful Build

If resource estimation values are slightly below 100%, build might fail. On the other hand, even if resource estimation values are slightly over 100%, build might be successful. This is due to the fact that the values are only estimated and the actual resource usage might be slightly higher or lower.

Resource Usage Estimation on Module Level

Detailed information on the resource usage of the entire design as well as on the resource usage of each individual module you can obtain by selecting from the main menu Analysis → View FPGA Resources or by clicking the View FPGA Resources button .

Detailed Information on FPGA Resource Estimation

Figure 102. Detailed Information on FPGA Resource Estimation


For further comparison, you can export the estimated values as a coma-separated values (CSV) file by clicking the Export as CSV button.

You can access information on the estimated FPGA resource usage of an individual module via the context menu (right-click), selecting FPGA Resources.

Context Menu FPGA Resources

Figure 103. Context Menu FPGA Resources


FPGA Resource Usage of Individual Module

Figure 104. FPGA Resource Usage of Individual Module


Build

The applet build step is the final step in the design process of your applets. During the build step, the VisualApplets implementation is translated into the hardware applet (HAP). It is also called synthesis or compilation. The output of the build step is the hardware applet file *.HAP which can be loaded onto the frame grabber hardware.

VisualApplets will call the external tools of the FPGA manufacturer XILINX for HAP generation. Make sure these tools are installed in the right version and VisualApplets is configured accordingly.

[Note] Xilinx Installation

For a detailed description of the required Xilinx tools, and to learn all about their correct installation, refer to the VisualApplets Installation Guide.

[Note] Build Settings for microEnable 5

When designing for microEnable 5 or LightBridge, make sure you configured VisualApplets accordingly, see section 'Build Settings'.

The Project Info dock window shows the version of the detected XILINX software (Figure 105, 'Detected Xilinx tools').

Detected Xilinx tools

Figure 105. Detected Xilinx tools


Open the Build Hardware Applets dilaog by clicking Build → Build Hardware Applet, by using the Build Harware Applet button from the tool bar or by using the shortcut F7.

[Note] Default Directory for Resulting Hardware Applet

VisualApplets will not ask the user where to store the resulting hardware applet (*.hap file). The file is automatically generated and saved in the directory that is specified under 'System Settings' / Global Build Settings / Generation of Hardware Applets / Path for storage of hardware applets (*.hap). By default, this is the installation directory of VisualApplets.

If VisualApplets 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 path, or to adapt the path setting under under 'System Settings' / Global Build Settings / Generation of Hardware Applets / Path for storage of hardware applets (*.hap).

The file is copied into the runtime directory, if a runtime is installed, matched with the design target runtime and recognized by VisualApplets. The output filename is equal to the filename of the *.va file, i.e., myDesignName.hap. The project name has no influence on the file name of the applet (*.hap file).

Experts can change the build settings. Read 'Build Settings' for more information.

Selecting the Build Configuration

In VisualApplets, multiple build settings can be created in the in the Build Settings dialog which are stored in the application.

In the Build Hardware Applets dialog under Xilinx configuration, you can select one of the build settings you defined in the in the Build Settings dialog. The Build configuration you select here will be used for the build you are going to start. Default value is the configuration you specified as Active configuration in the Build Settings dialog.

  1. Under Xilinx configuration, select the build configuration you want to use for the build.

Selecting the Build Configuration for Applet Build

Figure 106. Selecting the Build Configuration for Applet Build


Target Runtime Selection

In the same Build Hardware Applets dialog, you can specify the required target runtimes. By default, the target runtime of the design file is selected. (See 'Target Runtime') However, sometimes the applet will be used on multiple target runtimes. In this case, multiple target runtimes can be selected as can be seen in the next figure. VisualAppelts will generate a HAP file for all selected runtimes.

Target Runtime Selection during Applet Build

Figure 107. Target Runtime Selection during Applet Build


For the target runtime you defined the design file, the output file is located in the specified directory as described above. The file name of this output file is the same as the name of the *.va design file, only with the *.hap extention. The file is copied into the runtime directory, if a runtime is installed.

All additional output files: VisualApplets will add target runtime information to the file name of all additional output files, like “_Linux_AMD64”, “_Linux_IA32”, etc. These additional HAP files will NOT be copied into the runtime directory.

[Tip] Repacking the *.hap File for Other Target Runtimes at a Later Stage

You can easily create a new *.hap file for an additional target runtime at a later stage without starting the whole build process again. This may save you a lot of time as the repacking only takes some minuts. For details on how to repack a *.hap File for additional target runtimes, see section 'Repacking the *.hap File for Other Operating Systems at a Later Stage'.

Errors during Build

The build process will always execute design rules checks level 1 and level 2. If one of the fails, the build process is aborted. Check 'Design Rules Check' for more information on the design rules checks.

Moreover, the build process can cause several further errors. The most likely errors is a resource overmap or timing error. If an applet contains to much logic elements, the XILINX tools cannot map all required elements to the physically available elements. In the case of a resource overmap, your design has to be optimized to fit into the FPGA.

In case of a timing error, the XILINX tools cannot route all signals within the allowed constraints. This mostly happens if almost all logic resources are used. The design has to be optimized to use less resources in this case. Designs which have a timing error can still be completed. Keep in mind that a hardware applet which did not meet timing might not work correct. It might result in time-outs, failing data or other unexpected behaviors if used. Therefore, the use of a non-timing matched applet should only be used with care and is at the user's own risk. If the required resources of your design are far less than 100% and you still get timing errors, contact the Basler Support.

Other errors can be caused by an incorrect XILINX installation or disk volume access permissions.

Note that the build process might require some hours to be completed.

Applet Run

The usage and run of a hardware applet file (HAP) is described in the user documentation of the runtime software. The SDK generator of VisualApplets can help with the first steps of running an applet. See 'SDK' for more information.

microDisplay

microDisplay is part of the framegrabber runtime software. It is a program for first tests of the generated applets. If a runtime is installed, microDisplay can directly be opened from VisualApplets by clicking on Build → microDisplay ( F5 ). Alternatively, you can also use the icon microDisplay from the Build icon bar.

Repacking the *.hap File for Other Operating Systems at a Later Stage

You can create additional *.hap files out of an already existing *.hap file. This is especially helpful if you want to use an applet on additional operating systems you did not specify before the first build.

You do not need to start the whole build process again. This saves you a lot of time. The repacking only takes some minutes. Only the operating system specific parts of the original *.hap file are replaced by VisualApplets during the repacking process.

[Important] Pre-Conditions

To repack an existing *.hap file for a new operating system, you must use the same VisualApplets version that was used to build the original applet (VA 2.2 or higher).

Otherwise, you will get an according error message.

To create additional *.hap files for additional operating systems:

  1. From the Menu, select Build → Repacking Hardware Applet Files....

    The Repacking Hardware Applet Files window opens:

    Repacking Hardware Applet Files Window

    Figure 108. Repacking Hardware Applet Files Window


  2. Select the original *.hap file using the browse button.

    VisualApplet immeadiately checks if the original *.hap file was created with the same version of VisualApplets (2.2 or higher) you are using now (which is a precondition for the repacking process, see above).

    If the VisualApplets version doesn't match, an according error message is displayed.

  3. If everything is fine, click the Next button.

    Fullfilled Repacking Preconditions

    Figure 109. Fullfilled Repacking Preconditions


  4. Under Runtime, select the target runtime (i.e., target operating system) you want to create the new *.hap file for.

    Selecting Target Operating System

    Figure 110. Selecting Target Operating System


    VisualApplets offers a file name for the new *.hap file.

  5. Adapt the output location and the file name for the new *.hap file to your needs.

  6. Click Next.

    VisualApplets displays all settings you have specified for the repacking:

    Display of Specified Repacking Settings

    Figure 111. Display of Specified Repacking Settings


    If you need to adapt your settings, you can use the Back button.

  7. Click Finish to start the repacking process.

    After successful repacking, you get an according message:

    Message after Successful Repacking

    Figure 112. Message after Successful Repacking


SDK

The software development kit (SDK) is used to access the hardware devices in the runtime environment. All VisualApplets implementations can be accessed using the SDK functions. VisualApplets can generate an individual SDK sample project for each VisualApplets implementation.

Generating an SDK Example

You can generate an SDK example for each VisulApplets project. To generate an SDk example, select Build → Generate SDK example from the menu or select the icon in the Build toolbar to generate the example. The Browse to Folder dialog opens up.

Selecting the Storing Location for the SDK Example

Figure 113. Selecting the Storing Location for the SDK Example


Select the location where you want your SDK example to be stored and click OK. Note that no subdirectory is generated, therefore it is recommended to create a subdirectory. The SDK example is generated and stored in the selected directory.

[Note] VisualApplets Warns in case of Erroneous Designs

Before each SDK example generation, VisualApplets runs a DRC check and prompts a warning, if the DRC check fails:

Using the Generated SDK Example

The SDK example includes the source files as well as a Microsoft VisualStudio 6 project file which you can open also in newer versions of VisualStudio. You can compile and execute the example immediately. All available parameters are included and parametrized examplarily.

For a detailed explanation on the usage of a VisualApplets in the runtime, refer to the Runtime documentation. Use the function Fg_getParameterIDByName() to obtain the unique parameter ID as shown in the example. A header file is generated for all enumerations in VisualApplets operators. A namespace with the name of the operator is created for each operator type used in the applet. Multiple enumerations are embedded in this namespace.