Patent GB-1346283-A (GB)
Title: Stack memory systems
IPC: G06F7/78
Filed: 1972-07-21
Abstract: 1346283 Storage system HEWLETTPACKARD CO 21 July 1972 [28 July 1971] 34235/72 Heading G4C A stack memory system includes a stack memory (20, Fig. not shown) having a plurality of top of stack (TOS) registers TR0, TR1, TR2, TR3, which store some or all of the top information A, B, C, D in the stack, a register 26 for storing the number of TOS registers holding valid information and a namer register 28 representing which registers TR0- TR3 are assigned to the information A-D. In one embodiment the relationship between the state of the namer register and the information in the reassignable TOS registers is Thus if the register 25 has a count of 3 and the namer is in the state 01, the information A, B and C is in registers TR1, TR2, TR3, the information D is in the main memory stack at the address SM held in a register representing the top of the stored information, and the register TR0 holds no valid information. The system is arranged to perform several operations. To enter new information into one of the TOS registers, a check is first made of the number of the registers holding valid information (represented by the count in register 26). If all the TOS registers are full the information in the register assigned RD is sent to the main memory at address SM + 1 and the address SM is incremented, the count in the register 26 being decremented. The register currently assigned to RD is determined by register 28 which controls multiplexer 48 to enable one of the inputs of all the multiplexers 46a-46d so that with a signal on the store RD line 32d one of the multiplexers passes the signal to enable the associated register. to store the new information fed in on parallel leads 36. The namer register 28 is then decremented and the register 26 is incremented. A queue-up operation transfers information from the main memory to the bottom of the TOS registers. This is effected by adding the contents of the namer register 28 to the contents of the register 26 modulo 4 in an adder 52. The output from the adder is then used to control the multiplexer 48 so that with a store RA signal on lead 32a one of the multiplexers passes a signal to enable one of the stores. The register 26 is then incremented and the address SM decremented, and the apparatus returns to its normal operation with the register 28 controlling the multiplexer 48. The top element of the stack is removed by, if the contents of register 26 are zero, decrementing SM and otherwise by decrementing the contents of register 26 and incrementing the register 28.  A queue-down operation in which data from the bottom of the TOS registers is transferred to the top of the main memory 20 is effected by adding the contents of the namer register 28 to the contents of the register 26 modulo 4 and using the result to control multiplexer 48 so that with a read RD signal on lead 30d one of the four multiplexers 44a-44d passes a signal to read out one of the registers TR0-TR3. The register 26 is then decremented and the address SN incremented. To access or store information it is necessary to know whether it is held in the main store 20 or in one of the TOS registers. This is determined by computing the difference TA between the absolute address EA of the information and the address SM of the top piece of the information in the memory 20. If TA is negative the information is in the memory 20. If TA is positive the difference between the contents of register 26 and TA is computed. If this is negative an error signal is issued. If it is positive the result is entered into register 54 and added to the contents of the register 28 modulo 4, the result then being used to address the register temporarily named RA, line 32a being energized for a storage operation and line 30a being energized for a read operation. Alternatively the namer register can be a four bit register, only one output of which is enabled at any one time. This necessitates the use of 4-bit multiplexers (Fig. 9, not shown).