EP0722583A1 - Processor for variable-length character strings - Google Patents

Processor for variable-length character strings

Info

Publication number
EP0722583A1
EP0722583A1 EP94928335A EP94928335A EP0722583A1 EP 0722583 A1 EP0722583 A1 EP 0722583A1 EP 94928335 A EP94928335 A EP 94928335A EP 94928335 A EP94928335 A EP 94928335A EP 0722583 A1 EP0722583 A1 EP 0722583A1
Authority
EP
European Patent Office
Prior art keywords
chain
unit
partial
strings
bytes
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.)
Ceased
Application number
EP94928335A
Other languages
German (de)
French (fr)
Inventor
Wilhelm Ernst Haller
Klaus Jörg GETZLAFF
Herbert Chilinski
Ralph KÖSTER
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.)
International Business Machines Corp
Original Assignee
International Business Machines 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
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Publication of EP0722583A1 publication Critical patent/EP0722583A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/02Comparing digital values
    • G06F7/026Magnitude comparison, i.e. determining the relative order of operands based on their numerical value, e.g. window comparator

Definitions

  • the invention relates to a processor for character strings of variable length with a system of memory units for storing character strings, which can be addressed in pairs by program instructions and from which partial strings corresponding to the data flow width are transferred to two operand registers, with an arithmetic / logic unit for executing Processing operations, with a condition code circuit which stores signals derived from the processing results, which are used to control program branches, and with a control unit which successively addresses the partial chains of the character string pairs in the storage unit and, in successive machine cycles, the operation of the units and transfers between the units Controls units.
  • a character string is a data element consisting of a byte sequence with a variable length.
  • the length of a character string can range from one byte to a number of bytes, which is only limited by the size of a storage unit. It can be determined by a length code or by a special character that is contained in the string and indicates the end of the chain. It is normal for string commands that the strings to be processed have different lengths.
  • Common types of processing are the comparison of two character strings and the determination of the first matching or different byte pair, the determination of a chain end character in a character string A and in a character string B, the search for a partial chain within a character string or the shifting of a character string to another storage position.
  • Complex character string instructions have three operands: the address of a first character string A, the address of a second character string B, where A and B have variable lengths, and, as third operands, the address of an end-of-chain byte, which mark the end of the character strings A and B.
  • Executing such a command requires a number of operations.
  • the character string representing the first operand is compared byte-by-byte from left to right with the character string representing the second operand until a non-matching byte pair or a chain end byte is found. Both strings are the same if the end of the byte is found in the same bit position in both strings. If the end of the byte is found in only one of the two strings, this string is the shorter one and is considered the smaller one.
  • the command execution therefore comprises the following phases: search for the end-of-chain byte in the character string A, search for the end-of-chain byte of the character string B, comparison of both character strings for mismatch, subtraction of one character string from the other to determine which character string is the smaller.
  • search for the end-of-chain byte in the character string A search for the end-of-chain byte of the character string B, comparison of both character strings for mismatch, subtraction of one character string from the other to determine which character string is the smaller.
  • Accelerate string commands by operating circuits that allow a number of bytes to be compared in parallel (U.S. Patent No. 4,896,133).
  • the comparison operations can be performed by a bank of EXCLUSIVE-NOR circuits or by the arithmetic and logic unit of the processor in which this arrangement is used.
  • the arrangement is only suitable for the parallel execution of part of the previously explained operating phases.
  • the invention is based on the object of specifying an improved processor for character strings which avoids these disadvantages and which makes greater use of the principle of parallel processing.
  • the features of the invention for solving this problem are characterized in claim 1. Claims 2 to 7 indicate advantageous refinements and developments of the invention.
  • FIG. 1 is a block diagram of a string processor in accordance with the invention.
  • Figure 2 is a table of compliance
  • Figure 4 is a flow diagram of a microprogram as used in the control unit of the processor of Figure 1.
  • the processor of Figure 1 contains a local memory 10, an arithmetic unit 20 and a control unit 40. These units are constructed in a conventional manner and are therefore not shown in detail here.
  • the memory 10 is a fast memory of limited capacity which is arranged on the processor chip and which is connected via a multiplexer 13 to a memory unit 12 which, in a conventional manner, consists of separate semiconductor chips.
  • the storage unit 12 contains a large number of character strings which, for example, form a database in their entirety. Each of these strings consists of a number of bytes, each of which represents a character. However, a different assignment between characters and bytes can also be selected, for example the representation of two characters by one byte. The number of characters belonging to a character string is variable and can be freely selected within wide limits.
  • the only limitation is the capacity of the memory.
  • the length of a character string is determined by an end-of-string character, which is represented by the last byte of the chain and indicates the end of the chain during processing.
  • the processing is carried out by means of character string commands contained in the respective application program, which usually address two character strings of different lengths to be related to one another and control their processing.
  • Typical Forms of processing are the test for equality or inequality, the determination of which character string is the larger or the smaller or in a given order scheme, such as an alphabetical order before the other character strings.
  • the individual bytes of both strings must be checked in pairs to determine which byte position in the order of priority from left to right is the first byte position with different bytes.
  • the string commands have three operands *: the address of a first string A, the address of a second string B and, as the third operand, the address of an end-of-chain byte, at the application programmer's choice, which marks the end of the two strings, which are usually of different lengths.
  • An application program containing the string commands is stored in the memory 12.
  • the microprogram that executes the character string command is located in a control memory (not shown), which is part of the control unit 40.
  • the local memory 10 is successively loaded with a part of the character strings from the memory 12.
  • the output of the memory 10 is connected via bus lines 14, 15 to operand registers 16, 18, each of which is designed to hold a partial chain of four bytes.
  • the registers 16, 18 are loaded under the control of the control unit 40 simultaneously in one machine cycle, starting in each case with the first partial chains of two character strings A and B to be processed, which are addressed by the operand addresses in the respective character string instruction.
  • these partial chains are also called A and B, partial chain A being stored in register 16 and partial chain B in register 18.
  • the arithmetic unit 20 a logic unit 22 and a comparison unit 24 are connected in parallel to one another via bus lines 17 and 19. These units each receive the partial chains A and B stored in the registers simultaneously via the collecting lines 17, 19.
  • the comparison unit 24 has a third input, which is connected to the output of a further register 26, in which the end of chain identifier specified by the character string command as third operands is stored in a preparatory operation from the memory 10 via the register 16 and the bus 17. This takes place before the operand partial chains are fed to the units 20, 22, 24.
  • the comparison unit 24 carries out a parallel multiple comparison. It compares the identifier located in register 26 with all bytes of sub-chain A and with all bytes of sub-chain B. These comparison operations are carried out with the help of EXCLUSIVE-OR circuits, not shown.
  • the comparison unit 24 has two outputs 28, 30, each with four lines.
  • a signal EA (0), EA (1), EA (2) or EA (3) appears in each case on the output lines 28 if one of the four bytes of the partial chain A matches the chain end identifier in the register 26.
  • Each of these signals is assigned to a byte position in sub-chain A and provides an indication that the byte supplied to unit 24 in this position matches the end-of-chain identifier.
  • a signal EB (0), EB (1), EB (2) or EB (3) appears on the output lines 30 if one of the four bytes of the sub-chain B matches the chain end identifier in the register 26.
  • the signal shows the Match for the assigned byte position in sub-chain B.
  • the logical unit 22 optionally carries out different logical operand combinations such as AND, OR, EXCLUSIVE OR.
  • the comparison operation is of interest to determine a mismatch in the supplied operand bytes.
  • the contents of the four byte positions of operand A are compared with the contents of the four corresponding byte positions of operand B. This comparison also takes place in parallel. Since a mismatch is to be determined, the EXCLUSIVE-OR operation is suitable for carrying out the comparison, which delivers an output signal for each pair of operand bits if the two bits are unequal. In relation to an operand byte, this means that the output signal of one bit position is sufficient to indicate a mismatch for the respective operand byte pair.
  • the logic unit 22 supplies four signals MC (0), MC (1), MC (2) and MC (3) on an output 32, each of which is assigned to a byte position of the two operands A and B. If one or more of these signals occur, this indicates that the operand bytes of the assigned position are not the same.
  • the arithmetic unit 20 performs the subtraction BA. This is done by adding the two's complement of the partial chain A to the partial chain B.
  • the partial chain A is fed from the register 16 to the operand A input of the arithmetic unit 20 via a complementing circuit 36.
  • a complementing circuit 38 connected to the operand B input remains ineffective.
  • the arithmetic unit 20 has a carry output line 34 in the highest byte position. This is the output signal of the unit 20 which is of interest in the present context.
  • a carry signal "1" on line 34 indicates that operand A is smaller than operand B and the absence of such a signal indicates that operand A is larger than operand B.
  • the Sub-chains A and B are understood as arithmetic operands. The following examples illustrate the operation of arithmetic unit 52 in generating these signals.
  • Chain B 'binary' 0000 0000 1010 1010 0000 Olli xxxx xxxx Chain A 'binary' 00000000 1010 10100000 0110 xxxx xxxx
  • Chain B 'binary' 0000 0000 1010 1010 0000 Olli xxxx xxxx Chain A 'binary' 1111 1111 0101 0101 1111 1001 xxxx xxxx
  • the top line of the example specifies the byte position of the character strings (partial strings) A and B of the example, which are shown in hexadecimal form in the next two lines and in binary form in the two lines below.
  • the "x" in bit position 3 means that the bytes in this position have no influence on the result and can therefore contain any characters. It can be seen that there is a mismatch (MC) in byte position 2 of both chains and that the value of the Chain A in this position is smaller than the corresponding value in chain B.
  • the binary representation of chain B is repeated in the third to last line, while the penultimate line represents chain A in two's complement form, as it is for operand input A of the arithmetic unit is supplied to carry out an addition.
  • the last line shows the transfers that occur during the addition.
  • the lowest byte position ie byte 3 is carried as part of the two's complement formation. This is done in a known manner by a signal from the control unit 40 on line 48, which also controls the arithmetic unit 20 to carry out a subtraction.
  • a carry is generated in byte position 2, which runs into byte position 1 and from there also into position 0, which in turn generates a carry on line 34. This carry serves as an indication that the chain A is smaller than the chain B.
  • the logic unit 22 has compared chains A and B, which are supplied to it in real, ie not complementary binary division according to lines 4 and 5 of the example above have been.
  • the logic unit 22 provides on its output line 32 an MC (2) signal which indicates that the position 2 bytes are not equal.
  • This indication and the carry on line 34 are independent of the bytes in byte position 3. If this position does not generate a carry in the example above, the result is as shown. This does not change if it is assumed that a carryover occurs in position 3. In this case, the byte of chain B in position 2 is increased by one. However, this does not change the fact that a carry is still generated in this position, which leads to a carry signal on line 34.
  • control unit 40 This unit generates control signals on lines 46 to 51 which lead to the individual units. These signals are generated at predefined cycle times. Access to the memory 10 is via a bus 46 in order to load the registers 16 and 18, each with four bytes of the character strings A and B. A control signal on line 47 causes these bytes to be transmitted to units 20, 22 and 24 and the complement circuit 36 is activated.
  • a subtraction control signal SUB BA occurs on line 48 and a control signal VGL (A, B) on line 49 which activates the logic unit to carry out an EXCLUSIVE-OR operation, and on line 50 a control signal VGL EZ (A, B) which the Transmission of the chain end identifier EZ transmits from the register 26 to the comparison unit and activates this to carry out the multiple comparison explained above.
  • the operations triggered by the control signals on lines 47 through 50 take up one machine cycle.
  • the result of the processing of the sub-chains A and B in the form of the display signals EA (0..3), EB (0..3), MC (0..3) and TRANSL (O) is on the lines 28 , 30, 32 and 34. These signals arrive at a display circuit 60, which is explained with reference to FIGS. 2 and 3.
  • the possible combinations of the signals MC, EA and EB are shown schematically in the left part of the table in FIG. 2 and the selection of the effective signal combinations is shown in the right part.
  • the display logic 60 has a circuit 62 for shortening the effective partial chains, which takes into account a missing or incorrect alignment of the partial chains, as can occur when a physical memory limit is exceeded when accessing the character strings in the memory 12.
  • the display logic 60 also has a circuit 64 for determining priority and a selection circuit 66 controlled by the carry signal on line 34.
  • the circuit 62 for shortening the effective partial chains consists of AND circuits 72, 73, 74, which are selectively conditioned via a bus 70.
  • Each of the four lines in the manifolds 28, 30, 32 from the output of the units 24 and 22 are each connected to one of the AND circuits 72, 73, 74 which output signals corresponding to the signals on these lines to a manifold 76 when on the manifold 70 for all four in these Units of processed bytes
  • Conditioning signal on the cores of the bus that correspond to the byte positions in which no significant byte was processed. These can be, for example, bytes 2 and 3, to which the wires 71 are assigned, so that their AND circuits 72, 73 74 do not emit a signal to the bus 70.
  • the connections on the input side are designated AO to A3, B0 to B3 and MO to M3, connections A0 to A3 being assigned to lines 28, connections B0 to B3 to lines 30 and connections MO to M3 to lines 32 are.
  • the priority logic 64 determines in which byte position an end-of-chain character in sub-chains A or B is displayed and in which byte position a mismatch between these sub-chains is displayed.
  • AND circuits 82 to 85 which inverters 78 to 80 are connected upstream.
  • the AND circuit 82 receives an input signal MO from the bus which indicates a mismatch in byte position 0. This signal is only transmitted to a bus if there are no signals A0, B0, ie if no end-of-chain character is displayed in the same byte position. In this case, the AND circuit 82 is conditioned by output signals from the upstream inverters 78.
  • the AND circuit 83 transmits a mismatch signal M1 to the bus 88 if neither in byte position 0 nor in byte position 1 there is a chain end Character is displayed and no mismatch is displayed in byte position 0.
  • the mismatch signals M2 and M3 are transmitted to the bus 88 through AND circuits, not shown.
  • the signals AO and B0 lead from the bus 76 directly to the bus 88.
  • the AND circuit 84 transmits the signal AI to the bus 88 if neither an end-of-chain character nor a mismatch is indicated for byte positions 0. A corresponding transmission of the signal B1 takes place via the AND circuit 85.
  • the remaining end-of-chain indication signals A2, A3 and B2, B3 are transmitted to bus 88 via AND circuits (not shown) if none of the lower byte positions indicates an end-of-chain character or a mismatch.
  • Signals AO to A3, B0 to B3 and MO to M3 from the bus 88 are combined by OR circuits 89 to form signals EA, EB and MC, which are fed via a further bus 90 to the carry evaluation logic 66, which are also provided with the carry line 34 is connected from the highest byte position of the arithmetic unit 20.
  • the carry evaluation logic 66 has AND circuits 91, 93, 94 and an inverter 92 and indicates on lines 95 and 96 which of the two partial chains A, B is the larger and the smaller, respectively.
  • the AND circuit 91 transmits the signal MC to line 95 when it has been conditioned by a carry signal on line 34.
  • Signal MC is further transmitted via AND circuit 93 to line 96 when there is no carry signal is present and the inverter 92 supplies a conditioning signal to the AND circuit 93.
  • the AND circuit 94 also provides an output signal on line 97 if the signals EA and EB occur together on the bus 90, ie if an end-of-chain character has been found in both the sub-chain A and the sub-chain B.
  • these signals are used to set the same condition codes as the signals on lines 95 and 96, ie that the end of sub-chain A also indicates that it is smaller than sub-chain B and that the end of sub-chain B also indicates that it is smaller than the sub-chain A.
  • the byte position for which a match was found during the last sub-chain processing was displayed on a bus 100 connected to the bus 88. This display, which results directly from the input signals A0 to A3 and B0 to B3 of the bus 88, is temporarily stored in a register (not shown) for use in the execution of subsequent program instructions.
  • FIG. 4 shows, in a simplified representation, the essential steps of the microprogram routine, which becomes active repeatedly in the control circuit 40 when two strings A and B are to be processed.
  • This microprogram routine is stored as part of the microprogram of the processor in a memory of the control unit, not shown.
  • step 101 starting with the start address specified by the string command to be executed, the first eight bytes of the string A are transferred from the storage unit 12 to the local data memory 10. At the same time, the start address is increased by eight.
  • step 102 the same process takes place for the character string B.
  • step 103 the first four of the bytes of the character strings A and B located in the storage unit 103 are each transferred to the registers 16 and 18. This transfer takes place in one machine cycle.
  • step 104 the partial chains of A and B in the registers 16, 18 are processed in parallel in the units 20, 22 and 24 in the manner described. This processing also takes place in just one machine cycle.
  • step 105 loads the second four bytes of character strings A and B from memory 10 as new partial strings of A and B into registers 16, 18.
  • step 106 which corresponds to step 104.
  • step 107 an inquiry is made as to whether an output signal EA, EB or MC has been determined in steps 104 or 106.
  • step 101 This is done by scanning the signal state of lines 97, 98 and 99 (Fig. 3). If there is no output signal EA, EB or MC, the microprogram branches back to step 101, with which the next eight bytes in the memory unit 12 are accessed. On the other hand, if such an output signal has been detected, this means that the processing of the character strings A and B has ended. Usually, this will not already be the case after the first run of the microprogram routine according to FIG. 4, but several such runs will be necessary in order to process longer character strings. Regardless of how many runs are necessary, a YES result in step 107 branches to step 108, which sets the condition codes CC in accordance with the signal state of lines 95 to 99.
  • the following step 109 ends the microprogram and at the same time the execution of the string instruction.
  • the next instruction of the respective application instruction can be a branch instruction which uses the previously set condition codes CC to carry out a program branching to a program section in which the processing result of the executed string processing instruction including the address of the byte position indicating a match indicated on the output bus 100 is further used.

Abstract

A processor for variable-length character strings A, B is used rapidly to determine matches, non-matches and larger/smaller differences. The character strings, the length of which is limited by character string end flags, are broken down into successive part-strings with a number of bytes corresponding to the data flow width and processed to establish a match, a non-match and a string end flag. Each part-string is taken in parallel to an arithmetic unit (20), a logic unit (22) and a comparator unit (24) via operand registers (16, 18) and processed simultaneously. In the arithmetic unit (20) one part-string is subtracted from the other, in the logic unit (22) they are both compared and in the comparator unit (24) the bytes of both part-strings are compared with the content of a flag register (26) previously set to the string end flag. These operations are conducted in one machine cycle. Output signals from the comparator unit are used as indicators of the match between both part-strings, those from the logic unit of the non-match between them and a transmission signal from the arithmetic unit is also used as an indication of which of the two part-strings is larger or smaller.

Description

B e s c h r e i b u n g Description
PROZESSOR FÜR ZEICHENKETTEN VARIABLER LÄNGEVARIABLE LENGTH PROCESSOR
Die Erfindung bezieht sich auf einen Prozessor für Zeichenketten variabler Länge mit einem System von Speichereinheiten zur Speicherung von Zeichenketten, die durch Programmbefehle paarweise adressierbar sind und aus denen der Datenflußbreite entsprechende Teilketten in zwei Operandenregister übertragen werden, mit einer Arithmetik/Logik-Einheit zur Ausführung von Verarbeitungsoperationen, mit einer Bedingungscode- Schaltung, die aus den Verarbeitungsergebnissen abgeleitete Signale speichert, die zur Steuerung von Programmverzweigungen dienen, und mit einer Steuereinheit, die nacheinander die Teilketten der Zeichenkettenpaare in der Speichereinheit adressiert und in aufeinanderfolgenden Maschinenzyklen die Operation der Einheiten und Übertragungen zwischen den Einheiten steuert.The invention relates to a processor for character strings of variable length with a system of memory units for storing character strings, which can be addressed in pairs by program instructions and from which partial strings corresponding to the data flow width are transferred to two operand registers, with an arithmetic / logic unit for executing Processing operations, with a condition code circuit which stores signals derived from the processing results, which are used to control program branches, and with a control unit which successively addresses the partial chains of the character string pairs in the storage unit and, in successive machine cycles, the operation of the units and transfers between the units Controls units.
Computeranwendungen zur Datenbankabfrage, Anwendungen im Bereich der Textverarbeitung und die Unterstützung höherer Programmiersprachen erfordern in hohem Maße die Verarbeitung von Zeichenketten. Allgemein ausgedrückt ist eine Zeichenkette ein Datenelement, das aus einer Bytefolge mit einer variablen Länge besteht. Die Länge einer Zeichenkette kann von einem Byte bis zu einer Anzahl von Bytes reichen, die lediglich durch die Größe einer Speichereinheit begrenzt ist. Sie kann durch einen Längencode bestimmt sein oder durch ein Sonderzeichen, welches in der Zeichenkette enthalten ist und das Ende der Kette anzeigt. Für Zeichenkettenbefehle ist es ein Normalfall, daß die zu verarbeitenden Zeichenketten unterschiedlich lang sind. Häufige Arten der Verarbeitung sind der Vergleich von zwei Zeichenketten und die Ermittlung des ersten übereinstimmenden oder voneinander abweichenden Bytepaares, die Ermittlung eines Kettenendzeichens in einer Zeichenkette A und in einer Zeichenkette B, die Suche einer Teilkette innerhalb einer Zeichenkette oder die Verschiebung einer Zeichenkette auf eine andere Speicherposition.Computer applications for database queries, applications in the field of word processing and the support of higher programming languages require the processing of character strings to a great extent. Generally speaking, a character string is a data element consisting of a byte sequence with a variable length. The length of a character string can range from one byte to a number of bytes, which is only limited by the size of a storage unit. It can be determined by a length code or by a special character that is contained in the string and indicates the end of the chain. It is normal for string commands that the strings to be processed have different lengths. Common types of processing are the comparison of two character strings and the determination of the first matching or different byte pair, the determination of a chain end character in a character string A and in a character string B, the search for a partial chain within a character string or the shifting of a character string to another storage position.
Komplexe Zeichenkettenbefehle haben drei Operanden: die Adresse einer ersten Zeichenkette A, die Adresse einer zweiten Zeichenkette B, wobei A und B variable Länge haben, und als dritten Operanden die Adresse eines Kettenende-Bytes, die das Ende der Zeichenketten A und B markieren. Die Ausführung eines solchen Befehls erfordert eine Reihe von Operationen. Die den ersten Operanden darstellende Zeichenkette wird byteweise von links nach rechts mit der den zweiten Operanden darstellenden Zeichenkette verglichen, bis ein nichtübereinstimmendes Bytepaar oder ein Kettenende- Byte festgestellt wird. Beide Zeichenketten sind gleich, wenn das Kettenende-Byte in beiden Zeichenketten in der gleichen Bitposition gefunden wird. Wird das Kettenende-Byte in nur einer der beiden Zeichenketten festgestellt, ist diese Zeichenkette die kürzere und wird als die kleinere angesehen. Wenn dagegen anstelle eines Kettenende-Bytes ein nichtübereinstimmendes Bytepaar festgestellt wird, sind diese beiden Bytes miteinander zu vergleichen, um zu ermitteln, welcher der beiden Operanden der kleinere ist. Die Befehlsausführung umfaßt daher folgende Phasen: Suche nach dem Kettenende-Byte in der Zeichenkette A, Suche nach dem Kettenende-Byte der Zeichenkette B, Vergleich beider Zeichenketten auf Nichtübereinstimmung, Subtraktion der einen Zeichenkette von der anderen zur Bestimmung, welche Zeichenkette die kleinere ist. Die Ausführung dieser verschiedenen Operationen erfordert einen erheblichen Aufwand an Mikroprogramm-Steuerung und Verarbeitungszeit.Complex character string instructions have three operands: the address of a first character string A, the address of a second character string B, where A and B have variable lengths, and, as third operands, the address of an end-of-chain byte, which mark the end of the character strings A and B. Executing such a command requires a number of operations. The character string representing the first operand is compared byte-by-byte from left to right with the character string representing the second operand until a non-matching byte pair or a chain end byte is found. Both strings are the same if the end of the byte is found in the same bit position in both strings. If the end of the byte is found in only one of the two strings, this string is the shorter one and is considered the smaller one. If, on the other hand, a mismatched byte pair is found instead of a chain end byte, these two bytes must be compared with one another to determine which of the two operands is the smaller one. The command execution therefore comprises the following phases: search for the end-of-chain byte in the character string A, search for the end-of-chain byte of the character string B, comparison of both character strings for mismatch, subtraction of one character string from the other to determine which character string is the smaller. The execution of this Various operations require considerable micro-program control and processing time.
Es ist bekannt, die Ausführung vonIt is known to execute
Zeichenkettenbefehlen dadurch zu beschleunigen, daß Schaltungen vorgehen sind, die einen parallelen Vergleich einer Anzahl von Bytes gestatten (US- PS 4 896 133). Mit einer solchen Anordnung ist es möglich, ein bestimmtes Steuerzeichen in einer Zeichenkette durch eine Vergleichsoperation festzustellen, in dem Kopien dieses Steuerzeichens in allen Bytepositionen eines Operandenregisters eingespeichert werden und gleichzeitig mit acht Bytes der Kette verglichen werden. Wenn eine Übereinstimmung festgestellt wird, erfolgt eine durch Mikroprogramm gesteuerte Verzweigung zum nächsten Programmbefehl. Im anderen Falle wird der Vergleich mit einer weiteren Zeichenkette wiederholt. Die Vergleichsoperationen können durch eine Bank von EXCLUSIV-NOR-Schaltungen oder durch die arithmetische und logische Einheit des Prozessors, in dem diese Anordnung verwendet wird, ausgeführt werden. Die Anordnung ist jedoch nur zur parallelen Ausführung eines Teils der vorausgehend erläuterten Operationsphasen geeignet.Accelerate string commands by operating circuits that allow a number of bytes to be compared in parallel (U.S. Patent No. 4,896,133). With such an arrangement, it is possible to determine a specific control character in a character string by means of a comparison operation in which copies of this control character are stored in all byte positions of an operand register and are simultaneously compared with eight bytes of the chain. If a match is found, a micro-controlled branch to the next program instruction takes place. In the other case, the comparison is repeated with another character string. The comparison operations can be performed by a bank of EXCLUSIVE-NOR circuits or by the arithmetic and logic unit of the processor in which this arrangement is used. However, the arrangement is only suitable for the parallel execution of part of the previously explained operating phases.
Es gehört auch zum Stand der Technik, in einem konventionellen Datenverarbeitungssystem besondere Zeichenkettenbefehle vorzusehen, die durch Mikroprogramm unter Verwendung der vorhandenen Einrichtungen des zentralen Prozessors ausgeführt werden (US-PS 4 556 951). Bei diesen Befehlen wird die Länge der zu verarbeitenden Zeichenketten durch einen in den Befehlen enthaltenen Längenkode angegeben, der die Zahl der Bytes repräsentiert, über die sich die Kette erstreckt. Die Zeichenvergleiche werden durch Operationen der arithmetischen und logischen Einheit des Prozessors ausgeführt. Hierbei werden die in einem solchen System als Teil der Ergebnisse erzeugten Bedingungskodes zur Anzeige der Übereinstimmung bzw. Nichtübereinstimmung von Zeichenketten, Teilketten oder Einzelzeichen verwendet und zur Steuerung der Verzweigungen zu nachfolgenden Programmteilen. Auch diese Anordnung erfordert einen erheblichen Zeitaufwand für die zahlreichen zur Ausführung der eingangs erläuterten Operationsphasen notwendigen Mikroprogrammschritte.It is also known in the art to provide, in a conventional data processing system, special string instructions that are executed by microprogram using the existing central processor facilities (US Pat. No. 4,556,951). With these commands, the length of the character strings to be processed is specified by a length code contained in the commands, which represents the number of bytes over which the chain extends. The character comparisons are made by Arithmetic and logic unit operations of the processor are performed. In this case, the condition codes generated in such a system as part of the results are used to indicate the correspondence or non-correspondence of character strings, partial strings or individual characters and to control the branches to subsequent program parts. This arrangement also requires a considerable amount of time for the numerous micro-program steps necessary to carry out the operation phases explained at the outset.
Die Erfindung liegt die Aufgabe zugrunde, einen verbesserten Prozessor für Zeichenketten anzugeben, der diese Nachteile vermeidet und der in erhöhtem Maße vom Prinzip der Parallelverarbeitung Gebrauch macht. Die Merkmale der Erfindung zur Lösung dieser Aufgabe sind im Patentanspruch 1 gekennzeichnet. Die Ansprüche 2 bis 7 geben vorteilhafte Ausgestaltungen und Weiterbildungen der Erfindung an.The invention is based on the object of specifying an improved processor for character strings which avoids these disadvantages and which makes greater use of the principle of parallel processing. The features of the invention for solving this problem are characterized in claim 1. Claims 2 to 7 indicate advantageous refinements and developments of the invention.
Nachfolgend ist ein bevorzugtes Ausführungsbeispiel der Erfindung anhand von Zeichnungen beschrieben. Es zeigen:A preferred embodiment of the invention is described below with reference to drawings. Show it:
Figur 1 ein Blockdiagram eines Zeichenketten- Prozessors in Übereinstimmung mit der Erfindung,FIG. 1 is a block diagram of a string processor in accordance with the invention.
Figur 2 eine Tabelle der Übereinstimmungs- undFigure 2 is a table of compliance and
Nichtübereinstimmungsbedingungen bei der Verarbeitung von Zeichenketten zur Erläuterung der Arbeitsweise der Anordnung von Figur 1, Figur 3 ein Blockdiagramm der Resultat-Auswertelogik zur Verwendung in der Anordnung von Figur 1, undMismatch conditions in the processing of character strings to explain the mode of operation of the arrangement of FIG. 1, 3 shows a block diagram of the result evaluation logic for use in the arrangement of FIG. 1, and
Figur 4 ein Flußdiagramm eines Mikroprogramms, wie es in der Steuereinheit des Prozessors von Figur 1 Verwendung findet.Figure 4 is a flow diagram of a microprogram as used in the control unit of the processor of Figure 1.
Der Prozessor von Figur 1 enthält einen lokalen Speicher 10, eine arithmetische Einheit 20 und eine Steuereinheit 40. Diese Einheiten sind in herkömmlicher Weise aufgebaut und daher hier nicht näher dargestellt. Der Speicher 10 ist ein schneller Speicher begrenzter Kapazität, der auf dem Prozessor-Chip angeordnet ist und der über einen Multiplexer 13 mit einer Speichereinheit 12 verbunden ist, die in herkömmlicher Weise aus separaten Halbleiterchips besteht. Die Speichereinheit 12 enthält eine große Anzahl von Zeichenketten, die z.B. in ihrer Gesamtheit eine Datenbank bilden. Jede dieser Zeichenketten (strings) besteht aus einer Anzahl Bytes, von denen jedes ein Zeichen (character) darstellt. Es kann aber auch eine andere Zuordnung zwischen Zeichen und Bytes gewählt werden, z.B. die Darstellung von zwei Zeichen durch ein Byte. Die Anzahl der zu einer Zeichenkette gehörenden Zeichen ist variabel und kann in weiten Grenzen frei gewählt werden. Eine Begrenzung stellt lediglich die Kapazität des Speicher dar. Die Länge einer Zeichenkette wird durch ein Kettenendzeichen bestimmt, das durch das letzte Byte der Kette dargestellt wird und während der Verarbeitung das Ende der Kette anzeigt. Die Verarbeitung erfolgt durch im jeweiligen Anwendungsprogramm enthaltene Zeichenkettenbefehle, die üblicherweise zwei miteinander in Beziehung zu setzende unterschiedlich lange Zeichenketten adressieren und deren Verarbeitung steuern. Typische Verarbeitungsformen sind die Prüfung auf Gleichheit oder Ungleichheit, die Bestimmung, welche Zeichenkette die größere oder die kleinere ist bzw. in einem vorgegebenen Ordungsschema, wie z.B. eine alphabetische Ordnung vor der anderen Zeichenketten steht. Hierbei sind die einzelnen Bytes beider Zeichenketten paarweise zu prüfen, um festzustellen, in welcher Byteposition in der Rangordnung von links nach rechts die erste Byteposition mit voneinander abweichenden Bytes ist. Die Zeichenkettenbefehle haben drei Operanden*: die Adresse einer ersten Zeichenkette A, die Adresse einer zweiten Zeichenkette B und als dritten Operanden die Adresse eines Kettenende-Bytes, nach Wahl des Anwendungsprogrammierers das in den beiden in der Regel unterschiedlich langen Zeichenketten deren Ende markiert. Ein die Zeichenkettenbefehle enthaltendes Anwendungsprogramm ist im Speicher 12 gespeichert. Das Mikroprogramm, das den Zeichenkettenbefehl ausführt, befindet sich in einem nicht dargestellten Kontrollspeicher, der Teil der Steuereinheit 40 ist. Der lokale Speicher 10 wird sukzessive mit jeweils einem Teil der Zeichenketten vom Speicher 12 geladen.The processor of Figure 1 contains a local memory 10, an arithmetic unit 20 and a control unit 40. These units are constructed in a conventional manner and are therefore not shown in detail here. The memory 10 is a fast memory of limited capacity which is arranged on the processor chip and which is connected via a multiplexer 13 to a memory unit 12 which, in a conventional manner, consists of separate semiconductor chips. The storage unit 12 contains a large number of character strings which, for example, form a database in their entirety. Each of these strings consists of a number of bytes, each of which represents a character. However, a different assignment between characters and bytes can also be selected, for example the representation of two characters by one byte. The number of characters belonging to a character string is variable and can be freely selected within wide limits. The only limitation is the capacity of the memory. The length of a character string is determined by an end-of-string character, which is represented by the last byte of the chain and indicates the end of the chain during processing. The processing is carried out by means of character string commands contained in the respective application program, which usually address two character strings of different lengths to be related to one another and control their processing. Typical Forms of processing are the test for equality or inequality, the determination of which character string is the larger or the smaller or in a given order scheme, such as an alphabetical order before the other character strings. The individual bytes of both strings must be checked in pairs to determine which byte position in the order of priority from left to right is the first byte position with different bytes. The string commands have three operands *: the address of a first string A, the address of a second string B and, as the third operand, the address of an end-of-chain byte, at the application programmer's choice, which marks the end of the two strings, which are usually of different lengths. An application program containing the string commands is stored in the memory 12. The microprogram that executes the character string command is located in a control memory (not shown), which is part of the control unit 40. The local memory 10 is successively loaded with a part of the character strings from the memory 12.
Der Ausgang des Speichers 10 ist über Sammelleitungen 14, 15 mit Operandenregistern 16, 18 verbunden, von denen jedes zur Aufnahme einer Teilkette von vier Bytes ausgebildet ist. Die Register 16, 18 werden unter der Steuerung der Steuereinheit 40 gleichzeitig in einem Maschinenzyklus geladen, beginnend jeweils mit den ersten Teilketten von zwei zu verarbeitenden Zeichenketten A und B, die durch die Operandenadressen im jeweiligen Zeichenkettenbefehl adressiert werden. In der nachfolgenden Beschreibung werden diese Teilketten ebenfalls A und B genannt, wobei die Teilkette A im Register 16 und die Teilkette B im Register 18 gespeichert wird. An die Ausgänge dieser Operandenregister 16, 18 sind über Sammelleitungen 17 und 19 die arithmetische Einheit 20, eine logische Einheit 22 und eine Vergleichseinheit 24 parallel zueinander angeschlossen. Diese Einheiten erhalten über die Sammelleitungen 17, 19 jeweils die in den Registern gespeicherten Teilketten A und B gleichzeitig zugeführt.The output of the memory 10 is connected via bus lines 14, 15 to operand registers 16, 18, each of which is designed to hold a partial chain of four bytes. The registers 16, 18 are loaded under the control of the control unit 40 simultaneously in one machine cycle, starting in each case with the first partial chains of two character strings A and B to be processed, which are addressed by the operand addresses in the respective character string instruction. In the following description, these partial chains are also called A and B, partial chain A being stored in register 16 and partial chain B in register 18. To the outputs of this Operand registers 16, 18, the arithmetic unit 20, a logic unit 22 and a comparison unit 24 are connected in parallel to one another via bus lines 17 and 19. These units each receive the partial chains A and B stored in the registers simultaneously via the collecting lines 17, 19.
Die Vergleichseinheit 24 weist einen dritten Eingang auf, der mit dem Ausgang eines weiteren Registers 26 verbunden, in das in einer vorbereitenden Operation vom Speicher 10 über das Register 16 und die Sammelleitung 17 das durch den Zeichenkettenbefehl als dritten Operanden angegebene Kettenende-Kennzeichen eingespeichert wird. Dies geschieht vor der Zuführung der Operanden-Teilketten zu den Einheiten 20, 22, 24. Die Vergleichseinheit 24 führt einen parallelen Mehrfachvergleich durch. Sie vergleicht das im Register 26 befindliche Kennzeichen zugleich mit allen Bytes der Teilkette A und mit allen Bytes der Teilkette B. Diese Vergleichsoperationen erfolgen mit Hilfe von nicht dargestellten EXCLUSIV-ODER-Schaltungen. Die Vergleichseinheit 24 weist zwei Ausgänge 28, 30 mit je vier Leitungen auf. Auf den Ausgangsleitungen 28 erscheint jeweils ein Signal EA(0), EA(1), EA(2) oder EA(3), wenn eines der vier Bytes der Teilkette A mit dem Kettenende-Kennzeichen im Register 26 übereinstimmt. Jedes dieser Signale ist einer Byteposition in der Teilkette A zugeordnet und liefert eine Anzeige, daß das in dieser Position der Einheit 24 zugeführte Byte mit dem Kettenende-Kennzeichen übereinstimmt. Ebenso erscheint auf den Ausgangsleitungen 30 jeweils ein Signal EB(0), EB(1), EB(2) oder EB(3), wenn eines der vier Bytes der Teilkette B mit dem Kettenende-Kennzeichen im Register 26 übereinstimmt. Auch hier zeigt das Signal die Übereinstimmung für die zugeordnete Byteposition in der Teilkette B an.The comparison unit 24 has a third input, which is connected to the output of a further register 26, in which the end of chain identifier specified by the character string command as third operands is stored in a preparatory operation from the memory 10 via the register 16 and the bus 17. This takes place before the operand partial chains are fed to the units 20, 22, 24. The comparison unit 24 carries out a parallel multiple comparison. It compares the identifier located in register 26 with all bytes of sub-chain A and with all bytes of sub-chain B. These comparison operations are carried out with the help of EXCLUSIVE-OR circuits, not shown. The comparison unit 24 has two outputs 28, 30, each with four lines. A signal EA (0), EA (1), EA (2) or EA (3) appears in each case on the output lines 28 if one of the four bytes of the partial chain A matches the chain end identifier in the register 26. Each of these signals is assigned to a byte position in sub-chain A and provides an indication that the byte supplied to unit 24 in this position matches the end-of-chain identifier. Likewise, a signal EB (0), EB (1), EB (2) or EB (3) appears on the output lines 30 if one of the four bytes of the sub-chain B matches the chain end identifier in the register 26. Here too the signal shows the Match for the assigned byte position in sub-chain B.
Die logische Einheit 22 führt wahlweise unterschiedliche logische Operandenverknüpfungen wie AND, ODER, EXCLUSIV ODER durch. Hier interessiert nur die Vergleichsoperation zur Feststellung einer fehlenden Übereinstimmung der zugeführten Operandenbytes. Verglichen werden der Inhalt der vier Bytepositionen des Operanden A mit dem Inhalt der vier entsprechenden Bytepositionen des Operanden B. Auch dieser Vergleich geschieht parallel. Da Nichtübereinstimmung festgestellt werden soll, eignet sich zur Ausführung des Vergleichs die EXCLUSIV-ODER- Operation, die für jedes Operandenbitpaar ein Ausgangssignal liefert, wenn die beiden Bits ungleich sind. Bezogen auf ein Operandenbyte bedeutet dies, daß das Ausgangssignal einer Bitposition genügt, um eine Nichtübereinstimmung für das betreffende Operndenbytepaar anzuzeigen. Die logische Einheit 22 liefert auf einem Ausgang 32 vier Signale MC(0), MC(1), MC(2) und MC(3), von denen jedes einer Byteposition zugeordnet der beiden Operanden A und B zugeordnet ist. Wenn eines oder mehrere dieser Signale auftreten, wird damit angezeigt, daß die Operandenbytes der zugeordneten Position ungleich sind.The logical unit 22 optionally carries out different logical operand combinations such as AND, OR, EXCLUSIVE OR. Here only the comparison operation is of interest to determine a mismatch in the supplied operand bytes. The contents of the four byte positions of operand A are compared with the contents of the four corresponding byte positions of operand B. This comparison also takes place in parallel. Since a mismatch is to be determined, the EXCLUSIVE-OR operation is suitable for carrying out the comparison, which delivers an output signal for each pair of operand bits if the two bits are unequal. In relation to an operand byte, this means that the output signal of one bit position is sufficient to indicate a mismatch for the respective operand byte pair. The logic unit 22 supplies four signals MC (0), MC (1), MC (2) and MC (3) on an output 32, each of which is assigned to a byte position of the two operands A and B. If one or more of these signals occur, this indicates that the operand bytes of the assigned position are not the same.
Die arithmetische Einheit 20 führt die Subtraktion B - A durch. Dies geschieht durch Addition des Zweierkomplements der Teilkette A zur Teilkette B. Hierzu wird die Teilkette A aus dem Register 16 über eine Komplementierschaltung 36 dem Operand-A-Eingang der arithmetischen Einheit 20 zugeführt. Eine mit dem Operand-B-Eingang verbundene Komplementierschal¬ tung 38 bleibt dabei unwirksam. Die arithmetische Einheit 20 weist ein Übertragsausgangsleitung 34 in der höchsten Byteposition auf. Dies ist das Ausgangssignal der Einheit 20, das im vorliegenden Zusammenhang interessiert. Ein Übertragssignal "1" auf Leitung 34 zeigt an, daß der Operand A kleiner ist als der Operand B und das Fehlen eines solchen Signals zeigt an, daß der Operand A größer ist als der Operand B. Für die Operation der arithmetischen Einheit 20 werden die Teilketten A und B als arithmetische Operanden verstanden. Die folgende Beispiele erläutern die Operation der arithmetischen Einheit 52 bei der Erzeugung dieser Signale.The arithmetic unit 20 performs the subtraction BA. This is done by adding the two's complement of the partial chain A to the partial chain B. For this purpose, the partial chain A is fed from the register 16 to the operand A input of the arithmetic unit 20 via a complementing circuit 36. A complementing circuit 38 connected to the operand B input remains ineffective. The arithmetic unit 20 has a carry output line 34 in the highest byte position. This is the output signal of the unit 20 which is of interest in the present context. A carry signal "1" on line 34 indicates that operand A is smaller than operand B and the absence of such a signal indicates that operand A is larger than operand B. For the operation of arithmetic unit 20, the Sub-chains A and B are understood as arithmetic operands. The following examples illustrate the operation of arithmetic unit 52 in generating these signals.
Bytebyte
Kette B 'hex' 00 AA 07 XXChain B 'hex' 00 AA 07 XX
Kette A 'hex' 00 AA 06 XXChain A 'hex' 00 AA 06 XX
Kette B 'binär' 0000 0000 1010 1010 0000 Olli xxxx xxxx Kette A 'binär' 00000000 1010 10100000 0110 xxxx xxxxChain B 'binary' 0000 0000 1010 1010 0000 Olli xxxx xxxx Chain A 'binary' 00000000 1010 10100000 0110 xxxx xxxx
NU Byte 2NU byte 2
Kette B 'binär' 0000 0000 1010 1010 0000 Olli xxxx xxxx Kette A 'binär' 1111 1111 0101 0101 1111 1001 xxxx xxxxChain B 'binary' 0000 0000 1010 1010 0000 Olli xxxx xxxx Chain A 'binary' 1111 1111 0101 0101 1111 1001 xxxx xxxx
Überträge 1 1 1 1Carryovers 1 1 1 1
Ü(0) Ü in Ü in 2erÜ (0) Ü in Ü in 2er
Byte(θ) Byte(θ) Kompl.Byte (θ) Byte (θ) Compl.
Die oberste Zeile des Beispiels gibt die Byteposition der der Zeichenketten (Teilketten) A und B des Beispiels an, die in den nächsten beiden Zeilen in hexadezimaler Darstellung und in den beiden Zeilen darunter in binärer Darstellung wiedergegeben sind. Die "x" in der Bitposition 3 bedeutet, daß die Bytes in dieser Position keinen Einfluß auf das Ergebnis haben und daher dort beliebige Zeichen stehen können. Es ist ersichtlich, daß in Byteposition 2 beider Ketten eine Nichtübereinstimmung (MC) vorliegt und daß der Wert der Kette A in dieser Position kleiner ist als der entsprechende Wert in Kette B. Die Binärdarstellung der Kette B ist in der drittletzten Zeile wiederholt, während die vorletzte Zeile die Kette A in Zweierkomplement-Darstellung wiedergeben ist, so wie sie dem Operandeneingang A der arithmetischen Einheit zur Ausführung einer Addition zugeführt wird. Die letzte Zeile zeigt die Übertrage, die während der Addition auftreten. Zunächst wird der niedrigsten Byteposition, d.h. dem Byte 3 ein Übertrag als Teil der Zweierkomplementbildung zugeführt. Dies geschieht in bekannter Weise durch ein Signal von der Steuereinheit 40 auf Leitung 48, das auch die arithmetische Einheit 20 zur Ausführung einer Subtraktion steuert. In der Byteposition 2 wird ein Übertrag erzeugt, die in die Byteposition 1 läuft und von dort auch in die Position 0, die ihrerseits einen Übertrag auf Leitung 34 erzeugt. Dieser Übertrag dient als Anzeige dafür, daß die Kette A kleiner ist als die Kette B. Zur gleichen Zeit hat die logische Einheit 22 Ketten A und B verglichen, die ihr in echter, d.h. nicht komplementierter Binärdasteilung gemäß Zeilen 4 und 5 des obigen Beispiels zugeführt worden sind. Als Ergebnis dieses Vergleichs liefert die logische Einheit 22 auf ihrer Ausgangsleitung 32 ein MC(2) Signal, das anzeigt, daß die Bytes der Position 2 ungleich sind. Diese Anzeige und der Übertrag auf Leitung 34 sind unabhängig von den in der Byteposition 3 befindlichen Bytes. Wenn diese Position im obigen Beispiel keinen Übertrag erzeugt, dann ist das Ergebnis wie dargestellt. Daran ändert sich nichts, wenn angenommen wird, daß in Position 3 ein Übertrag auftritt. In diesem Fall wird zwar das Byte der Kette B in Position 2 um eins erhöht. Dies ändert jedoch nichts daran, daß in dieser Position dennoch ein Übertrag erzeugt wird, der zu einem Übertragssignal auf Leitung 34 führt. Auch wenn die Bytes in Position 3 ungleich sind und in der logischen Einheit 22 ein Ausgangssignal MC(3) zur Folge haben, das neben dem erläuterten Signal MC(2) auftritt, hat dies keinen Einfluß, da es nur auf das Nichtübereinstimmungssignal von der Byteposition ankommt, die dem Kettenanfang am nächsten liegt. Es ist daher ersichtlich, daß die Bytes, die sich rechts von der eine Nichtübereinstimmung ergebenden Position befinden, keinen Einfluß auf das Ergebnis der Operation der Einheiten 20 und 22 haben. Es bleibt nachzutragen, daß die regulären Ergebnisse, die an den Ausgängen der Einheiten 20 und 22 auftreten, d.h. die algebraische Differenz A - B und die EXCLUSIV-ODER-Verknüpfung der Ketten A und B für die Anordnung gemäß der Erfindung nicht von Bedeutung sind. Bei den regulären Operationen der beiden Einheiten 20 und 22 werden diese Ergebnisse über einen Multiplexer 39, eine Sammelleitung 42 und den Multiplexer 13 zum lokalen Speicher übertragen und dort gespeichert.The top line of the example specifies the byte position of the character strings (partial strings) A and B of the example, which are shown in hexadecimal form in the next two lines and in binary form in the two lines below. The "x" in bit position 3 means that the bytes in this position have no influence on the result and can therefore contain any characters. It can be seen that there is a mismatch (MC) in byte position 2 of both chains and that the value of the Chain A in this position is smaller than the corresponding value in chain B. The binary representation of chain B is repeated in the third to last line, while the penultimate line represents chain A in two's complement form, as it is for operand input A of the arithmetic unit is supplied to carry out an addition. The last line shows the transfers that occur during the addition. First, the lowest byte position, ie byte 3, is carried as part of the two's complement formation. This is done in a known manner by a signal from the control unit 40 on line 48, which also controls the arithmetic unit 20 to carry out a subtraction. A carry is generated in byte position 2, which runs into byte position 1 and from there also into position 0, which in turn generates a carry on line 34. This carry serves as an indication that the chain A is smaller than the chain B. At the same time, the logic unit 22 has compared chains A and B, which are supplied to it in real, ie not complementary binary division according to lines 4 and 5 of the example above have been. As a result of this comparison, the logic unit 22 provides on its output line 32 an MC (2) signal which indicates that the position 2 bytes are not equal. This indication and the carry on line 34 are independent of the bytes in byte position 3. If this position does not generate a carry in the example above, the result is as shown. This does not change if it is assumed that a carryover occurs in position 3. In this case, the byte of chain B in position 2 is increased by one. However, this does not change the fact that a carry is still generated in this position, which leads to a carry signal on line 34. Also if the bytes in position 3 are unequal and result in the logic unit 22 an output signal MC (3), which occurs in addition to the explained signal MC (2), this has no effect, since it only depends on the mismatch signal from the byte position that is closest to the beginning of the chain. It can therefore be seen that the bytes to the right of the mismatched position have no effect on the result of the operation of units 20 and 22. It must be added that the regular results that occur at the outputs of units 20 and 22, ie the algebraic difference A - B and the EXCLUSIVE-OR combination of chains A and B, are not important for the arrangement according to the invention. In the regular operations of the two units 20 and 22, these results are transmitted to a local memory via a multiplexer 39, a bus 42 and the multiplexer 13 and stored there.
Die Operationen der Anordnung gemäß Figur 1 werden von der Steuereinheit 40 gesteuert. Diese Einheit erzeugt Steuersignale auf Leitungen 46 bis 51, die zu den einzelnen Einheiten führen. Diese Signale werden zu vorgegebenen Taktzeiten erzeugt. Über eine Sammelleitung 46 erfolgt ein Zugriff zum Speicher 10, um die Register 16 und 18 mit je vier Bytes der Zeichenketten A und B zu laden. Ein Steuersignale auf der Leitungen 47 veranlaßt eine Übertragung dieser Bytes zu den Einheiten 20, 22 und 24 sowie ein Aktivierung der Komplementierschaltung 36. Gleichzeitig tritt auf der Leitung 48 ein Subtraktionssteuersignal SUB B-A auf sowie auf der Leitung 49 ein Steuersignal VGL(A,B), das die logische Einheit zur Ausführung einer EXCLUSIV-ODER-Operation aktiviert, sowie auf der Leitung 50 ein Steuersignal VGL EZ(A,B), das die Übertragung des Kettenende-Kennzeichens EZ vom Register 26 zur Vergleichseinheit überträgt und diese zur Ausführung des oben erläuterten Mehrfachvergleichs aktiviert. Die von den Steuersignalen auf den Leitungen 47 bis 50 ausgelösten Operationen nehmen einen Maschinenzyklus in Anspruch. Am Ende dieses Zyklus liegt das Ergebnis der Verarbeitung der Teilketten A und B in Form der Anzeigesignale EA(0..3), EB(0..3), MC(0..3) und ÜBERTR(O) auf den Leitungen 28, 30, 32 und 34 vor. Diese Signale gelangen zu einer Anzeigeschaltung 60, die anhand der Figuren 2 und 3 erläutert wird.The operations of the arrangement according to FIG. 1 are controlled by the control unit 40. This unit generates control signals on lines 46 to 51 which lead to the individual units. These signals are generated at predefined cycle times. Access to the memory 10 is via a bus 46 in order to load the registers 16 and 18, each with four bytes of the character strings A and B. A control signal on line 47 causes these bytes to be transmitted to units 20, 22 and 24 and the complement circuit 36 is activated. At the same time, a subtraction control signal SUB BA occurs on line 48 and a control signal VGL (A, B) on line 49 which activates the logic unit to carry out an EXCLUSIVE-OR operation, and on line 50 a control signal VGL EZ (A, B) which the Transmission of the chain end identifier EZ transmits from the register 26 to the comparison unit and activates this to carry out the multiple comparison explained above. The operations triggered by the control signals on lines 47 through 50 take up one machine cycle. At the end of this cycle, the result of the processing of the sub-chains A and B in the form of the display signals EA (0..3), EB (0..3), MC (0..3) and TRANSL (O) is on the lines 28 , 30, 32 and 34. These signals arrive at a display circuit 60, which is explained with reference to FIGS. 2 and 3.
Im linken Teil der Tabelle von Figur 2 sind die möglichen Kombinationen der Signale MC, EA und EB schematisch dargestellt und im rechten Teil die Auswahl der wirksamen Signalkombinatio-nen. Die Anzeigelogik 60 weist eine Schaltung 62 zur Verkürzung der wirksamen Teilketten auf, die eine fehlende oder falsche Ausrichtung der Teilketten berücksichtigt, wie sie bei Überschreitung einer physikalischen Speichergrenze beim Zugriff auf die Zeichenketten im Speicher 12 auftreten kann. Die Anzeigelogik 60 weist des weiteren eine Schaltung 64 zur Prioritätsbestimmung sowie eine durch das Übertragssignal auf Leitung 34 gesteuerte Auswahlschaltung 66 auf.The possible combinations of the signals MC, EA and EB are shown schematically in the left part of the table in FIG. 2 and the selection of the effective signal combinations is shown in the right part. The display logic 60 has a circuit 62 for shortening the effective partial chains, which takes into account a missing or incorrect alignment of the partial chains, as can occur when a physical memory limit is exceeded when accessing the character strings in the memory 12. The display logic 60 also has a circuit 64 for determining priority and a selection circuit 66 controlled by the carry signal on line 34.
Die Schaltung 62 zur Verkürzung der wirksamen Teilketten besteht aus UND-Schaltungen 72, 73, 74, die über eine Sammelleitung 70 selektiv konditioniert werden. Jede der vier Leitungen in den Sammelleitungen 28, 30, 32 vom Ausgang der Einheiten 24 und 22 sind an je eine der UND-Schaltungen 72, 73, 74 angeschlossen, die den Signalen auf diesen Leitungen entsprechende Ausgangssignale an eine Sammelleitung 76 abgeben, wenn auf der Sammelleitung 70 für alle vier in diesen Einheiten verarbeiteten Bytes einThe circuit 62 for shortening the effective partial chains consists of AND circuits 72, 73, 74, which are selectively conditioned via a bus 70. Each of the four lines in the manifolds 28, 30, 32 from the output of the units 24 and 22 are each connected to one of the AND circuits 72, 73, 74 which output signals corresponding to the signals on these lines to a manifold 76 when on the manifold 70 for all four in these Units of processed bytes
Konditionierungssignal erscheint. Wenn dagegen ein Speicherzugriff nur eine unvollständige Teilkette A,B in die Register 16,18 geladen hat, weil der Adressierte Speicherbereich eine Speichergrenze überschreitet, unterdrückt die Steuereinheit 40 einConditioning signal appears. If, on the other hand, a memory access has loaded only an incomplete partial chain A, B into the registers 16, 18 because the addressed memory area exceeds a memory limit, the control unit 40 suppresses
Konditionierungssignal auf den Adern der Sammelleitung, die den Bytepositionen entsprechen, in denen kein signifikantes Byte verarbeitet wurde. Dies können beispielsweise die Bytes 2 und 3 sein, denen die Adern 71 zugeordnet sind, so daß deren UND-Schaltungen 72, 73 74 kein Signal an die Sammelleitung 70 abgeben. An der Sammelleitung 70 sind die eingangsseitigen Anschlüsse mit AO bis A3, B0 bis B3 und MO bis M3 bezeichnet, wobei die Anschlüsse A0 bis A3 den Leitungen 28, die Anschlüsse B0 bis B3 den Leitungen 30 und die Anschlüsse MO bis M3 den Leitungen 32 zugeordnet sind. In der Prioritätslogik 64 wird ermittelt, in welcher Byteposition ein Kettenende-Zeichen in den Teilketten A oder B angezeigt wird und in welcher Byteposition eine Nichtübereinstimmung zwischen diesen Teilketten angezeigt wird. Dies geschieht durch UND-Schaltungen 82 bis 85, denen Inverter 78 bis 80 vorgeschaltet sind. Hierbei wurde aus Gründen der Darstellung ein Teil der UND-Schaltungen und Inverter weggelassen. Die UND- Schaltung 82 erhält von der Sammelleitung ein Eingangssignal MO, das eine Nichtübereinstimmung in Byteposition 0 anzeigt. Dieses Signal wird nur dann zu einer Sammelleitung übertragen, wenn keine Signale A0, B0 vorliegen, d.h. wenn in der gleichen Byteposition kein Kettenende-Zeichen angezeigt wird. In diesem Fall wird die UND-Schaltung 82 durch Ausgangssignale der ihr vorgeschalteten Inverter 78 konditioniert. Ebenso überträgt die UND-Schaltung 83 ein Nichtüberein¬ stimmungssignal Ml zur Sammelleitung 88, wenn weder in Byteposition 0 noch in Byteposition 1 ein Kettenende- Zeichen angezeigt wird und in Byteposition 0 keine Nichtübereinstimmung angezeigt wird. In der gleichen Weise werden die Nichtübereinstimmungssignale M2 und M3 durch nicht dargestellte UND-Schaltungen zur Sammelleitung 88 übertragen. Die Signale AO und B0 führen von der Sammelleitung 76 direkt zur Sammelleitung 88. Die UND-Schaltung 84 überträgt das Signal AI zur Sammelleitung 88, wenn für Bytepositionen 0 weder ein Kettenende-Zeichen noch eine Nichtübereinstimmung angezeigt wird. Eine entsprechende Übertragung des Signals Bl findet über die UND- Schaltung 85 statt. Ebenso werden die übrigen Kettenende-Anzeigesignale A2, A3 und B2, B3 über nichtdargestellte UND-Schaltungen zur Sammelleitung 88 übertragen, wenn jeweils keine der niedrigeren Bytepositionen ein Kettenende-Zeichen oder eine Nichtübereinstimmung anzeigt. Durch ODER-Schaltungen 89 werden jeweils die Signale AO bis A3, B0 bis B3 und MO bis M3 von der Sammelleitung 88 zu Signalen EA, EB und MC kombiniert, die über eine weitere Sammelleitung 90 der Übertrags-Auswertelogik 66 zugeführt werden, welche auch mit der Übertragsleitung 34 von der höchsten Byteposition der arithmetischen Einheit 20 verbunden ist. Die Übertrags-Auswertelogik 66 weist UND- Schaltungen 91, 93, 94 und einen Inverter 92 auf und zeigt jeweils auf Leitungen 95 und 96 an, welche der beiden Teilketten A, B die größere bzw. die kleinere ist. Hierzu Überträgt die UND-Schaltung 91 das Signal MC zur Leitung 95, wenn sie durch ein Übertragsignal auf Leitung 34 konditioniert worden ist. Das Ausgangssignal auf Leitung 95 zeigt an, daß die Teilkette A kleiner ist als die Teilkette B und dient zur Einstellung des Bedingungscodes CC=01 in einer nicht dargestellten Verriegelungsschaltung. Das Signal MC wird des weiteren über die UND-Schaltung 93 zur Leitung 96 übertragen, wenn kein Übertragssignal vorliegt und der Inverter 92 ein Konditionierungssignal an die UND-Schaltung 93 liefert. Das Ausgangssignal auf Leitung 96 zeigt an, daß die Teilkette B kleiner ist als die Teilkette A und dient zur Einstellung des Bedingungscodes CC=10. Die UND-Schaltung 94 liefert zudem ein Ausgangssignal auf Leitung 97, wenn auf der Sammelleitung 90 die Signale EA und EB gemeinsam auftreten, d.h. wenn ein Kettenende-Zeichen sowohl in der Teilkette A als auch in der Teilkette B festgestellt wurde. Das Signal auf Leitung 97 dient zur Einstellung des Bedingungscodes CC=00 zur Anzeige dafür, daß beide Teilketten gleich sind. Von der Sammelleitung 90 werden des weiteren die Signale EA und EB den Leitungen 98 und 99 zugeführt zur Einstellung der Bedingungscodes CC=01 und CC=10. Beide Signale zeigen Kettenende in der Teilkette A bzw. B an. Es ist ersichtlich, daß diese Signale zur Einstellung der gleichen Bedingungscodes wie die Signale auf den Leitungen 95 und 96 dienen, d.h. daß das Ende der Teilkette A zugleich anzeigt, daß diese kleiner ist als die Teilkette B und daß das Ende der Teilkette B zugleich anzeigt, daß diese kleiner ist als die Teilkette A. Zur gleichen Zeit wird auf einer mit der Sammelleitung 88 verbundenen Sammelleitung 100 die Byteposition angezeigt, für die während der letzten Teilketten-Verarbeitung eine Übereinstimmung festgestellt wurde. Diese Anzeige, die sich unmittelbar aus den Eingangssignalen A0 bis A3 und B0 bis B3 der Sammelleitung 88 ergibt, wird in einem nicht dargestellten Register zur Verwendung bei der Ausführung nachfolgender Programmbefehle zwischengespeichert.Conditioning signal on the cores of the bus that correspond to the byte positions in which no significant byte was processed. These can be, for example, bytes 2 and 3, to which the wires 71 are assigned, so that their AND circuits 72, 73 74 do not emit a signal to the bus 70. On the collecting line 70, the connections on the input side are designated AO to A3, B0 to B3 and MO to M3, connections A0 to A3 being assigned to lines 28, connections B0 to B3 to lines 30 and connections MO to M3 to lines 32 are. The priority logic 64 determines in which byte position an end-of-chain character in sub-chains A or B is displayed and in which byte position a mismatch between these sub-chains is displayed. This is done by AND circuits 82 to 85, which inverters 78 to 80 are connected upstream. For the sake of illustration, part of the AND circuits and inverters have been omitted here. The AND circuit 82 receives an input signal MO from the bus which indicates a mismatch in byte position 0. This signal is only transmitted to a bus if there are no signals A0, B0, ie if no end-of-chain character is displayed in the same byte position. In this case, the AND circuit 82 is conditioned by output signals from the upstream inverters 78. Likewise, the AND circuit 83 transmits a mismatch signal M1 to the bus 88 if neither in byte position 0 nor in byte position 1 there is a chain end Character is displayed and no mismatch is displayed in byte position 0. In the same way, the mismatch signals M2 and M3 are transmitted to the bus 88 through AND circuits, not shown. The signals AO and B0 lead from the bus 76 directly to the bus 88. The AND circuit 84 transmits the signal AI to the bus 88 if neither an end-of-chain character nor a mismatch is indicated for byte positions 0. A corresponding transmission of the signal B1 takes place via the AND circuit 85. Likewise, the remaining end-of-chain indication signals A2, A3 and B2, B3 are transmitted to bus 88 via AND circuits (not shown) if none of the lower byte positions indicates an end-of-chain character or a mismatch. Signals AO to A3, B0 to B3 and MO to M3 from the bus 88 are combined by OR circuits 89 to form signals EA, EB and MC, which are fed via a further bus 90 to the carry evaluation logic 66, which are also provided with the carry line 34 is connected from the highest byte position of the arithmetic unit 20. The carry evaluation logic 66 has AND circuits 91, 93, 94 and an inverter 92 and indicates on lines 95 and 96 which of the two partial chains A, B is the larger and the smaller, respectively. To this end, the AND circuit 91 transmits the signal MC to line 95 when it has been conditioned by a carry signal on line 34. The output signal on line 95 indicates that the sub-chain A is smaller than the sub-chain B and is used to set the condition code CC = 01 in a locking circuit, not shown. Signal MC is further transmitted via AND circuit 93 to line 96 when there is no carry signal is present and the inverter 92 supplies a conditioning signal to the AND circuit 93. The output signal on line 96 indicates that the sub-chain B is smaller than the sub-chain A and is used to set the condition code CC = 10. The AND circuit 94 also provides an output signal on line 97 if the signals EA and EB occur together on the bus 90, ie if an end-of-chain character has been found in both the sub-chain A and the sub-chain B. The signal on line 97 is used to set the condition code CC = 00 to indicate that both sub-chains are the same. The signals EA and EB are also fed from the bus 90 to the lines 98 and 99 for setting the condition codes CC = 01 and CC = 10. Both signals indicate the chain end in the partial chain A or B. It can be seen that these signals are used to set the same condition codes as the signals on lines 95 and 96, ie that the end of sub-chain A also indicates that it is smaller than sub-chain B and that the end of sub-chain B also indicates that it is smaller than the sub-chain A. At the same time, the byte position for which a match was found during the last sub-chain processing was displayed on a bus 100 connected to the bus 88. This display, which results directly from the input signals A0 to A3 and B0 to B3 of the bus 88, is temporarily stored in a register (not shown) for use in the execution of subsequent program instructions.
Die Figur 4 zeigt in vereinfachter Darstellung die die wesentlichen Schritte der Mikroprogramm-Routine, die in der Steuerschaltung 40 wiederholt wirksam wird, wenn zwei Zeichenketten A und B zu verarbeiten sind. Diese Mikroprogramm-Routine ist als Teil des Mikroprogramms des Prozessors in einem nicht dargestellten Speicher der Steuereinheit gespeichert. Im Schritte 101 werden, beginnend mit der Startadresse, die vom jeweils auszuführenden Zeichenkettenbefehl angegeben wird, die ersten acht Bytes der Zeichenkette A aus der Speichereinheit 12 in den lokalen Datenspeicher 10 übertragen. Zugleich wird die Startadresse um acht erhöht. Im Schritt 102 erfolgt der gleiche Vorgang für die Zeichenkette B. Im Schritt 103 werden von den in der Speichereinheit 103 befindlichen Bytes der Zeichenketten A und B jeweils die ersten vier in die Register 16 und 18 übertragen. Diese Übertragung erfolgt in einem Maschinenzyklus. Daraufhin werden im Schritt 104 die in den Registern 16, 18 stehenden Teilketten von A und B in den Einheiten 20, 22 und 24 in der beschriebenen Weise parallel verarbeitet. Auch diese Verarbeitung erfolgt in nur einem Maschinenzyklus. Der Schritt 105 lädt die zweiten vier Bytes der Zeichenketten A und B aus dem Speicher 10 als neue Teilketten von A und B in die Register 16, 18. Hiernach erfolgt ein erneuter Verarbeitungsschritt 106, der dem Schritt 104 entspricht. In einem Verzweigungsschritt 107 wird abgefragt, ob in den Schritten 104 oder 106 ein Ausgangssignal EA, EB oder MC festgestellt worden ist.FIG. 4 shows, in a simplified representation, the essential steps of the microprogram routine, which becomes active repeatedly in the control circuit 40 when two strings A and B are to be processed. This microprogram routine is stored as part of the microprogram of the processor in a memory of the control unit, not shown. In step 101, starting with the start address specified by the string command to be executed, the first eight bytes of the string A are transferred from the storage unit 12 to the local data memory 10. At the same time, the start address is increased by eight. In step 102, the same process takes place for the character string B. In step 103, the first four of the bytes of the character strings A and B located in the storage unit 103 are each transferred to the registers 16 and 18. This transfer takes place in one machine cycle. Then, in step 104, the partial chains of A and B in the registers 16, 18 are processed in parallel in the units 20, 22 and 24 in the manner described. This processing also takes place in just one machine cycle. Step 105 loads the second four bytes of character strings A and B from memory 10 as new partial strings of A and B into registers 16, 18. This is followed by another processing step 106, which corresponds to step 104. In a branching step 107, an inquiry is made as to whether an output signal EA, EB or MC has been determined in steps 104 or 106.
Dies geschieht durch Abtastung des Signalzustandes der Leitungen 97, 98 und 99 (Fig. 3). Liegt kein Ausgangssignal EA, EB oder MC vor, verzweigt das Mikroprogramm zurück zum Schritt 101, mit dem auf die nächsten acht Bytes in der Speichereinheit 12 zugegriffen wird. Wenn dagegen ein solches Ausgangssignal festgestellt wurde, bedeutet dies, daß die Verarbeitung der Zeichenketten A und B beendet ist. Üblicherweise wird dies nicht bereits nach dem ersten Durchlauf der Mikroprogramm-Routine gemäß Figur 4 der Fall sein, sondern er werden mehrere solche Durchläufe notwendig sein, um längere Zeichenketten zu verarbeiten. Unabhängig davon, wieviele Durchläufe notwendig sind, wird durch ein JA-Ergebnis im Schritt 107 zum Schritt 108 verzweigt, der die Bedingungscodes CC entsprechend dem Signalzustand der Leitungen 95 bis 99 einstellt. Der folgende Schritt 109 beendet das Mikroprogramm und zugleich die Ausführung des Zeichenkettenbefehls. Der nächste Befehl des jeweiligen Anwendungsbefehls kann ein Verzweigungsbefehl sein, der die zuvor eingestellten Bedingungscodes CC benutzt, um eine Programmverzweigung zu einem Programmabschnitt durchzuführen, in dem das Verarbeitungsergebnis des ausgeführten Zeichenkettenverarbeitungsbefehls einschließlich der auf der Ausgangssammelleitung 100 angezeigten Adresse der eine Übereinstimmung anzeigenden Byteposition weiterverwendet wird. This is done by scanning the signal state of lines 97, 98 and 99 (Fig. 3). If there is no output signal EA, EB or MC, the microprogram branches back to step 101, with which the next eight bytes in the memory unit 12 are accessed. On the other hand, if such an output signal has been detected, this means that the processing of the character strings A and B has ended. Usually, this will not already be the case after the first run of the microprogram routine according to FIG. 4, but several such runs will be necessary in order to process longer character strings. Regardless of how many runs are necessary, a YES result in step 107 branches to step 108, which sets the condition codes CC in accordance with the signal state of lines 95 to 99. The following step 109 ends the microprogram and at the same time the execution of the string instruction. The next instruction of the respective application instruction can be a branch instruction which uses the previously set condition codes CC to carry out a program branching to a program section in which the processing result of the executed string processing instruction including the address of the byte position indicating a match indicated on the output bus 100 is further used.

Claims

1818th
P a t e n t a n s p r ü c h eP a t e n t a n s r u c h e
Prozessor für Zeichenketten variabler Länge mit einem System von Speichereinheiten zur Speicherung von Zeichenketten, die durch Programmbefehle paarweise adressierbar sind und aus denen der Datenflußbreite entsprechende Teilketten in zwei Operandenregister übertragen werden, mit einer Arithmetik/Logik-Einheit zur Ausführung von Verarbeitungsoperationen, mit einer Bedingungscode-Schaltung, die aus den Verarbeitungs-ergebnissen abgeleitete Signale speichert, die zur Steuerung von Programmverzweigungen dienen, und mit einer Steuereinheit, die nacheinander die Teilketten der Zeichenkettenpaare in der Speichereinheit adressiert und in aufeinanderfolgenden Maschinenzyklen die Operation der Einheiten sowie Übertragungen zwischen den Einheiten steuert, dadurch gekennzeichnet, daß die Operandenregister (16, 18) mit einer arithmetischen Einheit (20), mit einer logischen Einheit (22) und mit einer Vergleichseinheit (24) parallel verbunden sind, daß ein mit einem Kettenende-Kennzeichen (E) ladbares Kennzeichenregister (26) mit einem weiteren Eingang der Vergleichseinheit (24) verbunden ist, daß die in den Operandenregistern (16, 18) gespeicherten Teilketten gleichzeitig der arithmetischen Einheit (20) zur Subtraktion der einen Teilkette von der anderen Teilkette, der logischen Einheit (22) zum Vergleich der beiden Teilketten und der Vergleichseinheit (24) zum Vergleich der Zeichen beider Teilketten mit dem Inhalt des Kennzeichenregisters (26) zugeführt werden und daß Ausgangssignale dieser Einheiten innerhalb des gleichen Maschinenzyklus verfügbar sind und Ausgangssignale der Vergleichseinheit als Anzeige für die Gleichheit beider Zeichenketten oder Teilketten dienen, Ausgangssignale der logischen Einheit als Anzeige für die Ungleichheit beider Zeichenketten oder Teilketten dienen, und ein Übertragssignal aus der arithmetischen Einheit als Anzeige dafür dient, welche der beiden Zeichenketten oder Teilketten die Größere oder die Kleinere ist.Processor for character strings of variable length with a system of storage units for storing character strings, which can be addressed in pairs by program instructions and from which partial strings corresponding to the data flow width are transferred to two operand registers, with an arithmetic / logic unit for performing processing operations, with a condition code Circuit which stores signals derived from the processing results, which are used to control program branches, and with a control unit which addresses the partial chains of the character string pairs in the memory unit in succession and controls the operation of the units and transfers between the units in successive machine cycles characterized in that the operand registers (16, 18) are connected in parallel with an arithmetic unit (20), with a logic unit (22) and with a comparison unit (24), that one with a chain end identifier (E) Loadable identifier register (26) is connected to a further input of the comparison unit (24), that the partial chains stored in the operand registers (16, 18) are simultaneously used by the arithmetic unit (20) for subtracting one partial chain from the other partial chain, the logical unit ( 22) for comparing the two partial chains and the comparison unit (24) for comparing the characters of both partial chains with the content of the identifier register (26) and that output signals of these units are available within the same machine cycle and output signals of the comparison unit serve as an indication of the equality of both character strings or partial chains, output signals of the logic unit serve as an indication of the inequality of both character strings or partial chains, and a carry signal from the arithmetic unit as This is used to show which of the two strings or partial strings is the larger or the smaller.
2. Prozessor nach Anspruch 1, worin die Zeichen durch Bytes dargestellt werden, dadurch gekennzeichnet, daß die Vergleichseinheit (24) zur parallelen Ausführung eines Mehrfachvergleichs des Inhalts des Kennzeichenregister (26) mit allen Bytes beider Teilketten ausgebildet ist und für jede Teilkette (A, B) eine Ausgangsleitung (28, 30) aufweist, auf der ein Kettenende-Signal (EA, EB) erzeugt wird, wenn der Inhalt des Kennzeichenregisters mit einem Byte der Teilketten übereinstimmt.2. Processor according to claim 1, wherein the characters are represented by bytes, characterized in that the comparison unit (24) is designed to carry out a multiple comparison of the contents of the identifier register (26) in parallel with all bytes of both partial chains and for each partial chain (A, B) has an output line (28, 30) on which a chain end signal (EA, EB) is generated if the content of the identifier register corresponds to a byte of the partial chains.
3. Prozessor nach Anspruch 1 oder 2, dadurch gekennzeichnet, daß die logische Einheit (22) für einen parallelen Vergleich der Bytes gleicher Position in den beiden Teilketten (A, B) ausgebildet ist und für jedes Bytepaar eine Ausgangsleitung (32) aufweist, auf der ein Nichtübereinstimmungssignal (MC) erzeugt wird, wenn die Bytes voneinander abweichen. 3. Processor according to claim 1 or 2, characterized in that the logic unit (22) is designed for a parallel comparison of the bytes of the same position in the two sub-chains (A, B) and has an output line (32) for each byte pair which generates a mismatch signal (MC) when the bytes differ.
4. Prozessor nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, daß die arithmetische Einheit (20) für eine parallele Addition der Bytes gleicher Position in den beiden Teilketten (A, B) ausgebildet ist und an einem ihrer Eingänge eine Komplementierschaltung (16) sowie in ihrer höchsten Byteposition eine Übertragsausgangsleitung (34) aufweist, auf der ein Übertragssignal erscheint, wenn die über die aktivierte Komplementierschaltung (16) zugeführte Teilkette (A) in den Binärwerten ihrer Bytes größer ist als die andere Teilkette (B) und die im anderen Falle durch Fehlen eines solchen Übertragssignals anzeigt, daß die andere Teilkette größer ist.4. Processor according to one of claims 1 to 3, characterized in that the arithmetic unit (20) is designed for a parallel addition of the bytes of the same position in the two partial chains (A, B) and a complementing circuit (16) at one of its inputs. and in its highest byte position has a carry output line (34) on which a carry signal appears when the partial chain (A) supplied via the activated complementing circuit (16) is larger in binary values of its bytes than the other partial chain (B) and the other one Trap due to the lack of such a carry signal indicates that the other sub-chain is larger.
5. Prozessor nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, daß eine Resultat- Auswertelogik (60) eine Schaltung (64) zur Bestimmung der Priorität unter den Ausgangssignalen (EA, EB, MC) von der Vergleichseinheit (24) und der logischen Einheit (22) aufweist, die jeweils die niedrigste Byteposition anzeigt, in der für die eine oder die andere Teilkette (A oder B) oder für beide Teilketten eine Übereinstimmung mit dem Kettenende-Zeichen (E) festgestellt wird, und die auf einer Ausgangssammelleitung (100) jeweils die niedrigste Byteposition anzeigt, in der eine Nichtübereinstimmung festgestellt wurde.5. Processor according to one of claims 1 to 4, characterized in that a result evaluation logic (60) has a circuit (64) for determining the priority among the output signals (EA, EB, MC) from the comparison unit (24) and the logical Unit (22), which indicates the lowest byte position, in which a match for one or the other sub-chain (A or B) or for both sub-chains is found to match the end-of-chain character (E), and which is on an output bus ( 100) indicates the lowest byte position in which a mismatch was found.
6. Prozessor nach einem der Ansprüche 1 bis 5, dadurch gekennzeichnet, daß eine Ubertragsauswertelogik (66) vorgesehen ist, die durch Übertragssignale von der arithmetischen Einheit gesteuerte Auswahlschaltungen (91, 92, 93) enthält zu Erzeugung von Signalen A KLEINER B und B KLEINER A auf Ausgangsleitungen (95, 96) .6. Processor according to one of claims 1 to 5, characterized in that a Uebertragauswertelogik (66) is provided, which by carry signals from the arithmetic Unit-controlled selection circuits (91, 92, 93) contain A SMALLER B and B SMALLER A on output lines (95, 96) for generating signals.
Prozessor nach einem der Ansprüche 1 bis 6, dadurch gekennzeichnet, daß die Ausgangssignale EA, EB, EAB, A KLEINER B und B KLEINER A auf Ausgangsleitungen (98, 99, 97, 95, 96) zur Einstellung von Bedingungscodes (CC) dienen, die zusammen mit der auf der AusgangsSammel¬ leitung (100) angezeigten Byteposition zur Weiterverwendung durch dem ausgeführten Zeichenkettenbefehl nachfolgende Programmbefehle gespeichert werden. Processor according to one of Claims 1 to 6, characterized in that the output signals EA, EB, EAB, A SMALLER B and B SMALLER A on output lines (98, 99, 97, 95, 96) serve to set condition codes (CC), the program commands following the byte position displayed on the output bus (100) are stored for further use by the executed string command.
EP94928335A 1993-10-08 1994-09-12 Processor for variable-length character strings Ceased EP0722583A1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
DE4334294A DE4334294C1 (en) 1993-10-08 1993-10-08 Variable length string processor
DE4334294 1993-10-08
PCT/EP1994/003045 WO1995010803A1 (en) 1993-10-08 1994-09-12 Processor for variable-length character strings

Publications (1)

Publication Number Publication Date
EP0722583A1 true EP0722583A1 (en) 1996-07-24

Family

ID=6499679

Family Applications (1)

Application Number Title Priority Date Filing Date
EP94928335A Ceased EP0722583A1 (en) 1993-10-08 1994-09-12 Processor for variable-length character strings

Country Status (5)

Country Link
US (1) US5761521A (en)
EP (1) EP0722583A1 (en)
JP (1) JP3183669B2 (en)
DE (1) DE4334294C1 (en)
WO (1) WO1995010803A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6114945A (en) * 1997-05-08 2000-09-05 Texas Instruments Incorporated Apparatus and method for programmable fast comparison of a result of a logic operation with an selected result
JPH1145211A (en) * 1997-07-28 1999-02-16 Fujitsu Ltd Testing device for information processor and testing method for information processor
US5944772A (en) * 1997-11-07 1999-08-31 International Business Machines Corporation Combined adder and logic unit
US6061775A (en) * 1997-12-12 2000-05-09 Advanced Micro Devices, Inc. Apparatus and method for predicting a first microcode instruction of a cache line and using predecode instruction data to identify instruction boundaries and types
US7191318B2 (en) * 2002-12-12 2007-03-13 Alacritech, Inc. Native copy instruction for file-access processor with copy-rule-based validation
KR20060014600A (en) * 2004-08-11 2006-02-16 삼성전자주식회사 Apparatus and methods for checking the change of data stored in the external storage
JP4147423B2 (en) * 2004-11-12 2008-09-10 セイコーエプソン株式会社 Arbitrary precision computing unit, arbitrary precision computing method, and electronic device
US7613755B1 (en) * 2005-04-01 2009-11-03 Netlogic Microsystems, Inc. Signature searching system
AU2006231545B9 (en) * 2005-04-05 2011-09-29 Sunfish Studio, Llc Modal interval processor
US8073893B1 (en) * 2005-08-25 2011-12-06 Robert T. Jenkins Method and/or system for comparing character expressions
US8484236B1 (en) 2006-06-30 2013-07-09 Robert T. Jenkins and Virginia T. Jenkins Method and/or system for processing data streams
US7849399B2 (en) * 2007-06-29 2010-12-07 Walter Hoffmann Method and system for tracking authorship of content in data
WO2009105332A1 (en) * 2008-02-18 2009-08-27 Sandbridge Technologies, Inc. Method to accelerate null-terminated string operations
US8380779B2 (en) * 2009-05-29 2013-02-19 Freescale Semiconductor, Inc. Technique for determining if a logical sum of a first operand and a second operand is the same as a third operand
US9323534B2 (en) 2013-03-15 2016-04-26 Freescale Semiconductor, Inc. Method and apparatus for detecting a collision between multiple threads of execution for accessing a memory array
US9116799B2 (en) 2013-06-30 2015-08-25 Freescale Semiconductor, Inc. Method for detecting bank collision at a memory and device therefor
US20180367673A1 (en) * 2016-12-27 2018-12-20 Bronson Picket Enhanced communication using variable length strings of alphanumerics, symbols, and other input
US10564965B2 (en) * 2017-03-03 2020-02-18 International Business Machines Corporation Compare string processing via inline decode-based micro-operations expansion
US10678506B2 (en) * 2017-08-01 2020-06-09 Arm Limited Matching consecutive values in a data processing apparatus

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4094001A (en) * 1977-03-23 1978-06-06 General Electric Company Digital logic circuits for comparing ordered character strings of variable length
DE2830467C2 (en) * 1978-07-11 1983-07-14 Artemij Michajlovič Eršov Information processing facility
US4384325A (en) * 1980-06-23 1983-05-17 Sperry Corporation Apparatus and method for searching a data base using variable search criteria
US4556951A (en) * 1982-06-06 1985-12-03 Digital Equipment Corporation Central processor with instructions for processing sequences of characters
US4575795A (en) * 1983-04-01 1986-03-11 Honeywell Information Systems Inc. Apparatus for detecting a predetermined character of a data string
US4618956A (en) * 1983-09-29 1986-10-21 Tandem Computers Incorporated Method of operating enhanced alu test hardware
US4760523A (en) * 1984-06-29 1988-07-26 Trw Inc. Fast search processor
DE3507100A1 (en) * 1985-02-28 1986-08-28 Siemens AG, 1000 Berlin und 8000 München Operational network for a parallel processor
US4896133A (en) * 1987-02-10 1990-01-23 Davin Computer Corporation Parallel string processor and method for a minicomputer
US5212697A (en) * 1988-09-13 1993-05-18 Ricoh Company, Ltd. Variable length character string detection apparatus
US5222225A (en) * 1988-10-07 1993-06-22 International Business Machines Corporation Apparatus for processing character string moves in a data processing system
AU624205B2 (en) * 1989-01-23 1992-06-04 General Electric Capital Corporation Variable length string matcher
CA2045773A1 (en) * 1990-06-29 1991-12-30 Compaq Computer Corporation Byte-compare operation for high-performance processor
CA2045705A1 (en) * 1990-06-29 1991-12-30 Richard Lee Sites In-register data manipulation in reduced instruction set processor
US5440753A (en) * 1992-11-13 1995-08-08 Motorola, Inc. Variable length string matcher
JP3637922B2 (en) * 1993-06-14 2005-04-13 アップル コンピュータ インコーポレイテッド Method and apparatus for finding termination characters in various length strings in a processor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of WO9510803A1 *

Also Published As

Publication number Publication date
US5761521A (en) 1998-06-02
DE4334294C1 (en) 1995-04-20
WO1995010803A1 (en) 1995-04-20
JPH09503327A (en) 1997-03-31
JP3183669B2 (en) 2001-07-09

Similar Documents

Publication Publication Date Title
DE4334294C1 (en) Variable length string processor
DE69738188T2 (en) METHOD AND APPARATUS FOR INCREASED ACCURACY IN THE BRANCHING FORECAST IN A SUPERSCALAR MICROPROCESSOR
DE2934971C2 (en) Central processor working according to the assembly line principle
DE2131066C3 (en) Arrangement for addressing a table memory
DE4302495C2 (en) Apparatus and method for determining the length of an instruction in a sequential instruction stream
EP0010198B1 (en) Device for page replacement control in a data processing system with a virtual memory
DE2846495C2 (en) Central unit
DE2753062C2 (en) Device for the repeated execution of program loops
DE1931966C3 (en) Data processing system with associative memories
DE3638572C2 (en)
DE1928202B2 (en) Device for the creation of statistical data on the operational sequence of program-controlled data processing systems
CH650600A5 (en) CENTRAL PROCESSOR UNIT OF A DATA PROCESSING SYSTEM WITH OPERATION CODE EXTENSION REGISTER.
DE2714805A1 (en) DATA PROCESSING SYSTEM
DE2712224A1 (en) DATA PROCESSING SYSTEM
DE2556617C2 (en) Sliding and rotating circuit
DE2722124A1 (en) ARRANGEMENT FOR DETERMINING THE PRIORITY RANK IN A DP SYSTEM
DE2054830C3 (en) Information processing system with means for accessing memory data fields of variable length
DE2023354A1 (en) Programmable unit and method of operating a programmable unit
DE2718110A1 (en) DATA PROCESSING UNIT
DE1285219B (en) Control unit for the execution of subroutines
DE2133638C3 (en) Method for operating an adaptive system made up of adaptive data processing units connected in cascade and suitable for non-linear data processing
DE3507584C2 (en)
DE2454613C2 (en) Channel unit for controlling data transmission on a large number of channels between the peripheral devices and the main memory of a digital data processing system
DE2245284A1 (en) DATA PROCESSING SYSTEM
DD294115A5 (en) DEVICE AND METHOD FOR SIGNAL PROCESSING

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 19960117

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): DE FR GB

GRAG Despatch of communication of intention to grant

Free format text: ORIGINAL CODE: EPIDOS AGRA

17Q First examination report despatched

Effective date: 19960808

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION HAS BEEN REFUSED

18R Application refused

Effective date: 19970125