Apparatus for aligning arithmetic operands during fetch
First Claim
1. In a data processing system having a memory for storing instructions and operands, and having means for sequentially retrieving the instructions and having means responsive to the instructions for performing operations upon the operands,the memory being organized as contiguous addressable words, each word comprising an integral multiple of eight bits, the memory being adapted to retrieve and store double words each comprising two contiguous words beginning on an even-numbered word address called a double word boundary,the operands being stored in the memory as contiguous packed (four-bit binary coded decimal (BCD)) digits which may begin and end on any four-bit boundary within a word, an operand'"'"'s most significant digit being its leftmost or lowest-addressed digit,the instructions having provision to specify each operand'"'"'s length, its type as packed, the memory double word address in which it begins, and its offset in digits from its double-word boundary to its first digit,said means for performing operations upon the operands including an arithmetic processor including a scratchpad memory organized as contiguous double words for receiving and holding operands retrieved from the memory and ALU means connected to the scratchpad memory for performing arithmetic operations upon the operands,alignment apparatus for presenting retrieved operands to the scratchpad memory right-justified on double word boundaries, comprising:
- first means coupled to said memory for receiving each instruction, said first means for calculating from said length, type and offset provided in the instruction, a number of double words that must be fetched from the memory in order to retrieve the entire operand, the number being designated NDWF;
second means operatively coupled to said first means and to said memory for receiving said each instruction, said second means for calculating from said length, type and offset provided in the instruction, a number of digit positions the operand must be shifted to the right in order to right-justify it on a double-word boundary, the number being designated RSFT;
third means operatively coupled to said first means and to said memory for receiving said each instruction, said third means (316, 350, 354, 368,
370) for calculating from said length and type provided in the instruction, a number of zeros required to precede the operand in a scratchpad memory double word, the number being designated RLZR;
fourth means operatively coupled to said first means, second means and to said memory, said fourth means for fetching from the memory, NDWF double words containing the operand, starting with the operand'"'"'s highest addressed word and progressing consecutively through lower addresses;
first and second register means coupled to said memory, said first register means for holding a double word most recently fetched from the memory and second register means for holding a double word next most recently fetched from the memory;
fifth means coupled to said first and second register means and to said scratchpad memory, said fifth means selecting from the first and second register means, a number of said first register'"'"'s rightmost digits, the number being equal to RSFT, and a number of said second register'"'"'s leftmost digits, the number being equal to the difference between the number of digits in a double word and RSFT, and said fifth means storing in a double word location in the scratchpad memory a double word having as its leftmost digits the digits selected from the most recently fetched double word and as its rightmost digits the digits selected from the next most recently fetched double word; and
sixth means coupled to said memory and to said fifth means, said sixth means responsive to a completion of fetching NDWF double words from the memory for inserting in the double word to be stored in the scratchpad memory RLZR leading zero digits so that the operand is stored in the scratchpad memory right justified on a double word boundary and filled with leading zeros staring from a double word boundary.
1 Assignment
0 Petitions
Accused Products
Abstract
In a digital computer system in which arithmetic operands are addressed in instructions by their most significant digits, and in which operands need not start or end on particulr boundaries in system memory, apparatus is provided for calculating information from data available during instruction decoding and for using that information during operand fetching to fetch operands least significant digit first, and to store them in a scratchpad memory right-justified on double-word boundaries and filled with leading zeros.
-
Citations
6 Claims
-
1. In a data processing system having a memory for storing instructions and operands, and having means for sequentially retrieving the instructions and having means responsive to the instructions for performing operations upon the operands,
the memory being organized as contiguous addressable words, each word comprising an integral multiple of eight bits, the memory being adapted to retrieve and store double words each comprising two contiguous words beginning on an even-numbered word address called a double word boundary, the operands being stored in the memory as contiguous packed (four-bit binary coded decimal (BCD)) digits which may begin and end on any four-bit boundary within a word, an operand'"'"'s most significant digit being its leftmost or lowest-addressed digit, the instructions having provision to specify each operand'"'"'s length, its type as packed, the memory double word address in which it begins, and its offset in digits from its double-word boundary to its first digit, said means for performing operations upon the operands including an arithmetic processor including a scratchpad memory organized as contiguous double words for receiving and holding operands retrieved from the memory and ALU means connected to the scratchpad memory for performing arithmetic operations upon the operands, alignment apparatus for presenting retrieved operands to the scratchpad memory right-justified on double word boundaries, comprising: -
first means coupled to said memory for receiving each instruction, said first means for calculating from said length, type and offset provided in the instruction, a number of double words that must be fetched from the memory in order to retrieve the entire operand, the number being designated NDWF; second means operatively coupled to said first means and to said memory for receiving said each instruction, said second means for calculating from said length, type and offset provided in the instruction, a number of digit positions the operand must be shifted to the right in order to right-justify it on a double-word boundary, the number being designated RSFT; third means operatively coupled to said first means and to said memory for receiving said each instruction, said third means (316, 350, 354, 368,
370) for calculating from said length and type provided in the instruction, a number of zeros required to precede the operand in a scratchpad memory double word, the number being designated RLZR;fourth means operatively coupled to said first means, second means and to said memory, said fourth means for fetching from the memory, NDWF double words containing the operand, starting with the operand'"'"'s highest addressed word and progressing consecutively through lower addresses; first and second register means coupled to said memory, said first register means for holding a double word most recently fetched from the memory and second register means for holding a double word next most recently fetched from the memory; fifth means coupled to said first and second register means and to said scratchpad memory, said fifth means selecting from the first and second register means, a number of said first register'"'"'s rightmost digits, the number being equal to RSFT, and a number of said second register'"'"'s leftmost digits, the number being equal to the difference between the number of digits in a double word and RSFT, and said fifth means storing in a double word location in the scratchpad memory a double word having as its leftmost digits the digits selected from the most recently fetched double word and as its rightmost digits the digits selected from the next most recently fetched double word; and sixth means coupled to said memory and to said fifth means, said sixth means responsive to a completion of fetching NDWF double words from the memory for inserting in the double word to be stored in the scratchpad memory RLZR leading zero digits so that the operand is stored in the scratchpad memory right justified on a double word boundary and filled with leading zeros staring from a double word boundary. - View Dependent Claims (2, 3)
-
-
4. A method of aligning operands retrieved from a memory for storing instructions and operands of a system which includes means for sequentially retrieving the instructions and has means responsive to the instructions for performing operations upon the operands, said memory being organized as contiguous addressable words, each word comprising an integral multiple of eight bits, the memory being adapted to retrieve and store double words each comprising two contiguous words beginning on an even-numbered word address called a double word boundary, the operands being stored in the memory as contiguous packed (four-bit binary coded decimal (BCD)) digits which may begin and end on any four-bit boundary within a word, an operand'"'"'s most significant digit being its leftmost or lowest-addressed digit, the instructions having provision to specify each operand'"'"'s length, its type as packed, the memory double word address in which it begins, and its offset in digits from its double-word boundary to its first digit, said means for performing operations upon the operands including an arithmetic processor including a scratchpad memory organized as contiguous double words for receiving and holding operands retrieved from the memory and ALU means connected to the scratchpad memory for performing arithmetic operations upon the operands, said method of aligning retrieved operands for presentation to the scratchpad memory right-justified on double word boundaries comprising the steps of:
-
first calculating from said length, type and offset provided in the instruction a number of double words that must be fetched from the memory in order to retrieve the entire operand, the number being designated NDWF; next calculating from said length, type and offset provided in the instruction, a number of digit positions the operand must be shifted to the right in order to right-justify it on a double-word boundary, the number being designated RSFT; then calculating from said length and type provided in the instruction a number of zeros required to precede the operand in a scratchpad memory double word, the number being designated RLZR; fetching from the memory, NDWF double words containing the operand, starting with the operand'"'"'s highest addressed double word and progressing consecutively through lower addresses; storing a double word most recently fetched from the memory and a double word most recently fetched from the memory in first and second registers respectively; selecting from the first and second registers, a number of said first registers rightmost digits, the number being equal to RSFT, and a number of said second register'"'"'s leftmost digits, the number being equal to the difference between the number of digits in a double word and RSFT; storing in a double word location in the scratchpad memory a double word having as its leftmost digits the digits selected from the most recently fetched double word and as its rightmost digits the digits selected from the next most recently fetched double word; and
,inserting in the double word to be stored in the scratchpad memory RLZR leading zero digits upon completion of fetching NDWF double words from memory so that the operand is stored in the scratchpad memory right justified on a double word boundary and filled with leading zeros starting from a double word boundary. - View Dependent Claims (5, 6)
-
Specification