Automatic adapter card setup in a computer system

Abstract: The present invention relates to a computer system including a processor (202), a main storage means (203), an adapter card (204) and connecting means (205, 206) for connecting the card to the computer. The adapter card comprises first storage means (224; 225, 226) for storing setup parameters for the card receivable via the connecting means, and control means for controlling the supply of setup parameters to the first storage means. According to the invention the computer system is characterised in that the main storage means stores setup parameters for the adapter card and a first number related to the adapter card, and in that the control means comprises selector means (218) for selecting a second number related to the card, second storage means (214) for storing the first number related to the card received via the connecting means, and a comparator (216) for comparing the first and second numbers and for enabling said the storage means to receive and store the setup parameters from the main storage means via the connecting means when the first and second numbers are identical.

Description: This invention relates to a computer system capable of accepting at least one adapter card which needs to be supplied with setup parameters, and to an adapter card for use in such a computer system. The use of adapter cards is a well known technique for expanding the capability of a computer system. For example, if a computer user needs to send and receive data, an adapter card specifically designed for modem communications can be inserted into the computer to provide, in conjunction with appropriate communications software, the required data communications capability. Generally, personal computers are equipped with a plurality of "slots" into which adapter cards can be inserted. The essential element of each slot is a connector that is connected to an address and data bus within the computer. The adapter card includes a mating connector, usually a printed circuit board edge connector, that can be inserted into one of the adapter card connectors, i.e., one of the computer slots. To prevent interference with other adapter cards that may already be in the system, as well as interference with various resources within the computer, each adapter card must be provided with certain "setup" parameters, such as the specification of the address of the port through which the card communicates over the bus. In the International Business Machines Corporation (IBM) Personal Computer AT computer (the bus architecture of which has come to be known as the ISA or Industry Standard Architecture) setup parameters are specified by the setting of switches, such as dual-in-line or "DIP" switches, or the use of jumpers that are located on the adapter card. The difficulty in establishing setup parameters through the use of switches and jumpers is that the user must carefully choose, usually after reading the instruction manual for each adapter card in the computer, the setup parameters for each card to ensure that one adapter card does not interfere with another. To overcome this drawback, the IBM Micro Channel computer system architecture uses an arrangement in which each adapter card includes a plurality of programmable setup registers, called Programmable Option Select or "POS" registers. The particular setup parameters are determined automatically by a setup program that is supplied with each Micro Channel architecture computer, which in turn uses information that is provided on a reference diskette that is supplied with each of the adapter cards. These setup parameters are programmed into the POS registers of each of the adapter cards, usually immediately after power on and during system initialisation. In a conventional Micro Channel architecture adapter card, there are eight POS registers, POS0 - POS7, some of which may be read only registers. Each POS register of each adapter card is addressed using the same address as that used to address the corresponding POS register of every other adapter card. More specifically, in the Micro Channel architecture, POS registers 0-7 are addressed at I/O addresses 100-107 (hex) respectively. To read from or write to the POS registers of a particular adapter card, the Micro Channel architecture bus includes a separate setup line for each adapter card slot in the system. Thus, to setup the adapter card that is physically located in the first slot of the computer, the system is placed in the setup mode and the first setup line is activated (while all other setup lines remain in the inactive state). After properly selecting a particular adapter card, the processor can then individually address each one of the POS registers of the currently selected card. For a more detailed explanation of the POS registers of the Micro Channel architecture, the reader is referred to US -A- 5,038,320. An adapter card according to the preamble of claim 1 is given in EP-A-351 961. It would be desirable if the Micro Channel architecture automatic setup procedure could be used in an ISA bus computer. However, current adapter cards for ISA bus computers do not include setup or POS registers, and EVEN if they did, the ISA bus does not include separate setup lines for each card slot. The object of the present invention is to provide an improved computer system which includes at least one adapter card which needs to be supplied with setup data and to an adapter card for use in such a computer system. The invention relates to an adapter card for a computer comprising connecting means for connecting the card to a computer, first storage means for storing setup parameters for the card receivable via the connecting means, and control means for controlling the supply of setup parameters to the first storage means. According to the invention the adapter card is characterised in that the control means comprises second storage means for selecting a first number related to the card receivable via the connecting means, selector means for selecting a second number related to the card, and a comparator for comparing the second number with the contents of the second storage means and for enabling the first storage means to receive set up parameters via the connecting means when the first and second numbers are identical. The present invention also relates to a computer system including a processor, a main storage means, an adapter card and connecting means for connecting the card to the computer. The adapter card comprises first storage means for storing setup parameters for the card receivable via the connecting means, and control means for controlling the supply of setup parameters to the first storage means. According to the invention the computer system is characterised in that the main storage means stores setup parameters for the adapter card and a first number related to the adapter card, and in that the control means comprises selector means for selecting a second number related to the card, second storage means for storing the first number related to the card received via the connecting means, and a comparator for comparing the first and second numbers and for enabling the storage means to receive the setup parameters from the main storage means via the connecting means when the first and second numbers are identical. In order that the invention may be more readily understood an embodiment will now be described with reference to the accompanying drawings, in which the single figure, Figure 1, is a schematic diagram of a computer system that includes the present invention. Referring to Fig. 1, the computer system includes a Bus 201, a Processor 202, a Memory 203 (main storage system) and an Adapter Card 204. Bus 201 is a conventional ISA (Industry Standard Architecture) bus (or other bus that does not include separate setup lines for each adapter card) and includes individual control, address and data lines. Bus 201 also includes a plurality of receptacles 205 (only one is illustrated in Fig. 1) for receiving adapter cards, such as Adapter Card 204. Each location at which an adapter card can be inserted into the system is referred to as a "slot" and each slot includes one receptacle 205. Each slot is assigned a unique slot or adapter card number. Although the slot numbers may be arbitrarily assigned, they usually correspond to the physical location of the slot. Memory 203 stores one or more programs for execution by Processor 202. In Fig. 1, Memory 203 and Processor 202 communicate via Bus 201, although, in an ISA bus, a separate memory bus interconnects the Memory and the Processor. The Processor 202 provides control, address and data information to Bus 201. Adapter Card 204 is electrically connected to Bus 201 via connector 206, which is inserted into one of the receptacles 205. Address decoder 210 is connected to the address lines of Bus 201 and decodes I/O port address 96h (the suffix "h" is used to indicate that the preceding number is expressed in hexadecimal format). The output of decoder 210 is coupled to an OR Gate 212 and the output of OR Gate 212 is coupled to a first Enable input (E 1 ) of a Data Register 214. A second Enable input (E 2 ) of Data Register 214 is coupled to the Write line of the control portion of Bus 201. Both the first and second Enable inputs must be active in order to write data to Data Register 214. Data register 214 has four data inputs (D 0 -D 3 that are connected to the data lines of Bus 201. Three of the four data inputs (D 0 -D 2 ) to Data Register 214 are used to write a programmed slot number into the Data Register 214, while the fourth input (D 3 ) is used to indicate when the system is in the setup mode of operation. To write data to Data Register 214, the Processor 202 places address 96h on the Bus 201 and this is decoded by Address Decoder 210. The output of Address Decoder 210 then activates Enable input E 1 to Data Register 214. During a write operation, the Write Line of the control portion of Bus 201 is made active, thereby activating Enable input E 2 of Data Register 214. With both Enable inputs active, data bits D 0 -D 3 are then written into Data Register 214. Each of the three outputs Q 0 -Q 2 (the outputs that indicate the programmed slot number) of Data Register 214 is coupled to a first input of a respective a respective one of three Comparators 216 (only one comparator is illustrated in Fig. 1). Likewise, each of three Switches 218 (only one switch is illustrated in Fig. 1) is coupled to a second input of a respective one of the Comparators 216. Each of the second inputs to the Comparators includes a Pull-up Resistor 220. The Switches 218 are used to select a slot number. The Switches 218 are manually selectable by a user and are preferably contained in a small, eight position rotary switch suitable for direct mounting on a printed circuit board, although other manually selectable switches may also be suitable. As an alternative, jumpers may be used in place of the Switches 218. Each of the three outputs of Comparators 216 is connected to a respective one of three inputs of a four input AND Gate 222 (only two inputs of AND Gate 222 are illustrated in Fig. 1). The fourth input to AND Gate 222 (illustrated) is connected to the Q 3 output (the output that indicates setup mode) of Data Register 214. After (or immediately before) inserting Adapter Card 204 into Receptacle 205, the user sets the Switches 218 to indicate the particular slot number that the Adapter Card has been plugged into (the switch selected slot number). If the programmed slot number, as loaded into bits Q 0 -Q 2 of Data Register 214, matches the switch selected slot number, as selected by Switches 218, the outputs of the three Comparators 216 are active. And, if Q 3 (the setup mode bit of Data Register 214) is also active, then the output (Card Setup) of AND Gate 222 is active, indicating that Adapter Card 204 is in the setup mode. Note that, if the switches of each of the adapter cards in the system are set to unique slot numbers, then only one of the adapter cards can be placed in the setup mode at any one time. The output of AND gate 222 (Card Setup) is coupled to the second Enable (E 2 ) input of each of eight data registers POS0 - POS7 (only three such data registers 224, 225, and 226 are illustrated in Fig. 1). These data or "setup" registers, which are referred to as Program Option Select or "POS" registers, are used to store setup information pertinent to this particular adapter card. These setup registers correspond to the POS registers in the Micro Channel architecture bus version of the computer. To individually address each one of the POS registers, Address Decoder 230 decodes addresses 100h through 107h, and the decoding of each address within this range causes a first Enable (E 1 ) input of a corresponding POS register to be activated. For example, when address 100h is decoded, input E 1 of the POS0 register (224) is activated. Similarly, when address 101h is decoded, input E 1 of the POS1 register (225) is enabled. However, before any one of the POS registers can be accessed, the adapter card must be placed in the setup mode, such that Card Setup activates the second Enable (E 2 ) inputs of the POS registers. To setup an adapter card, the processor must write setup parameters to, and read setup parameters from the POS registers. The processor does this under the control of a setup program stored in the Memory 203, which is usually run at system initialisation. Since the setup program is well known in the Micro Channel architecture art, the details of the program are not presented here. To write parameters to and read parameters from the POS registers, the Processor 202 begins by placing address 96h on the bus, thereby selecting Address Decoder 210. The processor then selects a particular adapter card slot by writing a "programmed card slot number" into Data Register 214. Simultaneously with the writing of the programmed card slot number, the processor also sets the fourth output bit (Q 3 ) of Data Register 214 active to indicate that the system is now operating in the setup mode. If the system is in the setup mode, and if the programmed card slot number, as stored in Data Register 214, matches the switch selectee card number, as determined by the setting of the switches 218, each one of the POS registers on the currently selected adapter card may now be individually accessed. To access a particular POS register, the Processor places the corresponding address of the POS register (100h for POS0, 101h for POS1, etc.) on the Bus 201, and Address Decoder 230 then activates the selected POS register through its E 1 input. Primarily for testing purposes, it is also possible to read the contents of Data Register 214. To permit the reading of the contents of Data Register 214, the output of a four line Bus Transceiver 231 is coupled to the data portion of Bus 201, and the Q 0 through Q 3 outputs of Data Register 214 are coupled to the inputs of this Bus Transceiver. The output of Comparator 216 and the output of Address Decoder 210 are coupled to the input of a two input AND Gate 232. The output of AND gate 232 is coupled to one input of an OR Gate 234, the output of which is coupled to one input of a two input AND Gate 236. The other input of AND Gate 236 is coupled to the Read Line of the control portion of Bus 201. The output of AND Gate 236 is coupled to the enable input of Transceiver 231. Consequently, when the card is in the setup mode, the output of comparator 216 and the first input of AND Gate 232 are active. The second input of AND Gate 232 is active when Address Decoder 210 is selected by placing address 96h on the Bus. Under both of these conditions, the output of AND Gate 232 is active and this signal is passed through OR Gate 234 and into the first input of AND Gate 236. When the control portion of Bus 201 indicates that the Bus is in read mode by making the Read line active, the other input of AND Gate 236 also goes active. Since both inputs of AND Gate 236 are now active, its output goes active, thereby activating Transceiver 231 and gating the contents of Data Register 214 onto the Bus 201. There is an additional method of reading the contents of Data Register 214. To accomplish this, Address Decoder 238 has three inputs that are coupled to the output of Switches 218, thereby presenting the switch selected card number to Address Decoder 238. The other input to Address Decoder 238 is coupled to the address lines of Bus 201, such that the Address Decoder decodes an address within the range of 108h - 10Fh. The particular address within that range that is decoded depends upon the three inputs from Switches 218. For example, when Switches 218 are set to Card Number 0, the output of Address Decoder 238 goes active only when address 108h is placed on the Bus. Similarly, when the Switches are set to Card Number 1, the output of the Address Decoder goes active only when address 109h is placed on the Bus. This output from Address Decoder 238 is coupled to the second input of OR Gate 234, thereby activating Bus Transceiver 231 when the read line of Bus 201 is active. The output of Address Decoder 238 is also coupled to the second input of OR Gate 212, thereby activating the first Enable input E 1 of Data Register 214 when an address in the range of 108h - 10Fh is decoded and when that address corresponds to the switch selected card number set by Switches 218. Thus, by addressing the card in this way, a second method is provided for reading data in from Data Register 214.

Claims: An adapter card (204) for a computer comprising connecting means (206) for connecting said card to a computer, first storage means (224, 225, 226) for storing setup parameters for said card receivable via said connecting means, and control means for controlling the supply of setup parameters to said first storage means, characterised in that said control means comprises second storage means (214) for storing a first number related to said card receivable via said connecting means, selector means (218) for selecting a second number related to said card and, a comparator (216) for comparing said second number with the contents of said second storage means and for enabling said first storage means to receive set up parameters via said connecting means when said first and second numbers are identical. An adapter card as claimed in Claim 1 characterised in that said control means comprises a decoder (210) for decoding a selected address receivable via said connecting means, and means (212) for supplying the output of said decoder to said second storage means to enable said second storage means to receive said first number. An adapter card as claimed in Claim 1 or Claim 2 characterised in that said selector means comprises a set of switches (218). A computer system including a processor (202), a main storage means (203), an adapter card (204) according to claim 1 or 2 and connecting means (205, 206) for connecting said card to said computer, wherein said main storage means (203) stores setup parameters for said adapter card and a first number related to said adapter card.

Inventors: THOMPSON STEPHEN PATRICK, THOMPSON, STEPHEN PATRICK
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1992
Main classification: G06F13
IPC codes: G06F13, G06F3