PIPELINE SYSTEM FOR MICROPROGRAM CONTROL UNIT

Abstract: A pipeline system for a microprogram control unit is arranged such that a command is pre-read in order to prevent the generation of any dummy cycle and attain a higher speed, and at the same time when a program counter specifies an address, a command corresponding to the specified address in held in a pipeline register. Further, when a conditional branch instruction is issued, all of the commands which may be subsequently executed are pre-read in parallel, and a command to be executed is selected from the pre-read com­ mands.

Description: DESCRIPTION Pipeline System for Microprogram Control Apparatus Technical Field The present invention relates to a pipeline system for a microprogram control apparatus, and more particularly to a pipeline system for a microprogram control apparatus Which is designed to enable conditional branching without generating a dummy cycle, to increase the operating speed. Background Art The prior art will be described hereunder, taking as an example a pattern generator acting as a tester of LSI devices such as memories, which is used as a microprogram control apparatus. Test patterns employed for testing LSI devices such as memories are usually generated by a microprogram control system. One cycle thereof comprises the operations of specifying an address at which an instruction is stored, reading the instruction, and decoding and executing it, so that the minimum period of the cycle is limited by the total of the minimum times required for each operation. The increasing operating speed of the elements being tested has led to a demand for an increase in the operating speed of LSI testers, particularly of the test pattern generator thereof. The best method known for increasing the speed of generation of test patterns in a microprogram control system is to read and execute instructions concurrently using a pipeline system. Even in this system, however, it takes one cycle between the specification of an address by a program counter to the storing of an instruction held therein in a pipeline register. Consequently, a time length equivalent to two cycles is required for the program counter to specify the address at which a conditional branch instruction is stored, read out this instruction, and specify the subsequent address, so that the second cycle becomes a dummy cycle during which the subsequent address is not certain. Therefore, if a dummy cycle is generated during the execution of a test by an LSI tester, two cycles become needed for generating the test pattern during the period in which that dummy cycle is generated, so that it is impossible to expect the execution of a normal test in real time. Disclosure of the Invention The present invention is designed to solve this defect in the prior art, and an object thereof is to provide a pipeline system for a microprogram control apparatus which enables the execution of a conditional branch instruction without the generation of a dummy cycle, to enable high-speed operation of the microprogram control apparatus. The pipeline system for a microprogram control apparatus provided by the present invention has a construction wherein instructions being are pre-read thereinto, an instruction corresponding to an address is placed in a pipeline register at the same time that a program counter specifies that address, all the instructions which might be executed in a subsequent step are pre-read in parallel when a conditional branch instruction is output, and the instruction which will actually be executed is selected therefrom, so that the generation of a dummy cycle can be prevented as a consequence. To enable the pre-reading of instructions by the present invention, an "instruction which might be executed in a subsequent step" is read out from a "current address" by operating a storage configuration of instructions within a memory. The present invention makes it possible to adopt a pipeline structure and an interleaving structure without the generation of dummy cycles, and consequently it is possible to operate the microprogram control apparatus at higher speed. Other objects, characteristics and effects of the present invention will become more apparent from the following description, with reference to the accompanying drawings. Brief Description of the Drawings Figure 1 (a) shows a conventional instruction storage configuration; Figure 1 (b) shows the instruction storage configuration in the pipeline system for a microprogram control apparatus according to the present invention; Figure 2 (a) shows an example of the conventional instruction storage configuration; Figure 2 (b) shows a first example of the instruction storage configuration in the pipeline system for a microprogram control apparatus according to the present invention; Figure 3 is a block diagram of a first embodiment of the pipeline system for a microprogram control apparatus according to the present invention; Figure 4 is a sequence chart of the operations of the first embodiment of Fig. 3; Figure 5 (a) shows the conventional instruction storage configuration; ; Figure 5 (b) shows another example of the instruction storage configuration in the pipeline system for a microprogram control apparatus according to the present invention; Figure 6 is a block diagram of a second embodiment of the pipeline system for a microprogram control apparatus according to the present invention; and Figure 7 is a block diagram of a third embodiment of the pipeline system for a microprogram control apparatus according to the present invention. Best Mode for Carrying Out the Invention Figure 1 (a) shows how a conditional branch instruction is stored in an address N in a conventional system. ¯{hen a condition is satisfied at address N, control branches to an address M. If this condition is not satisfied, no branching occurs, and the procedure moves on to address (N + 1). Figure 1 (b) shows the instruction storage configuration according to the pipeline system of the present invention. In this system, the instructions in address (N + 1) and the branch address M of the conventional system are stored at address N, enabling the pre-reading of a "subsequent instruction" within a "current address". In the condition at address N of Fig. 1 (b) is satisfied, a program counter specifies address M in the subsequent cycle. Simultaneously, an instruction (M) read out from address N is selected and held in a pipeline register. In other words, according to the present invention, the content read out of a memory is always advanced one cycle ahead of the instruction in the program counter, and thus the pipeline register temporarily holding this content corresponds at all times to the instruction in the program counter. The following is a more detailed description of the present invention, according to embodiments shown in the appended figures. Figure 2 shows the difference between instruction storage configurations according to the conventional system and those of the pipeline system of the present invention, during the execution of the same program. Figure 2 (a) shows the instruction storage configuration according to the conventional. system, and Figure 2 (b) shows those according to the pipeline system of the present invention. In these figures, NOP denotes 'no operation', whereby the program counter is incremented, IMP denotes 'jump' whereby branching to an address given by the operand thereof is executed, JC denotes 'jump conditionally' whereby branching to the address in the operand is executed only when a condition is satisfied, SBR denotes 'subroutine control', and SC denotes 'subroutine control conditionally' whereby the subroutine is controlled only when a condition is satis fied. RET denotes 'return'. In the conventional instruction storage configuration shown in Fig. 2 (a), instructions to be executed are stored in addresses in run order. In contrast therewith, in the instruction storage configuration of a test pattern generator of the present invention, shown in Fig. 2 (b), an instruction that might be executed in the subsequent step is stored at the current address. The instruction storage configuration of Fig. 2 (b) can be obtained from that of Fig. 2 (a) by a simple procedure. Instructions stored in each of addresses subsequent to corresponding addresses in Fig. 2 (a) are stored in a memory A of Fig. 2 (b). For instance, instruction JC 5 stored in address 1 of memory A of Fig. 2 (b) is the same as that stored in address 2 of Fig. 2 (a). Similarly, an instruction NOP stored in address 2 of memory A of Fig. 2 (b) is the same as that stored in address 3 of Fig. 2 (a). When any instruction is stored in a memory B of Fig. 2 (b), a branch instruction or a conditional branch instruction is stored in a corresponding address of Fig. 2 (a). Instructions stored in memory B of Fig. 2 (b) are the same as those stored in branch addresses specified by branch instructions stored in the corresponding addresses of Fig. 2 (a). SBR 10 stored in address 4 of memory B of Fig. 2 (b), for instance, is the same as an instruction stored in address 8 specified by branch instruction JC 8 of address 4 of Fig. 2 (a). Similarly, an instruction NOP stored in address 6 of memory B of Fig. 2 (b) is the same as an instruction stored in address 10 specified by branch instruction SC 10 of address 6 of Fig 2 (a). Figure 3 is a block diagram of a first embodiment of the pipeline system for a microprogram control apparatus according to the present invention. In tlis figure, a program counter 1 specifies addresses in memories A and B in which instructions are stored in the configuration shown in Fig. 2 (b). A selector 2 selects and outputs either a subsequent-address instruction S1 or a branch-address instruction S2 which are output from the memories A and B, respectively. A pipeline register 3 temporarily holds the instruction selected by the selector 2. An execution unit 4 decodes the instruction held temporarily in the pipeline register 3 and specifies the operations of the program counter 1 and the selector 2, etc. A register file 5 is a memory which temporarily holds an instruction stored in a return address when a subroutine is called. This memory is not essential to the present invention. The operation of the first embodiment of Fig. 3 will now be described with reference to the sequence chart of Fig. 4. Figure 4 shows the sequence followed when the program example of Fig. 2 (b) is run. In the initial state, an instruction corresponding originally to the address at which the operation starts (the instruction which should have been stored in the start address in the conventional system) is input to the pipeline register 3. Since the operation starts at address 1 in Fig. 4, instruction NOP is stored in the pipeline register 3. The execution unit 4 then interprets this instruction, and outputs a program counter control signal S4 to the program counter 1 to specify incrementation, and a selection signal S3 to the selector 2 to specify the selection of an instruction S1 for the subsequent address (non-branch instruction) from memory A. At the next clock, the program counter 1 specifies address 2, and the instruction/JC5 corresponding originally to address 2 (the instruction which should have been stored at address 2 in the conventional system) is held temporarily in the pipeline register 3. The execution unit 4 decodes the instruction JC 5 and a condition signal S5, and outputs the program counter control signal S4 to the program counter 1 to specify parallel data load if the condition is satisfied, and outputs the selection signal S3 to the selector 2 to specify the selection of a branch instruction S2 (instruction during branching) from memory B. At the subsequent clock, the program counter 1 specifies address 5 when it receives a branch address S6 output from the pipeline register 3, while NOP, the instruction originally at address 5, is retained in the pipeline register 3 These operations are repeated so that the instructions originally in the addresses specified by the program counter 1 are held in the pipeline register 3, and thus all the instructions which might be executed in subsequent steps are set up at the input to the register 3 through the selector 2. As can be seen from this description, branching is enabled without the generation of any dummy cycle, even when the branching is conditional, according to the present embodiment. Figure 5 is similar to Fig. 2 and shows the difference between the instruction storage configurations according to the conventional system and the pipeline system of the present invention, when executing the same program. Figure 5 (a) shows the instruction storage configuration according to the conventional system, which is identical to that of Fig. 2, and Figure 5 (b) shows the instruction storage configuration of a second embodiment of the present invention shown in Figure 6. This figure differs the instruction storage configuration of Fig. 2 (b) in that the operand parts specifying branch addresses are not stored in memories A and B. Another memory OPD used exclusively for operands is provided instead, and these operands (branch addresses) are stored in the same addresses within this memory as those in the conventional system. Figure 6 shows the second embodiment of the present invention which is provided with these memories A, B and OPD. In this figure, the memories A, B and OPD each hold the instructions and operands shown in Fig. 5 (b). The operations of the second embodiment of Fig. 6 are the same as those of the first embodiment of Fig. 3, except that the memory OPD is added, and the bit widths of the memories A and B are reduced. In the above description of the embodiments, the case in which branching to either of two addresses occurs has been used as an example. The present invention is not, of course, limited to this case, but is applicable to any case in which branching to N addresses, occurs, by providing N parallel memories. The instructions used in these embodiments have been assumed to be stored in a configuration which enables pre-reading by one cycle. #Then the instructions are stored in a configuration enabling pre-reading by two or more cycles, interleaving of the memories is possible. In the description of the embodiments of Figs. 3 and 6, the memories A and B, or the memories A, B and OPD, are assumed to be independent from one another. It is possible to use a single memory in which two or three independent storage regions are provided at the same address. Figure 7 is a block diagram of a third embodiment of the present invention, wherein three-way interleaving is performed. In this embodiment, interleaving is performed among three units, i.e. a program counter P1 and a memory M1, a program counter P2 and a memory M2, and a program counter P3 and a memory M3. Instructions can be read'from each of the memories M1, M2 and M3 at an apparent speed three times the speed at which each of the memories M1, M2 and M3 operates. The following is a description of the operations of the embodiment of Fig. 7. - The program counters Pl, P2 and P3 are updated sequentially by program counter control signals S4a, S4b and S4c output from the execution unit 4. All the instructions which might be executed three cycles after an instruction which is stored in address N in the conventional system are stored in address N of each of the memories M1, M2 and M3. The selector 2 selects sequentially an output from each of the memories M1, M2 and M3, and the selects one of the plurality of selected instructions output from the memories M1, M2 and M3 as the instruction to be executed next, in accordance with a selection signal S3 from the execution unit 4. The pipeline register 3 temporarily holds the instruction selected by the selector 2. The execution unit 4 outputs the selection signal S3 to the selector 2 in accordance with the instruction held temporarily in the pipeline register 3, while outputting the program counter control signal S4a, S4b or S4c to one of the three sequentially-selected program counters P1, P2 and P3. As is clear from the above description of the operation, the count of the program counter P1 is updated, a new address is specified in, for instance, memory M1, and three cycles later, one of a plurality of instructions read from the memory M1 by the selector 2 is selected and output Since all the instructions which might be executed three cycles later are stored beforehand in memory M1, as described above, the next instruction to be executed can be read out without generating a dummy cycle. Three-way interleaving is assumed in the third embodiment described above, but the present invention is not, of course, limited to this case. In the first, second and third embodiments, the pipeline register 3 for temporary storage is provided next to the selecting means 2, but the present invention is not limited to this construction, the selecting means may be provided next to the temporary storage means. As can be seen from the above description, the present invention enables the adoption of both a pipeline construction and an interleaving construction, without any generation of dummy cycles, and consequently it is possible to further increase the speed of the microprogram control apparatus. Industrial Applicability The present invention is extremely effective when, for instance, applied to a control device for a pattern generator of an IC testing apparatus which tests semiconductor storage elements and large-scale integrated logic circuits, etc. The present invention is not, of course, limited to this application, but can be adapted to a wide variety of microprogram controllers.

Claims: CLAIMS 1. A pipeline system for a microprogram control apparatus characterized in that it comprises storage means for storing instructions, an address-specifying means which outputs address signals to said storage means, a selecting means which selects one instruction from a plurality of instructions read out of said storage means by said address-specifying means, a holding means which holds the selected instruction temporarily, and an execution unit which decodes said temporarily-held instruction and gives each element directions corresponding to the content of said instruction, wherein said storage means pre-stores in an nth address (where n = 0, 1, 2 ...) all instructions which might be executed m (where m is a positive integer) cycles after the execution of the instruction currently held in said holding means, when said nth address is specified by said address-specifying means. 2. The pipeline system for a microprogram control apparatus according to Claim 1, characterized in that said storage means consists of a first memory storing non-branch instructions and a second memory storing branch instructions. 3. The pipeline system for a microprogram control apparatus according to Claim 1, characterized in that a memory used exclusively for operands is added as a third memory thereto. 4. The pipeline system for a microprogram control apparatus according to Claim 1, characterized in that a plurality of pairs of said address-specifying means and said storage means are provided, and each addressspecifying means is constructed so that it is updated by a program counter control signal output from said execution unit.

Inventors: KIKUCHI, SYUJI
Applicants: HITACHI, LTD.
Application year: 1984
Main classification: G06F9
IPC codes: G06F9