VisSim/Fixed Point 4.5 
Fixed-Point serial echo diagram
|
Keeping your calculations in fixed-point (scaled integer operations)
is important for getting maximum performance from a low-cost microcontroller.
Performance can be sped up by a factor of 5 or more by using in-line
fixed point vs. emulated floating point. VisSim/Fixed-Point lets you
simulate and generate code for fixed-point algorithms. You can mix fixed-point
algorithms like controllers or filters with floating-point plant models
to validate system behavior.
When used in conjunction with VisSim/Embedded Controls Developer,
VisSim/Fixed-Point produces highly efficient, fixed-point production
code that works very well with targets like Texas Instruments C2000
microcontroller.
Simulation is Key to Debugging
The downside to fixed-point coding is the limited range and precision
relative to floating point. The upside to model-based development
is that you can easily simulate your model and debug it before
you ever generate code. It can be very difficult to find overflow
cases and maximize precision when hand coding, so the VisSim model-based
paradigm is ideal for fixed-point algorithm development. VisSim/Fixed-Point
makes fixed-point design easy by tracking minimum and maximum values
during simulation flowing through each block. Any overflow causes
an error and flags the block red.
fixed-point gain properties

Fixed-Point gain block properties. note tracking of min/max
values |
Makes Fixed-Point Easy
You enter floating point values in gains, parameters and constants,
plus the desired scaling, and VisSim does the rest. In simulation
mode, values will be truncated and drop precision according to
the current scaling factors in force. For ease of use and clarity,
VisSim uses the "fx" format: fx<magnitude bits>.<word
size>. For example, scaling with 8 bits of magnitude in a 16
bit word has format fx8.16. Texas Instruments uses the "Q" format.
It only has one numeric value, the number of fractional bits. It
is missing the word size, so it can be ambiguous. The fx8.16 is
q8 in a 16 bit word or q24 in a 32 bit word.
Auto-Scale Mode
The "auto-scale" mode automatically sets the radix point
on each auto-scale enabled fixed-point block to the optimal point.
This point allows storage of the largest magnitude value seen during
the simulation, while retaining the maximal fractional precision
possible.
Tutorials and Interactive Help
VisSim/Fixed-Point provides comprehensive tutorials on fixed-point
controller design, along with an example of converting a floating-point
controller implementation to a fixed-point implementation. It also
comes with interactive Help.
High Level Fixed-Point Library
VisSim/Fixed-Point comes with a toolbox of high level fixed-point
operations like 16- and 32-bit PI and PID, digital integrators,
up count, down count, ramp, rising/falling edge detect, cascadable
counters, resettable one-shots, triangle wave generation, and toggle.
Features
- Uses simpler 'fx' notation instead of 'q' notation
- Automatic radix point scaling of all fixed-point blocks and
fixed-point operations to maximize dynamic range
- Efficient simulation and code generation for digital filters,
sin, cos, arctan2, sqrt, interpolated table look-up
- Color highlighting at the block level for overflow alerts
- Use of high and low watermarks to determine headroom for radix
point settings
- Master word length control that enables the fixed-point word
length to be changed for the entire block diagram
- Choose any word size between 1 and 32
- Many blocks that become fixed- or floating-point based on the
input data type
- Intuitive dialog boxes to configure fixed-point options
If you are logged in, you can download the VisSim/Fixed-Point
addon below. Downloads
Download the Fixed-Point add-on Demo
VisSim Version 8 Download (Free Trial)
|