JP5930802B2 - General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method - Google Patents

General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method Download PDF

Info

Publication number
JP5930802B2
JP5930802B2 JP2012080185A JP2012080185A JP5930802B2 JP 5930802 B2 JP5930802 B2 JP 5930802B2 JP 2012080185 A JP2012080185 A JP 2012080185A JP 2012080185 A JP2012080185 A JP 2012080185A JP 5930802 B2 JP5930802 B2 JP 5930802B2
Authority
JP
Japan
Prior art keywords
terminal
general
input
selection signal
output port
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2012080185A
Other languages
Japanese (ja)
Other versions
JP2013210810A (en
Inventor
岡田 敦彦
敦彦 岡田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lapis Semiconductor Co Ltd
Original Assignee
Lapis Semiconductor Co Ltd
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 Lapis Semiconductor Co Ltd filed Critical Lapis Semiconductor Co Ltd
Priority to JP2012080185A priority Critical patent/JP5930802B2/en
Publication of JP2013210810A publication Critical patent/JP2013210810A/en
Application granted granted Critical
Publication of JP5930802B2 publication Critical patent/JP5930802B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Microcomputers (AREA)
  • Information Transfer Systems (AREA)

Description

本発明は、マイクロコンピュータ(以下、単にマイコンまたはCPUともいう)の入出力ポート(以下、IOポートもしくは単にポートともいう)の割付技術に係り、特に、IOポートの割付処理に伴うソフトウェアのオーバーヘッドを回避するのに好適な汎用入出力ポート接続制御回路、半導体装置、及び汎用入出力ポート接続制御方法に関するものである。   The present invention relates to a technology for assigning input / output ports (hereinafter also simply referred to as IO ports or simply ports) of a microcomputer (hereinafter also simply referred to as a microcomputer or a CPU), and in particular, reduces the software overhead associated with IO port assignment processing. The present invention relates to a general-purpose input / output port connection control circuit, a semiconductor device, and a general-purpose input / output port connection control method suitable for avoidance.

一般に、マイクロコンピュータには各々の汎用に使用可能な複数のIOポートが備えられ、各IOポートには、例えばUART(Universal Asynchronous Received Transmitter)、I2C(Inter-Integrated Circuit)、SPI(System Packet Interface)、あるいはPWM(Pulse Width Modulation)といった特定の機能を有したインタフェースが2次機能として割り付けられる。   In general, a microcomputer is provided with a plurality of general-purpose IO ports, and each IO port includes, for example, a UART (Universal Asynchronous Received Transceiver), an I2C (Internal-Integrated Circuit), or an SPI (System Packet Interface). Alternatively, an interface having a specific function such as PWM (Pulse Width Modulation) is assigned as a secondary function.

マイコンのユーザは、これら2次機能や汎用IOポートを組み合わせてシステムを構築する。図5に、従来のマイコンを使用したシステム構成を示す。   The user of the microcomputer constructs a system by combining these secondary functions and general-purpose IO ports. FIG. 5 shows a system configuration using a conventional microcomputer.

このようなシステムでは、CPUを具備したマイクロコントローラ(図中、「MCU」と記載)51の汎用IOポートに割付けられた2次機能のI2C(IO[2:1])をIC#1に接続し、同じく汎用IOポートに割付けられたSIO(IO[6:5])をIC#2に接続している。なお、IO[2:1]とはポートIO[1]とポートIO[2]を意味し、IO[6:5]とはポートIO[5]とポートIO[6]を意味しており、また、例えば、IO[7:0]とはポートIO[0]〜ポートIO[7]を意味する。   In such a system, the secondary function I2C (IO [2: 1]) assigned to the general-purpose IO port of the microcontroller 51 (described as “MCU” in the figure) 51 is connected to IC # 1. Similarly, SIO (IO [6: 5]) assigned to the general-purpose IO port is connected to IC # 2. IO [2: 1] means port IO [1] and port IO [2], IO [6: 5] means port IO [5] and port IO [6], For example, IO [7: 0] means port IO [0] to port IO [7].

そして、残った汎用IOポート(IO[7],IO[4:3],IO[0])をIC#3のアドレス線として使用する。   The remaining general-purpose IO ports (IO [7], IO [4: 3], IO [0]) are used as address lines for IC # 3.

汎用IOポートの2次機能の割付を切り換える回路を図6に示す。切替器61a〜61hを切替信号S[7:0]で制御することにより、汎用IOレジスタA[7:0]と2次機能群B[7:0]との接続を切り替えて、割り付けを行っている。なお、切替信号S[7:0]、汎用IOレジスタA[7:0]、及び2次機能群B[7:0]における[7:0]も上記汎用IOポートと同様、[0]〜[7]を意味する。   FIG. 6 shows a circuit for switching the assignment of the secondary function of the general-purpose IO port. By controlling the switching devices 61a to 61h with the switching signal S [7: 0], the connection between the general-purpose IO register A [7: 0] and the secondary function group B [7: 0] is switched and assigned. ing. Note that [7: 0] in the switching signal S [7: 0], the general purpose IO register A [7: 0], and the secondary function group B [7: 0] are similar to the general purpose IO port. It means [7].

図6の例では、2次機能B[1]がI2CのSCL信号、2次機能B[2]がI2CのSDA信号、2次機能B[5]がSIOのRXD信号、そして、2次機能B[6]がSIOのTXD信号を表し、切替信号S[2:1]と切替信号S[6:5]は、切替器61b,61c,61f,61gが2次機能を選択するよう設定されている。   In the example of FIG. 6, the secondary function B [1] is an I2C SCL signal, the secondary function B [2] is an I2C SDA signal, the secondary function B [5] is an SIO RXD signal, and the secondary function B [6] represents the TXD signal of SIO, and the switching signal S [2: 1] and switching signal S [6: 5] are set so that the switches 61b, 61c, 61f, 61g select the secondary function. ing.

この場合、汎用IOポートIO[7:0]の空いているIOポートは分断されて非連続となっている。このように、2次機能を利用することで分断された汎用IOポートIO[7:0]をアドレス線として使用するには、ソフトウェアにより割り付けが行なわれるため、ソフトウェアのオーバーヘッドが大きくなるという問題点があった。   In this case, the vacant IO port of the general-purpose IO port IO [7: 0] is divided and discontinuous. As described above, in order to use the general-purpose IO port IO [7: 0] divided by using the secondary function as an address line, since allocation is performed by software, the overhead of software increases. was there.

例えば、図6におけるシステム構成の場合、図7に示すように、アドレス変数の下位から、ビット0をA[0]に、ビット1をA[3]に、ビット2をA[4]に、ビット3をA[7]にそれぞれセットすることになる。   For example, in the case of the system configuration in FIG. 6, as shown in FIG. 7, from the lower order of the address variable, bit 0 to A [0], bit 1 to A [3], bit 2 to A [4], Bit 3 will be set to A [7] respectively.

この場合、汎用IOレジスタにアドレス変数をセットするためには、ソフトウェアにより、4回分ビットを分離するフローが必要になる。   In this case, in order to set the address variable in the general-purpose IO register, a flow for separating the bits for four times is required by software.

このように、マイコンのポートに対しては複数の機能が割り付けられるが、どのポートにどの機能を割り付けるかは、従来の割り付け方などを踏襲した割り付け方とすることが一般的に行われている。そのため、任意のポートに任意の機能を割り付けることができるとは限らず、図5に示すIC#3のアドレス線のように、場合によっては不連続に割り付けられることが起こる。   As described above, a plurality of functions are assigned to the ports of the microcomputer, but it is generally performed to assign which function to which port according to the conventional assignment method. . For this reason, it is not always possible to assign an arbitrary function to an arbitrary port, and in some cases, it is assigned discontinuously like the address line of IC # 3 shown in FIG.

アドレス線に対応するアドレス変数は、下位ビット側にまとめて配置することが一般的であり、そのため、下位ビット側にまとめて配置されたアドレス値を、不連続に割り付けられたアドレス線に対応したレジスタに設定しようとすると、一度に全ての値を設定することができず、各レジスタに対応したビット毎にシフト演算を行う必要が生じる。   Generally, the address variables corresponding to the address lines are collectively arranged on the lower bit side. Therefore, the address values arranged collectively on the lower bit side correspond to the address lines allocated discontinuously. When trying to set in a register, it is not possible to set all the values at once, and it is necessary to perform a shift operation for each bit corresponding to each register.

なお、このようなマイコンにおけるポートの接続制御に関しては、特許文献1において記載されている。   Note that port connection control in such a microcomputer is described in Patent Document 1.

また、特許文献2においては、コアボードとインタフェースボード間に、割り付け変換ボードを設けて、割り付け変換ボードに備えられた複数のスイッチ素子により、コアボードのポートとインタフェースボードの端子との接続関係を自動的に変更する技術が記載されている。   In Patent Document 2, an allocation conversion board is provided between the core board and the interface board, and the connection relationship between the ports of the core board and the terminals of the interface board is determined by a plurality of switch elements provided in the allocation conversion board. The technology to change automatically is described.

特開平5−250497号公報Japanese Patent Laid-Open No. 5-250497 特開2005−327264071号公報JP-A-2005-32724071

しかし、特許文献2に記載の技術では、ボード間の端子の接続を任意の組み合わせで可能とするものであり、割り付け変換ボード内には、複数のスイッチ素子が、上位側と下位側のいずれにも接続先を切り換えることができるよう配置されている。そのため、回路規模が大きく、半導体装置内の限られたスペースに配置するには適していない。   However, the technology described in Patent Document 2 enables connection of terminals between boards in any combination, and a plurality of switch elements are provided on either the upper side or the lower side in the allocation conversion board. Is also arranged so that the connection destination can be switched. Therefore, the circuit scale is large and it is not suitable for placement in a limited space in the semiconductor device.

また、上述したように、図5,図7に示すようにアドレス線が不連続に割り付けられた場合には、下位ビット側にまとめて配置されたアドレス値を、不連続に割り付けられたアドレス線に対応したレジスタに設定するためには、ソフトウェアにより、各レジスタに対応したビット毎にシフト演算を行う必要が生じる。   As described above, when the address lines are discontinuously allocated as shown in FIGS. 5 and 7, the address values collectively arranged on the lower bit side are changed to the discontinuously allocated address lines. In order to set a register corresponding to the above, it is necessary to perform a shift operation for each bit corresponding to each register by software.

本発明は、上記問題点を解決するためのものであり、例えば下位ビット側にまとめて格納されたアドレス変数をレジスタに一括して設定することができ、ソフトウェアによるシフト演算を不要とすることが可能な汎用入出力ポート接続制御回路、半導体装置、及び汎用入出力ポート接続制御方法を提供することを目的とする。   The present invention is for solving the above-described problems. For example, address variables stored together on the lower bit side can be collectively set in a register, so that a shift operation by software is unnecessary. An object is to provide a general-purpose input / output port connection control circuit, a semiconductor device, and a general-purpose input / output port connection control method.

上記目的を達成するため、本発明の汎用入出力ポート接続制御回路は、複数の汎用入出力ポートと、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、アドレス変数が設定される複数のアドレスレジスタと、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、各々に特定機能が設定される複数の特定機能端子と、各々が前記複数の特定機能端子の各々に対応して設けられると共に、各々に選択信号が入力される複数の選択信号入力端子と、各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、前記選択信号入力端子に接続され、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とが接続され、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とが接続されるように切り替える複数の切替部であって、いずれか1つの切替部の前記第2の端子が前記アドレスレジスタの1つに直接接続された複数の切替部と、前記アドレスレジスタと該アドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続され、前記複数の切替部の切り替えにより、接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御部と、を備えている。   In order to achieve the above object, the general-purpose input / output port connection control circuit of the present invention is provided with a plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports, and an address variable is set. A plurality of address registers, a plurality of specific function terminals each provided corresponding to each of the plurality of general-purpose input / output ports, each having a specific function set, and each of the plurality of specific function terminals A plurality of selection signal input terminals to which a selection signal is input, a first terminal connected to the specific function terminal, a second terminal, and the general-purpose input. A third terminal connected to the output port; and connected to the selection signal input terminal; and when the selection signal is input via the selection signal input terminal, the first terminal and the third terminal A plurality of switching units that are switched so that the second terminal and the third terminal are connected when the selection signal is not input, the switching unit of any one of the switching units A plurality of switching units having two terminals directly connected to one of the address registers and a second terminal of the remaining switching unit not directly connected to the address register; When the general-purpose input / output port corresponding to the address register to be connected is connected to the specific function terminal by switching the plurality of switching units, the general-purpose input / output port to which the specific function terminal is not connected is connected. As described above, a connection control unit that controls a connection state between the address register and the second terminal is provided.

一方、上記目的を達成するため、本発明の半導体装置は、前記汎用入出力ポート接続制御回路と、該汎用入出力ポート接続制御回路を用いる中央処理装置と、を備えている。   On the other hand, in order to achieve the above object, a semiconductor device of the present invention includes the general-purpose input / output port connection control circuit and a central processing unit using the general-purpose input / output port connection control circuit.

さらに、上記目的を達成するため、本発明の汎用入出力ポート接続制御方法は、複数の汎用入出力ポートに対する、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共にアドレス変数が設定される複数のアドレスレジスタと、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に各々に特定機能が設定される複数の特定機能端子との接続を切り替える汎用入出力ポート接続制御方法であって、各々が前記複数の特定機能端子の各々に対応して設けられた複数の選択信号入力端子を介して選択信号を入力する選択信号入力手順と、各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、いずれか1つの第2の端子が前記アドレスレジスタの1つに直接接続され、かつ前記選択信号入力端子に接続された複数の切替部により、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とを接続し、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とを接続するように切り替える切替手順と、前記アドレスレジスタとアドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続された接続制御部により、前記複数の切替部による切替手順で接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御手順と、を含む。   Furthermore, in order to achieve the above object, the general-purpose input / output port connection control method of the present invention provides a plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports, and having an address variable. General-purpose input / output port connection for switching the connection between a plurality of address registers to be set and a plurality of specific function terminals, each of which is provided corresponding to each of the plurality of general-purpose input / output ports and each of which has a specific function set A selection signal input procedure for inputting a selection signal via a plurality of selection signal input terminals provided corresponding to each of the plurality of specific function terminals, and A first terminal connected to the second input terminal; a third terminal connected to the general-purpose input / output port; and one of the second terminals is connected to the address level. When the selection signal is input via the selection signal input terminal by a plurality of switching units connected directly to one of the registers and connected to the selection signal input terminal, the first terminal and the first terminal 3 and a switching procedure for switching to connect the second terminal and the third terminal when the selection signal is not input, and the address register and the address register are not directly connected. The general-purpose input / output port corresponding to the address register to be connected is connected to the specific function terminal in the switching procedure by the plurality of switching units by the connection control unit connected to the second terminals of the remaining switching units. A connection control procedure for controlling a connection state between the address register and the second terminal so that the specific function terminal is connected to a general-purpose input / output port to which the specific function terminal is not connected, Including.

本発明によれば、例えば下位ビット側にまとめて格納されたアドレス変数をレジスタに一括して設定することができ、ソフトウェアによるシフト演算を不要とすることが可能となる。   According to the present invention, for example, address variables stored together on the lower bit side can be collectively set in a register, and a shift operation by software can be made unnecessary.

実施の形態に係る汎用入出力ポート接続制御回路の構成例を示す回路図である。It is a circuit diagram which shows the structural example of the general purpose input / output port connection control circuit which concerns on embodiment. 図1における汎用入出力ポート接続制御回路の動作例を示す説明図である。FIG. 2 is an explanatory diagram illustrating an operation example of a general-purpose input / output port connection control circuit in FIG. 1. 実施の形態に係る汎用入出力ポート接続制御方法の処理動作例を示すフローチャートである。It is a flowchart which shows the processing operation example of the general purpose input / output port connection control method which concerns on embodiment. 図1における汎用入出力ポート接続制御回路を具備した半導体装置の構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a semiconductor device including the general-purpose input / output port connection control circuit in FIG. 1. 従来のマイクロコンピュータにおける汎用入出力ポートの接続構成例を示すブロック図である。It is a block diagram which shows the example of a connection structure of the general purpose input / output port in the conventional microcomputer. 従来の汎用入出力ポート接続制御回路の構成例を示す回路図である。It is a circuit diagram which shows the structural example of the conventional general purpose input / output port connection control circuit. 図6における従来の汎用入出力ポート接続制御回路の動作例を示す説明図である。It is explanatory drawing which shows the operation example of the conventional general purpose input / output port connection control circuit in FIG.

以下、図を用いて本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施の形態に係る8ビットに対応した汎用入出力ポート接続制御回路の構成を示しており、図6に示した従来の汎用入出力ポート接続制御回路に、スイッチ回路1a〜1g,2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a〜6b,7aからなる接続制御部1を設けた構成となっている。   FIG. 1 shows a configuration of a general-purpose input / output port connection control circuit corresponding to 8 bits according to the present embodiment. Switch circuits 1a to 1g are added to the conventional general-purpose input / output port connection control circuit shown in FIG. , 2a to 2f, 3a to 3e, 4a to 4d, 5a to 5c, 6a to 6b, and 7a.

すなわち、図1に示す汎用入出力ポート接続制御回路は、複数の汎用入出力ポートIO[7:0]と、各々が複数の汎用入出力ポートの各々に対応して設けられると共に、アドレス変数が設定される複数のアドレスレジスタA[7:0]と、各々が複数の汎用入出力ポートの各々に対応して設けられると共に、各々に特定機能が設定される複数の特定機能端子B[7:0]と、各々が複数の特定機能端子の各々に対応して設けられると共に、各々に選択信号が入力される複数の選択信号入力端子S[7:0]と、図1の切替部61aに例示するように、各々が特定機能端子に接続された第1の端子61a1、第2の端子61a2、及び汎用入出力ポートに接続された第3の端子61a3を備えると共に、選択信号入力端子に接続され、選択信号が選択信号入力端子を介して入力された際に第1の端子と第3の端子とが接続され、選択信号が入力されない場合に第2の端子と第3の端子とが接続されるように切り替える複数の切替部であって、いずれか1つの切替部(61a)の第2の端子がアドレスレジスタの1つに直接接続された複数の切替部61a〜61hとを備え、さらに、アドレスレジスタと当該アドレスレジスタが直接接続されていない残りの切替部(61b〜61h)の第2の端子との間に接続され、複数の切替部の切り替えにより、接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと第2の端子との接続状態を制御する接続制御部1と、を備えている。   In other words, the general-purpose input / output port connection control circuit shown in FIG. 1 is provided corresponding to each of a plurality of general-purpose input / output ports IO [7: 0] and a plurality of general-purpose input / output ports. A plurality of address registers A [7: 0] to be set and a plurality of specific function terminals B [7: each having a specific function set to each of the plurality of general-purpose input / output ports. 0] and a plurality of selection signal input terminals S [7: 0], each of which is provided corresponding to each of a plurality of specific function terminals, and each of which receives a selection signal, and the switching unit 61a of FIG. As illustrated, each terminal includes a first terminal 61a1, a second terminal 61a2, and a third terminal 61a3 connected to a general-purpose input / output port connected to a specific function terminal, and connected to a selection signal input terminal. Selected signal Is input through the selection signal input terminal, the first terminal and the third terminal are connected, and when the selection signal is not input, the second terminal and the third terminal are connected. A plurality of switching units, wherein the second terminal of any one switching unit (61a) includes a plurality of switching units 61a to 61h directly connected to one of the address registers, General-purpose input / output port corresponding to the address register to be connected by switching between the plurality of switching units connected to the second terminal of the remaining switching unit (61b to 61h) not directly connected to the address register Is connected to the general-purpose input / output port to which the specific function terminal is not connected when the is connected to the specific function terminal, the connection for controlling the connection state between the address register and the second terminal It is provided with a control unit 1, a.

このような構成により汎用入出力ポート接続制御回路は、マイクロコンピュータの所定のポートに対して複数の機能が割り付ける場合に、機能の割り付けを効率的に制御することができる。例えば、汎用入出力ポートIOに割付けられた特定機能を任意に組み合わせて利用しても、残りの汎用入出力ポートIOのビットをソフトウェアのオーバーヘッド(ビットを分離する処理)なしに利用することができる。以下、その動作の説明を行なう。   With this configuration, the general-purpose input / output port connection control circuit can efficiently control function assignment when a plurality of functions are assigned to a predetermined port of the microcomputer. For example, even if the specific functions assigned to the general purpose input / output port IO are used in any combination, the remaining bits of the general purpose input / output port IO can be used without software overhead (processing for separating bits). . Hereinafter, the operation will be described.

本例では、図1に示す本実施の形態に係る汎用入出力ポート接続制御回路の切替器61a〜61hによる各々の2次機能の選択動作に伴い、接続制御部1におけるスイッチ回路1a〜1g,2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a〜6b,7aの各々が制御される構成となっており、切替器61a〜61hに対する1つの選択信号で、複数のスイッチ回路1a〜1g,2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a〜6b,7aを制御している。   In this example, the switching circuits 1a to 1g in the connection control unit 1 are selected in accordance with the selection operation of each secondary function by the switches 61a to 61h of the general purpose input / output port connection control circuit according to the present embodiment shown in FIG. Each of 2a to 2f, 3a to 3e, 4a to 4d, 5a to 5c, 6a to 6b, and 7a is controlled. -1g, 2a-2f, 3a-3e, 4a-4d, 5a-5c, 6a-6b, 7a are controlled.

なお、以下の説明では、複数のアドレスレジスタA[7:0]においては、アドレスレジスタA[0]からアドレスレジスタA[7]に順次にアドレス変数が下位ビットから設定されるものとする。   In the following description, in the plurality of address registers A [7: 0], it is assumed that address variables are sequentially set from the lower bits to the address register A [7] from the address register A [0].

図1に示す汎用入出力ポート接続制御回路においては、汎用入出力ポートIO、アドレスレジスタA、特定機能端子B、選択信号入力端子S、及び切替部は、各々、第1〜第8の汎用入出力ポートIO[7:0]、第1〜第8のアドレスレジスタA[7:0]、第1〜第8の特定機能端子B[7:0]、第1〜第8の選択信号入力端子S[7:0]、及び第1〜第8の切替部61a〜61hからなる。第1〜第8のアドレスレジスタA[7:0]は、第1のアドレスレジスタA[0]から第8のアドレスレジスタA[7]の順に下位から上位ビットのアドレス変数が設定される。接続制御部1は、例えば、第1の選択信号入力端子S[0]の選択信号に基づき、第1の切替部61aが、汎用入出力ポートIO[0]を特定機能端子[0]に接続すると、第1の選択信号入力端子S[0]に接続された全てのスイッチ回路1a〜1gの接続先を、上位ビットのアドレス変数が設定されたアドレスレジスタの第2の端子側に切り替える。   In the general-purpose input / output port connection control circuit shown in FIG. 1, the general-purpose input / output port IO, the address register A, the specific function terminal B, the selection signal input terminal S, and the switching unit are respectively first to eighth general-purpose inputs. Output port IO [7: 0], first to eighth address registers A [7: 0], first to eighth specific function terminals B [7: 0], first to eighth selection signal input terminals S [7: 0] and first to eighth switching units 61a to 61h. In the first to eighth address registers A [7: 0], address variables of lower to upper bits are set in order from the first address register A [0] to the eighth address register A [7]. In the connection control unit 1, for example, based on the selection signal of the first selection signal input terminal S [0], the first switching unit 61a connects the general-purpose input / output port IO [0] to the specific function terminal [0]. Then, the connection destinations of all the switch circuits 1a to 1g connected to the first selection signal input terminal S [0] are switched to the second terminal side of the address register in which the upper bit address variable is set.

接続制御部1を構成する各スイッチ回路は、スイッチ回路1gに例示するように、第4の端子1g1と第5の端子1g2のいずれかを、第1〜第8の選択信号入力端子S[7:0]からの選択信号の出力の有無に基づいて第6の端子1g3に選択的に接続する構成となっており、このような構成のスイッチ部が、第1〜第8の切替部61a〜61hに各々並列に上位ビット側に設けられている。   As illustrated in the switch circuit 1g, each switch circuit constituting the connection control unit 1 is connected to any one of the fourth terminal 1g1 and the fifth terminal 1g2 through the first to eighth selection signal input terminals S [7. : 0] is selectively connected to the sixth terminal 1g3 based on whether or not a selection signal is output, and the switch unit having such a configuration includes the first to eighth switching units 61a to 61a. 61h are provided on the upper bit side in parallel.

そして、第1の切替部61aに各々並列に上位ビット側に設けられた各スイッチ部1a〜1gは、第1の選択信号入力端子S[0]からの選択信号の出力が例えばLの場合に、第4の端子(例えば第4の端子1g1)に接続された自アドレスレジスタ(例えばアドレスレジスタA[7])を選択して第6の端子(例えば第6の端子1g3)に接続し、選択信号の出力がHの場合に、第5の端子(例えば第5の端子1g2)に接続された下位ビット側のアドレスレジスタ(例えばアドレスレジスタA[6])を選択して第6の端子(例えば第6の端子1g3)に接続する。   Then, each of the switch units 1a to 1g provided in parallel with the first switching unit 61a on the upper bit side, when the output of the selection signal from the first selection signal input terminal S [0] is L, for example. Select the address register (for example, address register A [7]) connected to the fourth terminal (for example, the fourth terminal 1g1) and connect to the sixth terminal (for example, the sixth terminal 1g3) to select When the signal output is H, the lower bit side address register (for example, address register A [6]) connected to the fifth terminal (for example, the fifth terminal 1g2) is selected to select the sixth terminal (for example, Connect to the sixth terminal 1g3).

また、第2〜第8の切替部61b〜61hに各々並列に上位ビット側に設けられた各スイッチ部2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a〜6b,7aは、第2〜第8の選択信号入力端子S[7:1]からの選択信号の出力が例えばLの場合に、第4の端子に接続された前段のスイッチ部を選択して第6の端子に接続し、選択信号の出力がHの場合に、第5の端子に接続された下位ビット側の前段のスイッチを選択して第6の端子に接続する。   Further, each of the switch units 2a to 2f, 3a to 3e, 4a to 4d, 5a to 5c, 6a to 6b, 7a provided in parallel with the second to eighth switching units 61b to 61h on the upper bit side, When the output of the selection signal from the second to eighth selection signal input terminals S [7: 1] is, for example, L, the previous-stage switch unit connected to the fourth terminal is selected to be the sixth terminal. When the output of the selection signal is H, the previous stage switch on the lower bit side connected to the fifth terminal is selected and connected to the sixth terminal.

このようにして、接続制御部1を設けることにより、特定機能端子B[7:0]が接続された汎用入出力ポートIO[7:0]に対応して設けられたアドレスレジスタA[7:0]を、特定機能端子B[7:0]が接続されていない空きの汎用入出力ポートIO[7:0]に接続することができる。   Thus, by providing the connection control unit 1, the address register A [7: provided for the general-purpose input / output port IO [7: 0] to which the specific function terminal B [7: 0] is connected. 0] can be connected to an empty general-purpose input / output port IO [7: 0] to which the specific function terminal B [7: 0] is not connected.

このように、図1に示す汎用入出力ポート接続制御回路においては、特定の汎用入出力ポートのビットが特定機能に選択されると、そのビットより上位のビットが1ビットずつ上位側へシフトする回路構成となっている。   As described above, in the general-purpose input / output port connection control circuit shown in FIG. 1, when a bit of a specific general-purpose input / output port is selected for a specific function, bits higher than that bit are shifted to the upper side bit by bit. It has a circuit configuration.

例えば、図1において、第2の選択信号入力端子S[1]がHとなり、汎用入出力ポートIO[1]が特定機能に選択された場合について説明する。この場合、第1の選択信号入力端子S[0]はLであり、上位側に接続されているアドレスレジスタA[0]は汎用入出力ポートIO[0]に接続されたままである。その一方で、第2の選択信号入力端子S[1]はHであり、下位側に接続されている汎用入出力ポートIO[1]には特定機能端子B[1]が接続される。そして、アドレスレジスタA[6:1]は、各々1ビットずつシフトして(スイッチ回路2a〜2fの下位側に入力され)、汎用入出力ポートIO[7:2]に接続することになる。   For example, in FIG. 1, the case where the second selection signal input terminal S [1] becomes H and the general-purpose input / output port IO [1] is selected for the specific function will be described. In this case, the first selection signal input terminal S [0] is L, and the address register A [0] connected to the upper side remains connected to the general-purpose input / output port IO [0]. On the other hand, the second selection signal input terminal S [1] is H, and the specific function terminal B [1] is connected to the general-purpose input / output port IO [1] connected to the lower side. The address register A [6: 1] is shifted by one bit (inputted to the lower side of the switch circuits 2a to 2f) and connected to the general-purpose input / output port IO [7: 2].

これは複数の汎用入出力ポートIOを特定機能に選択しても同じことで、汎用入出力ポートIO[2:1]、及び汎用入出力ポートIO[6:5]が特定機能に選択されるとすると、図2に示すように、アドレスレジスタA[3:0]は、各々、汎用入出力ポートIO[7],IO[4],IO[3],IO[0]に接続される。   This is the same even if a plurality of general-purpose input / output ports IO are selected as specific functions. The general-purpose input / output ports IO [2: 1] and general-purpose input / output ports IO [6: 5] are selected as specific functions. Then, as shown in FIG. 2, the address register A [3: 0] is connected to the general-purpose input / output ports IO [7], IO [4], IO [3], IO [0], respectively.

以下、このように、汎用入出力ポートIO[2:1]、及び汎用入出力ポートIO[6:5]が特定機能に選択された場合に、アドレスレジスタA[3:0]を、汎用入出力ポートIO[7],IO[4],IO[3],IO[0]にそれぞれ接続する際の動作を説明する。   Hereinafter, when the general-purpose input / output port IO [2: 1] and the general-purpose input / output port IO [6: 5] are selected as specific functions, the address register A [3: 0] is set to the general-purpose input / output. The operation when connected to the output ports IO [7], IO [4], IO [3], IO [0] will be described.

ここでは、汎用入出力ポートIO[2:1]が特定機能端子B[2:1]に選択され、汎用入出力ポートIO[6:5]が特定機能端子B[6:5]に選択された場合について説明する。   Here, the general purpose input / output port IO [2: 1] is selected as the specific function terminal B [2: 1], and the general purpose input / output port IO [6: 5] is selected as the specific function terminal B [6: 5]. The case will be described.

この場合、選択信号入力端子S[2:1]と選択信号入力端子S[6:5]から選択信号が出力されている。   In this case, selection signals are output from the selection signal input terminal S [2: 1] and the selection signal input terminal S [6: 5].

この状態においては、特定機能端子B[2:1]を汎用入出力ポートIO[2:1]に接続する切替部61b,61cと、特定機能端子B[6:5]を汎用入出力ポートIO[6:5]に接続する切替部61f,61gに、選択信号が出力されている。   In this state, the switching units 61b and 61c for connecting the specific function terminal B [2: 1] to the general purpose input / output port IO [2: 1] and the specific function terminal B [6: 5] to the general purpose input / output port IO. A selection signal is output to the switching units 61f and 61g connected to [6: 5].

特定機能端子B[0]に対応して設けられた切替部61a、及び当該切替部61aに並列に上位ビット側に設けられたスイッチ部1a〜1gには選択信号は出力されていない。従って、切替部61aはアドレスレジスタA[0]を汎用入出力ポートIO[0]に接続し、各スイッチ部1a〜1gは、自アドレスレジスタA[7:1]を後段の切替部61b及び各スイッチ部2a〜2fに接続する。   No selection signal is output to the switching unit 61a provided corresponding to the specific function terminal B [0] and the switch units 1a to 1g provided in parallel to the switching unit 61a on the upper bit side. Accordingly, the switching unit 61a connects the address register A [0] to the general-purpose input / output port IO [0], and each of the switch units 1a to 1g sets its own address register A [7: 1] to the subsequent switching unit 61b and each switching unit 61b. Connect to the switch sections 2a to 2f.

選択信号入力端子S[1]に対応して設けられた切替部61b及び各スイッチ部2a〜2fには、選択信号入力端子S[1]から選択信号が出力されている。従って、切替部61bは特定機能端子B[1]を汎用入出力ポートIO[1]に接続し、各スイッチ部2a〜2fは、下位ビット側の前段のスイッチ部1a〜1fを選択して後段の切替部61c及び各スイッチ部3a〜3eに接続する。この結果、アドレスレジスタA[7:1]の各々が上位ビット側に1つずつシフトされる。これにより、例えばアドレスレジスタA[1]はスイッチ部2aに接続されて汎用入出力ポートIO[2]に対応した状態となる。なお、アドレスレジスタA[7]の接続先はなくなる。   A selection signal is output from the selection signal input terminal S [1] to the switching unit 61b and the switch units 2a to 2f provided corresponding to the selection signal input terminal S [1]. Accordingly, the switching unit 61b connects the specific function terminal B [1] to the general-purpose input / output port IO [1], and each of the switch units 2a to 2f selects the previous switch unit 1a to 1f on the lower bit side to select the subsequent stage. The switching unit 61c and the switch units 3a to 3e are connected. As a result, each of the address registers A [7: 1] is shifted by one to the upper bit side. As a result, for example, the address register A [1] is connected to the switch unit 2a and is in a state corresponding to the general-purpose input / output port IO [2]. Note that the address register A [7] has no connection destination.

選択信号入力端子S[2]に対応して設けられた切替部61c及び各スイッチ部3a〜3eにも、選択信号入力端子S[2]から選択信号が出力されている。従って、切替部61cは特定機能端子B[2]を汎用入出力ポートIO[2]に接続し、各スイッチ部3a〜3eは、下位ビット側の前段のスイッチ部2a〜2eを選択して後段の切替部61d及び各スイッチ部4a〜4dに接続する。この結果、アドレスレジスタA[6:1]の各々が上位ビット側に1つずつシフトされる。これにより、例えばアドレスレジスタA[1]はスイッチ部3aに接続されて汎用入出力ポートIO[3]に対応した状態となる。なお、アドレスレジスタA[6]の接続先はなくなる。   The selection signal is also output from the selection signal input terminal S [2] to the switching unit 61c and the switch units 3a to 3e provided corresponding to the selection signal input terminal S [2]. Accordingly, the switching unit 61c connects the specific function terminal B [2] to the general-purpose input / output port IO [2], and each of the switch units 3a to 3e selects the previous switch unit 2a to 2e on the lower bit side and selects the subsequent stage. The switching unit 61d and the switch units 4a to 4d are connected. As a result, each of the address registers A [6: 1] is shifted by one to the upper bit side. As a result, for example, the address register A [1] is connected to the switch unit 3a so as to correspond to the general-purpose input / output port IO [3]. The connection destination of the address register A [6] is eliminated.

選択信号入力端子S[3]に対応して設けられた切替部61d及びスイッチ部4a〜4dには選択信号は出力されていない。従って、切替部61dは、前段のスイッチ部3aを汎用入出力ポートIO[3]に接続する。スイッチ部3aにはアドレスレジスタA[1]が接続されており、これにより、アドレスレジスタA[1]が汎用入出力ポートIO[3]に接続される。   No selection signal is output to the switching unit 61d and the switch units 4a to 4d provided corresponding to the selection signal input terminal S [3]. Accordingly, the switching unit 61d connects the preceding switch unit 3a to the general-purpose input / output port IO [3]. An address register A [1] is connected to the switch unit 3a, whereby the address register A [1] is connected to the general-purpose input / output port IO [3].

また、各スイッチ部4a〜4dは、前段の各スイッチ部3b〜3eを後段の切替部61e及び各スイッチ部5a〜5cに接続する。この場合、アドレスレジスタA[5:2]の各々はシフトされず、これにより、例えばアドレスレジスタA[2]はスイッチ部4aに接続されて汎用入出力ポートIO[4]に対応した状態となり、アドレスレジスタA[5]もスイッチ部5cに接続される。   The switch units 4a to 4d connect the switch units 3b to 3e in the previous stage to the switch unit 61e and the switch units 5a to 5c in the subsequent stage. In this case, each of the address registers A [5: 2] is not shifted, so that, for example, the address register A [2] is connected to the switch unit 4a and corresponds to the general-purpose input / output port IO [4]. The address register A [5] is also connected to the switch unit 5c.

選択信号入力端子S[4]に対応して設けられた切替部61e及びスイッチ部5a〜5cには選択信号は出力されていない。従って、切替部61eは、前段のスイッチ部4aを汎用入出力ポートIO[4]に接続する。スイッチ部4aにはアドレスレジスタA[2]が接続されており、これにより、アドレスレジスタA[2]が汎用入出力ポートIO[3]に接続される。   No selection signal is output to the switching unit 61e and the switch units 5a to 5c provided corresponding to the selection signal input terminal S [4]. Accordingly, the switching unit 61e connects the preceding switch unit 4a to the general-purpose input / output port IO [4]. An address register A [2] is connected to the switch unit 4a, whereby the address register A [2] is connected to the general-purpose input / output port IO [3].

また、各スイッチ部5a〜5cは、前段の各スイッチ部4b〜4dを後段の切替部61f及び各スイッチ部6a,6bに接続する。この場合、アドレスレジスタA[5:3]の各々はシフトされず、これにより、例えばアドレスレジスタA[3]は接続部61fに接続されて汎用入出力ポートIO[5]に対応した状態となり、アドレスレジスタA[5]もスイッチ部6bに接続される。   The switch units 5a to 5c connect the switch units 4b to 4d in the previous stage to the switch unit 61f and the switch units 6a and 6b in the subsequent stage. In this case, each of the address registers A [5: 3] is not shifted, so that, for example, the address register A [3] is connected to the connection unit 61f and corresponds to the general-purpose input / output port IO [5]. The address register A [5] is also connected to the switch unit 6b.

選択信号入力端子S[5]に対応して設けられた切替部61f及び各スイッチ部6a,6bには、選択信号入力端子S[5]から選択信号が出力されている。従って、切替部61fは特定機能端子B[5]を汎用入出力ポートIO[5]に接続し、各スイッチ部6a,6bは、下位ビット側の前段のスイッチ部5a,5bを選択して後段の切替部61g及びスイッチ部7aに接続する。この結果、アドレスレジスタA[4:3]の各々が上位ビット側に1つずつシフトされる。これにより、例えばアドレスレジスタA[3]は切替部61gに接続されて汎用入出力ポートIO[6]に対応した状態となる。なお、アドレスレジスタA[5]の接続先はなくなる。   A selection signal is output from the selection signal input terminal S [5] to the switching unit 61f and the switch units 6a and 6b provided corresponding to the selection signal input terminal S [5]. Therefore, the switching unit 61f connects the specific function terminal B [5] to the general-purpose input / output port IO [5], and each switch unit 6a, 6b selects the previous switch unit 5a, 5b on the lower bit side to select the subsequent stage. Are connected to the switching unit 61g and the switch unit 7a. As a result, each of the address registers A [4: 3] is shifted by one to the upper bit side. Thereby, for example, the address register A [3] is connected to the switching unit 61g and is in a state corresponding to the general-purpose input / output port IO [6]. The connection destination of the address register A [5] is eliminated.

選択信号入力端子S[6]に対応して設けられた切替部61g及びスイッチ部7aには、選択信号入力端子S[6]から選択信号が出力されている。従って、切替部61gは特定機能端子B[6]を汎用入出力ポートIO[6]に接続し、スイッチ部7aは、下位ビット側の前段のスイッチ部6aを選択して後段の切替部61hに接続する。この結果、アドレスレジスタA[3]が上位ビット側に1つシフトされる。これにより、アドレスレジスタA[3]は切替部61hに接続されて汎用入出力ポートIO[7]に対応した状態となる。なお、アドレスレジスタA[4]の接続先はなくなる。   A selection signal is output from the selection signal input terminal S [6] to the switching unit 61g and the switch unit 7a provided corresponding to the selection signal input terminal S [6]. Accordingly, the switching unit 61g connects the specific function terminal B [6] to the general-purpose input / output port IO [6], and the switch unit 7a selects the preceding switch unit 6a on the lower bit side and transfers it to the subsequent switching unit 61h. Connecting. As a result, the address register A [3] is shifted by one to the upper bit side. As a result, the address register A [3] is connected to the switching unit 61h and is in a state corresponding to the general-purpose input / output port IO [7]. The connection destination of the address register A [4] is eliminated.

選択信号入力端子S[7]に対応して設けられた切替部61hには選択信号は出力されていない。従って、切替部61hは、前段のスイッチ部7aを汎用入出力ポートIO[7]に接続する。これにより、アドレスレジスタA[3]が汎用入出力ポートIO[7]に接続される。   No selection signal is output to the switching unit 61h provided corresponding to the selection signal input terminal S [7]. Therefore, the switching unit 61h connects the previous switch unit 7a to the general-purpose input / output port IO [7]. As a result, the address register A [3] is connected to the general-purpose input / output port IO [7].

このように、本例の汎用入出力ポート接続制御回路では、特定の汎用入出力ポートのビットが特定機能に選択されると、そのビットより上位のビットが1ビットずつ上位側へシフトする回路構成となっている。   As described above, in the general-purpose input / output port connection control circuit of this example, when a bit of a specific general-purpose input / output port is selected for a specific function, the bit higher than that bit is shifted to the upper side bit by bit. It has become.

この結果、例えば、汎用入出力ポートIO[1]が特定機能に選択されると、アドレスレジスタA[0」は汎用入出力ポートIO[0]に接続されたままであるが、アドレスレジスタA[6:1]は汎用入出力ポート[7:2]に接続されることになる。   As a result, for example, when the general-purpose input / output port IO [1] is selected for the specific function, the address register A [0] remains connected to the general-purpose input / output port IO [0], but the address register A [6 : 1] is connected to the general-purpose input / output port [7: 2].

これは、複数の汎用入出力ポートを特定機能に選択しても同じことであり、例えば、図2に示すように、汎用入出力ポートIO[2:1],[6:5]が特定機能に選択されるとすると、アドレスレジスタA[3:0]の各ビット(アドレス変数)は、汎用入出力ポートIO[7],[4],[3],[0]に各々接続される。   This is the same even if a plurality of general-purpose input / output ports are selected as specific functions. For example, as shown in FIG. 2, the general-purpose input / output ports IO [2: 1] and [6: 5] are specified functions. Is selected, each bit (address variable) of the address register A [3: 0] is connected to the general-purpose input / output port IO [7], [4], [3], [0].

このような汎用入出力ポート接続制御回路の動作を図3に示す。この図3に示すように、汎用入出力ポート接続制御回路は、複数の汎用入出力ポートに対する、各々が複数の汎用入出力ポートの各々に対応して設けられると共にアドレス変数が設定される複数のアドレスレジスタと、各々が複数の汎用入出力ポートの各々に対応して設けられると共に各々に特定機能が設定される複数の特定機能端子との接続を切り替える際、まず、選択信号が入力されない(選択信号=L)場合には(ステップS302)、切替部において第2の端子と第3の端子とを接続して汎用入出力ポートをアドレスレジスタ側に接続する(ステップS304)。   The operation of such a general-purpose input / output port connection control circuit is shown in FIG. As shown in FIG. 3, the general-purpose input / output port connection control circuit is provided for a plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports and having a plurality of address variables set therein. When switching the connection between the address register and a plurality of specific function terminals each provided corresponding to each of a plurality of general-purpose input / output ports and having a specific function set for each, a selection signal is not input first (selection When the signal is L) (step S302), the switching unit connects the second terminal and the third terminal to connect the general-purpose input / output port to the address register side (step S304).

これに対して、複数の選択信号入力端子を介して選択信号(H)が選択信号入力端子を介して入力された場合には(ステップS302)、切替部において第1の端子と第3の端子とを接続して汎用入出力ポートを特定機能端子側に接続すると共に、当該アドレスレジスタの接続先を上位ビット側に順次にシフトすることで、汎用入出力ポートが特定機能端子に接続されているアドレスレジスタを、特定機能端子が接続されていない汎用入出力ポートと接続する(ステップS306)。   On the other hand, when the selection signal (H) is input through the selection signal input terminal via the plurality of selection signal input terminals (step S302), the first terminal and the third terminal in the switching unit. To connect the general purpose input / output port to the specific function terminal side, and the general purpose input / output port is connected to the specific function terminal by sequentially shifting the connection destination of the address register to the upper bit side. The address register is connected to a general-purpose input / output port to which no specific function terminal is connected (step S306).

なお、図1の例では、第1のアドレスレジスタから第nのアドレスレジスタの順に上位から下位のビットをアドレス変数として設定しており、ステップS306においては、上位のビットが設定されるアドレスレジスタから順に、最も近い下位のビットが設定されるアドレスレジスタに対応する空きの汎用入出力ポートに接続する。   In the example of FIG. 1, the upper and lower bits are set as address variables in the order from the first address register to the nth address register. In step S306, the address register from which the upper bits are set is set. In order, connection is made to an empty general-purpose input / output port corresponding to the address register in which the nearest lower bit is set.

より詳細には、第1の選択信号入力端子からの選択信号の出力がなければ、スイッチ部1a〜1gにおいて、自アドレスレジスタを選択して後段に接続し、選択信号の出力があれば、上位ビット側のアドレスレジスタを選択して後段に接続し、第2〜第nの選択信号入力端子からの選択信号の出力がなければ、各スイッチ部2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a,6b,7aにおいて、前段のスイッチ部を選択して後段に接続し、選択信号の出力があれば、上位ビット側の前段のスイッチを選択して後段に接続する。   More specifically, if there is no selection signal output from the first selection signal input terminal, the switch unit 1a to 1g selects its own address register and connects it to the subsequent stage. If the bit-side address register is selected and connected to the subsequent stage, and there is no selection signal output from the second to nth selection signal input terminals, the switch sections 2a to 2f, 3a to 3e, 4a to 4d, 5a In .about.5c, 6a, 6b, and 7a, the previous stage switch unit is selected and connected to the subsequent stage, and if the selection signal is output, the previous stage switch on the higher bit side is selected and connected to the subsequent stage.

以上のようにして、本例の汎用入出力ポート接続制御回路によれば、アドレス変数の下位ビットにまとめて格納された値をそのまま、アドレスレジスタに対して設定したとしても、特定機能が競合した場合にも、上位ビット側に順次値をシフトさせることで競合を回避でき、自動的に空きIOポートにアドレス変数を割り付けることができる。これにより、ソフトウェアによるビットシフト演算に伴うオーバーヘッドを回避することができ、半導体装置の性能を向上させることが可能となる。   As described above, according to the general-purpose I / O port connection control circuit of this example, even if the value stored in the lower bits of the address variable is stored in the address register as it is, the specific function competes. Even in this case, contention can be avoided by sequentially shifting the value to the upper bit side, and an address variable can be automatically assigned to an empty IO port. As a result, the overhead associated with the bit shift operation by software can be avoided, and the performance of the semiconductor device can be improved.

なお、上述の説明では、第1〜第8のアドレスレジスタA[7:0]は、第1のアドレスレジスタA[0]から第8のアドレスレジスタA[7]の順に下位から上位のビットがアドレス変数として設定される構成としているが、第1〜第8のアドレスレジスタA[7:0]を、第1のアドレスレジスタA[0]から第8のアドレスレジスタA[7]の順に上位から下位のビットがアドレス変数として設定される構成としても良い。この場合は、図1の説明において、第2〜第4のアドレスレジスタA[3:1]は下位側にシフトされる。   In the above description, the first to eighth address registers A [7: 0] are assigned the lower to upper bits in order from the first address register A [0] to the eighth address register A [7]. The first to eighth address registers A [7: 0] are set in order from the first address register A [0] to the eighth address register A [7]. A configuration in which lower bits are set as an address variable may be adopted. In this case, in the description of FIG. 1, the second to fourth address registers A [3: 1] are shifted to the lower side.

次に、このような汎用入出力ポート接続制御回路を設けたマイクロコントローラ(半導体装置)の構成について、図4を用いて説明する。   Next, the configuration of a microcontroller (semiconductor device) provided with such a general-purpose input / output port connection control circuit will be described with reference to FIG.

図4に示す本例のマクロコントローラ41は、汎用入出力ポート接続制御回路41a、CPU41b、及びメモリ41cを備え、CPU41bはメモリ41cに記憶されたプログラムに基づいてコンピュータ処理を実行する際、汎用入出力ポート接続制御回路41aを介して外部に接続されたIC42〜43との間でのデータの入出力を行なう。   The macro controller 41 of this example shown in FIG. 4 includes a general-purpose input / output port connection control circuit 41a, a CPU 41b, and a memory 41c. When the CPU 41b executes a computer process based on a program stored in the memory 41c, the general-purpose input / output port connection control circuit 41a. Data is input / output to / from the ICs 42 to 43 connected to the outside via the output port connection control circuit 41a.

図4においては、汎用入出力ポートIO[2:1]がIC42のSCLとSDAに割り付けられ、汎用入出力ポートIO[6:5]がIC43のTXDとRXDに割り付けられ、残りの汎用入出力ポートIO[7],[4],[3],[0]が各々IC44のアドレス線ADR[3:0]として使用されている。   In FIG. 4, general-purpose input / output ports IO [2: 1] are assigned to SCL and SDA of IC42, and general-purpose input / output ports IO [6: 5] are assigned to TXD and RXD of IC43, and the remaining general-purpose input / output Ports IO [7], [4], [3], and [0] are used as address lines ADR [3: 0] of IC 44, respectively.

以上、各図を用いて説明したように、本例の汎用入出力ポート接続制御回路は、複数の汎用入出力ポートと、各々が複数の汎用入出力ポートの各々に対応して設けられると共に、アドレス変数が設定される複数のアドレスレジスタと、各々が複数の汎用入出力ポートの各々に対応して設けられると共に、各々に特定機能が設定される複数の特定機能端子と、各々が複数の特定機能端子の各々に対応して設けられると共に、各々に選択信号が入力される複数の選択信号入力端子と、各々が特定機能端子に接続された第1の端子、第2の端子、及び汎用入出力ポートに接続された第3の端子を備えると共に、選択信号入力端子に接続され、選択信号が選択信号入力端子を介して入力された際に第1の端子と第3の端子とが接続され、選択信号が入力されない場合に第2の端子と第3の端子とが接続されるように切り替える複数の切替部であって、いずれか1つの切替部の第2の端子がアドレスレジスタの1つに直接接続された複数の切替部と、アドレスレジスタと該アドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続され、複数の切替部の切り替えにより、接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと第2の端子との接続状態を制御する接続制御部と、を備えている。   As described above with reference to the respective drawings, the general-purpose input / output port connection control circuit of this example is provided with a plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports, A plurality of address registers in which address variables are set, a plurality of specific function terminals, each of which is provided corresponding to each of a plurality of general-purpose input / output ports, each of which has a specific function set, each of which has a plurality of specific A plurality of selection signal input terminals provided corresponding to each of the function terminals, each of which receives a selection signal, a first terminal connected to the specific function terminal, a second terminal, and a general-purpose input A third terminal connected to the output port; connected to the selection signal input terminal; and when the selection signal is input via the selection signal input terminal, the first terminal and the third terminal are connected to each other. , Selection signal is input A plurality of switching units that are switched so that the second terminal and the third terminal are connected when the second terminal is not connected, and the second terminal of any one of the switching units is directly connected to one of the address registers Connected between a plurality of switching units and an address register and a second terminal of the remaining switching unit to which the address register is not directly connected, and corresponds to the address register to be connected by switching the plurality of switching units Connection for controlling the connection state between the address register and the second terminal so that the general purpose input / output port is connected to the general purpose input / output port not connected to the specific function terminal when the general purpose input / output port is connected to the specific function terminal. And a control unit.

そして、汎用入出力ポート、アドレスレジスタ、特定機能端子、選択信号入力端子、及び切替部は、各々、第1〜第8の汎用入出力ポート、第1〜第8のアドレスレジスタ、第1〜第8の特定機能端子、第1〜第8の選択信号入力端子、及び第1〜第8の切替部からなり、第1〜第8のアドレスレジスタは、第1のアドレスレジスタから第8のアドレスレジスタの順に下位から上位のビットがアドレス変数として設定され、接続制御部は、対応する汎用入出力ポートが特定機能端子に接続されたアドレスレジスタの接続先を、上位のビットが設定されたアドレスレジスタの第2の端子側に切り替える。   The general purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively the first to eighth general purpose input / output ports, the first to eighth address registers, the first to eighth address registers. The first to eighth address registers from the first address register to the eighth address register. The eight specific function terminals, the first to eighth selection signal input terminals, and the first to eighth switching units. The lower to upper bits are set as address variables in this order, and the connection control unit determines the connection destination of the address register in which the corresponding general-purpose input / output port is connected to the specific function terminal. Switch to the second terminal side.

特に、接続制御部は、第4の端子と第5の端子のいずれかを第1〜第8の選択信号入力端子からの選択信号の出力の有無に基づいて第6の端子に選択的に接続するスイッチ部を、第1〜第8の切替部に各々並列に上位ビット側に設けてなり、第1の切替部に各々並列に上位ビット側に設けられた各スイッチ部は、第1の選択信号入力端子から選択信号が入力されない場合、第4の端子に接続された自アドレスレジスタを選択して第6の端子に接続し、選択信号が入力された場合、第5の端子に接続された下位ビット側のアドレスレジスタを選択して第6の端子に接続し、第2〜第8の切替部に各々並列に上位ビット側に設けられた各スイッチ部は、第2〜第nの選択信号入力端子から選択信号が入力されない場合、第4の端子に接続された前段のスイッチ部を選択して第6の端子に接続し、選択信号が入力された場合、第5の端子に接続された下位ビット側の前段のスイッチを選択して第6の端子に接続する。   In particular, the connection control unit selectively connects either the fourth terminal or the fifth terminal to the sixth terminal based on whether or not a selection signal is output from the first to eighth selection signal input terminals. Switch units to be provided on the upper bit side in parallel with the first to eighth switching units, and each switch unit provided on the upper bit side in parallel with the first switching unit is the first selection unit. When the selection signal is not input from the signal input terminal, the local address register connected to the fourth terminal is selected and connected to the sixth terminal, and when the selection signal is input, it is connected to the fifth terminal. The address register on the lower bit side is selected and connected to the sixth terminal, and the switch units provided on the upper bit side in parallel with the second to eighth switching units are connected to the second to nth selection signals, respectively. If no selection signal is input from the input terminal, it is before the connection to the fourth terminal Of select switch portion connected to the sixth terminal, when the input selection signal, selectively connects the fifth lower bits preceding switches connected to a terminal of the sixth terminal.

以上のように、本例においては、アドレス変数の下位ビットにまとめて格納された値をそのまま、アドレスレジスタに対して設定したとしても、特定機能と競合した場合には、上位ビット側に順次値をシフトさせることで競合を回避でき、自動的に空きIOポートにアドレス変数を割り付けることができる。そのため、ソフトウェアによるビットシフト演算に伴うオーバーヘッドを回避することができるため、半導体装置の性能を向上させることが可能となる。   As described above, in this example, even if the values stored together in the lower bits of the address variable are set as they are in the address register, the values are sequentially transferred to the upper bits when there is a conflict with a specific function. By shifting, the contention can be avoided and address variables can be automatically assigned to empty IO ports. Therefore, it is possible to avoid the overhead associated with the bit shift operation by software, and it is possible to improve the performance of the semiconductor device.

なお、本発明は、図1〜図4を用いて説明した例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能である。例えば、本例では、8ビットに対応した汎用入出力ポート接続制御回路の構成で説明を行なっているが、16ビットに対応した汎用入出力ポート接続制御回路の構成としても良く、8ビット、16ビットに限るものではない。   In addition, this invention is not limited to the example demonstrated using FIGS. 1-4, In the range which does not deviate from the summary, various changes are possible. For example, in this example, the configuration of the general-purpose input / output port connection control circuit corresponding to 8 bits is described, but the configuration of the general-purpose input / output port connection control circuit corresponding to 16 bits may be used. It is not limited to bits.

1 接続制御部
1a〜1g,2a〜2f,3a〜3e,4a〜4d,5a〜5c,6a〜6b,7a スイッチ回路
1g1 第4の端子
1g2 第5の端子
1g3 第6の端子
41 マイクロコントローラ(半導体装置)
41a 汎用入出力接続制御回路
41b CPU
41c メモリ
42〜44 IC
51 マイクロコントローラ
61a〜61h 切替部
61a1 第1の端子
61a2 第2の端子
61a3 第3の端子
DESCRIPTION OF SYMBOLS 1 Connection control part 1a-1g, 2a-2f, 3a-3e, 4a-4d, 5a-5c, 6a-6b, 7a Switch circuit 1g1 4th terminal 1g2 5th terminal 1g3 6th terminal 41 Microcontroller ( Semiconductor device)
41a General-purpose input / output connection control circuit 41b CPU
41c Memory 42-44 IC
51 Microcontrollers 61a to 61h Switching unit 61a1 First terminal 61a2 Second terminal 61a3 Third terminal

Claims (7)

複数の汎用入出力ポートと、
各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、アドレス変数が設定される複数のアドレスレジスタと、
各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、各々に特定機能が設定される複数の特定機能端子と、
各々が前記複数の特定機能端子の各々に対応して設けられると共に、各々に選択信号が入力される複数の選択信号入力端子と、
各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、前記選択信号入力端子に接続され、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とが接続され、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とが接続されるように切り替える複数の切替部であって、いずれか1つの切替部の前記第2の端子が前記アドレスレジスタの1つに直接接続された複数の切替部と、
前記アドレスレジスタと該アドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続され、前記複数の切替部の切り替えにより、接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御部と、
を備え
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記第1〜第nのアドレスレジスタは、第1のアドレスレジスタから第nのアドレスレジスタの順に下位から上位のビットが前記アドレス変数として設定され、
前記接続制御部は、対応する汎用入出力ポートが特定機能端子に接続された前記アドレスレジスタの接続先を、上位のビットが設定されたアドレスレジスタに対応する前記汎用入出力ポートと前記第3の端子が接続されている前記切替部の前記第2の端子側に切り替える
汎用入出力ポート接続制御回路。
Multiple general purpose I / O ports;
A plurality of address registers each of which is provided corresponding to each of the plurality of general-purpose input / output ports and in which an address variable is set;
Each of the plurality of general-purpose input / output ports is provided corresponding to each of the plurality of general-purpose input / output ports, and a plurality of specific function terminals each having a specific function set;
Each provided corresponding to each of the plurality of specific function terminals, and a plurality of selection signal input terminals to which a selection signal is input,
Each includes a first terminal connected to the specific function terminal, a second terminal, and a third terminal connected to the general-purpose input / output port, and is connected to the selection signal input terminal. Is input via the selection signal input terminal, the first terminal and the third terminal are connected, and when the selection signal is not input, the second terminal and the third terminal A plurality of switching units that are switched so as to be connected, wherein the second terminal of any one switching unit is directly connected to one of the address registers,
A general-purpose input / output port connected between the address register and the second terminal of the remaining switching unit to which the address register is not directly connected, and corresponding to the address register to be connected by switching the plurality of switching units Is connected to a specific function terminal, the connection control unit controls the connection state between the address register and the second terminal so that it is connected to a general-purpose input / output port to which the specific function terminal is not connected When,
Equipped with a,
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
In the first to nth address registers, lower to upper bits are set as the address variables in order from the first address register to the nth address register.
The connection control unit is configured to specify a connection destination of the address register in which the corresponding general-purpose input / output port is connected to the specific function terminal, and the general-purpose input / output port corresponding to the address register in which higher bits are set and the third A general-purpose input / output port connection control circuit for switching to the second terminal side of the switching unit to which a terminal is connected .
前記接続制御部は、
第4の端子と第5の端子のいずれかを前記第1〜第nの選択信号入力端子からの前記選択信号の出力の有無に基づいて第6の端子に選択的に接続するスイッチ部を、前記第1〜第nの切替部に各々並列に上位ビット側に設けてなり、
前記第1の切替部に各々並列に上位ビット側に設けられた各スイッチ部は、前記第1の選択信号入力端子から前記選択信号が入力されない場合、前記第4の端子に接続された自アドレスレジスタを選択して前記第6の端子に接続し、前記選択信号が入力された場合、前記第5の端子に接続された下位ビット側のアドレスレジスタを選択して前記第6の端子に接続し、
前記第2〜第nの切替部に各々並列に上位ビット側に設けられた各スイッチ部は、前記第2〜第nの選択信号入力端子から前記選択信号が入力されない場合、前記第4の端子に接続された前段のスイッチ部を選択して前記第6の端子に接続し、前記選択信号が入力された場合、前記第5の端子に接続された下位ビット側の前段のスイッチを選択して前記第6の端子に接続する
請求項記載の汎用入出力ポート接続制御回路。
The connection control unit
A switch unit that selectively connects any of the fourth terminal and the fifth terminal to the sixth terminal based on whether or not the selection signal is output from the first to nth selection signal input terminals; Each of the first to nth switching units is provided in parallel on the upper bit side,
Each switch unit provided on the upper bit side in parallel with each of the first switching units has its own address connected to the fourth terminal when the selection signal is not input from the first selection signal input terminal. When a register is selected and connected to the sixth terminal and the selection signal is input, an address register on the lower bit side connected to the fifth terminal is selected and connected to the sixth terminal. ,
When the selection signal is not input from the second to n-th selection signal input terminals, each switch unit provided in parallel with the second to n-th switching units on the higher-order bit side, the fourth terminal When the selection signal is input, the previous-stage switch unit connected to the fifth terminal is selected when the previous-stage switch unit connected to is selected and connected to the sixth terminal. General-purpose output port connection control circuit according to claim 1 connected to said sixth terminal Te.
複数の汎用入出力ポートと、
各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、アドレス変数が設定される複数のアドレスレジスタと、
各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に、各々に特定機能が設定される複数の特定機能端子と、
各々が前記複数の特定機能端子の各々に対応して設けられると共に、各々に選択信号が入力される複数の選択信号入力端子と、
各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、前記選択信号入力端子に接続され、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とが接続され、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とが接続されるように切り替える複数の切替部であって、いずれか1つの切替部の前記第2の端子が前記アドレスレジスタの1つに直接接続された複数の切替部と、
前記アドレスレジスタと該アドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続され、前記複数の切替部の切り替えにより、接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御部と、
を備え、
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記第1〜第nのアドレスレジスタは、第1のアドレスレジスタから第nのアドレスレジスタの順に上位から下位のビットが前記アドレス変数として設定され、
前記接続制御部は、対応する汎用入出力ポートが特定機能端子に接続された前記アドレスレジスタの接続先を、下位のビットが設定されたアドレスレジスタに対応する前記汎用入出力ポートと前記第3の端子が接続されている前記切替部の前記第2の端子側に切り替える
用入出力ポート接続制御回路。
Multiple general purpose I / O ports;
A plurality of address registers each of which is provided corresponding to each of the plurality of general-purpose input / output ports and in which an address variable is set;
Each of the plurality of general-purpose input / output ports is provided corresponding to each of the plurality of general-purpose input / output ports, and a plurality of specific function terminals each having a specific function set;
Each provided corresponding to each of the plurality of specific function terminals, and a plurality of selection signal input terminals to which a selection signal is input,
Each includes a first terminal connected to the specific function terminal, a second terminal, and a third terminal connected to the general-purpose input / output port, and is connected to the selection signal input terminal. Is input via the selection signal input terminal, the first terminal and the third terminal are connected, and when the selection signal is not input, the second terminal and the third terminal A plurality of switching units that are switched so as to be connected, wherein the second terminal of any one switching unit is directly connected to one of the address registers,
A general-purpose input / output port connected between the address register and the second terminal of the remaining switching unit to which the address register is not directly connected, and corresponding to the address register to be connected by switching the plurality of switching units Is connected to a specific function terminal, the connection control unit controls the connection state between the address register and the second terminal so that it is connected to a general-purpose input / output port to which the specific function terminal is not connected When,
With
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
In the first to nth address registers, the upper to lower bits are set as the address variables in order from the first address register to the nth address register.
The connection control unit is configured to specify a connection destination of the address register in which the corresponding general-purpose input / output port is connected to the specific function terminal, the general-purpose input / output port corresponding to the address register in which a lower bit is set, and the third Switch to the second terminal side of the switching unit to which the terminal is connected
General-purpose input and output port connection control circuit.
前記接続制御部は、
第4の端子と第5の端子のいずれかを前記第1〜第nの選択信号入力端子からの前記選択信号の出力の有無に基づいて第6の端子に選択的に接続するスイッチ部を、前記第1〜第nの切替部に各々並列に下位ビット側に設けてなり、
前記第1の切替部に各々並列に下位ビット側に設けられた各スイッチ部は、前記第1の選択信号入力端子から前記選択信号が入力されない場合、前記第4の端子に接続された自アドレスレジスタを選択して前記第6の端子に接続し、前記選択信号が入力された場合、前記第5の端子に接続された上位ビット側のアドレスレジスタを選択して前記第6の端子に接続し、
前記第2〜第nの切替部に各々並列に下位ビット側に設けられた各スイッチ部は、前記第2〜第nの選択信号入力端子から前記選択信号が入力されない場合、前記第4の端子に接続された前段のスイッチ部を選択して前記第6の端子に接続し、前記選択信号が入力された場合、前記第5の端子に接続された上位ビット側の前段のスイッチを選択して前記第6の端子に接続する
請求項記載の汎用入出力ポート接続制御回路。
The connection control unit
A switch unit that selectively connects any of the fourth terminal and the fifth terminal to the sixth terminal based on whether or not the selection signal is output from the first to nth selection signal input terminals; Each of the first to nth switching units is provided in parallel on the lower bit side,
Each switch unit provided on the lower bit side in parallel with each of the first switching units has its own address connected to the fourth terminal when the selection signal is not input from the first selection signal input terminal. When the register is selected and connected to the sixth terminal and the selection signal is input, the upper bit side address register connected to the fifth terminal is selected and connected to the sixth terminal. ,
The switch units provided on the lower bit side in parallel with the second to n-th switching units, respectively, when the selection signal is not input from the second to n-th selection signal input terminals, When the selection signal is input, the previous switch unit on the higher bit side connected to the fifth terminal is selected when the previous switch unit connected to is selected and connected to the sixth terminal. The general-purpose input / output port connection control circuit according to claim 3 , wherein the general-purpose input / output port connection control circuit is connected to the sixth terminal.
請求項1から請求項のいずれか1項に記載の汎用入出力ポート接続制御回路と、該汎用入出力ポート接続制御回路を用いる中央処理装置と、
を備えた半導体装置。
A general-purpose input / output port connection control circuit according to any one of claims 1 to 4, a central processing unit using the general-purpose input / output port connection control circuit,
A semiconductor device comprising:
複数の汎用入出力ポートに対する、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共にアドレス変数が設定される複数のアドレスレジスタと、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に各々に特定機能が設定される複数の特定機能端子との接続を切り替える汎用入出力ポート接続制御方法であって、
各々が前記複数の特定機能端子の各々に対応して設けられた複数の選択信号入力端子を介して選択信号を入力する選択信号入力手順と、
各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、いずれか1つの第2の端子が前記アドレスレジスタの1つに直接接続され、かつ前記選択信号入力端子に接続された複数の切替部により、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とを接続し、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とを接続するように切り替える切替手順と、
前記アドレスレジスタとアドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続された接続制御部により、前記複数の切替部による切替手順で接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御手順と、
を含み、
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記第1〜第nのアドレスレジスタは、第1のアドレスレジスタから第nのアドレスレジスタの順に下位から上位のビットが前記アドレス変数として設定され、
前記接続制御手順は、対応する汎用入出力ポートが特定機能端子に接続された前記アドレスレジスタの接続先を、上位のビットが設定されたアドレスレジスタに対応する前記汎用入出力ポートと前記第3の端子が接続されている前記切替部の前記第2の端子側に切り替える
汎用入出力ポート接続制御方法。
A plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports and a plurality of address registers in which address variables are set, and each of the plurality of general-purpose input / output ports A general-purpose input / output port connection control method for switching connection with a plurality of specific function terminals provided correspondingly and each having a specific function set,
A selection signal input procedure in which a selection signal is input via a plurality of selection signal input terminals each corresponding to each of the plurality of specific function terminals;
A first terminal connected to the specific function terminal, a second terminal, and a third terminal connected to the general-purpose input / output port, and any one of the second terminals is the address register; When the selection signal is input via the selection signal input terminal by a plurality of switching units connected directly to one of the selection signal input terminals and connected to the selection signal input terminal, the first terminal and the third terminal A switching procedure for switching to connect the second terminal and the third terminal when the selection signal is not input,
The connection control unit connected between the address register and the second terminal of the remaining switching unit to which the address register is not directly connected corresponds to the address register to be connected in the switching procedure by the plurality of switching units. When the general-purpose input / output port is connected to a specific function terminal, the connection state between the address register and the second terminal is controlled so that the general-purpose input / output port is not connected to the specific function terminal. Connection control procedure to
Only including,
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
In the first to nth address registers, lower to upper bits are set as the address variables in order from the first address register to the nth address register.
In the connection control procedure, the connection destination of the address register to which the corresponding general-purpose input / output port is connected to the specific function terminal, the general-purpose input / output port corresponding to the address register in which the higher-order bit is set, and the third A general-purpose input / output port connection control method for switching to the second terminal side of the switching unit to which a terminal is connected .
複数の汎用入出力ポートに対する、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共にアドレス変数が設定される複数のアドレスレジスタと、各々が前記複数の汎用入出力ポートの各々に対応して設けられると共に各々に特定機能が設定される複数の特定機能端子との接続を切り替える汎用入出力ポート接続制御方法であって、
各々が前記複数の特定機能端子の各々に対応して設けられた複数の選択信号入力端子を介して選択信号を入力する選択信号入力手順と、
各々が前記特定機能端子に接続された第1の端子、第2の端子、及び前記汎用入出力ポートに接続された第3の端子を備えると共に、いずれか1つの第2の端子が前記アドレスレジスタの1つに直接接続され、かつ前記選択信号入力端子に接続された複数の切替部により、前記選択信号が前記選択信号入力端子を介して入力された際に前記第1の端子と前記第3の端子とを接続し、前記選択信号が入力されない場合に前記第2の端子と前記第3の端子とを接続するように切り替える切替手順と、
前記アドレスレジスタとアドレスレジスタが直接接続されていない残りの切替部の第2の端子との間に接続された接続制御部により、前記複数の切替部による切替手順で接続対象のアドレスレジスタに対応する汎用入出力ポートが特定機能端子に接続されている場合に、前記特定機能端子が接続されていない汎用入出力ポートと接続されるように、アドレスレジスタと前記第2の端子との接続状態を制御する接続制御手順と、
を含み、
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記汎用入出力ポート、前記アドレスレジスタ、前記特定機能端子、前記選択信号入力端子、及び前記切替部は、各々、第1〜第nの汎用入出力ポート、第1〜第nのアドレスレジスタ、第1〜第nの特定機能端子、第1〜第nの選択信号入力端子、及び第1〜第nの切替部からなり、
前記第1〜第nのアドレスレジスタは、第1のアドレスレジスタから第nのアドレスレジスタの順に上位から下位のビットが前記アドレス変数として設定され、
前記接続制御手順は、対応する汎用入出力ポートが特定機能端子に接続された前記アドレスレジスタの接続先を、下位のビットが設定されたアドレスレジスタに対応する前記汎用入出力ポートと前記第3の端子が接続されている前記切替部の前記第2の端子側に切り替える
汎用入出力ポート接続制御方法。
A plurality of general-purpose input / output ports, each corresponding to each of the plurality of general-purpose input / output ports and a plurality of address registers in which address variables are set, and each of the plurality of general-purpose input / output ports A general-purpose input / output port connection control method for switching connection with a plurality of specific function terminals provided correspondingly and each having a specific function set,
A selection signal input procedure in which a selection signal is input via a plurality of selection signal input terminals each corresponding to each of the plurality of specific function terminals;
A first terminal connected to the specific function terminal, a second terminal, and a third terminal connected to the general-purpose input / output port, and any one of the second terminals is the address register; When the selection signal is input via the selection signal input terminal by a plurality of switching units connected directly to one of the selection signal input terminals and connected to the selection signal input terminal, the first terminal and the third terminal A switching procedure for switching to connect the second terminal and the third terminal when the selection signal is not input,
The connection control unit connected between the address register and the second terminal of the remaining switching unit to which the address register is not directly connected corresponds to the address register to be connected in the switching procedure by the plurality of switching units. When the general-purpose input / output port is connected to a specific function terminal, the connection state between the address register and the second terminal is controlled so that the general-purpose input / output port is not connected to the specific function terminal. Connection control procedure to
Only including,
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
The general-purpose input / output port, the address register, the specific function terminal, the selection signal input terminal, and the switching unit are respectively a first to n-th general-purpose input / output port, first to n-th address register, 1 to nth specific function terminals, 1st to nth selection signal input terminals, and 1st to nth switching units,
In the first to nth address registers, the upper to lower bits are set as the address variables in order from the first address register to the nth address register.
In the connection control procedure, the connection destination of the address register in which the corresponding general-purpose input / output port is connected to the specific function terminal, the general-purpose input / output port corresponding to the address register in which a lower bit is set, and the third A general-purpose input / output port connection control method for switching to the second terminal side of the switching unit to which a terminal is connected .
JP2012080185A 2012-03-30 2012-03-30 General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method Active JP5930802B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012080185A JP5930802B2 (en) 2012-03-30 2012-03-30 General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012080185A JP5930802B2 (en) 2012-03-30 2012-03-30 General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method

Publications (2)

Publication Number Publication Date
JP2013210810A JP2013210810A (en) 2013-10-10
JP5930802B2 true JP5930802B2 (en) 2016-06-08

Family

ID=49528592

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012080185A Active JP5930802B2 (en) 2012-03-30 2012-03-30 General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method

Country Status (1)

Country Link
JP (1) JP5930802B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05250497A (en) * 1992-03-05 1993-09-28 Mitsubishi Electric Corp Device for selecting input/output function of microcomputer
JPH07152720A (en) * 1993-11-30 1995-06-16 Kawasaki Steel Corp Microprocessor
EP1043662B1 (en) * 1999-04-08 2002-07-31 Microchip Technology Inc. Apparatus and method for reconfiguring the pin assignments of one or more functional circuits in a microcontroller
US7417452B1 (en) * 2006-08-05 2008-08-26 Altera Corporation Techniques for providing adjustable on-chip termination impedance

Also Published As

Publication number Publication date
JP2013210810A (en) 2013-10-10

Similar Documents

Publication Publication Date Title
JP4726337B2 (en) One-chip microcomputer
KR100812225B1 (en) Crossbar switch architecture for multi-processor SoC platform
US7840732B2 (en) Stacked card address assignment
JP4322173B2 (en) Data transfer method and system, input / output request apparatus, data transfer program, and computer-readable recording medium recording the program
JP5930802B2 (en) General-purpose input / output port connection control circuit, semiconductor device, and general-purpose input / output port connection control method
KR100787054B1 (en) Control System for Same Address Device Using I2C Protocol
JP5288541B2 (en) Welding power source
JP4809497B2 (en) Programmable controller that executes multiple independent sequence programs in parallel
US20150355617A1 (en) Sequencer system and address setting method
JP6024752B2 (en) Information processing apparatus and control method thereof
JP5080162B2 (en) Inkjet printer driver circuit
JP2006259912A (en) Switch device, interprocessor communication system, control method of interprocessor communication system, and program
JP2010049508A (en) Selection system of plurality of buses and programmable controller with the system
JP4209648B2 (en) Memory device
JP4832721B2 (en) Semiconductor device and microcontroller
JP2006024134A (en) Dma transfer device and dma transfer method
JP2006323579A (en) Dma controller
JP5020856B2 (en) Programmable logic controller
JPS62224806A (en) Input-output device for programmable controller
JP5977209B2 (en) State machine circuit
JP2007323491A (en) Direct memory access control device and control method
JP2005242658A (en) Bus bridge
JP2005063183A (en) Semiconductor integrated circuit, semiconductor integrated circuit block, and data transfer system
JPS63142434A (en) Interrupt control system
JP4854598B2 (en) Data transfer control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150310

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160328

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160426

R150 Certificate of patent (=grant) or registration of utility model

Ref document number: 5930802

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150