Wiki

This version is outdated by a newer approved version.DiffThis version (11 Feb 2021 14:56) was approved by John Joseph.

This is an old revision of the document!


Go to parent page

Designing Module

Configuration

This section is used to define the basic configuration of the module to be developed.


  • Name - Name of the module
  • Version - Version number in a.b.c.d format
  • Processor - Target processor
  • Processing Type - Block or Sample processing
  • Configuration Properties (Primary/Secondary) - Optional properties (like channels, stages etc.) for end user to configure the behavior of the module (like pins, UI replication etc.). Up to 2 properties can be enabled. Secondary property can be enabled only when primary property is enabled.
    • Enable - Whether property is enabled
    • Name - Name of the property
    • Min - Minimum value of the property
    • Max - Maximum value of the property


Source and Libraries

This section is used to define the algorithm source. Algorithm source can be in the form of CCES libraries and/or C source with headers. Refer to section xxxxxxxxx below for more details on coding conventions.

C source code can be inserted in the editor under “Source Code” tab. The code has to follow the conventions mentioned in section xxxxxxxx. The ‘Header Files’ tab is used to load the header files included in the source code. Header files to beaded can be selected using ‘Browse’ button and added using the '+' button. Use the ‘-’ button to remove the selected header file from the list. The source entered in the editor and header files selected will get saved in the Algorithm Designer project. Source code entered in the Algorithm Designer source editor is not supported for sample processing schematics. It is not mandatory to have source code entered in the editor window since block processing Module supports a combination of libraries and C source code. Following combinations are supported.

  • Module implemented exclusively using DLBs
  • Module implemented using only source code entered in the source editor.
  • Module implemented using a combination of source code and libraries. Entry-point function is in one of the libraries.
  • Module implemented using a combination of source code and libraries. Entry-point function is implemented in the source editor.

The 'Libraries' tab could be used to add DLBs to the project. One Module can have more than one dlb elements. dlb element is mandatory for sample processing Module and optional for Block processing module. When a DLB is added as Embedded Library, the contents of the DLB is embedded into the module DLL generated by Algorithm Designer. The DLB is then no longer required to be present while using the module generated by Algorithm Designer in SigmaStudio+. On the other hand when the DLB is added as Referenced Library, the DLB file should be present along with the DLL as only a reference to the DLB is present in the DLL.


Parameter Definition

This section is used to define the module (target) parameters required for the module.


  • Name - Parameter name
  • Format - Data format of parameter
  • Buffer - Yes, when the parameter is a buffer. No, when the parameter is a variable

Use '+' button to add the parameter to the module. Use '-' button to remove from the list.


I/O Pins

This section is used to define the input and output pins.


  • Name - Name of the pin
  • Direction - Indicates whether input or output
  • Data Type - Indicates the type of the pin; Audio, Control, PCMx
  • Dynamic - Indicates whether the pin is Dynamic. If True, the pin count changes based on a configurable property. Else, is static.
  • Property - Enabled only when Dynamic is 'True'. Indicates the configurable property upon which the pin change dynamically.

Use '+' button to add pins. Use '-' button to remove selected pin from the list.


Variables

This section is used to define the temporary variables. These variables can be used for parameter and memory size definitions.


  • Name - Name of the variable
  • Type - Variable type. Supported types are Numeric, Boolean and NumericBuffer.

Use '+' button to add pins. Use '-' button to remove selected pin from the list.


Memory Size

State and Scratch Memory required by the Module should be assigned on this window.



The user can assign a static value to the memory size or assign a formula which is a function of one or more runtime variables and size of runtime buffers. ‘FS’, ‘RepCount’ and ‘BlockSize’ are predefined variables and can be used in the formula to represent the ‘Schematic Sampling Rate’, ‘Growth Count’ and ‘Schematic Block Size’ (for block processing Modules) respectively. The configurable properties defined in the 'Configuration' window are also available as predefined variables. In order to use the size of a runtime buffer as a variable use the buffer name with a prefix ‘LEN_’. For e.g. size of a runtime buffer ‘LUT’ is denoted by ‘_LEN_LUT’. Ternary operators can also be used to define the size. For example; “1024 + (RepCount>256?20:10)”

The validate icon will turn green if the size definition is valid. If invalid, the icon will turn red.


Parameter Assignment

The parameters defined in the “Parameter Definition” window will be listed in this window. The values and properties of the parameters can be assigned through this window.


  • Name - Name of the parameter
  • Equation - This is the field where the values are assigned to the parameters. Refer to below section for more details.
  • Value - Current value of the parameter
  • Format - Parameter data format
  • Safeload - Indicates whether the parameter to be safeloaded. Refer below section for more details
  • Group - Safeload group name. Valid only for safeload parameters.

Equation
This field is different for individual parameters and tables.

  • Individual Parameter - The user can either set a static value to the parameter or assign a formula which is a function of one or more runtime variables and size of runtime buffers. To set a formula, the user needs to define one or more runtime variables or runtime buffers. ‘FS’, ‘RepCount’ and ‘BlockSize’ are predefined variables and can be used in the formula to represent the ‘Schematic Sampling Rate’, ‘Growth Count’ and ‘Schematic Block Size’ (for block processing Modules) respectively. Configuration properties defined in “Configuration” window are also available as variables to be used in the equation. In order to use the size of a runtime buffer as a variable use the buffer name with a prefix ‘LEN_’. For e.g. size of a runtime buffer ‘LUT’ is denoted by ‘LEN_LUT’. Examples (In the below examples uservar1, uservar2 and userbuf1 are runtime variables and buffers):
    • 3.14
    • uservar1 + 10 + RepCount
    • uservar1 + uservar2 * 4 + _LEN_userbuf1
    • uservar1 + (BlockSize>256?20:10)
    • uservar1 + (BlockSize % 256 >= 0?1:0)
    • uservar1 + Math.Round(Math.Sqrt(BlockSize)) + Math.Min(uservar1, BlockSize) + Math.Log(BlockSize, 2)
Other Math class functions such as Math.Abs, Math.Acos, Math.Asin, Math.Atan, Math.Cos, Math.Cosh, Math.Exp, Math.Log10, Math.Max, Math.Sign, Math.Sin, Math.Sinh, Math.Tan, Math.Tanh, Math.Truncate and constants such as Math.E and Math.PI are also supported.
  • Tables - The user can set a runtime buffer to the table. Formula or constants are not supported and should not be assigned to Table parameters.

Safeload
Some Algorithms require a set of parameters be updated at once and the update in the parameter memory happens while the Algorithm is not being executed. For example, in a Bi-quad filter, 5 filter coefficients form the parameter set. To update the parameters of the Bi-quad filter, it is mandatory to satisfy the following conditions:

  • Coefficients are updated while the filter is not being executed.
  • All the 5 coefficients are updated at once.

This is to ensure that the filter is executed with a set of stable coefficients. If either of the above two conditions are not met, the resultant parameter set used in the Bi-quad filter can be a mix of coefficients from two different parameter sets and this can lead to filter instability. If the ‘Safeload’ checkbox is selected, the Algorithm Designer ensures that the first condition mentioned above is met, i.e. corresponding parameter is updated in the parameter memory while the Algorithm is not being executed. “Safeload Group” maps two or more parameters to the same group and ensure that the parameters belonging to the same group are updated at once. Thus safeload group ensures that the second condition is also met.


UI Designer


UI Designer is used to design and configure the user interface for the module.

Toolbox

Toolbox contains basic controls which could be dragged and dropped on to the design canvas area at the center to design the UI of the module.

Settings

  • Dynamic UI - If enabled, the UI replicates horizontally/vertically based on a configuration property.
  • Controlling Property - Configuration property based on which the UI replicates.
  • Orientation - Indicates whether the I should replicate horizontally or vertically.


Properties

Once a control is selected on the the design panel, the properties window will list the basic properties of the selected control. The properties window could be used to modify/update the properties.

Assignments

Assignments window could be used to assign the runtime variables and buffers to the controls such that assigned runtime variable or buffer could be controlled using the graphical control.

  • Control - Name of the selected control. Name is assigned by Algorithm Designer and is non-editable by user.
  • Control Property - Indicates the property on the control which could be assigned with a runtime variable.
  • Variable - Indicates the selected runtime variable. The drop down will list only unassigned variables and variables of the same type as the selected control (numeric, boolean etc.)
  • Assign - Can be used to assign a variable to the control. Will be active only when there in no active assignment on the control.
  • Unassign - Can be used to remove an assignment. Will be active only when there is an active assignment on the control.

Settings


Miscellaneous setting are assigned on the Settings Window.

  • Toolbox Caption - Indicates the caption to be used in the toolbox
  • Toolbox Hierarchy - Indicates the toolbox hierarchy. Hierarchy levels should be separated using '.'.
  • UI Caption - Indicated the caption to be displayed on the UI.
  • Description - Description of the module
  • Documentation URL - Documentation URL to be used when for displaying the help contents.
resources/tools-software/sigmastudiov2/usingsigmastudio/designing_module.1594270116.txt.gz · Last modified: 09 Jul 2020 06:48 by John Joseph