Conditional Compare Instruction Chained Logic Contradiction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing conditional compare instructions in data processing are limited to testing specific types of logical expressions and cannot be used for chains of comparisons with different relation types, restricting the complexity of source code that can be compiled and complicating compiler decisions.
Innovation Solution
A conditional compare instruction that updates the current condition state based on whether it passes or fails a test condition, allowing the specification of a fail condition state to enable testing of chained sequences with different relation types, including those that cannot be transformed into the same kind of relation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If conditional compare instructions are used to test logical expressions, then the current condition state is updated based on the test result, but the instructions are limited to testing only certain kinds of logical expressions where all individual tests evaluate the same kind of relation
Solution Approach 1:
The patent introduces a new parameter 'fail condition state' to the conditional compare instruction that specifies what condition state to set if the test condition fails. This parameter change enables the instruction to handle different relation types (equality, inequality, greater than, less than) within the same instruction framework, expanding adaptability without increasing compiler complexity
Solution Approach 2:
The conditional compare instruction is enhanced to serve multiple functions: it can test various relation types (==, !=, >, <, >=, <=) and update the condition state to either a result condition state or a fail condition state. This multi-functionality allows a single instruction type to handle diverse logical expressions, improving versatility while maintaining simple compiler processing
2Adaptability or versatility
If existing conditional compare instructions are used, then they can evaluate chains of tests with the same relation type, but they cannot test logical expressions with different relation types such as (A>B || C==D) && E!=F
Solution Approach 1:
The patent uses the 'fail condition state' parameter as an intermediary that bridges the gap between different relation types. When a test fails, the instruction can set the condition state to a predetermined fail state that prepares the system for the next test in the chain, enabling reliable evaluation of mixed relation type expressions without compromising correctness
Data Source
Figure 1~2
Figure 3A~4B
Figure 5
AI summary
An instruction decoder (14) is responsive to a conditional compare instruction to generate control signals for controlling processing circuitry (4) to perform a conditional compare operation. The conditional compare operation comprises: (i) if a current condition state of the processing circuitry (4) passes a test condition, then performing a compare operation on a first operand and a second operand and setting the current condition state to a result condition state generated during the compare operation; and (ii) if the current condition state fails the test condition, then setting the current condition state to a fail condition state specified by the conditional compare instruction. The conditional compare instruction can be used to represent chained sequences of comparison operations where each individual comparison operation may test a different kind of relation between a pair of operands.