Automatic floating-point to fixed-point conversion
AssigneeThe MathWorks, Inc.
InventorsKiran Kintali, Anand Krishnamoorthi, Srinivas Muddana, Richard M. McKeever
Life of this patent
Estimating the term…
Abstract
A method and system for enabling a designer to more easily convert a model of a dynamic system instantiated using floating-point representation such as has been created in a high level design language to fixed-point code suitable for execution in a programmable processor or logic array.
Claims20
A method performed using one or more computers comprising:
- receiving a design model for a dynamic system, the design model specifying at least one floating-point variable,
- obtaining a design range for the at least one floating-point variable;
- simulating the design model using one or more test bench stimuli to obtain a simulation range for the at least one floating-point variable;
- performing a static analysis of the design model using either the design range or the simulation range as inputs, to determine a static range for the at least one floating-point variable;
- automatically determining, using the one or more computers, at least one proposed fixed-point variable type to represent the at least one floating-point variable, the automatic determining using at least one of the simulation range and the static range;
- and
- generating a list of one or more floating-point variables from the design model and including, for each floating-point variable in the list of one or more floating-point variables:
- a simulation range including minimum and maximum values resulting from the simulating the design model;
- a static range including minimum and maximum values resulting from the determining static ranges from the design model;
- and
- a proposed fixed-point variable type.
An apparatus comprising:
- a receiver, for receiving a design model for a dynamic system, the design model specifying at least one floating-point variable;
- a processor, for automatically performing the acts of:
- simulating operation of the design model to obtain a computed simulation range for the at least one floating-point variable;
- determining a static range for the at least one floating-point variable;
- determining a proposed fixed-point variable type to represent the at least one floating-point variable based on both the computed simulation range and the static range;
- generating fixed-point code representing the design model, the generating performed using the proposed fixed-point variable type;
- receiving a design model for a dynamic system, the design model specifying at least one floating-point variable,
- obtaining a design range for the at least one floating-point variable;
- simulating the design model using one or more test bench stimuli to obtain a simulation range for the at least one floating-point variable;
- performing a static analysis of the design model using either the design range or the simulation range as inputs, to determine a static range for the at least one floating-point variable;
- automatically determining, using the one or more computers, at least one proposed fixed-point variable type to represent the at least one floating-point variable, the automatic determining using at least one of the simulation range and the static range;
- and
- generating a list of one or more floating-point variables from the design model and including, for each floating-point variable in the list of one or more floating-point variables:
- a simulation range including minimum and maximum values resulting from the simulating the design model;
- a static range including minimum and maximum values resulting from the determining static ranges from the design model;
- and
- a proposed fixed-point variable type.
A non-transitory machine-readable medium storing executable instructions to facilitate conversion of a design model, the executable instructions, when executed by a processor, causing an apparatus to perform at least the following:
- simulating operation of the design model to obtain a computed simulation range for the at least one floating-point variable;
- determining a static range for the at least one floating-point variable;
- determining a proposed fixed-point variable type to represent the at least one floating-point variable based on both the computed simulation range and the static range;
- generating fixed-point code representing the design model, the generating performed using the proposed fixed-point variable type;
- receiving a design model for a dynamic system, the design model specifying at least one floating-point variable,
- obtaining a design range for the at least one floating-point variable;
- simulating the design model using one or more test bench stimuli to obtain a simulation range for the at least one floating-point variable;
- performing a static analysis of the design model using either the design range or the simulation range as inputs, to determine a static range for the at least one floating-point variable;
- automatically determining, using the one or more computers, at least one proposed fixed-point variable type to represent the at least one floating-point variable, the automatic determining using at least one of the simulation range and the static range;
- and
- generating a list of one or more floating-point variables from the design model and including, for each floating-point variable in the list of one or more floating-point variables:
- a simulation range including minimum and maximum values resulting from the simulating the design model;
- a static range including minimum and maximum values resulting from the determining static ranges from the design model;
- and
- a proposed fixed-point variable type.
Dependencies are inferred from the claim text.