US5524251A - Microcomputer having ALU performing min and max operations - Google Patents

Microcomputer having ALU performing min and max operations Download PDF

Info

Publication number
US5524251A
US5524251A US07/548,571 US54857190A US5524251A US 5524251 A US5524251 A US 5524251A US 54857190 A US54857190 A US 54857190A US 5524251 A US5524251 A US 5524251A
Authority
US
United States
Prior art keywords
data
item
output
max
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
US07/548,571
Inventor
Kazuaki Urasaki
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
S Aqua Semiconductor LLC
Original Assignee
Omron Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=16042646&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=US5524251(A) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
US case filed in California Northern District Court litigation https://portal.unifiedpatents.com/litigation/California%20Northern%20District%20Court/case/5%3A11-cv-00671 Source: District Court Jurisdiction: California Northern District Court "Unified Patents Litigation Data" by Unified Patents is licensed under a Creative Commons Attribution 4.0 International License.
US case filed in California Northern District Court litigation https://portal.unifiedpatents.com/litigation/California%20Northern%20District%20Court/case/5%3A11-cv-04407 Source: District Court Jurisdiction: California Northern District Court "Unified Patents Litigation Data" by Unified Patents is licensed under a Creative Commons Attribution 4.0 International License.
US case filed in Delaware District Court litigation https://portal.unifiedpatents.com/litigation/Delaware%20District%20Court/case/1%3A11-cv-00666 Source: District Court Jurisdiction: Delaware District Court "Unified Patents Litigation Data" by Unified Patents is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Omron Corp filed Critical Omron Corp
Assigned to OMRON CORPORATION reassignment OMRON CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST. Assignors: URASAKI, KAZUAKI
Application granted granted Critical
Publication of US5524251A publication Critical patent/US5524251A/en
Assigned to DETELLE RELAY KG, LIMITED LIABILITY COMPANY reassignment DETELLE RELAY KG, LIMITED LIABILITY COMPANY ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: OMRON CORPORATION
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30021Compare instructions, e.g. Greater-Than, Equal-To, MINMAX

Definitions

  • This invention relates to a microcomputer and, more particularly, to a microcomputer capable of performing MIN and MAX operations.
  • fuzzy inferential reasoning and fuzzy control In fuzzy inferential reasoning and fuzzy control, MIN and MAX operations are often used. There are also instances where operations for fuzzy inferential reasoning and fuzzy control are executed using a device having a special-purpose architecture specifically for fuzzy operations, such as a fuzzy special-purpose coprocessor, IC chip or a read-only memory (ROM). In many applications, however, these operations are executed by a general-purpose binary microcomputer suitably programmed for fuzzy operations.
  • FIG. 3 illustrates the operation which takes place in a case where a MIN or MAX operation is executed by a general-purpose microcomputer.
  • an instruction CMP for comparing source data and destination data is executed, then a conditional branch instruction Bcc conforming to a MIN or MAX operation is executed, and finally a transfer instruction MOVE for the compared data is executed.
  • a problem encountered with a fuzzy special-purpose coprocessor is high cost, since 600,000 transistors, for example, are required.
  • a fuzzy special-purpose IC chip or ROM is incapable of executing processing other than the intended fuzzy inferential reasoning.
  • the rules and membership functions in fuzzy inferences cannot be changed in case of a ROM.
  • An object of the present invention is to provide a microcomputer capable of executing MIN and MAX operations at high speed.
  • a microcomputer has a circuit, which is provided in an arithmetic-logic unit (ALU), for comparing two items of data by a MIN operational instruction, selecting the smaller item of data and outputting the same.
  • ALU arithmetic-logic unit
  • a microcomputer has a circuit, which is provided in an ALU, for comparing two items of data by a MAX operational instruction, selecting the larger item of data and outputting the same.
  • a MIN operation or a MAX operation is performed by one MIN operational instruction or one MAX operational instruction. Accordingly, in comparison with performing a MIN or MAX operation by three instructions, as in the prior art, MIN and MAX operations for fuzzy inferential reasoning can be performed at higher speed.
  • the microcomputer includes subtracting means, provided with two items of data, for subtracting one item of data from the other and outputting a borrow signal if one item of data is smaller than the other, and a logic circuit for performing a predetermined logic operation between the borrow signal and at least either one of a signal representing a MIN operational instruction and a signal representing a MAX operational instruction.
  • the subtracting means is a full subtractor or a full adder/subtractor.
  • the full adder/subtractor performs a subtracting operation in response to a subtraction instruction.
  • the microcomputer preferably includes an output control circuit for controlling output of the abovementioned one item of data in response to an output signal from the logic circuit.
  • the output control circuit inhibits output of a signal representing the result of subtraction, which is outputted by the subtracting means, when output of the abovementioned one item of data is permitted.
  • the output control circuit permits output of the one item of data, in response to output of the borrow signal, when the MIN operational instruction is applied, and permits output of the one item of data, in response to non-output of the borrow signal, when the MAX operational instruction is applied.
  • the microcomputer according to the present invention preferably further includes first memory means for storing the abovementioned one item of data, and second memory means for storing the abovementioned other item of data, with output data from the output control circuit being applied to the second memory means. Further, the microcomputer according to the present invention has initial setting means for storing all data to be compared in the first memory means in advance, and storing predetermined initial-value data in the second memory means in advance.
  • Subtracting means and memory means provided in the conventional general-purpose binary microcomputer can be utilized as the abovementioned subtracting means and first and second memory means, and the initial setting means can be implemented by a software program. Therefore, in accordance with the invention, a microcomputer capable of executing MIN and MAX operations at high speed is realized merely by making a small improvement in the architecture of the conventional general-purpose microcomputer. It goes without saying that this microcomputer is capable of possessing the functions of a conventional microcomputer for performing such arithmetic processing as addition and subtraction, logical operations such as AND, OR and NOT, jump processing, etc.
  • FIG. 1 is illustrative of an embodiment of the present invention and shows part of the constitution of an arithmetic-logic unit (ALU) as well as the peripheral circuitry thereof;
  • ALU arithmetic-logic unit
  • FIG. 2 is a circuit diagram showing the overall construction of a microcomputer
  • FIG. 3 is a flowchart showing procedure for performing MIN and MAX operations using a general-purpose microcomputer.
  • FIG. 1 illustrates part of the constitution of an arithmetic-logic unit (ALU) in a microcomputer according to the present invention, as well as the peripheral circuitry thereof.
  • ALU arithmetic-logic unit
  • a register group 1 includes a large number of registers.
  • Let x 1 , x 2 , . . . , x m represent data to which a MIN operation or MAX operation is to be applied.
  • a MIN operation is one in which the smallest item of data is picked out from among the data x 1 -x m .
  • a MAX operation is one in which the largest item of data is picked out from among the data x 1 -x m .
  • These items of data x 1 , x 2 , . . . , x m are stored beforehand in respective registers in the register group 1.
  • These data x 1 -x m are expressed by a prescribed number of bits among eight to 32 bits. It is permissible to store these data x 1 -x m is a memory rather than the register group 1.
  • a memory 2 is for storing initial data, data representing the results of a MIN operation, or data representing the results of a MAX operation.
  • a register can be used instead of the memory 2.
  • An ALU 3 includes a full adder/subtractor 30, logic circuitry and an output control circuit.
  • the logic circuitry comprises an exclusive-OR (EX-OR) gate 31 and an AND gate 32, and the output control circuit comprises AND gates 33, 34 and an OR gate 35.
  • the full adder/subtractor 30 acts as a full subtractor when a subtraction instruction SUB is applied thereto.
  • Data stored in any register in the register group 1 and data stored in memory 2 are applied to the full subtractor 30 as source data and destination data, respectively.
  • the full subtractor 30 subtracts the destination data from the source data, outputs the results (8- to 32-bit data) of subtraction (data representing the results of subtraction are unnecessary in case of a MIN or MAX operation), and outputs a borrow signal B when the item of source data is smaller than the item of destination data.
  • a signal represented by C is a carry signal outputted when the full adder/subtractor 30 operates as a full adder.
  • a signal representing a MIN operational instruction (this signal shall be referred to as a "MIN instruction signal” hereafter) attains a logic value "1" (H level) when a MIN operational instruction has been applied.
  • a signal representing a MAX operational instruction (this signal shall be referred to as a “MAX instruction signal” hereafter) attains a logic value "1" (H level) when a MAX operational instruction has applied.
  • the borrow signal B and a MAX instruction signal are applied to the EX-OR gate 31.
  • This MAX instruction signal assumes a logic value "0" (L level) when the MIN operational instruction has been applied. It is permissible to apply an inverted signal MIN to the EX-OR gate 31 in place of the MAX instruction signal.
  • This signal MIN assumes value "1" when the MAX operational instruction is applied and value "0" when the MIN operational instruction has been applied.
  • Inputted to the AND gate 32 is the MIN instruction signal (when the MIN operational instruction has been applied) or the MAX instruction signal (when the MAX operational instruction has been applied).
  • the output signal of the AND gate 32 enters a D-type flip-flip 4.
  • the latter is for delaying the output signal of the AND gate 32 by one clock period.
  • the output of the D-type flip-flop 4 serves as a write signal W and is also applied to an instruction decoder 5.
  • the memory 2 is incapable of reading and writing data at the same time.
  • a write cycle which takes place only if the output of the AND gate 32 is "1”
  • the delay of one clock period is applied to the output signal "1" of the AND gate 32 by the D-type flip-flop 4. If the memory 2 has the ability to read and write data simultaneously, it will be possible to dispense with 5he D-type flip-flop 4.
  • the instruction decoder 5 is adapted to decode a program and output various operational instructions (instructions for a MAX operation, MIN operation, AND operation, OR operation, NOT operation, bit processing, decision processing, etc.).
  • the instruction decoder 5 outputs a signal for controlling the output control circuit when an output signal from the D-type flip-flop 4 has been applied thereto. It is permissible to delete the instruction decoder 5 and apply the output of the D-type flip-flop 4 directly to the output control circuit, but such an arrangement will be possible solely with regard to the operation of the circuit shown in FIG. 1.
  • the source data outputted by the register group 1 are inputted to the AND gate 33, and the data representing the results of addition/subtraction performed by the full adder/subtractor 30 are inputted to the AND gate 34.
  • the AND gate 33 is controlled by the output of the instruction decoder 5 (for the output of the D-type flip-flop 4), and the AND gate 34 is controlled by a signal obtained by inverting the output of the instruction decoder 5. Accordingly, in a case where the output signal of the instruction decoder 5 is "1", the source data are permitted to pass through the AND gate 33, and output of the data indicative of the results of addition/subtraction performed by the full adder/subtractor 30 is inhibited.
  • the source data which have passed through the AND gate 33 are applied to the memory 2 via the OR gate 35.
  • the data x 1 -x m are stored in the register group 1.
  • the maximum value (“FF” in case of eight bits, and "FFFF” in case of 32 bits) is set as initial data in the memory 2.
  • the subtraction instruction SUB is applied to the full adder/subtractor 30, the MIN instruction signal becomes "1", and the MAX instruction signal becomes "0" owing to the MIN operational instruction.
  • the first item of data x 1 from the register group 1 is applied as source data to the full subtractor 30, and the initial data from the memory 2 is applied as destination data to the full subtractor 30. Since the item of source data is smaller than the item of destination data, the borrow signal B takes on the value "1". Since the MAX instruction signal is "0", the output of the EX-OR gate 31 becomes “1”, and so does the output signal of the AND gate 32. Accordingly, the write signal W is outputted by the D-type flip-flop 4 following a delay of one clock period, and the AND gate 33 is enabled by the output "1" of the instruction decoder 5, as a result of which the item of source data x 1 is written in the memory 2.
  • the second item of data x 2 is read out of the register group 1 and the item of data x 1 written previously is read out of the memory 2, and these items of data are applied to the full subtractor 30. If the inequality x 2 ⁇ x 1 holds, then, just as described above, the borrow signal B becomes "1" and the item of data x 2 is written in the memory 2 in the write cycle one clock period later.
  • the third item of data x 3 is read out of the register group 1 and the same comparison operation is performed.
  • an item of source data is smaller than an item of destination data
  • the item of source data is written in the memory 2. If an item of source data is not smaller than an item of destination data (i.e., if the former equal to or greater than the latter), rewriting of the memory 2 does not take place. As a result, when processing regarding the last item of source data x m ends, the smallest item of data among the data x 1 -x m will be stored in the memory 2.
  • the microcomputer of this embodiment is capable of obtaining source data smaller than destination data by single MIN operational instruction, and is capable of obtaining the minimum value of the source data by repeating execution of the MIN operational instruction.
  • the data x 1 -x m are stored in the register group 1.
  • the minimum value (“OO” in case of eight bits, and "OOOO” in case of 32 bits) is set as initial data in the memory 2.
  • the subtraction instruction SUB is applied to the full adder/subtractor 30, the MAX instruction signal becomes "1" and the MIN instruction signal becomes "0" owing to the MAX operational instruction.
  • the first item of data x 1 from the register group 1 is applied as source data to the full subtractor 30, and the initial data from the memory 2 is applied as destination data to the full subtractor 30. Since the item of source data is larger than the item of destination data, the borrow signal B takes on the value "0". Since the MAX instruction signal is "1", the output of the EX-OR gate 31 becomes “1”, and so does the output signal of the AND gate 32. Accordingly, the write signal W is outputted by the D-type flip-flop 4 following a delay of one clock period, and the AND gate 33 is enabled by the output "1" of the instruction decoder 5, as a result of which the item of source data x 1 is written in the memory 2.
  • the second item of data x 2 is read out of the register group 1 and the item of data x 1 written previously is read out of the memory 2, and these items of data are applied to the full subtractor 30. If the relation x 2 ⁇ x 1 holds, then, just as described above, the borrow signal becomes "0" and the item of data x 2 is written in the memory 2 in the write cycle one clock period later.
  • the third item of data x 3 is read out of the register group 1 and the same comparison operation is performed.
  • the microcomputer of this embodiment is capable of obtaining source data equal to or greater than destination data by single MAX operational instruction, and is capable of obtaining the maximum value of the source data by repeating execution of the MAX operational instruction.
  • FIG. 2 illustrates the overall construction of the microcomputer.
  • the circuitry of FIG. 1 is included in FIG. 2. Accordingly, portions in FIG. 2 that are the same as those in FIG. 1 are designated by like reference characters.
  • the ALU 3 performs, in addition to the MIN and MAX operations described above, arithmetic operations such as addition and subtraction, logic operations such as AND, OR and NOT, as well as bit processing and decision processing. Instructions for performing these various types of processing are applied to the ALU 3 from the instruction decoder 5.
  • the output (the write signal w) of the D-type flip-flop also is applied to the instruction decoder 5, and a memory-write signal W M from the instruction decoder 5 is applied to the memory 2.
  • the memory 2 includes a RAM and a ROM.
  • the RAM stores various data (which includes destination data).
  • the ROM stores a program, and the program and data read out of the ROM are applied to the instruction decoder 5.
  • the write and read addresses of the memory 2 are designated by data that have been stored in a register within an address register group 10.
  • the address is computed by an address computing circuit 14.
  • a register selection signal and an address register group write signal W A from the instruction decoder 5 are applied to the address register group 10.
  • An address designating/computing instruction is applied to the address computing circuit 14 from the instruction decoder 5.
  • the source data x 1 -x m are read out of the memory 2 and written in the register group 1 via a data bus.
  • the registers in the register group 1 are designated by the register selection signal outputted by the instruction decoder 5.
  • the writing and reading of data to and from the designated register is controlled by a data register group write signal W D and read signal R D , respectively. These control signals W D , R D are also outputted by the instruction decoder 5.
  • the source data read out of the register group 1 are applied to the ALU 3 via a gate 12.
  • the destination data read out of the memory 2 are applied to the ALU 3 via a gate 11.
  • the source data outputted by the ALU 3 are written in the memory 2 via a gate 13 and the data bus.
  • FIG. 2 Also shown in FIG. 2 are an instruction register 15 and an input/output unit 16, etc.

Abstract

All data to be compared are stored in a register group (1) in advance. When a MIN operation is executed, a maximum value (e.g, FF) is initially set in a memory (2). Source data outputted by the register group (1) and destination data outputted by the memory (2) are applied to a full adder/subtractor (30) operating as a subtractor. The subtractor (30) outputs a borrow signal when an item of source data is smaller than an item of destination data. In response to the borrow signal, an AND gate (33) is enabled, so that the item of source data is written in the memory (2) as a new item of destination data. When an item of source data is equal to or greater than an item of destination data, the borrow signal is not delivered as an output, the AND gate (33) is disabled and a new item of data is not stored in the memory (2). The foregoing operation is repeated with regard to all data in the register group (1). Eventually, a state is attained in which the smallest item of data among the data in the register group (1) is stored in the memory (2).
In a MAX operation, a minimum value (e.g, OO) is set in the memory (2) as initial data. When the borrow signal is not outputted, the AND gate (33) is enabled. Eventually, a state is attained in which the largest item of data among the data in the register group (1) is stored in the memory (2).

Description

BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates to a microcomputer and, more particularly, to a microcomputer capable of performing MIN and MAX operations.
2. Description of the Related Art
In fuzzy inferential reasoning and fuzzy control, MIN and MAX operations are often used. There are also instances where operations for fuzzy inferential reasoning and fuzzy control are executed using a device having a special-purpose architecture specifically for fuzzy operations, such as a fuzzy special-purpose coprocessor, IC chip or a read-only memory (ROM). In many applications, however, these operations are executed by a general-purpose binary microcomputer suitably programmed for fuzzy operations.
FIG. 3 illustrates the operation which takes place in a case where a MIN or MAX operation is executed by a general-purpose microcomputer. First, an instruction CMP for comparing source data and destination data is executed, then a conditional branch instruction Bcc conforming to a MIN or MAX operation is executed, and finally a transfer instruction MOVE for the compared data is executed.
Thus, with this method of executing MIN and MAX operations by the software of a general-purpose microcomputer, the three instructions CMP, Bcc and MOVE are necessary and these instructions must be executed in succession. A problem that results is low speed due to a slow-down in operation speed.
A problem encountered with a fuzzy special-purpose coprocessor is high cost, since 600,000 transistors, for example, are required. In addition, a fuzzy special-purpose IC chip or ROM is incapable of executing processing other than the intended fuzzy inferential reasoning. In particular, the rules and membership functions in fuzzy inferences cannot be changed in case of a ROM.
SUMMARY OF THE INVENTION
An object of the present invention is to provide a microcomputer capable of executing MIN and MAX operations at high speed.
A microcomputer according to the present invention has a circuit, which is provided in an arithmetic-logic unit (ALU), for comparing two items of data by a MIN operational instruction, selecting the smaller item of data and outputting the same.
Furthermore, a microcomputer according to the present invention has a circuit, which is provided in an ALU, for comparing two items of data by a MAX operational instruction, selecting the larger item of data and outputting the same.
In the present invention, a MIN operation or a MAX operation is performed by one MIN operational instruction or one MAX operational instruction. Accordingly, in comparison with performing a MIN or MAX operation by three instructions, as in the prior art, MIN and MAX operations for fuzzy inferential reasoning can be performed at higher speed.
The microcomputer according to the present invention includes subtracting means, provided with two items of data, for subtracting one item of data from the other and outputting a borrow signal if one item of data is smaller than the other, and a logic circuit for performing a predetermined logic operation between the borrow signal and at least either one of a signal representing a MIN operational instruction and a signal representing a MAX operational instruction.
The subtracting means is a full subtractor or a full adder/subtractor. The full adder/subtractor performs a subtracting operation in response to a subtraction instruction.
The microcomputer according to the present invention preferably includes an output control circuit for controlling output of the abovementioned one item of data in response to an output signal from the logic circuit. The output control circuit inhibits output of a signal representing the result of subtraction, which is outputted by the subtracting means, when output of the abovementioned one item of data is permitted. The output control circuit permits output of the one item of data, in response to output of the borrow signal, when the MIN operational instruction is applied, and permits output of the one item of data, in response to non-output of the borrow signal, when the MAX operational instruction is applied.
The microcomputer according to the present invention preferably further includes first memory means for storing the abovementioned one item of data, and second memory means for storing the abovementioned other item of data, with output data from the output control circuit being applied to the second memory means. Further, the microcomputer according to the present invention has initial setting means for storing all data to be compared in the first memory means in advance, and storing predetermined initial-value data in the second memory means in advance.
Subtracting means and memory means provided in the conventional general-purpose binary microcomputer can be utilized as the abovementioned subtracting means and first and second memory means, and the initial setting means can be implemented by a software program. Therefore, in accordance with the invention, a microcomputer capable of executing MIN and MAX operations at high speed is realized merely by making a small improvement in the architecture of the conventional general-purpose microcomputer. It goes without saying that this microcomputer is capable of possessing the functions of a conventional microcomputer for performing such arithmetic processing as addition and subtraction, logical operations such as AND, OR and NOT, jump processing, etc.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is illustrative of an embodiment of the present invention and shows part of the constitution of an arithmetic-logic unit (ALU) as well as the peripheral circuitry thereof;
FIG. 2 is a circuit diagram showing the overall construction of a microcomputer; and
FIG. 3 is a flowchart showing procedure for performing MIN and MAX operations using a general-purpose microcomputer.
DESCRIPTION OF THE PREFERRED EMBODIMENT
FIG. 1 illustrates part of the constitution of an arithmetic-logic unit (ALU) in a microcomputer according to the present invention, as well as the peripheral circuitry thereof.
A register group 1 includes a large number of registers. Let x1, x2, . . . , xm represent data to which a MIN operation or MAX operation is to be applied. A MIN operation is one in which the smallest item of data is picked out from among the data x1 -xm. A MAX operation is one in which the largest item of data is picked out from among the data x1 -xm. These items of data x1, x2, . . . , xm are stored beforehand in respective registers in the register group 1. These data x1 -xm are expressed by a prescribed number of bits among eight to 32 bits. It is permissible to store these data x1 -xm is a memory rather than the register group 1.
A memory 2 is for storing initial data, data representing the results of a MIN operation, or data representing the results of a MAX operation. A register can be used instead of the memory 2.
An ALU 3 includes a full adder/subtractor 30, logic circuitry and an output control circuit. The logic circuitry comprises an exclusive-OR (EX-OR) gate 31 and an AND gate 32, and the output control circuit comprises AND gates 33, 34 and an OR gate 35.
The full adder/subtractor 30 acts as a full subtractor when a subtraction instruction SUB is applied thereto. Data stored in any register in the register group 1 and data stored in memory 2 are applied to the full subtractor 30 as source data and destination data, respectively. The full subtractor 30 subtracts the destination data from the source data, outputs the results (8- to 32-bit data) of subtraction (data representing the results of subtraction are unnecessary in case of a MIN or MAX operation), and outputs a borrow signal B when the item of source data is smaller than the item of destination data. A signal represented by C is a carry signal outputted when the full adder/subtractor 30 operates as a full adder.
A signal representing a MIN operational instruction (this signal shall be referred to as a "MIN instruction signal" hereafter) attains a logic value "1" (H level) when a MIN operational instruction has been applied. A signal representing a MAX operational instruction (this signal shall be referred to as a "MAX instruction signal" hereafter) attains a logic value "1" (H level) when a MAX operational instruction has applied.
In the logic circuitry, the borrow signal B and a MAX instruction signal are applied to the EX-OR gate 31. This MAX instruction signal assumes a logic value "0" (L level) when the MIN operational instruction has been applied. It is permissible to apply an inverted signal MIN to the EX-OR gate 31 in place of the MAX instruction signal. This signal MIN assumes value "1" when the MAX operational instruction is applied and value "0" when the MIN operational instruction has been applied. Inputted to the AND gate 32 is the MIN instruction signal (when the MIN operational instruction has been applied) or the MAX instruction signal (when the MAX operational instruction has been applied).
The output signal of the AND gate 32 enters a D-type flip-flip 4. The latter is for delaying the output signal of the AND gate 32 by one clock period. The output of the D-type flip-flop 4 serves as a write signal W and is also applied to an instruction decoder 5. The memory 2 is incapable of reading and writing data at the same time. In order to write data in the memory 2 (referred to as a write cycle, which takes place only if the output of the AND gate 32 is "1") after readout of destination data from this memory 2 (referred to as a readout cycle), the delay of one clock period is applied to the output signal "1" of the AND gate 32 by the D-type flip-flop 4. If the memory 2 has the ability to read and write data simultaneously, it will be possible to dispense with 5he D-type flip-flop 4.
The instruction decoder 5 is adapted to decode a program and output various operational instructions (instructions for a MAX operation, MIN operation, AND operation, OR operation, NOT operation, bit processing, decision processing, etc.). In FIG. 1, the instruction decoder 5 outputs a signal for controlling the output control circuit when an output signal from the D-type flip-flop 4 has been applied thereto. It is permissible to delete the instruction decoder 5 and apply the output of the D-type flip-flop 4 directly to the output control circuit, but such an arrangement will be possible solely with regard to the operation of the circuit shown in FIG. 1.
In the output control circuit, the source data outputted by the register group 1 are inputted to the AND gate 33, and the data representing the results of addition/subtraction performed by the full adder/subtractor 30 are inputted to the AND gate 34. The AND gate 33 is controlled by the output of the instruction decoder 5 (for the output of the D-type flip-flop 4), and the AND gate 34 is controlled by a signal obtained by inverting the output of the instruction decoder 5. Accordingly, in a case where the output signal of the instruction decoder 5 is "1", the source data are permitted to pass through the AND gate 33, and output of the data indicative of the results of addition/subtraction performed by the full adder/subtractor 30 is inhibited. The source data which have passed through the AND gate 33 are applied to the memory 2 via the OR gate 35.
The operation of the microcomputer shown in FIG. 1 will now be described.
(1) MIN Operation
The data x1 -xm are stored in the register group 1. The maximum value ("FF" in case of eight bits, and "FFFF" in case of 32 bits) is set as initial data in the memory 2. The subtraction instruction SUB is applied to the full adder/subtractor 30, the MIN instruction signal becomes "1", and the MAX instruction signal becomes "0" owing to the MIN operational instruction.
The first item of data x1 from the register group 1 is applied as source data to the full subtractor 30, and the initial data from the memory 2 is applied as destination data to the full subtractor 30. Since the item of source data is smaller than the item of destination data, the borrow signal B takes on the value "1". Since the MAX instruction signal is "0", the output of the EX-OR gate 31 becomes "1", and so does the output signal of the AND gate 32. Accordingly, the write signal W is outputted by the D-type flip-flop 4 following a delay of one clock period, and the AND gate 33 is enabled by the output "1" of the instruction decoder 5, as a result of which the item of source data x1 is written in the memory 2.
In the next read cycle, the second item of data x2 is read out of the register group 1 and the item of data x1 written previously is read out of the memory 2, and these items of data are applied to the full subtractor 30. If the inequality x2 <x1 holds, then, just as described above, the borrow signal B becomes "1" and the item of data x2 is written in the memory 2 in the write cycle one clock period later.
If the relation x2 ≧x1 holds, the borrow signal B is "0", and therefore the outputs of the EX-OR gate 31 and AND gate 32 are both "0"; hence the write signal W is not delivered as an output. Further, the AND gate 33 is placed in the disabled state, so that the item of data x2 is not outputted. Though the data representing the results of subtraction are outputted via the AND gate 34 and the OR gate 35, rewriting of the memory 2 does not take place because the write signal W is not outputted.
In the next read cycle, the third item of data x3 is read out of the register group 1 and the same comparison operation is performed.
Thus, in a case where an item of source data is smaller than an item of destination data, the item of source data is written in the memory 2. If an item of source data is not smaller than an item of destination data (i.e., if the former equal to or greater than the latter), rewriting of the memory 2 does not take place. As a result, when processing regarding the last item of source data xm ends, the smallest item of data among the data x1 -xm will be stored in the memory 2.
Accordingly, the microcomputer of this embodiment is capable of obtaining source data smaller than destination data by single MIN operational instruction, and is capable of obtaining the minimum value of the source data by repeating execution of the MIN operational instruction.
(2) MAX Operation
The data x1 -xm are stored in the register group 1. The minimum value ("OO" in case of eight bits, and "OOOO" in case of 32 bits) is set as initial data in the memory 2. The subtraction instruction SUB is applied to the full adder/subtractor 30, the MAX instruction signal becomes "1" and the MIN instruction signal becomes "0" owing to the MAX operational instruction.
The first item of data x1 from the register group 1 is applied as source data to the full subtractor 30, and the initial data from the memory 2 is applied as destination data to the full subtractor 30. Since the item of source data is larger than the item of destination data, the borrow signal B takes on the value "0". Since the MAX instruction signal is "1", the output of the EX-OR gate 31 becomes "1", and so does the output signal of the AND gate 32. Accordingly, the write signal W is outputted by the D-type flip-flop 4 following a delay of one clock period, and the AND gate 33 is enabled by the output "1" of the instruction decoder 5, as a result of which the item of source data x1 is written in the memory 2.
In the next read cycle, the second item of data x2 is read out of the register group 1 and the item of data x1 written previously is read out of the memory 2, and these items of data are applied to the full subtractor 30. If the relation x2 ≧x1 holds, then, just as described above, the borrow signal becomes "0" and the item of data x2 is written in the memory 2 in the write cycle one clock period later.
If the inequality x2 <x1 holds, the borrow signal is "1", and therefore the outputs of the EX-OR gate 31 and AND gate 32 are both "0"; hence the write signal W is not delivered as an output. Further, the AND gate 33 is placed in the disabled state, so that the item of data x2 is not outputted. Though the data representing the results of subtraction are outputted via the AND gate 34 and the OR gate 35, rewriting of the memory 2 does not take place because the write signal W is not outputted.
In the next read cycle, the third item of data x3 is read out of the register group 1 and the same comparison operation is performed.
Thus, in a case where an item of source data is equal to or larger than an item of destination data, the item of source data is written in the memory 2. If an item of source data is smaller than an item of destination data, rewriting of the memory 2 does not take place. As a result, when processing regarding the last item of source data xm ends, the largest item of data among the data x1 -xm will be stored in the memory 2.
Accordingly, the microcomputer of this embodiment is capable of obtaining source data equal to or greater than destination data by single MAX operational instruction, and is capable of obtaining the maximum value of the source data by repeating execution of the MAX operational instruction.
FIG. 2 illustrates the overall construction of the microcomputer. The circuitry of FIG. 1 is included in FIG. 2. Accordingly, portions in FIG. 2 that are the same as those in FIG. 1 are designated by like reference characters.
The ALU 3 performs, in addition to the MIN and MAX operations described above, arithmetic operations such as addition and subtraction, logic operations such as AND, OR and NOT, as well as bit processing and decision processing. Instructions for performing these various types of processing are applied to the ALU 3 from the instruction decoder 5. The output (the write signal w) of the D-type flip-flop also is applied to the instruction decoder 5, and a memory-write signal WM from the instruction decoder 5 is applied to the memory 2.
The memory 2 includes a RAM and a ROM. The RAM stores various data (which includes destination data). The ROM stores a program, and the program and data read out of the ROM are applied to the instruction decoder 5. The write and read addresses of the memory 2 are designated by data that have been stored in a register within an address register group 10. The address is computed by an address computing circuit 14. A register selection signal and an address register group write signal WA from the instruction decoder 5 are applied to the address register group 10. An address designating/computing instruction is applied to the address computing circuit 14 from the instruction decoder 5.
The source data x1 -xm are read out of the memory 2 and written in the register group 1 via a data bus. The registers in the register group 1 are designated by the register selection signal outputted by the instruction decoder 5. The writing and reading of data to and from the designated register is controlled by a data register group write signal WD and read signal RD, respectively. These control signals WD, RD are also outputted by the instruction decoder 5.
The source data read out of the register group 1 are applied to the ALU 3 via a gate 12. The destination data read out of the memory 2 are applied to the ALU 3 via a gate 11. The source data outputted by the ALU 3 are written in the memory 2 via a gate 13 and the data bus.
Also shown in FIG. 2 are an instruction register 15 and an input/output unit 16, etc.
As many apparently widely different embodiments of the present invention can be made without departing from the spirit and scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims (11)

What is claimed is:
1. A general purpose binary microcomputer comprising:
means for outputting one of a MIN operational instruction and a MAX operational instruction;
an arithmetic logic unit (ALU) capable of performing addition, subtraction, multiplication and division operations and MIN and MAX operations, said arithmetic logic unit receiving said one of a MIN and MAX operational instruction and:
(a) in response to a MIN operational instruction comparing plural items of data and selecting whichever of the plural items of data is smallest,
(b) in response to a MAX operational instruction comparing plural items of data and selecting whichever of the plural items of data is largest.
2. A microcomputer as in claim 1 wherein said arithmetic logic unit comprises:
subtracting means to which two items of data are applied for subtracting from one item of data, another item of data and outputting a borrow signal if said one item of data is smaller than said other item of data, and
a logic circuit for performing a predetermined logic operation between the borrow signal and a signal representing one of a MIN operational instruction and a MAX operational instruction.
3. The microcomputer according to claim 2, wherein said arithmetic logic unit further comprises an output control circuit for controlling an output of a selected one of said two items of data in response to an output signal from said logic circuit.
4. The microcomputer according to claim 3, further comprising:
first memory means for storing said one item of data; and
second memory means for storing said other item of data;
said output from said output control circuit being applied to said second memory means.
5. The microcomputer according to claim 4, further comprising initial setting means for storing a plurality of data which is to be selectively applied to said subtracting means as said one item of data to be compared in said first memory means in advance, and storing a predetermined initial-value data in said second memory means in advance.
6. The microcomputer according to claim 3, wherein said output control circuit inhibits output of a signal representing a result of subtraction, which is outputted by said subtracting means, when output of said selected item of data is permitted.
7. The microcomputer according to claim 3, wherein said output control circuit permits output of said selected item of data, in response to output of the borrow signal, when the MIN operational instruction has been applied, and permits output of said selected item of data, in response to non-output of the borrow signal, when the MAX operational instruction has been applied.
8. The microcomputer according to claim 2, wherein said subtracting means is a full subtractor.
9. The microcomputer according to claim 2, wherein said subtracting means is a full adder/subtractor, and said full adder/subtractor performs a subtracting operation in response to a subtraction instruction.
10. The microcomputer according to claim 1 wherein said outputting means outputs a MIN operational instruction.
11. The microcomputer according to claim 1 wherein said outputting means outputs a MAX operational instruction.
US07/548,571 1989-07-12 1990-07-05 Microcomputer having ALU performing min and max operations Expired - Lifetime US5524251A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP1178100A JPH0343827A (en) 1989-07-12 1989-07-12 Fuzzy microcomputer
JP1-178100 1989-07-12

Publications (1)

Publication Number Publication Date
US5524251A true US5524251A (en) 1996-06-04

Family

ID=16042646

Family Applications (1)

Application Number Title Priority Date Filing Date
US07/548,571 Expired - Lifetime US5524251A (en) 1989-07-12 1990-07-05 Microcomputer having ALU performing min and max operations

Country Status (2)

Country Link
US (1) US5524251A (en)
JP (1) JPH0343827A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5706488A (en) * 1993-03-31 1998-01-06 Motorola, Inc. Data processing system and method thereof
US5991785A (en) * 1997-11-13 1999-11-23 Lucent Technologies Inc. Determining an extremum value and its index in an array using a dual-accumulation processor
US6081820A (en) * 1998-02-20 2000-06-27 Siemens Energy & Automation Method and apparatus for filtering a signal using a window value
US6411975B1 (en) * 1998-06-19 2002-06-25 Lsi Logic Corporation Digital processing
US6434689B2 (en) * 1998-11-09 2002-08-13 Infineon Technologies North America Corp. Data processing unit with interface for sharing registers by a processor and a coprocessor
US20040028270A1 (en) * 2002-08-06 2004-02-12 Lockheed Martin Corporation System and method for locating multiple peak summits in three-dimensional data
US20060095739A1 (en) * 2004-09-13 2006-05-04 Ati Technologies Inc. SIMD processor executing min/max instructions
US20070297558A1 (en) * 2004-06-03 2007-12-27 Johnson Tyler J Event duration and signal value minimum and maximum circuit for performance counter
RU2620991C1 (en) * 2016-03-23 2017-05-30 Олег Александрович Козелков Device for selection of binary numbers

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5780946A (en) * 1994-03-03 1998-07-14 Fanuc Ltd. Air-cooled type electric motor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4620188A (en) * 1981-08-17 1986-10-28 Development Finance Corporation Of New Zealand Multi-level logic circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4620188A (en) * 1981-08-17 1986-10-28 Development Finance Corporation Of New Zealand Multi-level logic circuit

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
"ALU Implementing Native Minimum/Maximum Function for Signal Processing Applications", IBM Technical Disclosure Bulletin, vol. 29, No. 5, (Oct. 1986) pp. 1975-1978.
ALU Implementing Native Minimum/Maximum Function for Signal Processing Applications , IBM Technical Disclosure Bulletin, vol. 29, No. 5, (Oct. 1986) pp. 1975 1978. *
Labib Sultan, "A Formal Approach for the Organization and Implementation of Fuzzy Micro-Processor Module", Fuzzy Computing, Elsevier Science Publishers B.V., (1988) pp. 201-221.
Labib Sultan, A Formal Approach for the Organization and Implementation of Fuzzy Micro Processor Module , Fuzzy Computing, Elsevier Science Publishers B.V., (1988) pp. 201 221. *
Takeshi Yamakawa, "Fuzzy Computing Theory, Hardware, And Applications," Fuzzy Computing Elsevier Science Publishers B.V. (1988) pp. 157-171.
Takeshi Yamakawa, Fuzzy Computing Theory, Hardware, And Applications, Fuzzy Computing Elsevier Science Publishers B.V. (1988) pp. 157 171. *
Togai et al, "Expert System on a Chip: An Engine for Real-Time Approximate Reasoning," IEEE Expert (Fall 1986) pp. 55-62.
Togai et al, Expert System on a Chip: An Engine for Real Time Approximate Reasoning, IEEE Expert (Fall 1986) pp. 55 62. *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5706488A (en) * 1993-03-31 1998-01-06 Motorola, Inc. Data processing system and method thereof
US5991785A (en) * 1997-11-13 1999-11-23 Lucent Technologies Inc. Determining an extremum value and its index in an array using a dual-accumulation processor
US6081820A (en) * 1998-02-20 2000-06-27 Siemens Energy & Automation Method and apparatus for filtering a signal using a window value
US6411975B1 (en) * 1998-06-19 2002-06-25 Lsi Logic Corporation Digital processing
US6434689B2 (en) * 1998-11-09 2002-08-13 Infineon Technologies North America Corp. Data processing unit with interface for sharing registers by a processor and a coprocessor
US20040028270A1 (en) * 2002-08-06 2004-02-12 Lockheed Martin Corporation System and method for locating multiple peak summits in three-dimensional data
US7206444B2 (en) 2002-08-06 2007-04-17 Lockheed Martin Corporation System and method for locating multiple peak summits in three-dimensional data
US20070297558A1 (en) * 2004-06-03 2007-12-27 Johnson Tyler J Event duration and signal value minimum and maximum circuit for performance counter
US20060095739A1 (en) * 2004-09-13 2006-05-04 Ati Technologies Inc. SIMD processor executing min/max instructions
US7434034B2 (en) * 2004-09-13 2008-10-07 Ati Technologies Inc. SIMD processor executing min/max instructions
US20090132785A1 (en) * 2004-09-13 2009-05-21 Ati Technologies Ulc SIMD processor executing min/max instructions
US7941649B2 (en) * 2004-09-13 2011-05-10 Broadcom Corporation SIMD processor executing min/max instructions
RU2620991C1 (en) * 2016-03-23 2017-05-30 Олег Александрович Козелков Device for selection of binary numbers

Also Published As

Publication number Publication date
JPH0343827A (en) 1991-02-25

Similar Documents

Publication Publication Date Title
US4675809A (en) Data processing system for floating point data having a variable length exponent part
US4181942A (en) Program branching method and apparatus
US5511207A (en) Program control circuit determining the designated number of times a sequence of instructions is repetitively executed to prevent further execution of a jump instruction
US4785421A (en) Normalizing circuit
US5524251A (en) Microcomputer having ALU performing min and max operations
JPS6351287B2 (en)
GB1129660A (en) Data processors
JPH0414385B2 (en)
US5303354A (en) Data transfer system between registers for microcomputer
US5991872A (en) Processor
EP0230668B1 (en) Arithmetic logic circuit
GB986791A (en) A data processing system
US4754424A (en) Information processing unit having data generating means for generating immediate data
US4641278A (en) Memory device with a register interchange function
US4580238A (en) Arithmetic operating system
US5146479A (en) Up/down counter for counting binary data stored in flip flops
JP3493369B2 (en) Computer
EP0256134B1 (en) Central processing unit
EP0136699B1 (en) Programmable controller
US5220670A (en) Microprocessor having ability to carry out logical operation on internal bus
EP0265948A2 (en) Data processor capable of immediately calculating branch address in relative address branch
US5423052A (en) Central processing unit with switchable carry and borrow flag
KR960012664B1 (en) Dizital signalling processor
JPH0679268B2 (en) Program-controlled shift mechanism in a programmer with variable data bus width.
JPS6148174B2 (en)

Legal Events

Date Code Title Description
AS Assignment

Owner name: OMRON CORPORATION, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST.;ASSIGNOR:URASAKI, KAZUAKI;REEL/FRAME:005424/0990

Effective date: 19900817

STCF Information on status: patent grant

Free format text: PATENTED CASE

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 12

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FEPP Fee payment procedure

Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

AS Assignment

Owner name: DETELLE RELAY KG, LIMITED LIABILITY COMPANY, DELAW

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:OMRON CORPORATION;REEL/FRAME:022331/0351

Effective date: 20080109

RR Request for reexamination filed

Effective date: 20110322

B1 Reexamination certificate first reexamination

Free format text: CLAIMS 1, 10 AND 11 ARE CANCELLED. CLAIM 2 IS DETERMINED TO BE PATENTABLE AS AMENDED. CLAIMS 3-9, DEPENDENT ON AN AMENDED CLAIM, ARE DETERMINED TO BE PATENTABLE. NEW CLAIMS 12-19 ARE ADDED AND DETERMINED TO BE PATENTABLE.