WO1995010806A1 - Dispositif et procede pour le controle d'interruptions - Google Patents

Dispositif et procede pour le controle d'interruptions Download PDF

Info

Publication number
WO1995010806A1
WO1995010806A1 PCT/JP1994/001690 JP9401690W WO9510806A1 WO 1995010806 A1 WO1995010806 A1 WO 1995010806A1 JP 9401690 W JP9401690 W JP 9401690W WO 9510806 A1 WO9510806 A1 WO 9510806A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
signal
interrupt signal
data
arithmetic processing
Prior art date
Application number
PCT/JP1994/001690
Other languages
English (en)
French (fr)
Inventor
Toshiyuki Tanaka
Original Assignee
Sony Corporation
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 Sony Corporation filed Critical Sony Corporation
Priority to US08/454,240 priority Critical patent/US5568643A/en
Publication of WO1995010806A1 publication Critical patent/WO1995010806A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt

Definitions

  • the present invention relates to an interrupt control method and apparatus.
  • the present invention relates to an advanced interrupt processing circuit dedicated to a computer itself, such as a simple small computer represented by a RISC (Reduced Instruction Set Computer).
  • the present invention relates to an interrupt control method and apparatus for performing common interrupt processing of a plurality of interrupt input signals using a simple circuit provided outside a computer and an interrupt processing program operated by the computer. Backing technique
  • RISC is a computer designed to execute high-speed basic instructions most frequently used at the machine language level, such as store and load instructions for memory and registers.
  • RISC usually has an arithmetic processing circuit having a pipeline structure, and is designed to execute each instruction in the same operation cycle to maximize the performance of the arithmetic processing circuit having a pipeline structure.
  • RISCs typically consist of a very small number of circuit elements compared to a conventional micro-processor or a Complimented Instruction Set Computer (CISC) used for similarly sized equipment.
  • the parts that realize functions that are not necessarily provided by the ordinary microprocessor itself are omitted as much as possible.
  • An example of such an abbreviated circuit is an interrupt processing circuit.
  • MIPS RISC.R30000 has eight interrupt input terminals.
  • the interrupt processing is performed in common by one interrupt processing program for the interrupt input signal input to each interrupt input terminal. That is, no matter which interrupt input signal is applied to any of the interrupt input terminals, a common interrupt processing program is executed for each of the interrupt input signals.
  • Some such RISCs do not provide the interrupt processing function of the individual interrupt input terminals provided in the 8-bit microphone processor, for example, Z80 of Zi10g.
  • the present invention overcomes the above-described problems by providing an RISC without a complicated interrupt processing circuit configured to perform the same processing on interrupt input signals input to a plurality of interrupt input terminals. It is an object of the present invention to provide an interrupt control method and apparatus capable of efficiently performing interrupt processing control on a plurality of interrupt input signals in a small computer or the like.
  • the status register holds the state of which interrupt input terminal the interrupt signal is applied to.
  • the address data and the identification indicated when the interrupt signal is held A plurality of interrupt signal holding means for outputting data as different values; and (e) means for dividing the plurality of interrupt signal holding means into a plurality of groups and holding the divided signal in each group. from The write signal, respectively interrupt control device including an interrupt signal dividing means you supplied to different interrupt input terminal of the arithmetic processing means.
  • the interrupt table stored in the storage means has a plurality of sub-tables corresponding to each of the groups, and in these sub-tables, addresses corresponding to the plurality of interrupt signal holding means are provided.
  • the data, the identification data indicating that an interrupt signal for the corresponding interrupt signal holding means corresponding to the address data is input, and the name of the interrupt processing program for the corresponding interrupt signal holding means are associated with each other. Is remembered.
  • the arithmetic processing means operates (i) a common interrupt control program when the interrupt signal is applied to the interrupt input terminal, and (ii) based on the common interrupt control program.
  • the interrupt signal holding means holds, for example, an interrupt input signal input from an interrupt signal generating circuit such as a DMA controller, and transmits identification data indicating that the interrupt input signal is held to an address bus and data. It passes to the arithmetic processing means via the bus.
  • the interrupt signal holding means releases the held interrupt input signal in response to a release signal from the arithmetic processing means that has performed the interrupt processing.
  • the interrupt signal dividing means applies the interrupt input signals held by the plurality of interrupt signal holding means to the interrupt input terminals of the arithmetic processing means at a time, thereby providing an interrupt for each interrupt input terminal.
  • the signal holding means can be divided into a plurality of groups and handled.
  • the interrupt table has sub-tables corresponding to groups of the interrupt signal holding means.
  • the common interrupt control program specifies the group to which the interrupt input signal belongs, based on the interrupt input signal received by the arithmetic processing means at the status register via the interrupt input terminal. Further, the common interrupt control program refers to the interrupt table stored in the storage means, and sequentially reads the interrupt processing data of the sub-table corresponding to the specified group, and reads the data. The interrupt signal holding unit that matches the input data with the corresponding identification data in the sub-table is specified. Further, the common interrupt control program executes the desired interrupt processing program stored in the storage means corresponding to the specified interrupt signal holding means by the arithmetic processing means, or executes the storage means from the secondary storage device. Is loaded once and executed by the arithmetic processing unit.
  • the interrupt signal holding means designated by the arithmetic processing means via the address bus is output by the arithmetic processing means via the data bus. And releasing the held interrupt input signal based on the released signal.
  • the interrupt signal holding means is connected to the arithmetic processing means via the address bus and the data bus, and controlled by the arithmetic processing means via the address bus and the data bus.
  • An interrupt release signal generating means for outputting a release signal for each of them is further provided.
  • each of the interrupt request signals is generated by an interrupt signal generating circuit external to the arithmetic processing means connected to the arithmetic processing means via the address bus and the data bus. You.
  • Each of the interrupt signal generation circuits outputs a predetermined address and predetermined data when outputting the interrupt request signal.
  • the arithmetic processing means reads out the predetermined data indicated by the address.
  • the interrupt table further stores priority order data for the plurality of groups, and the arithmetic processing unit responds to the groups based on the interrupt control program in order from a group having a higher priority. Start the interrupt processing program.
  • the common interrupt control processing program and the interrupt processing program corresponding to the interrupt signal stored in the storage means operate as one of ordinary application programs.
  • Storing in the storage means a common interrupt control program operating as one of the application programs, and an interrupt processing program operating as one of the application programs in response to the interrupt signal;
  • an interrupt control method including the steps of: identifying a corresponding interrupt signal by referring to the contents of a table; and activating an interrupt processing program corresponding to the identified interrupt signal.
  • FIG. 1 is a configuration diagram of a first embodiment of an interrupt control device of the present invention
  • FIG. 2 is a diagram showing a configuration of an interrupt table stored in the memory circuit shown in FIG.
  • FIG. 3 is a flowchart showing the processing of the interrupt processing program shown in Table 2 executed by the interrupt control device shown in FIG.
  • FIG. 4 is a flowchart showing a process of starting an interrupt processing program executed in the RISC processor shown in Table 3.
  • FIG. 5 is a flowchart showing the detailed processing of step 100 shown in FIG.
  • FIG. 6 is a configuration diagram of a second embodiment of the interrupt control device of the present invention.
  • FIG. 7 is a configuration diagram of a third embodiment of the interrupt control device of the present invention.
  • the interrupt control device has an interrupt input terminal for receiving a plurality of interrupt input signals.
  • an interrupt process is commonly performed on the interrupt input signals applied to the plurality of interrupt input terminals.
  • microprocessors that do not transfer execution rights to individual addresses for each interrupt input terminal, for example, MIPS
  • RI SC. R300 This is an interrupt control device using RI SC. R300.
  • Such RISC performs image signal processing and the like. In this image signal processing, various interrupt processings for the RISC occur.
  • a RISC is shown as a simple small computer.
  • the interrupt control device of the present invention is not limited to the case where the RISC is used. It goes without saying that the present invention is also applied to an apparatus.
  • the interrupt controller 1 shown in FIG. 1 includes a RISC processor 10, an external latch 20a, a first OR (OR) circuit 22a, a second OR circuit 24a, and an interrupt signal holding circuit 26a. ! ⁇ 26 a n, control circuit 28 a, the data bus 3 0, and a Adoresubasu 32 and memory circuit 34. Note that an interrupt signal generation circuit 42 such as a DMA controller is provided outside the interrupt control device 1.
  • the RISC processor 10 includes an arithmetic processing device 12 having a status register 120, and an interrupt signal input buffer 14.
  • an external latch 20a corresponding to the first interrupt input terminal int 0, a first OR circuit 22a, a second OR circuit 24a, an interrupt signal holding circuit 26 a, ⁇ 26 a n, although illustrated only control circuit 28 a, in response to the interrupt input terminal Intl ⁇ int 7 of the second to eighth, seven external latch 20 B to 20 g (not shown), 7 first OR circuits 22 b to 24 g (not shown), 7 second OR circuits 2 b to 24 g (not shown), interrupt signal holding circuit 26 b 1 ⁇ 26 b m, ⁇ , SS gi zeg! (not shown), seven control circuit 28 b ⁇ 28 g (not shown) is provided.
  • the number of the RISC processor 10, the data bus 30, the address bus 32, and the memory circuit 34 is one.
  • the memory circuit 34 includes data and control programs related to arithmetic processing by the arithmetic processing unit 12 in the RISC processor 10, that is, an operating system, programs such as application programs including an interrupt control program, and An interrupt table to be executed is stored.
  • the arithmetic processing device 12 performs arithmetic processing according to programs such as an operating system and an application program including an interrupt control program stored in the memory circuit 34.
  • the status register 120 in the arithmetic processing unit 12 holds the interrupt input signal input from the interrupt signal input buffer 14.
  • the interrupt signal input buffer 14 only has the function of passing the interrupt input signal and has no latching function. That is, the interrupt input signal is supplied as it is to the arithmetic processing unit 12 and held in the status register 120.
  • the status register 120 can detect to which of the interrupt input terminals int0 to int7 the interrupt signal is applied.
  • the interrupt signal holding circuit 2 6 ai to 2 6 a n the pulse-shaped interrupt request signal req is applied from the interrupt signal generating circuit 4 2, the appropriate interrupt signal holding circuit 2 6 & 1 to 2 6 a n is holding the interrupt request signal, the latch signal 1 atch against external latch 2 0 a, and generates an interrupt signal int, a latch signal 1 atch second And outputs the interrupt signal iiit to the first OR circuit 22a.
  • the interrupt signal holding circuit 26 a: ⁇ 26 a n further when the interrupt request signal req is applied to produce a de one evening showing its Adoresu set in advance for each. This address information can be detected by the RISC processor 10 via the address bus 32 and the data bus 30.
  • the control circuit 28 a is controlled by RI SC processor 1 0 which is connected via a data bus 3 0 and Adoresubasu 32, a chip select signal CS to the interrupt signal holding circuit 26 3 l ⁇ 26 a " Apply and output the reset signal RESET to the external latch 20a.
  • the first OR circuit 22 a is to pair the interrupt signal holding circuit 26 a! ⁇ 26 a n interrupt signal signal input terminal D of the external latch 20 a calculates the logical sum (OR) of int from Output.
  • the second OR circuit 24a is an interrupt signal holding circuit 26a! Calculating a logical sum of the latch signal 1 atch from ⁇ 26 a n to output against the latch signal input terminal of the external latch 20 a with.
  • External latch 20 a is a logical OR signal of the interrupt signal int from the first OR circuit 22 interrupts calculated in a signal holding circuit 2 6 ai ⁇ 26 a n, were calculated by the second OR circuit 24 a latches on the basis of the latch signal 1 atch logical OR signal of the interrupt signal holding circuit 26 ai ⁇ 26 a n, and outputs the to the interrupt signal input buffer 1 4 RI SC processor 1 0.
  • the interrupt signal int latched by the external latch 20a is reset by a reset signal RESET from the control circuit 28a.
  • any of the logical value of the latch signal 1 atch of ⁇ 26 a n is 1 logic value of the second OR circuit 24 a of the output signal is applied to the latch signal input terminal of the 1, and the external latch 20 a
  • the external latch 20a holds the interrupt signal int, and applies the interrupt signal inta from the external latch 20a to the interrupt signal input buffer 14 via the interrupt input terminal int0.
  • the first OR circuit 22 a when one or more of the interrupt signal holding circuit 26 a! ⁇ 26 a n has output an interrupt signal int, Outputs signals of logical value 1 to the external latch 20 a to so, the interrupt input terminal int 0 interrupt signal inta is applied from the Q terminal of the external latch 20 a, a plurality of interrupt input signals from a plurality of interrupt signal holding circuit 26 ai ⁇ 26 a n ( Interrupt request signal) at the same time.
  • the external latches 20 b to 20 g (not shown) and the first OR circuits 22 b to 22 g correspond to the other interrupt input terminals intl to int 7 connected to the interrupt signal input buffer 14.
  • second OR circuit 24 b to 24 g (not shown), interrupt signal holding circuit ⁇ ⁇ ⁇ ⁇ ) »ZS gi ZS gn control circuit 28 b to 28 g Therefore, each of the interrupt input terminals intl to int 7 can simultaneously accept interrupt input signals (interrupt request signals) from multiple interrupt signal holding circuits, as with the interrupt input terminal int 0. Can be.
  • the interrupt control program consists of the programs shown in Tables 1 to 3.
  • Table 1 is the interrupt signal holding circuit 2 for the interrupt table (database).
  • This is an example of a program (Database) in c language that registers conditions of saize an,, ze gi ze gn.
  • Each data in Table 1 int-proc, int-adr, int-ye, int-va1, int_pid respectively correspond to the data of the same name shown in Fig. 2.
  • the above data is registered in each sub-table of the interrupt table (database) shown in FIG. 2 by the program processing shown in Table 1.
  • Table 1 is the interrupt signal holding circuit 2 for the interrupt table (database).
  • [LEVEL] is the priority of the processing of the interrupt signal holding circuit to be registered
  • [MAXINT] is the multiplicity of the interrupt, that is, connected to the interrupt input terminals int0 to int7. This is the number of interrupt signal holding circuits to be executed. If the interrupt input terminal i ⁇ ⁇ 0, as shown in Fig. 1, the number of interrupt signal holding circuits is ⁇ , so the value of [ ⁇ ] is It becomes n.
  • the database int_tab1e (interrupt table) is composed of eight main tables (LEVEL) corresponding to each of the interrupt input terminals int0 to int7. cage, by the program processing shown in table 1, for each main table, the interrupt signal holding circuit 26 ai ⁇ 26 a n shown in the leftmost column of FIG. 2, ⁇ , setting subtables in 26 ⁇ 26 g n corresponding Is done.
  • an interrupt signal holding circuit is stored in the memory circuit 3 4 26 a 1 ⁇ 26 a n , ⁇ , pairs ZG gi ZS gn ⁇ : One Apurikeshonpu ⁇ grams of Data int_proc 0 indicating the start address of the interrupt processing program that is handled as is registered.
  • interrupt processing program is also just one of the application programs running on the RISC processor 10.
  • address data int—adr used to specify an interrupt signal is set.
  • the address is described as a byte format (unsigned char * c_adr)
  • the address is described as a unsigned short * w_adr
  • the address is described as a long word (unsigned * l_adr). Is done.
  • program step 04 when an interrupt is requested, a data int_v a1 indicating the contents of the identification data of the interrupt signal holding circuits ZSa! ZSan ,, ZegiZSgn is registered.
  • program step 05 PS 05
  • data int_pid indicating whether virtual address processing is performed is registered.
  • Interrupt signal holding circuit is RISC processor
  • the RISC processor 10 detects the data int_pid and executes the virtual address processing.
  • the registration of the interrupt processing program in the interrupt control device 1 as a system call is performed by, for example, the program shown in Table 2.
  • Table 2 shows an example of a C language program (init_vecct_set) that registers an interrupt processing program.
  • (l eve l) in Table 2 corresponds to (LEVEL) shown in Table 1
  • (int—tab 1 e) in Table 2 is (int_table) shown in Table 1.
  • data int-inf0 indicates a pointer (address) to the database int_tab1e shown in Table 1.
  • data int_v ect t_set causes an interrupt set system copy (Int er rup t s set t sys tem em a l l) to be performed.
  • FIG. 3 is a flowchart showing an example of processing of an example of a program written in C language for registering the interrupt processing program shown in Table 2.
  • each row (sub-table) of the main table selected in processing step 11 is sequentially checked, and an empty row (empty table) is checked.
  • processing step 13 it is determined whether or not there is an empty table in the sub-table in the main table selected in processing step 11-1. If there is an empty table, the process proceeds to S14, and if there is no empty table, the process proceeds to S16.
  • processing step 14 (S 1), the interrupt information is set in the empty table found in the processing of S 12.
  • processing step 16 abnormal termination is set and the user is notified that registration was not possible. .
  • the conditions of the interrupt signal holding circuits 26 ai to 26 a pertain,..., SS gi ZS gn are registered in the interrupt table in the memory circuit 3, and Table 2 and FIG.
  • the interrupt processing programs corresponding to the interrupt signal holding circuits 26 a 1 to 26 a a , to 26 g 1 to 26 g n are registered in the interrupt table as system calls. and the interrupt controller 1 smell Te, explaining the process when the interrupt signal is generated from one of the interrupt signal holding circuit 26 ⁇ 26 a n.
  • Table 3 shows the case where an interrupt signal is generated from any of the interrupt signal holding circuits 26 a! To 26 a n , to 26 to 26 g n , which is recorded at the specified address of the memory circuit 34.
  • C language that performs interrupt processing in the RISC processor 10 specifies the interrupt signal holding circuit that has output the interrupt signal, and starts the interrupt processing program corresponding to the specified interrupt signal holding circuit
  • a program in t_c om
  • FIG. 4 is a flowchart showing the processing of an example of a program written in C language that activates an interrupt processing program corresponding to the specified interrupt signal holding circuit shown in Table 3.
  • an interrupt signal holding circuit 26 ⁇ 26 eta, ⁇ , relative to either the 26 gi ⁇ 26 g n, the interrupt request signal req is applied from the interruption signal generating circuit 4 2, split Interrupt signal holding circuit to which interrupt request signal req is applied 26 a! ⁇ 26 ⁇ , ⁇ , 26 ⁇ 26 g n outputs Warikomishin No. int generated based on the interrupt request signal to one of the first OR circuit 22 a ⁇ 22 g. Further, the interrupt signal holding circuit 26 at to 26 administrat, to 26 to 26 g broadband to which the interrupt request signal req is applied, externally latches the latch signal 1 atch when the interrupt signal int rises reliably and stably.
  • the external latches 20a to 20g latch the interrupt signal int applied to the data terminal D via the first OR circuits 22a to 22g at the timing of the applied latch signal 1 attch.
  • the interrupt signal latched by the external latches 20a to 20g is output to the interrupt input buffer 14 of the RISC processor 10 via the Q terminal of the external latches 20a to 20g. Output to terminal int 0 to int 7.
  • the R ISC processor 10 can determine whether any of the interrupt input terminals int0 to int7 has an input, and uses this information in the status register.
  • the RISC processor 10 saves data held in various registers (not shown) in the RISC processor 10. Then, the maximum value max is set as an initial value in the numerical level 1 eve 1. As a result, the interrupt processing is performed with the higher numerical level 1 eve 1 having the higher priority.
  • the numerical level 1 eve 1 has eight levels from 0 to 7, the minimum value is 0, and the maximum value max is 7. This numerical level 1 eve 1 is provided at each interrupt input terminal int 0 to Lnt7.
  • processing step 22 it is determined whether or not the numerical value 1 eve 1 is 0.
  • the numerical level 1 eve 1 is first set to the maximum value max in the processing step 21, the processing after the processing step 32 is executed for all the numerical levels 1 ev e 1, Determined as negative result in processing step 22
  • the processing proceeds to the processing step 23, and the main table corresponding to the currently set level is set. That is, one of the main tables among the interrupt input terminals int0 to int7 in FIG. 2 is set.
  • processing step 25 it is determined whether or not the count value coun t is the maximum max. Since the count value c 0 un t is 0 at first, the process proceeds to step 27.
  • processing step 27 a sub-table corresponding to the count value c 0 unt is set.
  • the process proceeds to a process step 28, and it is determined whether or not the table is entered. This is determined by checking whether data is recorded in the currently set sub-table.
  • the count value c 0 unt is incremented by 1 in processing step 33, and the next sub-table is set in processing step 27 via processing step 25.
  • the process proceeds to the processing step 100 shown in FIG. 5, and the numerical value data is set.
  • the int-type in the currently set sub-table is referred to, and when the data is in the byte format, the processing proceeds to the processing step 102. If it is not a byte format, it is determined in processing step 103 whether or not it is a code format. If it is a word format, the process proceeds to processing step 104. If a negative result is obtained in processing step 103, it is determined that the remaining longword format is used. Then, in processing steps 102, 104, and 105, an interrupt signal holding circuit that assigns an address corresponding to the int-adr of the currently set sub-table according to each code type ⁇ ⁇ Read the bit value data of ⁇ , ⁇ , ZS gi ZG gn.
  • processing step 29 of FIG. 4 it is determined whether or not this bit value data matches the value of int-Va1 in the currently set sub-table. If they match, it means that the interrupt signal holding circuit 26 ai to 26 n , to which the interrupt signal has been applied is specified, and that the process proceeds to processing step 30. .
  • processing step 30 it is determined whether or not there is a process ID. Specifically, whether or not there is a process ID is determined based on whether or not the value of int-pid in the currently set sub-table is a predetermined value. If there is a process ID, a so-called virtual address mapping process is performed. If there is no process ID, the process proceeds to processing step 32 as it is.
  • processing step 32 an interrupt processing program included in the address of the memory circuit 34 indicated by int-pr0c0 of the set sub-table is started.
  • a bit reset is performed for the interrupt signal processing circuits 26 ai to 26 n , to 26 g 1 to 26 g n .
  • processing step 33 where the count value is incremented by 1 and the same processing is performed for the next sub-table. Therefore, within each level 1 e v e 1, the priority is assigned to the sub-tables having smaller values and the processing is performed. Then, when this processing is performed for all the sub-tables of all numerical levels 1 eve 1, a positive result is obtained in processing step 22 (Y), and the processing proceeds to processing step 34.
  • processing step 3 the register saved for the data saved in processing step 21 is restored, and this processing ends.
  • an interrupt signal holding circuit 2 6 a, ⁇ 2 6 a n, ⁇ , data corresponding respectively to 2 6 to 2 6 g n is the table 1 and Figure 2
  • the corresponding interrupt processing program is stored as a system call by the program shown in Table 2 in the form of a database shown in Table 2.
  • the RISC processor 10 uses the address indicated by the interrupt processing commonly set for the interrupt. Execute the program shown in Table 3 stored in.
  • the interrupt signal holding circuits 26 ⁇ 26 a n, ⁇ , ZS g! ZS gn respectively ⁇ address data int- adr (c- adr in Table 1, w- adr or 1-adr ),
  • the interrupt signal holding circuit reads the identification data recorded in the register and compares the read data with the contents (int-Va1 in Table 1) at the time of the interrupt request. If a match occurs, start the corresponding interrupt processing program (S33 in Fig. 4) o
  • the RISC processor 10 of the interrupt control device 1 When the above-described series of interrupt control is completed, the RISC processor 10 of the interrupt control device 1 outputs the reset signal RESET from the control circuits 28 a to 28 g to reset the external latches 20 a to 20 g. I do.
  • the interrupt control device 1 By configuring the interrupt control device 1 as described above, it is possible to easily perform a hardware change accompanied by a new interrupt request. That is, the external latch 20, the first OR circuit 22, the second OR circuit 24, the interrupt signal holding circuit 26! 26 to... May be increased or decreased as a set of control circuits 28.
  • the interrupt control is performed by loading the interrupt program as one of the application programs stored in the memory circuit 34 into the arithmetic processing unit 12, the contents thereof can be easily changed. Since the circuit does not involve any changes, a loadable driver has been realized.
  • the saving of the register of the RISC processor 10 at the time of applying the interrupt signal can be made common, which conventionally had to be provided individually for each interrupt signal.
  • processing unit 12 also determines whether or not to use a virtual address. If necessary, the virtual address mapping is performed. It is possible to place an interrupt processing program in the storage area.
  • interrupt control program shown in Table 3 does not necessarily need to be stored in the storage area of the memory circuit 34 indicated by the interrupt processing, but should be stored in an arbitrary area of the memory circuit 34. Can be activated when an interrupt request occurs
  • interrupt control is performed by reading from the identification data of the interrupt signal holding circuit with higher priority. It can be performed. At this time, for example, after the interrupt processing program of the interrupt signal holding circuit having the highest priority is completed, when the identification data of the interrupt signal holding circuit having the next highest priority is read and the processing is performed.
  • the configuration may be such that the interrupt processing program and the interrupt signal holding circuit which has requested the interrupt are alternately specified in order from the interrupt signal holding circuit having the highest priority.
  • the data int_va1 shown in Table 1 and FIG. 2 does not need to represent the identification data in units of bits, for example, by the bit position or value when the identification data is bit-checked. There may be.
  • the interrupt control program shown in Table 3 is used to hold the interrupt signal requesting the interrupt. Rather than seeing a match for the entire data that identifies the circuit, it needs to be changed to perform a bit check on certain bits.
  • the start address of the program used to specify the interrupt signal holding circuit that requested the interrupt is registered in the interrupt table stored in the memory circuit 34.
  • data int _v a 1 is not necessarily interrupt
  • the identification data signal does not need to be the identification data signal indicated by the interrupt signal holding circuit in the control device 1.
  • the identification data indicated by a predetermined address with respect to the RISC processor 10 may be used by the 10 device (not shown). .
  • the interrupt control unit 2 is a RISC processor 10 having an arithmetic processing unit 12 and an interrupt signal input buffer 14 equivalent to the RISC processor 10 shown in FIG. 1, a secondary storage unit 46, and a interrupt signal holding circuit 2 6 ai ⁇ 2 6 a n corresponding to the interrupt signal holding circuit 4 0 ai ⁇ 4 0 a n, the first OR circuit 2 2 a and the same OR circuit 2 shown in FIG. 1 2a, interrupt signal generation circuit 42 that outputs an interrupt request signal corresponding to interrupt signal generation circuit 42 shown in FIG. 1, 42 to 42, address decoder 44, data bus 30, address bus 32 And a memory circuit 34.
  • the interrupt control device 2 is different from the interrupt control device 1 shown in the first embodiment, it is configured to Warikomishin No. hold circuit 4 0 ⁇ 4 0 a n outputs only interrupt signal int I have.
  • the configuration is such that there is no second OR circuit 24a shown in FIG. 1, and further, there is no external latch 20a shown in FIG.
  • processor 1 2 RISC process Tsu Sa 1 0 holds an interrupt signal that rises temporarily be able to. Therefore, the interrupt control device 2 can perform the interrupt control process similarly to the interrupt control device 1 shown in FIG.
  • a secondary storage device 46 is, for example, a hard disk device, which stores an operating system, application programs, and the like. Once, and save the data stored in the memory circuit 34.
  • Interrupt signal generating circuit 4 2! To 4 2 n for outputting an interrupt request signal to the interrupt signal holding circuit 4 0 ai ⁇ 4 0 a n is the interrupt signal generating circuit 4 2 shown in FIG. 1
  • an interrupt request signal req! To req crave is activated, and the corresponding interrupt signal holding circuit 40 ai to 4 is activated.
  • Output for 0 a n When a request is made to the RISC processor 10, an interrupt request signal req! To req caulifloweris activated, and the corresponding interrupt signal holding circuit 40 ai to 4 is activated. Output for 0 a n .
  • the split write signal holding circuit 4 0 ai to 4 0 a n is connected to the RI SC processor 1 0 via the data bus 3 0 and Adoresubasu 32 holds the interrupt request signal req! ⁇ req n activated If you are the identification data of the content indicating that of their respective show as a separate address a 4 ⁇ A4 0 n.
  • RI SC processor 1 0 accesses the data bus 3 0 and ⁇ predetermined register of and through the address bus 32 interrupt signal holding circuit 4 0 ai ⁇ 4 0 a n , or, in a predetermined register by writing predetermined value, it is possible to release the interrupt request signal re ⁇ req n that Warikomishin No. holding circuit 4 0 ai ⁇ 4 0 a n is held.
  • OR circuit 22a is the interrupt signal holding circuit 40a! It calculates the logical S sum to 4 0 a n output from the interrupt signal int output to the interrupt input pin int 0.
  • the registration of the interrupt processing program as a system call is performed by the program shown in Table 2, for example, as described above with reference to FIG.
  • the system management program must register the interrupt signal holding circuit that requested the interrupt in the interrupt management table by writing the necessary address and data to a database that can identify the interrupt signal holding circuit. become.
  • the interrupt control device 2 By configuring the interrupt control device 2 as described above, the same effects as those of the interrupt control device 1 of the first embodiment can be obtained. Also, the interrupt control device 2 can be modified in the same manner as the interrupt control device 1.
  • the interrupt control device 3 performs the same operation as the interrupt control devices 1 and 2 shown in the first embodiment and the second embodiment.
  • the interrupt control device 3 By configuring the interrupt control device 3 in this way, the register of the interrupt signal holding circuit 40 ; and the register of the interrupt request signal generating circuit 42 i can be referred to. It is possible to perform a complicated interrupt process.
  • the interrupt control apparatus of the present invention may be implemented in various ways, for example, by describing the program shown in Table 3 in an assembler or another programming language such as PASCAL. Configuration can be adopted.
  • an interrupt control device using a simple small computer such as a RISC microphone port processor that performs the same interrupt processing with a plurality of interrupt input terminals, a plurality of interrupt causes are eliminated.
  • the corresponding interrupt control can be performed efficiently.
  • the interrupt control device and the interrupt control method of the present invention can be effectively used for the interrupt control in an image processing device to which a simple small computer is applied and various other signal processing devices.

Description

明 糸田 書 割込制御装置および割込制御方法 技術分野
本発明は、 割込制御方法と装置に関するものであり、 特に、 R I S C (Redu ced Instruction Set Computer) に代表される簡易な小型コンピュータのように 、 そのコンピュータ自体に専用の高度な割込処理回路を持たず、 コンピュータの 外部に設けた簡易な回路と、 コンピュータで動作する割込処理プログラムとを用 いて複数の割込入力信号を共通に割込処理する割込制御方法と装置に関する。 背京技俯
最近、 簡易な小型コンピュータ、 たとえば、 R I S Cを使用したワークステ ーシヨン、 あるいは、 画像処理装置が頻繁に用いられてきている。
R I S Cは、 コンピュータの機械語レベルで最も使用頻度の高い基本的な命 令、 例えばメモリおよびレジスタに対するストァ命令やロード命令等を高速に実 行するように設計されたコンピュータである。 R I S Cは通常パイプライン構造 の演算処理回路を有し、 各命令を同一動作サイクルで実行してパイプライン構造 の演算処理回路の性能を最大限に向上するように設計されている。
上述の特徴により、 R I S Cは、 同程度の規模の装置に使用される普通のマ イク口プロセッサ、 あるいは C I S C (Complicated Instruction Set Computer ) と比較して、 通常、 非常に少ない数の回路素子で構成されており、 必ずしも通 常のマイクロプロセッサ自体が提供する必要のない機能を実現する部分はできる 限り省略されている。 そのような省略した回路例として、 割込処理回路が該当す 例えば、 M I P S社の R I S C . R 3 0 0 0は、 8本の割込入力端子を有す るが、 それぞれの割込入力端子に入力された割込入力信号に対して 1つの割込処 理プログラムで割込処理が共通に行われる。 すなわち、 いずれの割込入力端子に 割込入力信号が印加されても、 それぞれの割込入力信号に対して共通の割込処理 プログラムが実行される。 このような R I S Cには、 8ビットマイク口プロセッサ、 例えば、 Z i 1 0 g社の Z 8 0においてさえ提供されていた割込入力端子個別の割込処理機能を提 供しないものがある。
従って、 このような R I S Cを使用した場合、 複数の割込入力端子に割込入 力信号が印加された場合、 割込入力端子個別の割込処理プログラムを自動的に起 動することができないという問題がある。
さらに、 このような R I S Cの同一割込入力端子に複数の割込入力信号、 例え ば DMAコントローラ、 シリアル通信用素子等の R I S Cの周辺回路からの割込 入力信号が多重化されている場合には、 割込処理プログラムを起動するための割 込制御はさらに困難であるという問題がある。 発明の開示
本発明は上述した問題点を克服するため、 複数の割込入力端子に入力される 割込入力信号に対して同一の処理を行うように構成された複雑な割込処理回路を 有しない R I S Cなどの小型コンピュータなどにおいて、 複数の割込入力信号に 対する割込処理制御を効率よく行うことが可能な割込制御方法と装置を提供する ことを目的とする。
また、 本発明は、 システムの変更および拡張等に柔軟に対応可能な割込制御 方法と装置を提供することを目的とする。
本発明によれば、 (a ) オペレーティングシステム、 共通割込制御プログラ ム、 割込信号に対応した割込処理プログラムおよび割込テーブルが記憶されてい る記憶手段と、 (b ) アドレスバスと、 (c ) データバスと、 前記アドレスバス と前記デ一夕バスとを介して前記記憶手段に接続され、 複数の割込入力端子を有 し、 割込信号がどの割込入力端子に印加されているかその状態を保持するステー タスレジスタを有する演算処理手段と、 (d ) 前記アドレスバスと前記データバ スとを介して前記演算処理手段に接続されており、 入力された割込要求信号を保 持して割込信号として前記演算処理手段の割込入力端子に出力し、 前記演算処理 手段からの解除信号に応じて該保持した割込要求信号の保持を解除し、 アドレス データと、 割込信号を保持している際に示される識別データとをそれぞれ異なる 値として出力する、 複数の割込信号保持手段と、 (e ) 前記複数の割込信号保持 手段を複数のグループに分割し、 分割したそれぞれのグループの割込信号保持手 段からの割込信号を、 前記演算処理手段のそれぞれ異なる割込入力端子に供給す る割込信号分割手段とを具備する割込制御装置が提供される。
前記記憶手段に記憶されている前記割込テーブルは、 上記各グループ毎に対 応する複数のサブテーブルを有し、 これらのサブテーブル内には、 前記複数の割 込信号保持手段に対応するァドレスデータと、 そのァドレスデータと対応する割 込信号保持手段に対する割込信号が入力されていることを示す識別データと、 対 応する割込信号保持手段に対する割込処理プログラムの名称が互いに関連付けら れて記憶されている。 そして、 前記演算処理手段は、 (i ) 前記割込入力端子に 前記割込信号が印加された際に、 共通の割込制御プログラムを動作させ、 (ii ) 該共通の割込制御プログラムに基づいて、 前記ステータスレジスタに保持された 状態に基づいて、 分割された前記割込信号保持手段の各グループの内の割込入力 信号が印加されているグループを識別し、 (iii ) 前記共通の割込制御プログラム に基づいて、 前記割込テーブルより前記識別されたグループに該当するサブテー ブルを参照して、 上記割込信号保持手段が保持するァドレスデータと上記識別デ —タとが、 上記サブテーブルの内容と一致する割込信号保持手段を特定し、 (iv ) 該特定したァドレスデータおよび識別データに対応する前記記憶手段に記憶さ れている割込処理プログラムを起動する。 つまり、 記憶手段は、 オペレーティングシステム、 割込制御プログラムを含 むアプリケーションプログラム、 および、 割込テーブルを記憶する。 演算処理手 段は、 複数の割込入力端子のいずれかに割込入力信号が印加されたとき、 記憶手 段に記憶された割込制御プログラムを実行する。 割込信号保持手段は、 例えば D M Aコント口ーラ等の割込信号発生回路から入力された割込入力信号を保持し、 割込入力信号を保持していることを示す識別データをァドレスバスおよびデータ バスを介して演算処理手段に渡す。 また、 割込信号保持手段は、 保持している割 込入力信号の保持を、 割込処理を行つた演算処理手段からの解除信号に応じて解 除する。 割込信号分割手段は、 複数の割込信号保持手段が保持している割込入力 信号をまとめて演算処理手段の割込入力端子に対して印加することにより、 割込 入力端子ごとに割込信号保持手段を複数のグループに分割して取り扱うことを可 能にする。 割込テーブルは、 割込信号保持手段のグループ対応にサブテーブルを 有しており、 これらのサブテーブルは、 対応するグループに含まれる割込信号保 持手段それぞれの識別データを示すアドレスデータ、 および、 割込入力信号を保 持している際に示される識別データの内容を対応付けて記憶する。 共通の割込制 御プログラムは、 演算処理手段が割込入力端子を介してステータスレジス夕に受 け入れた割込入力信号に基づいて、 その割込入力信号が属するグループを特定す る。 さらに、 共通の割込制御プログラムは、 記憶手段に格納されている割込テー ブルを参照して、 特定されたグループに対応するサブテーブルの割込処理用デ一 タを順次、 読み出して、 読み出したデータとサブテーブルの対応する識別データ とが一致する割込信号保持手段を特定する。 さらに、 共通の割込制御プログラム は、 特定した割込信号保持手段に対応する記憶手段に記憶された所望の割込処理 プログラムを演算処理手段で実行させ、 あるいは、 2次記憶装置上から記憶手段 に割込処理プログラムを一旦ロードして演算処理装置で実行させる。
好適には、 前記演算処理手段により前記ァドレスバスを介してァドレス指定 された割込信号保持手段は、 前記デ一夕バスを介して前記演算処理手段が出力し た解除信号に基づいて保持した前記割込入力信号を解除する。
また好適には、 前記ァドレスバスと前記データバスとを介して前記演算処理 手段に接続されており、 前記ァドレスバスおよび前記データバスを介した前記演 算処理手段の制御に従って、 前記割込信号保持手段のそれぞれに対する解除信号 を出力する割込解除信号生成手段をさらに有する。
さらに好適には、 前記割込要求信号のそれぞれは、 前記アドレスバスと前記 データバスとを介して前記演算処理手段に接続されている前記演算処理手段の外 部の割込信号発生回路によって発生される。 前記割込信号発生回路のそれぞれは 、 前記割込要求信号を出力する場合にそれぞれ所定のァドレスと所定のデータを 出力する。 前記演算処理手段は、 前記アドレスに示された前記所定のデータを読 み出す。
好適には、 前記割込テーブルにはさらに前記複数のグループに対する優先順 位データが記憶されており、 前記演算処理手段は、 優先順位の高いグループより 順に前記割込制御プログラムに基づいて前記対応する割込処理プログラムを起動 する。
また好適には、 前記記憶手段に記憶されている共通の割込制御処理プログラ ムおよび割込信号に対応した割込処理プログラムは、 通常のアプリケーションプ αグラムの 1つとして動作する。
また本発明によれば、
記憶手段に、 アプリケーションプログラムの 1つとして動作する共通の割込 制御プログラムと、 割込信号に対応してアプリケ一シヨンプログラムの 1つとし て動作する割込処理プログラムを記憶する段階、
前記記憶手段に格納される割込テ一ブルに種々の割込処理条件を登録する段 階、
割込信号が発生したとき、 割込信号の発生を検出する段階、
該検出に応答して、 前記共通の割込制御プログラムを起動させて、 前記割込 テーブルの内容を参照して該当する割込信号を特定する段階、 特定された割込信号に対応する割込処理プログラムを起動する段階 を有する割込制御方法が提供される。 図面の簡単な説明
本発明の上述した目的および特徵、 および、 その他の目的および特徵は、 添 付図面に関連づけて述べる下記の記述から一層明瞭になるのであって、
図 1は、 本発明の割込制御装置の第 1実施例の構成図であり、
図 2は、 図 1に示したメモリ回路に記憶されている割込テーブルの構成を示 す図であり、
図 3は、 図 1に示した割込制御装置において実行される、 テーブル 2に示し た割込処理プログラムの処理を示すフローチャートであり、
図 4は、 テーブル 3に示した R I S Cプロセッサにおいて実行される割込処 理プログラムを起動する処理を示すフローチヤ一トであり、
図 5は、 図 4に示したステップ 1 0 0の詳細処理を示すフローチャートであ り、
図 6は、 本発明の割込制御装置の第 2実施例の構成図であり、
図 7は、 本発明の割込制御装置の第 3実施例の構成図である。
発明を実施する最良の形態
第 1実施例
図 1〜図 5を参照して本発明の割込制御装置の第 1の実施例を説明する。 本発明の第 1実施例の割込制御装置は、 複数の割込入力信号を受け入れる割 込入力端子を有している。 しかしながら、 これら複数の割込入力端子に印加され る割込入力信号に対して共通に割込処理を行う。 つまり、 割込入力端子ごとに個 別アドレスへの実行権を移さないマイクロプロセッサ、 たとえば、 M I P S社の R I SC. R 300を用いた割込制御装置である。 そのような R I S Cは、 画像 信号処理などを行う。 この画像信号処理において、 R I SCに対する種々の割込 処理が発生する。
なお、 以下の実施例において、 簡易小型コンピュータとして、 R I SCを例 示するが、 本発明の割込制御装置は R I SCを用いる場合に限らず、 R I SCと 同等のコンピュータを用いた割込制御装置についても本発明が適用されることは いうまでもない。
図 1に示した割込制御装置 1は、 R I SCプロセッサ 10、 外部ラッチ 20 a、 第 1の論理和 (OR)回路 22 a、 第 2の OR回路 24 a、 割込信号保持回 路 26 a! 〜26 an 、 制御回路 28 a、 データバス 3 0、 ァドレスバス 32お よびメモリ回路 34から構成されている。 なお、 割込制御装置 1の外部には、 た とえば、 DMAコントローラ等の割込信号発生回路 42が設けられている。
R I SCプロセッサ 10は、 ステータスレジスタ 120を有する演算処理装 置 12と、 割込信号入力バッファ 14とを有している。
なお、 図解の簡略化のために、 図 1においては、 第 1の割込入力端子 i n t 0に対応する外部ラッチ 20 a、 第 1の OR回路 22 a、 第 2の OR回路 24 a 、 割込信号保持回路 26 a, 〜26 an 、 制御回路 28 aのみを図解しているが 、 第 2〜第 8の割込入力端子 i n t l〜i n t 7に対応して、 7個の外部ラッチ 20 b〜20 g (図示せず) 、 7個の第 1の OR回路 22 b〜24 g (図示せず )、 7個の第 2の OR回路 2 b〜24 g (図示せず) 、 割込信号保持回路 26 b1 〜26 bm , 〜, S S gi z e g! (図示せず) 、 7個の制御回路 28 b 〜28 g (図示せず) が設けられる。 それぞれの割込入力端子 i n t 0〜i n t 7に対応する割込信号保持回路の数は、 同じでもよいし (n=m=l)、 異なつ ていてもよい (n≠m≠ 1)。 なお、 R I SCプロセッサ 10、 データバス 30 、 アドレスバス 32、 メモリ回路 34はそれぞれ 1個である。 割込信号発生回路
2は割込入力信号の数だけ設けられる。 以下、 R I S Cプロセッサ 1 0の割込信号入力バッファ 1 4に接続された第 1の割込入力端子 i II t 0に対する構成および動作を中心に述べる。
デ一夕バス 3 0は、 R I S Cプロセッサ 1 0、 メモリ回路 3 4、 割込信号保 持回路 2 6 a ! 〜2 6 a n 、 および、 制御回路 2 8 aとの間で授受されるデータ を伝送する。
ァドレスバス 3 2は、 R I S Cプロセッサ 1 0とメモリ回路 3 4とのァドレ スの伝送を行う他、 R I S Cプロセッサ 1 0からのアドレスを割込信号保持回路 2 6 a i 〜2 6 a n および制御回路 2 8 aに対して伝送する。
メモリ回路 3 4は、 R I S Cプロセッサ 1 0内の演算処理装置 1 2による演 算処理に係るデータおよび制御プログラム、 つまり、 オペレーティングシステム 、 割込制御プログラムを含むアプリケーションプログラム等のプログラム、 およ び、 後述する割込テーブルを記憶している。
演算処理装置 1 2は、 メモリ回路 3 4に記憶されたオペレーティングシステ ムおよび割込制御プログラムを含むアプリケーションプログラム等のプログラム に係る演算処理を行う。
演算処理装置 1 2内のステータスレジスタ 1 2 0は割込信号入力バッファ 1 4から入力された割込入力信号を保持する。
割込信号入力バッファ 1 4は割込入力信号を通過させるのみでラッチする機 能を有さない。 すなわち、 割込入力信号はそのまま、 演算処理装置 1 2に供給さ れ、 ステータスレジスタ 1 2 0において保持される。 ステータスレジス夕 1 2 0 は、 どの割込入力端子 i n t 0〜i n t 7に割込信号が印加されているかが検出 できる。
割込信号保持回路 2 6 a i 〜2 6 a n に、 割込信号発生回路 4 2からのパル ス状の割込要求信号 r e qが印加されると、 該当する割込信号保持回路 2 6 & 1 〜2 6 a n はその割込要求信号を保持して、 外部ラッチ 2 0 aに対するラッチ信 号 1 a t c h、 および、 割込信号 i n tを生成し、 ラッチ信号 1 a t c hを第 2 の OR回路 24 aに、 割込信号 i ii tを第 1の OR回路 22 aに出力する。 また 、 割込信号保持回路 26 a: 〜26 a n は、 さらに割込要求信号 r e qが印加さ れた時に、 それぞれに対してあらかじめ設定されているそのァドレスを示すデ一 夕を生成する。 このアドレス情報は、 R I SCプロセッサ 1 0が、 アドレスバス 32及びデータバス 30を介して検出できる。
制御回路 28 aは、 データバス 3 0およびァドレスバス 32を介して接続さ れている R I SCプロセッサ 1 0によって制御され、 割込信号保持回路 263 l 〜26 a„ に対してチップセレクト信号 CSを印加し、 外部ラッチ 20 aに対し てリセット信号 RESETを出力する。
第 1の OR回路 22 aは、 割込信号保持回路 26 a! 〜26 an からの割込 信号 i n tの論理和 (OR) を算出して外部ラッチ 20 aの信号入力端子 Dに対 して出力する。
第 2の OR回路 24 aは、 割込信号保持回路 26 a! 〜26 an からのラッ チ信号 1 a t c hの論理和を算出して外部ラッチ 20 aのラッチ信号入力端子に 対して出力する。
外部ラッチ 20 aは、 第 1の OR回路 22 aで算出した割込信号保持回路 2 6 a i 〜26 an からの割込信号 i n tの論理和信号を、 第 2の OR回路 24 a で算出した割込信号保持回路 26 ai 〜26 an のラッチ信号 1 a t c hの論理 和信号に基づいてラッチして、 R I SCプロセッサ 1 0の割込信号入力バッファ 1 4にに出力する。 外部ラッチ 20 aでラッチされた割込信号 i n tは制御回路 28 aからのリセッ ト信号 RESETによりリセッ トされる。
つまり、 割込信号発生回路 4 2から割込要求信号 r e qが割込信号保持回路 26 a i 〜26 an のいずれかに印加され、 その割込信号保持回路 26 a ! ( i = 0〜n) から論理値 1の割込信号 i n t i ( i = 0〜n) が出力されると、 第 1の OR回路 22 aを介して外部ラッチ 20 aの信号入力端子に印加される。 割 込信号保持回路 26 a! 〜26 a„ のラッチ信号 1 a t c hは、 それぞれの割込 信号 i n t i ( i = 0~n) をラッチするために適したタイミングで生成されて おり、 割込信号保持回路 26 a! 〜26 an のラツチ信号 1 a t c hのいずれか の論理値が 1になると第 2の OR回路 24 aの出力信号の論理値は 1となり、 外 部ラッチ 20 aのラッチ信号入力端子に印加されて、 外部ラッチ 20 aにおいて 割込信号 i n tを保持し、 外部ラッチ 20 aから割込信号 i n t aを割込入力端 子 i n t 0を介して割込信号入力バッファ 14に印加する。
第 1の OR回路 22 aは、 割込信号保持回路 26 a! 〜26 an の内の 1つ 以上が割込信号 i n tを出力したとき、 外部ラッチ 20 aに論理値 1の信号を出 力するので、 外部ラッチ 20 aの Q端子から割込信号 i n t aが印加される割込 入力端子 i n t 0には、 複数の割込信号保持回路 26 a i 〜26 an からの複数 の割込入力信号 (割込要求信号) を同時に受け付けることができる。
なお、 割込信号入力バッファ 14に接続されているその他の割込入力端子 i n t l〜i n t 7に対応して、 外部ラッチ 20 b〜20 g (図示せず) 、 第 1の OR回路 22b〜22 g (図示せず) 、 第 2の OR回路 24 b〜24 g (図示せ ず) 、 割込信号保持回路 Ζ δ Ζ δΙ)» Z S g i Z S gn 制御回 路 28 b〜28 gが設けられているので、 割込入力端子 i n t l〜i n t 7のそ れぞれも、 割込入力端子 i n t 0と同様に、 複数の割込信号保持回路からの割込 入力信号 (割込要求信号) を同時に受け付けることができる。
割込入力端子 i n t 0〜i n t 7のいずれかに外部ラッチ 20 a〜20 gの いずれかから割込信号が印加された場合に R I SCプロセッサ 1 0が実行する割 込制御プログラムの処理を説明する。 なお、 割込制御プログラムは、 テーブル 1 〜テーブル 3に示す各プログラムから構成されている。
テーブル 1および図 2に示すように、 割込制御装置 1において、 割込信号お よび割込信号保持回路 26 a! 〜26 an , 〜, 26 〜26 g„ の条件が、 メモリ回路 34内の割込テーブルにデータベースの形式で登録される。
テーブル 1は、 割込テーブル (データべ一ス) に対する割込信号保持回路 2 s a i z e an , , z e gi z e gn の条件登録を行う c言語によるプロ グラム (D a t a b a s e) の例を示したものである。 テーブル 1における各デ 一夕 i n t― pr o c リ , i n t― a d r , i n t― y e, i n t一 v a 1, i n t_p i dはそれぞれ、 図 2に示す同名のデータに対応している。 そし て、 表 1に示すプログラム処理により図 2に示す割込テーブル (データベース) の各サブテーブルに上述したデータが登録される。 テーブル 1
構成;
Database; struct int_table [LEVEL] [ AXINT]= {0 } ;初期値
構造体; struct int_table {
void OintproclO) :処理プログラムのアドレス (PS 01) union int_adr { (P S 02) unsigned char *c_adr ;ノ ィ 卜の場合
unsigned short *w_adr ; ワードの場合
unsigned *l_adr ; ロングワードの場合
} ;
int int一 type;データの型 (PS 03) int int_val ;値、 ビット、 IZO (PS04) int int— pid ;仮想アドレスの識別 (PS 05)
} ; 但し、 〔LEVEL〕 は登録される割込信号保持回路の処理の優先順位であ り、 〔MAX I NT) は割込の多重度、 つまり、 割込入力端子 i n t 0〜i n t 7に接続される割込信号保持回路の数である。 割込入力端子 i η ΐ 0の場合、 図 1に示したように、 割込信号保持回路の数は η個なので 〔ΜΑΧΙΝΤ〕 の値は nとなる。
図 2に示すように、 データべ一ス i n t_t a b 1 e (割込テーブル) は、 割込入力端子 i n t 0〜i n t 7のそれぞれに対応して 8枚のメインテーブル ( LEVEL)から構成されており、 テーブル 1に示したプログラム処理により、 各メインテーブルごとに、 図 2の最左欄に示す割込信号保持回路 26 a i 〜26 an , 〜, 26 〜26 gn 対応にサブテーブルが設定される。
テーブル 1のプログラムステップ 01 (PS 01) において、 メモリ回路 3 4に記憶された割込信号保持回路 26 a1 〜26 an , 〜, Z G gi Z S gn に対^:するアプリケーションプ αグラムの 1つとして取り扱われている割込処理 プログラムの開始ァドレスを示すデータ i n t_p r o c 0が登録される。
ここで、 割込処理プログラムも、 R I SCプロセッサ 10で動作するアプリ ケーションプログラムの 1つに過ぎないことに留意されたい。
プログラムステップ 02 (PS 02) において、 割込信号を特定するために 用いられるアドレスデータ i n t— a d rが設定される。 ここで、 アドレスがバ ィト形式の場合 (unsigned char *c_adr ) と記述され、 ヮ一ド形式の場合 (un signed short *w_adr ) と記述され、 ロングワードの場合 (unsigned *l_ad r ) と記述される。
プログラムステップ 03 (PS 03) において、 割込信号発生回路 42が割 込信号保持回路 Z S a i S S an , , Z S gi Z S gn のそれぞれ割込を 要求する際に、 ァドレスデータ i n t_a d rの形式を示すデータ i n t_t p eが登録される。
プログラムステップ 04 (PS 04) において、 割込要求時に割込信号保持 回路 Z S a ! Z S an , , Z e gi Z S gn の識別データの内容を示すデ 一夕 i n t_v a 1が登録される。
プログラムステップ 05 (PS 05) において、 仮想アドレス処理の有無を 示すデータ i n t_p i dを登録する。 割込信号保持回路が R I SCプロセッサ 1 0に対して仮想アドレスを使用した割込処理を要求する場合、 R I SCプロセ ッサ 1 0は、 デ一夕 i n t_p i dを検出して仮想ァドレス処理を実行する。
また、 割込制御装置 1における割込処理プログラムのシステムコールとして の登録は、 例えば、 表 2に示すプログラムにより行われる。
テーブル 2は、 割込処理プログラムの登録を行う C言語によるプログラム ( i n t_v e c t_s e t) の例を示す。 テーブル 2
int_vect_set (level, int—info)
int level ;
struct int— table *int_info;割込の優先順位
{
extern struct int—table **itbl; 割込情報
struct int—table *itp;
int i; for (itp = &itpl [level] [0] i=0; i く AXINT; itpH, iH ) { if (!itp-> int— type) {
copybuf (tp, int _inf, sizeof (struct int_ta ble ) )
return YES;
{
return NO;
void copybuf (blf b2, size)
unsigned char *bl, *b2; int size;
while (size--) return;
ここで、 テーブル 2中の (l eve l) はテ一ブル 1に示した (LEVEL ) に対応し、 テーブル 2中の (i n t— t a b 1 e) はテーブル 1に示した (i n t_t ab l e) に対応する。
ただし、 テーブル 2において、 データ i n t— i n f 0は、 テーブル 1に示 したデータベース i n t_t ab 1 eへのポインタ (ァドレス) を示す。
また、 テーブル 2において、 データ i n t_v e c t_s e t () は、 イン タラプトセッ トシステムコ一ゾレ ( I n t e r r u p t s e t sys t em c a l l) を行わせる。
図 3は、 テーブル 2に示した割込処理プログラムの登録を行う C言語による プログラムの例の処理の一例を示すフローチヤ一トである。
図 3において、 処理ステップ 1 1 (S I 1) において、 割込入力端子 i n t 0~i n t 7に対応する、 メモリ回路 34に格納されている割込テーブル (メイ ンテーブル) のア ドレスを得る。
処理ステップ 12 (S 12) において、 処理ステップ 1 1で選択したメイン テーブルの各行 (サブテーブル) を順次チ Xックして、 空いた行 (空きテーブル
) を探す。
処理ステップ 1 3 (S 1 3) において、 処理ステップ 1 1で選択したメイン テーブル内のサブテーブルに空きテーブルがあるか否かを判断する。 空きテープ ルがある場合には S 1 4の処理に進み、 空きテ一ブルがない場合には S 1 6の処 理に進む。 処理ステップ 14 (S 1 ) において、 割込情報を S 12の処理において探 し出した空きテーブルに設定する。
処理ステップ 1 5 (S 1 5) において、 正常終了をセッ 卜する。
処理ステップ 1 6 (S 1 6) において、 異常終了をセットし、 登録できなか つたことを利用者に知らせる。 。
テーブル 1および図 2を参照して上述したように割込信号保持回路 26 ai 〜26 a„ , 〜, S S g i Z S gn の条件がメモリ回路 3 内の割込テーブル に登録され、 テーブル 2および図 3を参照して述べたように、 割込信号保持回路 26 a1 〜26 aa , 〜, 26 g1 〜26 gn それぞれに対応する割込処理プロ グラムがシステムコールとして割込テーブルに登録された割込制御装置 1におい て、 割込信号保持回路 26 〜26 an のいずれかから割込信号が発生された 場合の処理を説明する。
下記テーブル 3は、 メモリ回路 34の指定のアドレスに記億され、 割込信号 保持回路 26 a! 〜26 an , 〜, 26 〜26 gn のいずれかからの割込信 号が発生した場合に起動され、 R I SCプロセッサ 1 0において割込処理を行い 、 割込信号を出力した割込信号保持回路を特定し、 特定した割込信号保持回路に 対応する割込処理プログラムを起動する C言語によるプログラム (i n t_c o m) の例を示したものである。 テーブル 3
int_com()
{
extern struct int一 table **itbl;
struct int_tabale *cktble;
int count, level;
unsigned data; saveregO ;
for (level = MAXLEVEL; level ; level--) {
cktable = &intbl [level] [0] ;
for (count = 0; count < MAX I NT, cntH, itp+ ; { if (cktable->int_type) {
switch (itp-> int— type) {
case BYTE :
data = (unsigned)cktable->int_adr. c_adr; break;
case WORD :
data = (unsigned)cktable->int_adr. w_adr; break;
default:
data = (unsigned)cktable->int_adr. l_adr; break;
}
if (data == cktable - > int_val) {
if (cktable -> int_pid )
mapset (cktable -> int_pid ) ; cktable->int_procl();
}
}
}
recoverregO ; return;
図 4は、 テーブル 3に示した特定された割込信号保持回路に対応する割込処 理プログラムを起動する C言語によるプログラムの例の処理を示すフローチヤ一 トである。 このプログラムは、 割込信号保持回路 26 a i 〜26 an, 〜, 26
〜26 gn のいずれかからの割込が発生した場合に起動される。
図 4において、 数値 c k t ab 1 eとは割込処理の対象となっている割込信 号保持回路のテーブル 1に示したデータを示す。 例えば、 処理ステップ 23 (S 23) の処理におけるように" c hk t ab l e= i ii t— t b l 〔 l e v e l 〕 " と記述されている場合、 この処理は、 数値 1 e V e 1と対応するデータ i n t_t b 1 CI e v e 1 ) がー致するデータを探す処理を行う。 また、 処理ステ ップ 29の処理におけるように" d a t a = c k t a b 1 e→v a 1 " と記述さ れている場合、 数値データに割り込み処理の対象となっている割込信号保持回路 のテーブル 1に示したデータ i n t_v a 1を設定する処理を行う。
処理ステップ 2 1において、 割込信号保持回路 26 〜26η , 〜, 26 gi 〜26 gn のいずれかに対し、 割込信号発生回路 4 2から割込要求信号 r e qが印加されると、 割込要求信号 r e qが印加された割込信号保持回路 26 a! 〜26η , 〜, 26 〜26 gn は、 その割込要求信号を基に生成した割込信 号 i n tを第 1の OR回路 22 a〜22 gのいずれかに出力する。 さらに、 割込 要求信号 r e qが印加された割込信号保持回路 26 at 〜26„ , 〜, 26 ~26 g„ は、 割达信号 i n tが確実に立ち上がり安定したタイミングでラッチ 信号 1 a t c hを外部ラッチ 20 a〜20 gに出力する。 なお、 割込信号保持回 路込信号 26 〜26n, 〜, 26 〜26 gn は、 割込要求信号 r e qが 印加された際に特定のアドレスを表すビッ トが立つようになされており、 この値 (ァドレス) は、 データパス 3 0を介して R I SCプロセッサ 1 0が検出できる ようになされている。
外部ラッチ 20 a〜20 gは印加されたラッチ信号 1 a t c hのタイミング でデータ端子 Dに第 1の OR回路 22 a〜22 gを介して印加された割込信号 i n tをラッチする。 外部ラッチ 20 a〜20 gでラッチされた割込信号は、 外部 ラッチ 20 a〜 20 gの Q端子を介して、 R I SCプロセッサ 10の割込信号入 力バッファ 14に接続されている割込入力端子 i n t 0〜i n t 7のいずれかに 出力される。 R I SCプロセッサ 10は、 割込入力端子 i n t 0〜i n t 7のい ずれの端子に入力があつたかを知ることができ、 この情報をステータスレジス夕
120に保持しておく。 R I SCプロセッサ 10は、 いずれかの割込入力端子 i n t 0〜i n t 7に割込信号が供給されると、 R I SCプロセッサ 10内の種々 のレジスタ (図示せず〉 に保持されているデータの退避を行い、 さらに数値レべ ル 1 eve 1に初期値として最大値 maxを設定する。 その結果、 数値レベル 1 eve 1の大きい方から優先順位が高いものとして割込処理が行われる。 なお、 この実施例では、 数値レベル 1 eve 1は 0〜7までの 8レベルあり、 最低値は 0であり、 最大値 maxは 7である。 この数値レベル 1 e v e 1は、 各割込入力 端子 i n t 0〜; L n t 7に対応する。
次に処理ステップ 22において、 数値 1 eve 1が 0であるか否かが判断さ れる。 ここで、 数値レベル 1 eve 1は、 最初に、 処理ステップ 21で最大値 m axに設定されるので、 処理ステップ 32以降の処理を全ての数値レベル 1 ev e 1に対して実行した後に、 この処理ステップ 22で否定結果として判断される
(N)。
処理ステップ 22で否定結果になると (N)、 処理ステップ 23に進み、 現 在設定されている l eve lに対応するメインテーブルを設定する。 すなわち、 図 2における割込入力端子 i n t 0〜i n t 7の中のいずれかのメインテーブル を設定する。
そして、 処理ステップ 2 に進み、 ここでカウント値 c 0 u n tに 0を設定 する。 ここで、 カウント値 c o u II tは、 図 2に示した各テーブル i n t 0〜i n t 7の中の各行、 26 a 〜26 an に対応する。 すなわち、 カウント値 c o u n tは、 各 1 e v e 1内のいずれかの割込信号保持回路 26 a , 〜 26 a n に 対応することになる。
次に処理ステップ 25において、 カウント値 c o un tが最大 ma Xである か否かが判断される。 そして、 最初はカウント値 c 0 un tが 0であるため処理 ステップ 27に進む。
処理ステップ 27では、 サブテーブルとして、 カウント値 c 0 un tに対応 するものが設定される。
そして、 処理ステップ 28に進み、 テーブルがエントリされているか否かを 判断する。 これは、 現在設定されているサブテーブルにデータが記録済であるか 否かを見ることで判断される。
テーブルがェントリされていない時は、 処理ステップ 33でカウント値 c 0 un tを 1だけインクリメントし、 処理ステップ 25を介して処理ステップ 27 で次のサブテーブルを設定する。 これに対し、 テーブルがエントリされている時 は、 図 5に示す処理ステップ 1 00に進み数値 da t aが設定される。
処理ステップ 1 00の詳細を図 5を参照にして説明する。
まず、 処理ステップ 101で現在設定されているサブテーブルの中の i n t— typ eを参照し、 バイト形式である時には、 処理ステップ 102に進む。 そし て、 バイト形式でない時は、 処理ステップ 1 03でヮード形式か否かを判断し、 ワード方式である時は、 処理ステップ 1 04に進む。 処理ステップ 1 03で否定 結果が得られる際は、 残りのロングワード形式であると判断される。 そして、 処 理ステップ 1 02、 1 04及び 1 05でそれぞれのヮード形式に応じて、 現在設 定されているサブテーブルの i n t— a d rに対応するァドレスを する割込信 号保持回路 Ζ δ β ί Ζ δ η , 〜, Z S g i Z G gn のビッ ト値 da t aを読 み取る。 図 4の処理ステップ 2 9において、 このビッ ト値 d a t aが、 現在設定され ているサブテーブルにおける i n t— V a 1の値と一致するかを判断する。 一致 した際には、 割込信号が印加された割込信号保持回路 2 6 a i 〜2 6 n , 〜, 2 6 1 〜 2 6 g » が特定されたことになり、 処理ステツプ 3 0に進む。
処理ステップ 3 0では、 プロセス I Dがあるか否かが判断される。 具体的に は、 現在設定されているサブテーブルの i n t - p i dの値が所定値であるか否 かによつて、 プロセス I Dがあるか否かが判断される。 そして、 プロセス I Dが ある場合には、 いわゆる仮想アドレスマッピングの処理がなされ、 プロセス I D がない場合には、 そのまま処理ステップ 3 2に進む。
処理ステップ 3 2において、 設定されているサブテーブルの i n t— p r 0 c 0 に示すメモリ回路 3 4のアドレスに含まれる割込処理プログラムが起動さ れる。 また、 この処理ステップ 3 2において、 割込信号処理回路 2 6 a i 〜2 6 n , 〜, 2 6 g 1 〜2 6 g n に対するビッ トリセッ トを行う。
この割込処理プログラムが終了すると処理ステップ 3 3に進み、 カウント値 を 1だけ増加させて次のサブテーブルに対して同様の処理を行う。 従って、 各レ ベル 1 e v e 1内では、 値の小さいサブテーブルから優先順位が付けられ処理が なされることになる。 そして、 全ての数値レベル 1 e v e 1の全サブテーブルに 対してこの処理がなされると、 処理ステップ 2 2で肯定結果が得られ (Y) 、 処 理ステップ 3 4に進む。
処理ステップ 3 において、 処理ステップ 2 1において退避したデータにつ いてのレジスタ復帰がなされ、 この処理を終了する。
上述したように、 割込制御装置 1においては、 割込信号保持回路 2 6 a , 〜 2 6 a n , 〜, 2 6 〜2 6 g n にそれぞれ対応したデータが、 テーブル 1お よび図 2に示したデータベースの形式で割込テ一ブルに記憶されており、 対応す る割込処理プログラムがテーブル 2に示したプログラムによりシステムコールと して登録されている。 割込信号保持回路 Z S a i Z S an , , Z S gi Z S gn のいずれか から割込要求が発生した場合には、 R I SCプロセッサ 1 0は割込に共通に設定 された割込処理で示されるァドレスに記憶されているテーブル 3に示したプログ ラムを実行する。
テーブル 3に示したプログラムの実行により、 割込信号保持回路 26 〜 26 an , 〜, Z S g! Z S gn がそれぞれァドレスデータ i n t— a d r ( 表 1における c— a d r、 w— a d rあるいは 1— a d r )で示されるァドレス から、 割込信号保持回路がそのレジスタに記録された識別データを読み出し、 読 み出したデータを割込要求の際の内容 (テーブル 1における i n t— V a 1 ) と 比較して一致した場合に対応する割込処理プログラムを起動する (図 4における S 33) o
割込制御装置 1の R I S Cプロセッサ 1 0は、 上述の一連の割込制御が終了 した場合、 制御回路 28 a〜28 gからリセット信号 RESETを出力させて、 外部ラッチ 20 a〜20 gをリセッ トする。
割込制御装置 1を上述のように構成することにより、 新たな割込要求の発生 を伴うハードウェア的な変更を容易に行うことが可能である。 つまり、 外部ラッ チ 20、 第 1の OR回路 22、 第 2の OR回路 24、 割込信号保持回路 26! 〜 26» . 制御回路 28の組として増減させればよい。
また、 割込制御を、 メモリ回路 34に記憶させたアプリケーションプログラ ムの 1つとしての割込プログラムを演算処理装置 12にロードして行うから、 そ の内容は容易に変更でき、 演算処理装置 12の回路苜体には変更を伴わないから 、 ローダブルドライバーが実現できている。
また、 従来は各割込信号に個別に設ける必要があった、 割込信号印加時の R I SCプロセッサ 1 0のレジスタの退避を共通化することが可能である。
さらに、 演算処理装置 12において仮想ア ドレスを使用するか否かの判断を も行い、 必要な場合仮想アドレスマッピングを行っているので、 仮想アドレス上 の記憶領域に割込処理プログラムを置くことが可能になつている。
テーブル 3に示したように、 割込制御プログラムを C言語等の高級言語で記 述しているので、 そのプログラム記述が容易であり、 さらにアセンブラ等の C P U固有の記述をなくすことができるので割込制御プログラム等の移植性が向上す る。
なお、 テーブル 3に示した割込制御プログラムは、 必ずしも割込処理で示さ れるメモリ回路 3 4内の記憶領域に記憶されていなくともよく、 メモリ回路 3 4 の任意の領域に記憶しておくことができ、 割込要求発生の際に起動されればよい
O
図 2に示した割込テーブルに、 割込信号保持回路ごとの優先順位を示すデー 夕を付加することにより、 優先順位が高い割込信号保持回路の識別デー夕から読 み出して割込制御を行うことができる。 この際、 例えば、 優先順位が高い割込信 号保持回路の割込処理プログラムが終了してから、 次に優先順位が高い割込信号 保持回路の識別デ一タを読み出して処理を行うといつたように、 割込処理プログ ラムと割込を要求した割込信号保持回路の特定を、 優先順位が高い割込信号保持 回路から順に交互に行うように構成することもできる。
テーブル 1および図 2に示したデータ i n t _v a 1は、 識別デ一夕をヮ一 ド単位で表す必要はなく、 例えば、 識別データをビッ トチ Xックする際のビッ ト の位置あるいは値であってもよい。 なお、 このように、 ビッ トチェックを行うた めにデータ i n t— v a 1 としてビッ トの位置等を設定した場合、 テーブル 3に 示した割込制御プログラムを、 割込を要求した割込信号保持回路を特定するデー タ全体の一致を見るのではなく、 所定のビッ トのビッ トチェックを行うようにす るように変更する必要がある。
また、 データ i n t— V a 1 として、 メモリ回路 3 4に格納ざれる割込テ一 ブルに、 割込を要求した割込信号保持回路を特定するために用いるプログラムの 開始ァドレスを登録してもよい。 また、 データ i n t _v a 1は、 必ずしも割込 制御装置 1内部の割込信号保持回路が示す識別データ信号でなくともよく、 例え ば 1 0装置 (図示せず) が R I S Cプロセッサ 1 0に対して所定のァドレスに 示す識別データであってもよい。
第 2実施例
以下、 上述したテーブル 1〜テーブル 3および図 2〜図 6を参照して本発明 の割込制御装置の第 2の実施例を説明する。
図 6を参照して第 2実施例としての割込制御装置 2の構成を説明する。
割込制御装置 2は、 図 1に示した R I S Cプロセッサ 1 0と同等の演算処理 装置 1 2および割込信号入力バッファ 1 4を有する R I S Cプロセッサ 1 0、 2 次記憶装置 4 6、 図 1に示した割込信号保持回路 2 6 a i 〜2 6 a n に対応する 割込信号保持回路 4 0 a i 〜4 0 a n 、 図 1に示した第 1の O R回路 2 2 aと同 じ O R回路 2 2 a、 図 1に示した割込信号発生回路 4 2に該当する割込要求信号 を出力する割込信号発生回路 4 2 〜4 2„ 、 ァドレスデコーダ 4 4、 データバ ス 3 0、 ァドレスバス 3 2およびメモリ回路 3 4から構成される。
割込制御装置 2は、 第 1の実施例に示した割込制御装置 1と異なり、 割込信 号保持回路 4 0 〜4 0 a n が割込信号 i n tのみを出力するように構成され ている。 つまり、 図 1に示した第 2の O R回路 2 4 aがなく、 さらには、 図 1に 示した外部ラッチ 2 0 aがない構成となっている。 このように外部ラッチがない 場合でも、 割込信号保持回路 4 0 〜4 0 a n を有するので、 R I S Cプロセ ッサ 1 0の演算処理装置 1 2は、 一時的に立ち上がる割込信号を保持することが できる。 従って、 割込制御装置 2は、 図 1に示す割込制御装置 1同様に割り込み 制御処理を行うことができる。
図 6において、 2次記憶装置 4 6は、 例えばハードディスク装置であって、 オペレーティングシステムおよびアプリケーションプログラム等を記憶し、 R I S Cプロセッサ 1 0の制御に従って、 これらのプ πグラム等をメモリ回路 3 4に 対して一旦ロードし、 また、 メモリ回路 3 4に記憶されたデ一夕をセーブする。 割込信号保持回路 4 0 a i 〜4 0 an に対して割込要求信号を出力する割込 信号発生回路 4 2 ! 〜4 2n は、 図 1に示した割込信号発生回路 4 2と同様な回 路であり、 R I SCプロセッサ 1 0に対して割込を要求する際に、 それぞれ割込 要求信号 r e q! 〜r e q„ を活性化して、 対応する割込信号保持回路 4 0 a i 〜4 0 an に対して出力する。
割込信号保持回路 4 0 a , 〜4 0 an は、 割込要求信号発生回路 42! 〜4 2„ から出力された割込要求信号 r e qi 〜r e qn を所定の時間だけ遅延して ラッチ信号を生成する遅延回路、 および、 この遅延回路が生成したラッチ信号を 用いて割込要求信号 r e 〜r e qn をラ、ツチするラッチ回路を有し、 割込要 求信号 r e qj 〜r e qn を保持して R I SCプロセッサ 1 0の割込入力端子 i n t 0に対して出力する。 また、 割込信号保持回路 4 0 a i 〜4 0 an はデータ バス 3 0およびァドレスバス 32を介して R I SCプロセッサ 1 0に接続されて おり、 活性化した割込要求信号 r e q! 〜r e qn を保持している場合には、 そ のことを示す内容の識別データをそれぞれ個別のア ドレス A 4 〜A4 0n と して示す。
なお、 R I SCプロセッサ 1 0がデータバス 3 0及びァ ドレスバス 32を介 して割込信号保持回路 4 0 ai ~4 0 an の所定のレジスタにアクセスすること により、 あるいは、 所定のレジスタに所定の数値を書き込むことにより、 割込信 号保持回路 4 0 ai 〜4 0 an が保持した割込要求信号 r e 〜r e qn を解 除することができる。
ァドレスデコーダ 4 4は、 R I SCプロセッサ 1 0からデ一夕バス 3 0に出 力されるア ドレス信号等に基づいて、 割込信号保持回路 4 O a t 〜4 0 an に対 してチップセレクト信号 CSを発生する。
OR回路 22 aは、 割込信号保持回路 4 0 a! 〜4 0 an から出力された割 込信号 i n tの論 S和を算出して割込入力端子 i n t 0に対して出力する。
つまり、 割込信号保持回路 4 0 a i 〜4 0 a» の割込信号 i n tのいずれか が活性化して論理値 1になった場合、 O R回路 2 2 aの出力信号の論理値は 1と なるので、 割込入力端子 i n t 0は、 複数の割込要求信号発生回路 4 2: 〜4 2 n からの割込信号を受け付けることができる。
まず、 テーブル 1および図 2を参照して上述したように、 割込制御装置 2に おいて、 割込信号保持回路 4 0 a t 〜4 0 a n がデータベースの形式で割込テ一 ブルに登録される。
割込制御装置 2においても、 割込処理プログラムのシステムコールとしての 登録は、 例えばテーブル 2に示したプログラムにより、 図 3を参照して上述した ように行われる。 ただし、 インタラプトシステムコールにおいては、 割込を要求 した割込信号保持回路を特定可能なデータベースに必要なァドレス、 データを書 き込むことにより、 システム管理プログラムが割込管理テ一ブルに登録すること になる。
割込制御装置 2を上述のように構成することにより、 第 1の実施例の割込制 御装置 1と同様の効果を得ることができる。 また、 割込制御装置 2も割込制御装 置 1と同様の変形が可能である。
第 3実施例
以下、 図 7を参照して本発明の割込制御装置の第 3の実施例を説明する。 図 7に示すように、 本発明の割込制御装置 3は、 第 2の実施例として示した割 込制御装置 2の変形例であって、 割込信号保持回路 4 0 a , ( i = l〜: n ) と割 込要求信号発生回路 4 2 i とがいずれもデータバス 3 0およびアドレスバス 3 2 を介して R I S Cプロセッサ 1 0に接続されるように構成されている。
割込制御装置 3も、 第 1の実施例および第 2の実施例に示した割込制御装置 1、 2と同様の動作を行う。
このように割込制御装置 3を構成することにより、 割込信号保持回路 4 0 ; のレジス夕の他、 割込要求信号発生回路 4 2 i のレジスタも参照することができ るので、 より複雑な割込処理を行うことが可能になる。 以上述べた各実施例に示した他、 本発明の割込制御装置は、 例えば、 テープ ル 3に示したプログラムをアセンブラ、 あるいは、 P A S C A L等の他のプ αグ ラミング言語で記述する等、 種々の構成をとることができる。
以上述べたように本発明によれば、 複数の割込入力端子で同一の割込処理を 行う R I S C用マイク口プロセッサなどの簡易小型コンピュータを使用した割込 制御装置において、 複数の割込原因に対応する割込制御を効率よく行うことがで さ Φ θ
また、 上述のようなシステムの変更および拡張等の柔軟性を向上させること ができる。 産業上の利用可能性
本発明の割込制御装置および割込制御方法は、 簡易小型コンピュー夕を適用 した画像処理装置、 その他の種々の信号処理装置において、 その割込制御に効果 的に用いることができる。

Claims

請求の範囲
1 . オペレーティングシステム、 共通割込制御プログラム、 割込信号に対応し た割込処理プログラムおよび割込テ一ブルが記憶されている記憶手段と、
ァドレスノ スと、
データバスと、
前記ァドレスバスと前記データバスとを介して前記記憶手段に接続され、 複数の割込入力端子を有し、 割込信号がどの割込入力端子に印加されているかそ の状態を保持するステータスレジスタを有する演算処理手段と、
前記ァドレスバスと前記データバスとを介して前記演算処理手段に接続さ れており、 入力された割込要求信号を保持して割込信号として前記演算処理手段 の割込入力端子に出力し、 前記演算処理手段からの解除信号に応じて該保持した 割込要求信号の保持を解除し、 アドレスデータと、 割込信号を保持している際に 示される識別データとをそれぞれ異なる値として出力する、 複数の割込信号保持 手段と、
前記複数の割込信号保持手段を複数のグループに分割し、 分割したそれぞ れのグループの割込信号保持手段からの割込信号を、 前記演算処理手段のそれぞ れ異なる割込入力端子に供給する割込信号分割手段と
を具備し、
前記記憶手段に記憶されている前記割込テ一ブルは、 上記各グル一プ毎に 対応する複数のサブテーブルを有し、 これらのサブテーブル内には、 前記複数の 割込信号保持手段に対応するァドレスデータと、 そのァドレスデータと対応する 割込信号保持手段に対する割込信号が入力されていることを示す識別デー夕と、 対応する割込信号保持手段に対する割込処理プ口グラムの名称が互いに関連付け られて記憶されており、
前記演算処理手段は、 前記割込入力端子に前記割込信号が印加された際に、 共通の割込制御プロ グラムを動作させ、
該共通の割込制御プログラムに基づいて、 前記ステータスレジスタに保持 された状態に基づいて、 分割された前記割込信号保持手段の各グループの内の割 込入力信号が印加されているグループを識別し、
前記共通の割込制御プログラムに基づいて、 前記割込テーブルより前記識 別されたグループに該当するサブテーブルを参照して、 上記割込信号保持手段が 保持するァドレスデータと上記識別データとが、 上記サブテーブルの内容と一致 する割込信号保持手段を特定し、
該特定したァドレスデータおよび識別データに対応する前記記憶手段に記 憶されている割込処理プログラムを起動する
割込制御装置。
2 . 前記演算処理手段により前記ァドレスバスを介してァドレス指定された割 込信号保持手段は、 前記データバスを介して前記演算処理手段が出力した解除信 号に基づいて保持した前記割込入力信号を解除する
請求項 1に記載の割込制御装置。
3 . 前記ァドレスバスと前記データバスとを介して前記演算処理手段に接続さ れており、 前記ァドレスバスおよび前記データバスを介した前記演算処理手段の 制御に従って、 前記割込信号保持手段のそれぞれに対する解除信号を出力する割 込解除信号生成手段をさらに有する
請求項 1に記載の割込制御装置。
4 . 前記割込要求信号のそれぞれは、 前記アドレスパスと前記デ一夕バスとを 介して前記演算処理手段に接続されている、 前記演算処理手段の外部の割込信号 発生回路によって発生され、
前記割込信号発生回路のそれぞれは、 前記割込要求信号を出力する場合に それぞれ所定のァドレスと所定のデータを出力し、 前記演算処理手段は、 前記ァドレスに示された前記所定のデータを読み出 す
請求項 1に記載の割込制御装置。
5 . 前記割込テーブルにはさらに前記複数のグループに対する優先順位データ が記憶されており、
前記演算処理手段は、 優先順位の高いグループより順に前記割込制御プロ グラムに基づいて前記対応する割込処理プログラムを起動する、 請求項 1記載の 割込制御装置。
6 . 前記記憶手段に記憶されている共通の割込制御処理プログラムおよび割込 信号に対応した割込処理プログラムは、 通常のアブリケーシヨンプログラムの 1 つとして動作する、 請求項 1記載の割込制御装置。
7 . 記憶手段に、 アプリケーシヨンプログラムの 1つとして動作する共通の割 込制御プログラムと、 割込信号に対応してアプリケーションプログラムの 1つと して動作する割込処理プログラムを記憶する段階、
前記記憶手段に格納される割込テーブルに種々の割込処理条件を登録する 段階、
割込信号が発生したとき、 割込信号の発生を検出する段階、
該検出に応答して、 前記共通の割込制御プログラムを起動させて、 前記割 込テーブルの内容を参照して該当する割込信号を特定する段階、
特定された割込信号に対応する割込処理プログラムを起動する段階 を有する割込制御方法。
PCT/JP1994/001690 1993-10-12 1994-10-11 Dispositif et procede pour le controle d'interruptions WO1995010806A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US08/454,240 US5568643A (en) 1993-10-12 1994-10-11 Efficient interrupt control apparatus with a common interrupt control program and control method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP5/254133 1993-10-12
JP25413393 1993-10-12

Publications (1)

Publication Number Publication Date
WO1995010806A1 true WO1995010806A1 (fr) 1995-04-20

Family

ID=17260680

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1994/001690 WO1995010806A1 (fr) 1993-10-12 1994-10-11 Dispositif et procede pour le controle d'interruptions

Country Status (2)

Country Link
US (1) US5568643A (ja)
WO (1) WO1995010806A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970024764A (ko) * 1995-10-06 1997-05-30 다이나믹 로딩 메소드 콜 예외 코드용 방법 및 장치

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4406094C2 (de) * 1994-02-25 2000-04-13 Lp Elektronik Gmbh Vorrichtung zum Betrieb einer Steuerungsanwendung
US5884040A (en) * 1995-01-11 1999-03-16 Sony Corporation Per-packet jamming in a multi-port bridge for a local area network
US5857075A (en) * 1995-01-11 1999-01-05 Sony Corporation Method and integrated circuit for high-bandwidth network server interfacing to a local area network
US5940597A (en) * 1995-01-11 1999-08-17 Sony Corporation Method and apparatus for periodically updating entries in a content addressable memory
US6256313B1 (en) 1995-01-11 2001-07-03 Sony Corporation Triplet architecture in a multi-port bridge for a local area network
US5761492A (en) * 1996-05-07 1998-06-02 Lucent Technologies Inc. Method and apparatus for uniform and efficient handling of multiple precise events in a processor by including event commands in the instruction set
US6446173B1 (en) 1997-09-17 2002-09-03 Sony Corporation Memory controller in a multi-port bridge for a local area network
US6301256B1 (en) 1997-09-17 2001-10-09 Sony Corporation Selection technique for preventing a source port from becoming a destination port in a multi-port bridge for a local area network
US6816490B1 (en) 1997-09-17 2004-11-09 Sony Corporation Statistical learning technique in a multi-port bridge for a local area network
US6308218B1 (en) 1997-09-17 2001-10-23 Sony Corporation Address look-up mechanism in a multi-port bridge for a local area network
US6363067B1 (en) 1997-09-17 2002-03-26 Sony Corporation Staged partitioned communication bus for a multi-port bridge for a local area network
US6157951A (en) * 1997-09-17 2000-12-05 Sony Corporation Dual priority chains for data-communication ports in a multi-port bridge for a local area network
US6617879B1 (en) 1997-09-17 2003-09-09 Sony Corporation Transparently partitioned communication bus for multi-port bridge for a local area network
US6195715B1 (en) 1998-11-13 2001-02-27 Creative Technology Ltd. Interrupt control for multiple programs communicating with a common interrupt by associating programs to GP registers, defining interrupt register, polling GP registers, and invoking callback routine associated with defined interrupt register
US6598105B1 (en) * 1999-04-13 2003-07-22 Microsoft Corporation Interrupt arbiter for a computing system
US6539448B1 (en) * 2000-05-26 2003-03-25 Texas Instruments Incorporated Priority first come first serve interrupt controller
JP6418021B2 (ja) * 2015-03-18 2018-11-07 富士通株式会社 情報処理装置及び情報処理装置の制御方法
JP2016208269A (ja) * 2015-04-22 2016-12-08 キヤノン株式会社 情報処理装置、画像処理装置、通知制御方法、並びにプログラム

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51131229A (en) * 1975-05-12 1976-11-15 Hitachi Ltd Offering control system of electronic computer
JPS5783839A (en) * 1980-11-13 1982-05-25 Hitachi Ltd Control system for interruption request priority
JPS5882344A (ja) * 1981-11-11 1983-05-17 Usac Electronics Ind Co Ltd 割込み制御方式
JPS61231635A (ja) * 1985-04-05 1986-10-15 Hitachi Ltd 割込み制御方式
JPS62184542A (ja) * 1986-02-07 1987-08-12 Matsushita Electric Ind Co Ltd 割込み装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3599162A (en) * 1969-04-22 1971-08-10 Comcet Inc Priority tabling and processing of interrupts
US3665415A (en) * 1970-04-29 1972-05-23 Honeywell Inf Systems Data processing system with program interrupt priority apparatus utilizing working store for multiplexing interrupt requests
US3829839A (en) * 1972-07-24 1974-08-13 California Inst Of Techn Priority interrupt system
DE2659662C3 (de) * 1976-12-30 1981-10-08 Ibm Deutschland Gmbh, 7000 Stuttgart Prioritätsstufengesteuerte Unterbrechungseinrichtung
JPS61107456A (ja) * 1984-10-30 1986-05-26 Toshiba Corp 割込制御方式
US5027273A (en) * 1985-04-10 1991-06-25 Microsoft Corporation Method and operating system for executing programs in a multi-mode microprocessor
JPH0792782B2 (ja) * 1985-09-30 1995-10-09 富士通株式会社 処理実行システム
JP2855298B2 (ja) * 1990-12-21 1999-02-10 インテル・コーポレーション 割込み要求の仲裁方法およびマルチプロセッサシステム
JPH04318654A (ja) * 1991-02-13 1992-11-10 Hewlett Packard Co <Hp> マイクロプロセッサへの割り込みのリダイレクションシステム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51131229A (en) * 1975-05-12 1976-11-15 Hitachi Ltd Offering control system of electronic computer
JPS5783839A (en) * 1980-11-13 1982-05-25 Hitachi Ltd Control system for interruption request priority
JPS5882344A (ja) * 1981-11-11 1983-05-17 Usac Electronics Ind Co Ltd 割込み制御方式
JPS61231635A (ja) * 1985-04-05 1986-10-15 Hitachi Ltd 割込み制御方式
JPS62184542A (ja) * 1986-02-07 1987-08-12 Matsushita Electric Ind Co Ltd 割込み装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970024764A (ko) * 1995-10-06 1997-05-30 다이나믹 로딩 메소드 콜 예외 코드용 방법 및 장치

Also Published As

Publication number Publication date
US5568643A (en) 1996-10-22

Similar Documents

Publication Publication Date Title
WO1995010806A1 (fr) Dispositif et procede pour le controle d&#39;interruptions
US6282601B1 (en) Multiprocessor data processing system and method of interrupt handling that facilitate identification of a processor requesting a system management interrupt
US6457069B1 (en) Method and apparatus for providing support for dynamic resource assignment and configuration of peripheral devices when enabling or disabling plug-and-play aware operating systems
US5944816A (en) Microprocessor configured to execute multiple threads including interrupt service routines
US6336168B1 (en) System and method for merging multiple outstanding load miss instructions
KR101546033B1 (ko) Smt 기계에서 비교 및 전달 명령어를 사용한 안정적 실행
JP3663317B2 (ja) コンピュータ・システム
US6789167B2 (en) Method and apparatus for multi-core processor integrated circuit having functional elements configurable as core elements and as system device elements
US8255591B2 (en) Method and system for managing cache injection in a multiprocessor system
US20020052987A1 (en) Host controller interface descriptor fetching unit
US7467239B2 (en) Method and system for programming a DMA controller in a system on a chip, with the DMA controller having source, destination, and size registers
EP0464615A2 (en) Microcomputer equipped with DMA controller
JPH0430053B2 (ja)
US6611912B1 (en) Method and apparatus having a system BIOS write configuration data of a riser card to a controller configuration space when connecting the riser card to a motherboard
US5764996A (en) Method and apparatus for optimizing PCI interrupt binding and associated latency in extended/bridged PCI busses
JPS62156752A (ja) 多重プロセツサ計算システム
US20060059489A1 (en) Parallel processing system, interconnection network, node and network control method, and program therefor
US5146605A (en) Direct control facility for multiprocessor network
WO1999014679A1 (en) Interrupt system
GB2216306A (en) Load and synchronize computer architecture and process
EP0290942B1 (en) Guest machine execution control system for virtual machine system
CN114416317B (zh) 核间中断执行方法、处理方法及装置、设备和存储介质
US7093254B2 (en) Scheduling tasks quickly in a sequential order
US6449670B1 (en) Microcomputer with bit packets for interrupts, control and memory access
JPH1049373A (ja) パイプライン・デジタル・プロセッサにおいて多重で高精度の事象を操作する方法と装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

WWE Wipo information: entry into national phase

Ref document number: 08454240

Country of ref document: US