Model-based retiming with functional equivalence constraints
AssigneeThe MathWorks, Inc.
InventorsYongfeng Gu, Girish Venkataramani
Life of this patent
Estimating the term…
Abstract
A system and method tests for functional equivalence prior to automatically retiming a high-level specification. An Intermediate Representation (IR) includes one or more graphs or trees based on the high-level specification. A functional equivalence (FE) analyzer determines whether one or more components in the graph meet certain value and state conditions and thus is a candidate for retiming. A scheduler can use components that fail FE as a retiming boundary.
Claims42
A method comprising:
- building, on a computer, at least one intermediate representation (IR) including a specification for one or more components and a plurality of interconnections between the one or more components;
- storing the at least one IR in a memory;
- analyzing, on the computer, a first component of the at least one IR, the analyzing comprising
- receiving a first input value;
- determining a first condition of whether the first component produces an output value that is the same as the first input value;
- and
- determining a second condition of whether the first component does not change internal state with the first input value;
- when the first and second conditions are determined to exist, then
- rearranging, on the computer, at least one of the plurality of interconnections or at least one of the one or more of the components in the at least one IR.
A method comprising:
- building, on a computer, at least one intermediate representation (IR) including a specification for two or more components and a plurality of interconnections between the two or more components;
- storing the at least one IR in a memory;
- analyzing, on the computer, a first component and a second component of the at least one IR, the first and second components connected to one another, and the analyzing comprising
- determining a first condition of whether the first component passes a to functional equivalence retiming test;
- determining a second condition of whether the second component fails a functional equivalence retiming test;
- when the first and second conditions are determined to exist, then
- using the connection between the first and second component as a boundary for partitioning the at least one IR into a first partitioned portion that includes the first component that passes the functional equivalence retiming test and a second partitioned portion that includes the second component that fails the functional equivalence retiming test.
An apparatus comprising:
- an intermediate representation (IR) receiver, for receiving an IR that comprises a functional model that includes a representation of at least two components and a plurality of interconnections between the components;
- a memory, for storing the IR;
- a processor, for executing program code for a functional equivalence analyzer, the program code for accessing the memory to read the IR and to determine if a first component in the functional model, given a first input value;
- (a) produces a first output value that is the same as the first input value;
- and
- (b) does not change internal state with the first input value;
- and
- when (a) and (b) are determined to be true, then the program code further rearranging at least one of the plurality of interconnections or at least one of more of the components in the at least one IR.
An apparatus comprising:
- an intermediate representation (IR) receiver, for receiving an IR that comprises a functional model that includes a representation of at least two components and a plurality of interconnections between the components;
- a memory, for storing the IR;
- a processor, for executing program code for a functional equivalence analyzer, the program code for accessing the memory to read the IR and to determine:
- a first condition of whether a first component passes a functional equivalence retiming test;
- a second condition of whether a second component fails a functional equivalence retiming test;
- when the first and second conditions are determined to exist, using the connection between the first and second component as a boundary for partitioning the at least one IR into a first partitioned portion that includes the first component that passes the functional equivalence retiming test and a second partitioned portion that includes the second component that fails the functional equivalence retiming test.
A non-transitory computer readable medium comprising instructions executable by a computer, the medium comprising:
- instructions to build one or more intermediate representations (IRs) of a functional specification, at least one IR including a plurality components and a plurality of interconnections between the components;
- instructions to store the at least one IR in a memory;
- instructions to analyze the at least one IR to determine if at least one component therein:
- (a) produces a first output value that is the same as a first input value;
- and
- (b) does not change internal state with the first input value;
- and
- instructions to rearrange at least one connection or the at least one component in the IR when (a) and (b) are true.
A non-transitory computer readable medium comprising instructions executable by a computer, the medium comprising:
- instructions to build one or more intermediate representations (IRs) of a functional specification, at least one IR including a plurality components and a plurality of interconnections between the components;
- instructions to store the at least one IR in a memory;
- instructions to analyze the at least one IR to determine if conditions for at least one component therein include:
- (a) a first condition of whether a first component passes a functional equivalence retiming test;
- (b) a second condition of whether a second component fails a functional equivalence retiming test;
- and
- instructions to rearrange at least one connection or the at least one component in the IR, if conditions (a) and (b) are determined to exist for the component.
Dependencies are inferred from the claim text.