Simulating the Design
|
Case Sensitivity and Slashes |
|
|
|
The following commands are case sensitive. Use forward slashes to indicate pathes. |
|
Parameter Notation Syntax |
|
|
|
The notation used below for describing the parameters of individual commands is based on the Wirth Syntax Notation (WSN) :
|
|
Command |
Parameters |
Description |
|---|---|---|
|
|
FullSimModuleName xPos yPos |
Command for creating a simulation source module, and for positioning the module in the design window. FullSimModuleName has the following syntax: <HierLevelPath>/<SimModuleName>
The return value of function CreateSimSource is the FullModuleName of the new simulation source module (full hierarchical path to the simulation source module including the module name). |
|
|
FullSimModuleName xPos yPos |
Command for creating a simulation probe module, and for positioning the module in the design window. FullSimModuleName has the following syntax: <HierLevelPath>/<SimModuleName>
The return value of function CreateSimProbe is the FullModuleName of the new simulation probe module (full hierarchical path to the simulation probe module including the module name). |
|
|
FullSimModuleName
|
Command for deleting a simulation module (simulation source or simulation probe). The syntax of FullSimModuleName is the same as the syntax of FullModuleName. |
|
FullSimModuleName TargetModuleName TargetModulePortName [ xPos yPos ] |
Command for connecting a simulation module to a link. You identify the link via the module port the link is connected to. The syntax of FullSimModuleName and TargetModuleName is the same as the syntax of FullModuleName. The syntax of TargetModulePortName is the same as the syntax of PortName. Module TargetModuleName and simulation module FullSimModuleName need to be located in the same hierarchy to connect them with each other. Optionally, you can define the position of the connecting point on the link via xPos and yPos. |
|
|
FullSimModuleName |
Command for detaching the simulation module from a link. |
|
|
|
FullSimModuleName Key Value {OtherValue} |
Command for defining the properties of a simulation module. Use Key to identify the property you want to set. Set the individual properties in the format stated below. Available are the following properties and according value formats: pixelAlignmentOffset BITS Use this parameter to specify the alignment offset as integer value BITS. imageFileSubPixels NUMBER Use this parameter to specify the number of file pixels that are assigned to a link pixel as integer value NUMBER. Source: NUMBER pixels are conflated to one pixel. Probe: One pixel is split up into NUMBER pixels in the file. imageFilePixelBits BITS Use this parameter to specify the bit width in the image file as integer value BITS. Allowed are the values 1, 8, and 16. imageFileNormalize CHOICE Use this property to configure the way simulation result images are saved.
The following values for CHOICE are possible: CHOICE = "1" | "0" cropRect [imageNr] X Y WIDTH HEIGHT This property is only available for simulation sources. Specifying the image index [imageNr] is mandatory. Use this parameter to crop an image and to specify the region of the image (ROI) you want to use for simulation. With X and Y you define the left upper corner of the ROI. currentImage INDEX Use this parameter to select an image within the simulation module. Specify INDEX as integer value. |
|
|
FullSimSourceName ImageFileName1 {OtherImageFileName} [ImageLibrary] |
Command for adding an image to a simulation source module. If the number of kernel elements of the link the simulation source is connected to is > 1, you need to specify as many images as the kernel has elements. Optionally, you can state the image library you want to use ( ImageLibrary = "Native" | "ImageMagick").
|
|
FullSimSourceName {ImageIndex} |
Command for deleting one or all images from a simulation source module. Use the optional parameter ImageIndex to specify the image you want to delete. If you set ImageIndex to -1, or if you don’t use ImageIndex at all, all images in the simulation module are deleted. |
|
|
|
ProcessingCycles [SaveLogfilename]
|
Command for simulating a design. Use parameter ProcessingCycles for defining how many processing cycles you want to carry out with with the command. Use the optional parameter SaveLogfilename to save the log of the carried-out cycles to file. Specify in SaveLogfilename the path to the file and the file name itself. Use file name extension *.html, as the log is written in HTML format. Use forward slashes for indicating pathes. Example:
|
|
Command for resetting the simulation engine. As effect, all simulation probes in the design are cleared. |
||
|
|
FullSimModuleName Property [ImageIndex [LineIndex [LineCount] ] ] |
Command for retrieving the properties of a simulation module. The following properties are available: isConnected: returns 1 if simulation module is connected to a link; otherwise returns 0. connectedLink: Returns a list containing the FullModuleName of a module the link is connected to, and the port of the module the link is connected to. The return value always describes the link by a real module port, i.e., it never states an innner H box node (like, for example, INBOUND#I000 or OUTBOUND#O000). isSource: Returns 1 if the simulation module is a SimulationSource; otherwise returns 0. isProbe: Returns 1 if the simulation module is a SimulationProbe; otherwise returns 0. position: Returns position of the simulation module in the program window as a list (xPos, yPos). imageCount: Returns the number of images in the simulation module (=value of IMAGECOUNT). imageSize: Using parameter ImageIndex is mandatory. Returns the size of the image you specify in ImageIndex as a list {Width <WIDTH> Height <HEIGHT>}. pixelAligmentOffset: Returns the alignment offset as integer value BITS. imageFileSubPixels: Returns the number of file pixels that are assigned to a link pixel as integer value NUMBER. imageFilePixelBits: Returns the setting for bit width in the image file as integer value BITS. Allowed are the values 1, 8, and 16. imageFileNormalize: Returns 1 or 0 according to the settings for saving simulation result images. If set to 1, during saving a 1-bit simulation result to a file in 8-bit format: 0 is mapped to 0 (black) and 1 is mapped to 255 (white), i.e., the simulation image’s format is “normalized”. cropRect: This property is only available for simulation sources. Using parameter ImageIndex is mandatory.Returns a list with the following entries: {X Y WIDTH HEIGHT}. currentImage: Returns the currently selected image as integer value INDEX. |
|
|
FullSimModuleName ImageIndex KernelRow KernelCol Component X Y Width Value {OtherValues}
|
Command for overwriting one pixel or several neighboring pixels in an image within a simulation module (source or probe). You can use this command
The alteration of the image is volatile. As soon as you select another image of the same simulation module or re-select the altered image, the altered image is loaded anew from hard disk and your alterations are discarded. (You select another image if you enter a command for a new image ImageIndex (of the same simulation module) in the TCL console, or if you click on another image of the same simulation module in the viewer of the VisualApplets GUI.) However, you can make your alteration permanent by saving the altered image as long as it is active under a new file name. You can use a volatilely altered image for simulation. However, only one image per SimSource module can be used for simulation in altered condition (because altering another image in the same SimSource resets the pixel values of the image you altered before). You can use as many volatilely altered images as you want for simulation as long as you have only one volatilely altered image per simulation module. One value per Pixel: Command SetSimImageData allows you to write exactly one value per pixel. Thus, in gray scale pixels, you need to carry out command SetSimImageData only once to write the complete color information per pixel. In color pixels, you will be able to write only one of the three color components per pixel. Thus, if you want to change all three color components of color pixel(s), you have to carry out command SetSimImageData three times. Writing in images with kernels: When you are writing into images that have a kernel, you need to specify (in addition to the exact position of the (first) pixel you want to overwrite) which kernel element of the respective pixel(s) you want to overwrite when using command SetSimImageData. If you want to overwrite all kernel elements, you need to carry out command SetSimImageData exactly KernelRow *KernelCol times. To use the command: Before using the command, close the image viewer of the simulation module the image you want to change is located in. Specify the image you want to alter with index ImageIndex. Attention: ImageIndex starts with 0, whereas the numbering of the images in a simulation module in the VisualApplets GUI starts with 1. The values map as follows: ImageIndex = 0 referes to image 1 in the viewer of the VisualApplets GUI. ImageIndex = 1 referes to image 2 in the viewer of the VisualApplets GUI. ImageIndex = 2 referes to image 3 and so forth. Information: On the GUI of VisualApplets, the index of the image that is used in the next simulation cycle is displayed in square brackets and marked by a preceeding “sim” (e.g., sim[2]). Use KernelRow and KernelCol to specify the kernel element you are going to change a pixel value for. Which size the kernel of your simulation image has you can see in the link properties of the link the simulation module is connected to. A link that has a kernel size bigger than 1 pixel is always preceeded by an instance of an operator that allows specifying kernels (as, for example, operator FIRkernelNxM). Counting kernel columns and kernel rows starts with 0. Thus, if you have a kernel with only one element, set both values (KernelRow and KernelCol) to 0:
For a kernel with 4 elements, you identify an individual kernel element as follows:
For a kernel with 9 elements, you identify an individual kernel element as follows:
Use parameter Component to specify the color component of the pixel you want to set. In gray scale images, set Component to 0. In multi-component images (color), specify the component you want to write via its position in the color model. Example: Set Component to 0 if you want to address the red component in an RGB image, set Component to 1 if you want to address the green component in an RGB image, or set Component to 2 if you want to address the blue component in an RGB image. Set position (X,Y) to define the starting point (first pixel) for your writing within the image. Use Width to specify the number of neighboring pixels you want to overwrite per row. If you specify more Values than you write pixels in a row (Width), writing continues in the next row on position X. This way, you can write a region of interest (ROI) that has the width Width. Specify the individual pixel values Value {OtherValues} in hexadecimal writing without preceding “0x”. Specify negative values in two’s complement notation. How many values you state in Value {OtherValues} decides how many pixels within the image are altered. |
|
|
FullSimModuleName ImageIndex KernelRow KernelCol Component X Y [ Width [Height] ] |
Command for reading values of one or several neighboring pixels in an image within a simulation module (source or probe). One value per Pixel: Command GetSimImageData returns exactly one value per pixel. Thus, in gray scale pixels, you need to carry out command GetSimImageData only once to retreive the complete color information per pixel. In color pixels, you will be able to retrieve only one of the three color components per pixel. Thus, if you want to read all three color components of color pixel(s), you have to carry out command GetSimImageData three times. Reading in images with kernels: When you are reading from images that have a kernel, you need to specify (in addition to the exact position of the (first) pixel you want to read) which kernel element of the respective pixel(s) you want to read when using command GetSimImageData. If you want to read all kernel elements, you need to carry out command GetSimImageData exactly KernelRow*KernelCol times. To use the command: Specify the image with index ImageIndex. Attention: ImageIndex starts with 0, whereas the numbering of the images in a simulation module in the VisualApplets GUI starts with 1. The values map as follows: ImageIndex = 0 referes to image 1 in the viewer of the VisualApplets GUI. ImageIndex = 1 referes to image 2 in the viewer of the VisualApplets GUI. ImageIndex = 2 referes to image 3 in the viewer of the VisualApplets GUI, and so forth. Information: On the GUI of VisualApplets, the index of the image that is used in the next simulation cycle is displayed in square brackets and marked by a preceeding “sim” (e.g., sim[2]). Use KernelRow and KernelCol to specify the kernel element you want to read from. Which size the kernel of your simulation image has you can see in the link properties of the link the simulation module is connected to. A link that has a kernel size bigger than 1 element is always preceeded by an instance of an operator that allows specifying kernels (as, for example, operator FIRkernelNxM). Counting the columns and rows of a kernel starts with 0. Thus, if you have a kernel with only one element, set both values to 0.
For a kernel with 4 elements, you identify an individual kernel element as follows:
For a kernel with 9 elements, you identify an individual kernel element as follows:
Use parameter Component to specify the color component you want to read of the pixel. In gray scale images, set Component to 0. In multi-component images (color), specify the component you want to read via its position in the color model. Example: Set Component to 0 if you want to read the red component in an RGB image, set Component to 1 if you want to read the green component in an RGB image, or set Component to 2 if you want to read the blue component in an RGB image. Set position (X,Y) to define the starting point (first pixel) of your reading within the image. If you don’t use parameter Width, the value for exactly one pixel is returned. If you specify only Width, Width values in line Y are returned. If you specify Width and Height, Width * Height values are returned. Using Width and Height allows you to define a region of interest (ROI) you want to read the pixel values (gray)/the values of a pixel component (color) for. The individual pixel values are returned in hexadecimal writing without preceding “0x”. Negative values are returned in two’s complement notation. |
|
|
FullSimModuleName Property ImageIndex [LineIndex [LineCount] ] |
Command for retrieving the properties of a simulation image (in a source or a probe module). The following value for Property is available:
|
|
|
FullSimProbeName {ImageIndex} ImageBaseName |
Command for saving one or all result images from a simulation probe. Use the optional parameter ImageIndex if you want to save a specific image out of the result images. Don’t use ImageIndex or set it to -1 if you want to save all images of the probe. Use ImageBaseName to specify the path to the directory in your file system where you want to save the image(s), and for specifying the file name of the image file(s). Make sure the directories you specify already exist in your file system. Otherwise, you can create them using command MakeDirectoryPath (see there). Example: "c:/images/testimage". In the saving process, the file name extension (for example, *.tif) will be automatically added to the name. If you save all images of the probe, an image index will be automatically added to the file name. Example 1: Enter
to get the following files: c:/images/testimage_0001.tif c:/images/testimage_0002.tif c:/images/testimage_0003.tif ... Example 2: Enter
to get the following file: c:/images/testimage.tif |