Fix Design Range Conflicts
This example shows how to fix design range conflicts. If you specify conflicting design minimum and maximum values in your model, the range analysis software reports an error. To fix this error, examine the design ranges specified in the model to identify inconsistent design specifications. Modify them to make them consistent. In this example, the output design range specified on the Outport block conflicts with the input design ranges specified on the Inport blocks.
Open Model
Open the ex_range_conflict
model.
open_system("ex_range_conflict.slx")
The model displays the specified design minimum and maximum values for the blocks in the model.
The Inport blocks
In1
andIn2
have a design range of[-1..1]
.The Outport block
Out1
has a design range of[10..20
.
To display design ranges in your model, in the Debug tab, select Information Overlays > Signal Data Ranges.
Collect Ranges in the Fixed-Point Tool
From the Simulink® Apps tab, select Fixed-Point Tool.
In the Fixed-Point Tool, under New workflow, select
Iterative Fixed-Point Conversion
.In the Fixed-Point Tool, under System Under Design (SUD), select
ex_range_conflict
as the system you want to convert.Under Range Collection Mode, select Derived ranges.
Click the Collect Ranges button.
The Fixed-Point Tool reports an error because the derived range for the Sum block,
[-2..2]
is outside the specified design range for the Outport block,[10..20]
.
Fix Design Range Conflicts
To fix the conflict, change the design range on the Outport block to
[-10..20]
so that this range includes the derived range for the Sum block.In the model, double-click the Outport block.
In the block parameters dialog box, click the Signal Attributes tab.
In this tab, set Minimum to
-10
and click OK.
Clear previously collected ranges and rerun the range analysis.
In the Fixed-Point Tool, under New workflow, select
Range Collection
.Changing workflows clears range data collected during the active workflow.
Switch back to the
Iterative Fixed-Point Conversion
workflow.Select Derived ranges as the range collection mode.
Click the Collect Ranges button again to rerun the range analysis.
The range analysis derives a minimum value of
-2
and a maximum value of2
for the Outport block.