Semiconductor integrated circuit

Abstract: When the reset input changes 0 V to V cc , predetermined operational mode control information is set in an operational mode register (11) to establish a user operational mode. When the reset input changes from 0 V to 2 V cc , the operational mode control information inputted to a predetermined terminal of the input/output port (25, 58) is set in the operational mode control unit (10a, 10b) to establish a test or other mode.

Description: Background of the Invention The present invention relates to semiconductor integrated circuits such as single-chip microcomputers and digital signal processors which require distinction of the user mode from the mode used by the maker upon shipping. Various operational modes of a single-chip microcomputer are shown in FIGS. 6(a), 6(b), and 6(C). The single-chip microcomputer 20 consists of a central processing unit 21 for performing arithmetic and logic operations; a random access memory 22 for temporarily storing data necessary for data processing; a read only memory 23 for storing in advance data such as programs necessary for data processing; a peripheral logic circuit 24; an input/output port 25; an operational mode control circuit 26 responsive to set operational mode control information to control gates between the CPU 21 and ROM 23, and data and address buses and control lines on a single chip. In FIG. 6(a), a separate user logic circuit 27 is connected to the single-chip microcomputer 20 in the single chip mode. In this single chip mode, the microcomputer 20 controls the user logic 27 via the I/O port 25 and receives data from the user logic 27. The microcomputer 20 operates according to the program stored in the ROM 23. In FIG. 6(b), an external memory 28 is connected to the single-chip computer 20 in the external memory mode. In this external memory mode, the external memory 28 is accessed for exchange of data on an address or data bus, or a few control lines via the specified I/O port 25. The program is stored in the external memory 28, and the ROM 23 is not used. In FIG. 6(c), a tester 29 is connected to the single-chip microcomputer 20 in the module test mode. This module test mode is used by the microcomputer maker. Address data and control signals are fed to the single-chip microcomputer 20 from the tester 29 to operate the peripheral logic 24, ROM 23, and RAM 22 for testing the microcomputer 20. In the modes of FIGS. 6(a) and 6(b), the CPU 21 controls access to the peripheral logic 24, ROM 23, and RAM 22 but, in the module test mode of FIG. 6(c), the peripheral logic 24, ROM 23, and RAM 22 are tested by separating the CPU 21 from the internal buses of the microcomputer 20. Respective timing charts of the single-chip mode in FIG. 6(a), the external memory mode in FIG. 6(b), and the module test mode in FIG. 6(c) are shown in FIGS. 7(a), 7(b), and 7(c). The I/O port 25 serves as a double function port through which address, data, and control signals are inputted and outputted in the modes other than single chip mode, where it operates as a simple port through which data is inputted and outputted by the program. In the external memory mode of FIG. 6(b), the microcomputer 20 outputs address and control signals while the data bus serves as an input/output. At this point, the value of the I/O port 25, which is outputted in FIG. 6(a), is no longer outputted. That is, the I/O port 25 functions as a simple bus buffer. In the module test mode of FIG. 6(c), the microcomputer 20 receives the address and control signals from the tester 29 while the data bus serves as an input/output. In this case, too, no value of the port latch is outputted. A conventional operational mode control circuit 26a for setting the above operational modes is shown in FIG. 8. The operational mode register 41, which is composed of a register of one or more bits, stores operational mode control information for distinguishing the respective operational modes. A value is set in this register 41 by inputting a mode input value into the mode input terminal 47 which is dedicated to mode setting. A plurality of mode input terminals 47 may be provided, but the number of mode input terminals is reduced by providing a level decision circuit 42 into which three different levels 0 V, V cc , and 2 V cc (twice V cc ) are inputted. Another conventional operational mode control circuit 26b in a single-chip microcomputer is shown in FIG. 9. The operational mode register 51 is accessed from the data bus 59 via a path 61. The data bus 59 is interfaced with the outside via a port 58 which serves as a data bus buffer. The operational mode register 51 is made such that operational mode control information is set not only in response to the mode input level at the mode input terminal 57 (or the decision result of the level decision circuit 52) but also via the data bus 59. The conventional semiconductor integrated circuit requires at least one mode input terminal dedicated to mode setting and has a disadvantage for single-chip microcomputers in which only a limited number of pins are available. In addition, as the number of operational modes increases, there is a demand for two or more mode input terminals. Japanese Laid-open Patent No. 62-118557 discloses an integrated circuit in which a reset terminal is used for mode setting and the mode is switched with a three-value input, but fails to disclose how to write in mode data (mode control information). Japanese Laid-open Patent No. 1-130394 also fails to disclose how to write in mode data (mode control information). The arrangement illustrated in Fig. 9 uses an input terminal dedicated to a mode setting to enable mode data (mode control information) to be written upon a rise in signal to be supplied to the terminal. Summary of the Invention Accordingly, it is an object of the invention to provide a semiconductor integrated circuit which allows setting a large number of operational modes without using any mode input terminals. According to the invention there is provided a semiconductor integrated circuit as set out in Claim 1. Preferred features of the invention are defined in Claims 2 to 4. According to the invention, the reset input terminal of a semiconductor integrated circuit is used to set a predetermined operational mode control information in a setting unit, such as an operational mode register, to establish a user operational mode when a reset input is in the first level change, for example, from 0 V to V cc , and the operational mode control information inputted to a predetermined terminal of an input/output port in the operational mode setting unit to establish a test or other operational mode when the reset input is in the second level change, for example, from 0 V to 2 V cc . The above and other objects, features, and advantages of the invention will become more apparent from the following description when taken in conjunction with the accompanying drawings. Brief Description of the Drawings FIG. 1(a) is a block diagram of the essential part of a single-chip microcomputer according to an embodiment of the invention; FIG. 1(b) is a block diagram of the essential part of a single-chip microcomputer according to another embodiment of the invention; FIG. 2 is a schematic diagram of the essential part or operational mode control circuit of a single-chip microcomputer; FIGS. 3 and 4 are timing charts for the operational mode control circuit of FIG. 2; FIG. 5 is a schematic diagram of the essential part of FIG. 1(b); FIG. 6(a) is a block diagram of the essential part of a single-chip microcomputer in the single-chip mode; FIG. 6(b) is a block diagram of the essential part of a single-chip microcomputer in the external memory mode; FIG. 6(C) is a block diagram of the essential part of a single-chip microcomputer in the module test mode; FIGS. 7(a), 7(b), and 7(c) are timing charts for the essential part of FIGS. 6(a), 6(b), and 6(c), respectively; FIG. 8 is a block diagram of the essential part of a conventional single-chip microcomputer; and FIG. 9 is a block diagram of the essential part of another conventional single-chip microcomputer. Description of the Preferred Embodiment In FIG. 1(a), components of a single-chip microcomputer, such as CPU and RAM, are omitted for simplicity as in FIGS. 8 and 9. A single-chip microcomputer 13 includes a reset input terminal 14; a mode setting terminal 15a assigned to a predetermined terminal of an I/O port 25; an operational mode control circuit 10a according to an embodiment of the invention; an operational mode register 11 for storing operational mode control information to set an operational mode; a level decision circuit 12 for deciding the level of a reset signal from the reset input terminal 14; and a mode setting control circuit 16 responsive to the decision result of the level decision circuit 12 to feed operational mode control information from the mode setting terminal 15a to the operational mode register 11. It further includes a control line 18 for transmitting an output signal from the level decision circuit 12 to the mode setting control circuit 16; a control line 19 for transmitting a user mode value to the operational mode register 11 as predetermined operational mode control information; and a signal line S for connecting the mode setting terminal 15a to the mode setting control circuit 16. The mode setting terminal 15a is a double function port which returns to the original role in normal operation after reset release. Now, the operation is described below. In the user operational mode, the level decision circuit 12 recognizes the 0 V level of a reset input at the reset input terminal 14 and sets the value of a user mode (or operational mode control information) in the operational mode register 11 via the control line 19. When the reset input rises from 0V to V cc , the reset condition is released to start operation. At this point, the operational mode register 11 holds the value set by resetting. In the maker operational mode, on the other hand, the level decision circuit 12, which operates in the same way as in the above user mode at a 0 V reset input, recognizes the rising edge of a reset input from 0 V to 2 V cc and transfers data inputted from the mode setting terminal 15a to the operational mode register 11 via the mode setting control circuit 16. Then, in response to the operational mode control information from the operational mode register 11, the operational modes of respective components, such as CPU 21 and ROM 23, are set to start the microcomputer 13. After the initial value is set in the operational mode register 11, the mode setting terminal 15a is used as a normal function terminal. In FIG. 1(b), like numeral references denote like or corresponding components of FIG. 1(a), and their description is omitted. A data bus 17 is connected to a mode setting terminal 15b which is assigned to a predetermined terminal of a port 58 as a data bus buffer. This is the case where the invention is applied to the conventional circuit of FIG. 9, in which the data bus also is used for setting the initial value of the operational mode register 11. In the user operational mode, the operation is the same as in the above embodiment. In the maker operational mode, too, the operation is almost the same as in the above embodiment. When the level decision circuit 12 recognizes the rising edge of a reset input from 0V to 2 V cc , data is transferred from the bus buffer or mode setting terminal 15b to the operational mode register 11 via the mode setting control circuit 16 and the data bus 17. In response to the operational mode control information from the operational mode register 11, the operational modes of respective components are set to start the microcomputer 13. The mode setting terminal 15b is used as a normal function terminal after the initial value is set in the operational mode register 11. As has been described above, the mode setting control circuit receives data from the mode setting terminal with a special signal, such as the rising edge of a reset input from 0 V to 2 V cc , to set data in the operational mode register. Consequently, the microcomputer receives data from the mode setting terminal to set a value in the operational mode register with a special signal, such as the rising edge of a reset input from 0 V to 2 V cc , thus entering the desired operational mode. The operational mode control circuits of the above two embodiments are almost the same, and only that of FIG. 1(a) is shown in FIG. 2. The level decision circuit 12 includes an inverter 12a for inverting a reset input from the reset input terminal 14; a delay circuit 12b composed of a multistage inverter for delaying the output of the inverter 12a; a pair of FETs 12c and 12d connected in series for detecting a 2-V cc reset input; two stages of inverters 12e and 12f for inverting the output at the junction of the FETs; and a NAND gate 12g for receiving outputs from the inverter 12f and the delay circuit 12b. The mode setting control circuit 16 includes the first gate 16a responsive to a value from the junction between the inverters 12e and 12f to turn on or off an input from the mode setting terminal 15a; a latch circuit 16b responsive to the same value as above to latch an output from the first gate 16a; and the second gate 16c responsive to an output from the NAND gate 12g to turn on or off an output of the latch circuit 16b. The gates 16a and 16c each consist of an inverter 16d, 16f and a transmission 16e, 16g. The latch circuit 16b consists of two stages of inverters 16h and 16i, an inverter 16j, and a transmission 16k, a gate 161 responsive to a value from the junction between the inverters 12e and 12f to turn on or off the interconnection between the inverters 16h and 16i, and an inverter 16m for inverting a value from the junction between the inverters 16h and 16i. The operational mode register 11 consists of a NAND gate 11b connected to an output of the mode setting control circuit 16 and a data bus via a transmission (gate) 11a at one input and a reset input at the other input; a clock gated inverter 11c for inverting an output of the NAND gate and feeding it back to the one input; a transmission 11d for turning on or off an output from the junction between the NAND gate 11b and the clock gated inverter 11c; and two stages of inverters 11de and 11f for inverting an output of the transmission 11d. The output of the two stage inverter is fed back to the input, and a value is taken out from the junction between the inverters as an operational mode control signal. The transmissions 11a and 11d and the clock gated inverters 11c and 11f, which are controlled with a write signal ( WR , WR) at a time of setting by software, are transferred from the single-chip mode of FIG. 6(a) to the external memory mode of FIG. 6(b) in the user mode by the program written in the ROM 23 in FIG. 6. In a reset sequence or at a time of initial setting, WR = "L". As shown in FIG. 3, when the reset input changes from 0 V to V cc (first level change), an output of the inverter 12e is "H", but an output of the inverter 12f remains "L" as indicated by the broken line so that an output of the NAND gate 12g is not made significant. Consequently, the first gate 16a of the mode setting control circuit 16 is turned on, but the second gate 16c remains off so that the operational mode register 11 holds "0" or the condition initialized with a reset input. As a result, an operational mode control signal indicating a user mode is outputted. When the reset input changes from 0 V to 2 V cc (second level change), an output of the inverter 12e is "L" while an output of the inverter 12f becomes "H" as shown with a solid line so that an output of the NAND gate 12g is made significant. As a result, when the reset input is 0 V, the first gate 16a of the mode setting control circuit 16 is turned on to hold in the latch circuit 16b an operational mode control information ("1" in this case). When the reset input is at 2 V cc , the second gate 16c is turned on during the delay to set the value of the latch circuit 16b in the operational mode register 11. As a result, an operational mode control signal inputted at the mode setting terminal 15a is outputted indicating a test or other operational mode. In FIG. 2, only two operational modes (user and test modes), and the one-bit operation register 11 are shown for simplicity, but the operational mode register 11, mode setting control circuit 16, and mode setting terminal 15a may be provided in a multiple stage configuration. For example, four or eight operational modes may be set by a two or three stage configuration. The delay circuit 12b of the level decision circuit 12, which is a multistage inverter, may be synchronized with clock as shown in FIG. 4. The latch circuit 16b of the mode setting control circuit 16 may be eliminated by putting a value of the mode setting terminal 15a into the operational mode register 11 at a rising edge from 0 V to 2 V cc . In the embodiment of FIG. 1(b), the port 58 as a data bus buffer has inverters 58a and 58b for reading and inverters 58c and 58d for writing as shown in FIG. 5. The respective inverters 58b and 58d are controlled with RD and WR signals from the address decoder 62 so that it is necessary to add a reset signal to the RD signal as a control signal for the read inverter 58d. In this case, without providing a new signal line S, the operational mode control information inputted at the mode setting terminal 15b is supplied to the mode setting control circuit 16, which is shown in detail in FIG. 2, via the port 58 and data bus 17. As has been described above, with the embodiment of FIG. 1(a), data is fetched at a special level of a three-value reset input (for example, 2 V cc ) to set an operation mode so that the maker operation mode is set with higher degrees of freedom as well as the user operational mode. With the embodiment of FIG. 1(b) in which the operational mode is set at a special level of a three-value reset input via a data bus from a data bus buffer in a microcomputer in which the operational mode register is accessed from the data bus, it is possible to reduce the signal line area by use of the data bus in addition to the above advantage. In the above embodiments, the invention is applied to a single-chip microcomputer but it may be applied to other semiconductor integrated circuits such as DSP. The level decision circuit for detecting the 2-V cc level of a reset input may be replaced by another circuit capable of detecting a three-value input. As has been described above, with the operational mode control unit according to the invention which sets predetermined operational mode control information in the operational mode setting unit when the reset input is in the first level change and the operational mode control information inputted at a predetermined terminal of the I/O port in the operational mode setting unit when the reset input is in the second level change, it is possible to not only eliminate the input terminal dedicated to set an operational mode but also allow setting a large number of operational modes.

Claims: A semiconductor integrated circuit (13) responsive to operational mode control information set in an operational mode setting unit (11) to set a plurality of operational modes such as user and test modes, characterised by operational mode control means (10a) for setting a predetermined operational mode control information in said operational mode setting unit (11) when a reset input changes from a first level to a second level and for setting operational mode control information inputted at a predetermined terminal of an input/output terminal in said operation mode setting unit (11) when said reset input changes to a third level. The semiconductor integrated circuit of claim 1, wherein said operational mode setting unit (11) consists of a register (11) and said operational mode control means (10a) comprises: a level decision circuit (12) for deciding the levels of reset signals from reset input terminal (14) to set a predetermined operational mode control information in said operational mode register (11) for said change from a first level to a second level; and a mode setting control circuit (16) for setting operational mode control information inputted at a predetermined terminal of said input/output port in said operation mode register when said level decision circuit recognizes that said reset input is in said change to a third level. A semiconductor integrated circuit according to claim 1, comprising a reset input terminal (14) by which reset signals having the first level, a change to the second and a change to the third level are inputted and a plurality of input/output ports, and responsive to operational mode control information set in operational mode setting means to set a plurality of operational modes such as user and test modes, characterised in that either one of said input/output ports is designated as a mode setting terminal; the operational mode control means (10a), sets first operational mode control information in said operational mode setting means (11) when a reset input to be supplied to said reset input terminal is in the first level, and sets second operational mode control information inputted from said mode setting terminal via an internal data bus in said operational mode setting means when the reset input changes to the third level; and said operational mode control means controls, in response to said first operational mode information set in said operational mode setting means, to start operation when the reset input changes to the second level; and controls, in response to said second operational mode information set in said operational mode setting means, to start operation when the reset input changes to the third level. The semiconductor integrated circuit according to claim 3, wherein said operational mode setting means comprises an operational mode register (11), and said operational mode control means comprises: a level decision circuit (12) for deciding the levels of reset signals from said operational mode register and said reset input terminal to set predetermined operational mode control information in said operational mode register when the reset input is in the first level; and a mode setting control circuit (16) for setting operational mode control information inputted from a predetermined terminal of said input/output port via an internal data bus in said operational mode register when said level decision circuit recognizes that the reset input changes to the third level, which separates said mode setting terminal from said operational mode register after the start of operation based on this operational mode control information according to the reset inputs changing to the second and third levels and allows using this terminal as a normal input/output port or a normal function port.

Inventors: HAYASHI KAZUO, HIROSE SHINICHI, ISHIMARU YOSHIYUKI, TAKEUCHI MINORU, TASHIRO TETSU, HAYASHI, KAZUO, HIROSE, SHINICHI, ISHIMARU, YOSHIYUKI, TAKEUCHI, MINORU, TASHIRO, TETSU, HAYASHI, KAZUO, C/O MITSUBISHI DENKI K. K., HIROSE, SHINICHI, C/O MITSUBISHI DENKI K. K., ISHIMARU, YOSHIYUKI, C/O MITSUBISHI DENKI K. K., TAKEUCHI, MINORU, C/O MITSUBISHI DENKI K. K., TASHIRO, TETSU, C/O MITSUBISHI DENKI K. K.
Applicants: MITSUBISHI ELECTRIC CORP, MITSUBISHI DENKI KABUSHIKI KAISHA
Application year: 1990
Main classification: G06F11
IPC codes: G06F15, H01L21, G06F11, G01R31, H01L27