MATLAB DESIGN HDL CODER RELEASE NOTES User's Guide Page 37

  • Download
  • Add to my manuals
  • Print
  • Page
    / 410
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 36
System Generator for DSP User Guide www.xilinx.com 37
UG640 (v 12.2) July 23, 2010
System-Level Modeling in System Generator
NaNs that drive a Gateway In become indeterminate values. System Generator provides
an Indeterminate Probe block that allows for the detection of indeterminate values. This
probe cannot be translated into hardware.
In System Generator, any arithmetic signal can be indeterminate, but Boolean signals
cannot be. If a simulation reaches a condition that would force a Boolean to become
indeterminate, the simulation is halted and an error is reported. Many Xilinx blocks have
control ports that only allow Boolean signals as inputs. The rule concerning indeterminate
Booleans means that such blocks never see an indeterminate on a control port
A UFix_1_0 is a type that is equivalent to Boolean except for the above restriction
concerning indeterminate data.
Block Masks and Parameter Passing
The same scoping and parameter passing rules that apply to ordinary Simulink blocks
apply to System Generator blocks. Consequently, blocks in the Xilinx Blockset can be
parameterized using MATLAB variables and expressions. This capability makes possible
highly parametric designs that take advantage of the expressive and computational power
of the MATLAB language.
Block Masks
In Simulink, blocks are parameterized through a mechanism called masking. In essence, a
block can be assigned mask variables whose values can be specified by a user through dialog
box prompts or can be calculated in mask initialization commands. Variables are stored in
a mask workspace. A mask workspace is local to the blocks under the mask and cannot be
accessed by external blocks.
Note:
It is possible for a mask to access global variables and variables in the base workspace. To
access a base workspace variable, use the MATLAB evalin function. For more information on the
MATLAB and Simulink scoping rules, refer to the manuals titled Using MATLAB and Using Simulink
from The MathWorks, Inc.
Parameter Passing
It is often desirable to pass variables to blocks inside a masked subsystem. Doing so allows
the block’s configuration to be determined by parameters on the enclosing subsystem. This
technique can be applied to parameters on blocks in the Xilinx blockset whose values are
set using a listbox, radio button, or checkbox. For example, when building a subsystem
that consists of a multiply and accumulate block, you can create a parameter on the
subsystem that allows you to specify whether to truncate or round the result. This
parameter will be called trunc_round as shown in the figure below.
Page view 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 409 410

Comments to this Manuals

No comments