• Ingen resultater fundet

for modeling, simulation, testing, and automatically generating pure integer code for fixed-point applications

The parameter dialogs and scope displays provide immedi-ate interaction with the running model. You can change param-eters as you work and see the results immediately in the scope displays.

KEY FEATURES

Supports fixed-point bit-widths from 1 to 128 bits for bit-true simulation

Supports complex numbers, and single, double, and custom floating-point types

Provides automatic scaling tools. Allows data type and scaling to be configured independently for each signal

Allows modes for rounding and overflow handling to be independently configured for each block

Eases layout of models with high-level blocks (including filters) such as tapped delay line, dot product, matrix gain, and FIR filter. Automatic layout of fixed-point filters using the DSP Blockset Filter Realization Wizard

Obtains floating-point simulations for debugging and benchmarking

With the Fixed-Point Blockset, you can compare fixed-point and float-ing-point realizations of filters.

Reduces specification overhead with mechanisms that automatically propagate data type and scaling choices

Allows sensor-driven and actuator-driven scaling to be used

Generates code that includes every operation (such as shifts) needed to account for differences in fixed-point locations

Allows non-standard bit-widths to support implementation of custom hardware designs such as ASICs or FPGAs

Provides full compatibility with rapid prototyping systems for bit-true emulation on floating-point chips

Exploits Simulink capabilities for closed-loop simulation of fixed-point digital system interaction with analog systems

The Fixed-Point Blockset streamlines the process of developing embedded software for use on fixed-point processors. It pro-vides blocks to support operations

normally used in embedded control systems and digital filtering, including:

• Arithmetic blocks—for multiplying, divid-ing, adddivid-ing, or subtracting input values

• Delay blocks—for describing memory and states

• Conversion blocks—for converting from one data type to another

• Decision logic blocks —for relational operations, Boolean logic, bitwise logic, and switches

• Nonlinear blocks—for saturation, dead zone, and relay

• Look-up table blocks—for approximating one- or two-dimensional functions

• Discrete-time blocks—for creating a discrete-time system

• Filter blocks—for modeling discrete-time filters

• Additional key blocks that support fixed-point designs such as multiplexers, demultiplexers, scopes, and displays are available in Simulink

Digital Filter Design

The Fixed-Point Blockset lets you design dis-crete-time digital filters using one of many transformation methods. When you combine the Fixed-Point Blockset and the DSP Blockset, you can use the DSP Filter Realization Wizard to automatically lay out large or small fixed-point filters in a variety of useful realizations.

The Fixed-Point Blockset lets you fine-tune realizations, reducing costs and improving signal quality. When you have achieved the desired performance, you can use Real-Time Workshop to generate rapid The Fixed-Point Blockset GUI provides convenient access to global overrides

and min/max logging settings, logged min/max data, the automatic scaling tool, and the signal comparison tool.

prototyping C code and evaluate the code’s performance with respect to your system’s real-time constraints. You can alter the model based on feedback from the rapid prototyping system. When you are satisfied with the performance of the rapid proto-typing system, you can use the model and the generated code as specifications or as components of your implementation.

Automatic Scaling

The minimum and maximum values encountered during a simulation can be logged to the MATLAB®workspace. These values can then be accessed by the auto-matic scaling script,autofixexp. This script automatically changes the scaling for signals in the model.

Scaling is automatically modified to cover the simulation range and optimize preci-sion. If the output data type is a generalized fixed-point number, then you have the

option of locking the output scaling.

Otherwise, scaling will be automatically optimized.

Fixed-Point Blockset GUI

The Fixed-Point Blockset GUI allows you to easily control the parameters associated with automatic scaling and display the simulation results for a given model. The Fixed-Point Blockset GUI lets you:

• Turn logging on or off for all blocks

• Override the output data type with doubles for all blocks

• Invoke automatic scaling

• Run the simulation

• Display the data type and scaling results

• View logged overflows and saturations

• View logged minimum and maximum values

Customized single-precision and fixed-point filters can be created using the Filter Realization Wizard of the DSP Blockset. Each filter is constructed from the FixPt Sum, FixPt Gain, and FixPt Unit Delay blocks from the Fixed-Point Blockset.

Data Type Support

The Fixed-Point Blockset offers extensive support for data types. The blocks support inheritance and propagation of data type and scaling information between blocks in the model. This capability can be used to signifi-cantly reduce the amount of configuration information you need to supply.

Code Generation Support

All blocks support code generation with Real-Time Workshop. The following features are supported:

Pure integer code.All blocks generate pure integer code when used with fixed-point signals and parameters. If blocks handle floating-point signals or parameters, then Real-Time Workshop generates the necessary floating-point code.

Languages.ANSI C

Derivatives Compare output from the FixPt Derivative blocks to output from analo-gous Simulink derivatives built using the Discrete Filter and Transfer Fcn blocks.

Integrators Compare output from the FixPt Integrator blocks (Trapezoidal,

Backward, and Forward) to output from analogous Simulink integrators sup-ported by the Discrete Integrator block.

Lead and Lag Compare output from the FixPt Lead and Lag Filter block to Output from analogous Simulink filters built using the Discrete Filter block.

State-Space Compare output from the FixPt State-Space Realization block to output from the analogous built-in Simulink block.

Fixed-Point Model fixed-point time-varying and Direct Form time-invariant filters using direct Filters form realizations.

1-32 bits or 1-64 bits. The upper limit is determined by the largest integer size that the target compiler provides. Odd sizes are emulated; this provides great flexibility in rapid prototyping. The most efficient code is produced when the target's native sizes are used.

Storage class of parameters.Code can be generated for parameters from 1-32 bits, in most cases. The larger sizes (such as 64 bits) are currently not supported.

Rounding modes.The following four rounding modes are supported: Toward Zero, Toward Nearest, Toward Ceiling, and Toward Floor. Toward Floor generates the most efficient code in most cases.

Overflow handling.Saturation mode and Wrapping mode are supported. Wrapping must be selected for Real-Time Workshop to exclude saturation code.

the FixPt Up Table and FixPt Look-Up Table (2-D) blocks generate code for all look-up methods except extrapolation.

Scaling.Radix point-only scaling is sup-ported. Slope/bias scaling is supported for all blocks except when it leads to highly inefficient code.

Demos

The Fixed-Point Blockset provides basic and advanced demos that allow you to explore the capabilities of the product by changing

the basic functionality of the Fixed-Point Blockset. These can be accessed through the Fixed-Point Library’s Demos block.

Advanced demos illustrate the functionality of systems and filters built with fixed-point blocks. The output of these demos is analogous to that of built-in Simulink blocks with identical input. Advanced demos can be accessed through the Fixed-Point Library’s Filters & Systems Examples block or by typing fixptsysat the command line.

Converting Doubles Convert a double-precision to Fixed-Point Value value to fixed-point value.

Converting Fixed-Point Convert a fixed-point value to Fixed-Point to another fixed-point value.

Inherit Fixed-Point Convert a fixed-point to Fixed-Point value to an inherited

Conversion fixed-point value.

Fixed-Point Sine Add and multiply two Wave Example fixed-point values.

Automatic Scaling Simulate a fixed-point in Feedback Control feedback design.