Memory and peripheral chip select apparatus

Abstract: Memory and peripheral chip select apparatus for allowing the addressing of different memory and peripheral elements by a processor (410). The different memory and peripheral elements include a first memory elements and first periph­ eral elements (150, 181) located into a first adapter pluggable into a base machine (4) and second memory ele­ ments and second peripheral elements (250, 281) located into a second adapter pluggable into the base machine (4). The processor 410 further addresses third memory elements and third peripheral elements (420, 430, 440, 450) located into the base machine (4). The first and second memory elements include code which have a determined type and a determined level of release. The invention is character­ ized in the fact that it further includes means (410) for reading the type and the level of the release of said code included into one of said first and second adapter and means (420) responsive to said reading and operating when said codes of both of said first and second adapters are of the same type for selecting that of said first or second memory means which has the code of higher level of release when said processor (410) desires to access the code of a given type into one of said adapters.

Description: The present invention relates to data processing systems and particularly to processor based systems designed to be connected to pluggable electronic modules including memory and peripheral elements. The configuration of multipurpose data processing systems to individual needs or requirements, by adding peripheral modules, herein called adapters, such as video display devices, disk data storage devices, printer communication facilities or telecommunication adapters and the like, is often required. The addition of new capabilities to the multipurpose system herein called a base machine, or more generally the personnalization of the latter requires the plugging of interface adapters into the available slots of the board of the base machine. However, after each "module addition" or "substraction", the processor included into the base machine must be able to address separately every interface adapter plugged on the board of the base machine. The problem of address allocation is well known, and many solutions actually exist. European Patent Application EP-A- 265 575 owned by IBM describes, in addition to several systems of the prior art allowing address allocation of interface cards, a data processing system having automatic address allocation arrangements for addressing interface cards. The system described in this document allows the plugging of one or several cards, similar or different in the slots available irrespective of their location on the board of the system. However, this system and more generally the prior art systems have particularly three distinctive limitations: First, although EP-A-265 575 system allows the simultanous addressing of two similar adapters, each adapter containing code stored into Read Only Memory elements (ROM), the operating of each is strictly dependent of its associated code included therein and independent of the existence of the one included into the other adapter. The system therefore does not take into account the possible existence of two similar codes but being of different releases, that is to say manufactured at a different time and being at a different level of sophistication due to the continous progress of advanced technology. Therefore, in the prior art systems, the operating of a determined adapter is controlled by the corresponding code stored into it irrespective of its level of update. Let us assume that a customer having already plugged for some years an adapter of a definite type (telecommunication adapter for instance) wishes to add a second interface adapter of the same type. Assuming also that the latter interface adapter, although providing the same functions, is characterized by a higher level of release of the code included therein, due to a likely update of the code and the software contained into the ROM elements included into the more recent interface adapter. Now, the base machine being personalized with two interface adapters having a similar type, but each one being of a different level of release, it is highly desirable that the base machine be able to detect the more recent interface adapter and to choose the corresponding code included therein in order to control the operating of both interface adapters, whereby taking profit of the updated technology for both. The same problem requests a solution whenever a PROM included into one adapter is defective thus entailing a failure into the corresponding adapter. In the latter case, it is also desirable that the memory and peripheral chip select apparatus be able to substitute the PROM element existing in the other adapter in order to control the operation of both adapters. Furthermore, assuming that two adapters of the same type are plugged into the base machine, the two peripheral elements included therein and which are naturally affected to the same range of addresses, are both likely to generate interruptions to the processor included into the base machine. Therefore, the processor and the main program have to manage the interruptions, which may overlapp or not and which are generated by the latter peripheral elements. Indeed, when an determined adapter generates an interruption to the processor, the latter must distinguish the peripheral element having generated the interruption from the other. This management tasks generally require in the prior art systems that the main program or software be designed for all possible variations and combinations of adapters. It is therefore highly desirable to provide a memory and peripheral chip select apparatus allowing the main program to be designed as if only one adapter were plugged into the base machine. Furthermore, EP-A-265 575 system does not allow, when used in the telecommunication field in order to provide a base machine designed to receive pluggable adapters characterized by a determined CCITT protocol, the operating of the adapters, initially designed to be controlled by the code included therein, by a patch code directly loaded into the base machine. Indeed, in the field of telecommunication products, there may be cases when the codes or a part of the codes can be loaded directly through the telecommunication network into the base machine. The prior art system does not allow that code stored into the base machine being operated by means of some address allocation arrangements, in place of the code still loaded into the adapter. US-A-4- 589 063 discloses an apparatus for automatic configuration of a computer system wherein one or more system peripheral or I/O devices can be interfaced to the computer sytem through I/O boards that plug into a system motherboard. Each of the I/O devices includes a controlling device driver module that operates under a program code stored in a read only memory resident on the I/O board and by which the device driver module allows the computer system to communicate with its associated peripheral and I/O devices. DE-A-3-210 616 discloses a system having means to read data from a first ROM and means for reading the identifier data from a second ROM and means for comparing both data in order to select a routine existing either in the first ROM or the second one. Summary of the invention It is an object of the invention to provide a memory and peripheral chip select apparatus for allowing the plugging of adapters into a base machine and to provide, when two adapters having the same type are plugged, the detection of the code stored into the adapter which has the higher level of release, in order to control the operating of all adapters with the more recent code. It is an other object of the invention to provide a memory and peripheral chip select control apparatus for a equipment allowing the connection of a DTE to a telecommunication network and providing the possibility of updating the codes included into both the base machine and the adapters by patch routines directly transmitted through the telecommunication network. It is a further object of the invention to provide a memory and peripheral chip select control apparatus allowing easy succession of the different interruptions generated by the different peripheral elements included into the adapters without necessitating that the main control program takes into account and manages the location where the interruptions are generated and the number of adapters. The objects of the invention are achieved by means of the memory and peripheral chip select apparatus as defined in claim 1. This apparatus allows the addressing of different memory and peripheral elements by a processor. The different memory and peripheral elements include a first memory elements and first peripheral elements located into a first adapter pluggable into a base machine and second memory elements and second peripheral elements located into a second adapter pluggable into the base machine. The processor further addresses third memory elements and third peripheral elements located into the base machine. The first and second memory elements include code which have a determined type and a determined level of release. The invention is characterized in the fact that it further includes means for reading the type and the level of the release of said code included into one of said first and second adapter and means responsive to said reading and operating when said codes of both of said first and second adapters are of the same type for selecting that of said first or second memory means which has the code of higher level of release when said processor desires to access the code of a given type into one of said adapters. Description of the drawings Fig. 1 is an example of a I.S.D.N. Terminal Adapter consisting of a base machine and its associated adapters. Fig. 2 describes the arrangement of fig. 3, fig. 4, fig. 5 and fig. 6 in order to provide an extensive view of the apparatus according to the invention. Fig. 3, 4, 5 and 6 are partial views describing the general structure of the preferred embodiment of the invention. Fig. 7 illustrates the organization of NVRAM element 440. Fig. 8, fig. 9 are flow charts detailing the different operations involved by the operating of the differents elements according to the invention. Fig. 10 illustrates the management and the calling of the different interrupt routines when one adapter generates an interruption to the processor. Description of the invention The preferred embodiment of the invention will refer below to the telecommunication field and particularly to a Terminal Adapter for an I.S.D.N network. With this assumption, the above base machine should be considered as a telecommunication equipment designed to receive pluggable adapters, each adapter allowing the connection of one Data Terminating Equipment (DTE) to the telecommunication network. Indeed, the latter network are widely spreading, allow the connection and the communication between numerous equipments having different protocols such as V24, V35, X21 CCITT recommendations. In order to allow manufacturing costs reduction, telecommunication products suppliers tend to provide equipments in large quantities, which equipments are nevertheless expected to satisfy numerous different requirements and protocols. For instance, with respect to the concept of Integrated Services Digital Networks (I.S.D.N.) resulting from the on-going process of digitalization of telephone networks, the customer will be allowed to access large public telecommunication services. Telecommunication suppliers will therefore have to widely market equipments, commonly known as Terminal Adapters (TA) in the I.S.D.N. field, designed to allow the I.S.D.N. network connection for a large quantities of telecommunication DTE having different protocols such as V24 V35... as defined by the CCITT. Those TA may involve modular elements, or functional packages herein called adapters, containing electronic components specific to particular protocols and which, when plugged into a base machine will allow the connection of a particular Data Terminating Equipment (DTE) to the ISDN network. Since such products are intended to be used by the general public, a need has appeared for a system for allowing the plugging of an adapter into a base card irrespective of the physical location on the board or in the different slots available in the base machine and to provide the management of the possible existence of two adapters being of the same type, e.g. V24 adapters, but having codes characterized by a different level of release. Actually, let us assume that a customer who has already plugged a first V24 and a first V35 adapter into the base machine may wish to change the first V24 adapter for a second V35 adapter, the latter having more or updated functions with respect to the first V35 adapter. Those new function may come from an update of the code contained into the ROM elements included into the more recent adapter. Now, the base machine being personalized with two V35 adapters, each one having code being of a different level of release, it is highly desirable that the base machine, i.e. the terminal adapter, be able to detect the more recent V35 adapter and to choose the corresponding code included therein in order to control the operating of both V35 adapters, whereby taking profit of the uptdated technology for both. Fig. 1 shows a example of a telecommunication equipment and particularly a Terminal Adapter for a I.S.D.N. network consisting of a base machine (4) designed to receive particular fonctional packages or adapters (1), (2) and (3), each adapter supporting a determined type of protocol such as V24, V35, X21 ... as defined by the CCITT recommendations. In a processor based environment such as that used in the telecommunication products technology, the base machine and the different adapters will include a processor and storage means such as Read Only Memory elements (ROM), Non Volatil Random Access Memory elements (NVRAM), Random Access Memory elements (RAM), peripheric units... The apparatus according to the invention, as will be described in detail hereinafter, provides and manages the different addressing signals, and particularly memory chip select (MCS) and peripheral chip select (PCS) signals in order to allow the connection of the adapters whatever their location and to make sure, if so, that the more updated code stored into one of the adapters is preferrably used for all the adapters. As mentioned above, the present invention allows each adapter being plugged and located into any one of the available slots without any preassignment. In the case when two similar adapters, for instance of the type V35, have been plugged into the base machine, the apparatus according to the invention will detect whether both adapter have the same level of release, i.e. the same level of code contained into the ROM included into the adapters. If yes, each adapter will operate with its associated code included in the latter. If the codes contained into the two adapters have different levels of release, the apparatus according to the invention will detect the code of the higher level which will be used for both adapters. If the codes contained into one adapter is in competition with a patch code that has been directly loaded into the base machine by means of the telecommunication network, the system according to the invention will choose the latter every time the base machine wishes addressing this adapter. Fig. 3, 4, 5 and 6 are partial views describing the general structure of the preferred embodiment of the invention. The arrangement of these figures in order to provide the full drawing is shown in figure 2. As mentioned previously, and particularly with respect to figure 4 of the set of figures 3, 4, 5 and 6, base 4 includes a processor 410 such as one of the 80186 INTEL serie which communicates by means of a time multiplexed address and data bus 414 to a control logic 420, the selection of which being carried out by one chip select signal PCS0 generated by processor 410 on a lead 415. Bus 414 carries the Address/Data bus signals which constitute the time multiplexed memory or I/O addresss and data bus. Base 4 further includes memory storage elements and particularly a RAM 430, a non-volatil RAM 440 and a PROM 450, every elements being addressable by means of chip select signals carried on a bus 416 and a bus 421 connected to a multiplexing/demultiplexing element 424 included into control logic 420. Bus 421 consists of a first address bus 422 and a second data bus 423, first and second bus respectively carrying the value of the address and the data. Both address and data values are provided after some demultiplexing processing carried out by multiplexing/demultiplexing element 424. READ, WRITE and other control signals are provided by processor 410 on leads 413. Base 4 also communicates with adapters 1 and 2 by means of address and data busses 421, and READ/WRITE control leads 413. Adapter 1 (resp. adapter 2) described with respect to figure 5 (resp. fig. 6) includes a Data Terminating Equipment DTE interface and control logic 181 (resp. DTE Interface and control logic 281) for interfacing the different data and control signals transmitted by busses 182 and 183 (resp. busses 282 and 283) whereby allowing the communication of one adapter with its associated DTE. With respect to CCITT V24 requirements, DTE interfaces and control logic 181 and 182 particularly manage signals such as "Data Terminal Ready" (DTR), "Ready To Send" (RTS), "Ready For Sending" (RFS), "Calling Indicator" (CI), clock and data signals... With respect to figure 4 again, Control logic 420 also includes a first set of two MCS registers 103 and 106, the two MCS registers being connected to data bus 423 and being respectively controlled by the output of 3-inputs AND gates 102 and 105. AND gate 102 has a first input connected to the output of a decode circuit 101, the input of which being connected to address bus 422. AND gate 102 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. Similarly, AND gate 105 has a first input connected to the output of a decode circuit 104, the input of which being connected to address bus 422. AND gate 105 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. The output of MCS registers 103 and 106, both being 8-bit busses, is connected to an input of a comparator circuit 107, the latter comparator circuit 107 having a third input connected to the 8 most significant bits of address bus 422. The output 110 of comparator circuit 107 carries the MCS1 control signal that will control the chip select of the storage element included into adapter plugged into slot 1, hereinafter called adapter 1. With respect to figure 3, control logic 420 also includes a first set of two PCS registers 113 and 116, the two PCS registers being connected to data bus 423 and being respectively controlled by the output of 3-inputs AND gates 112 and 115. AND gate 112 has a first input connected to the output of a decode circuit 111, the input of which being connected to address bus 422. AND gate 112 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. Similarly than above, AND gate 115 has a first input connected to the output of a decode circuit 114, the input of which being connected to address bus 422. AND gate 115 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. The output of PCS registers 113 and 116, both being a 8-bit bus, is connected to an input of a comparator circuit 117, the latter comparator circuit 117 having a third input connected to the 8 most significant bits of address bus 422. Control logic 420 also includes a latch 123 having its input connected to one lead of data bus 423 and being controlled by 3-inputs AND gate 122. AND gate 122 has a first input connected to the output of a decode circuit 121, the input of which being connected to address bus 422. AND gate 122 also has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. The output of both comparator 117 and latch 123 is connected to AND gate 130 which eventually provides, on a lead 140, the peripheral chip select signal PCS1 allowing the control of the I/O circuits and particularly DTE interface and control logic 181 included into adapter 1. Similarly, control logic includes the following elements allowing the generation of the memory and peripheral chip select MCS2 and PCS2 signals in order to control the selection of the memory and the I/O circuits of adapters 2. Particularly, Control logic 420 includes a second set of two MCS registers 203 and 206, the two MCS registers being connected to data bus 423 and being respectively controlled by the output of 3-inputs AND gates 202 and 205. AND gate 202 has a first input connected to the output of a decode circuit 201, the input of which being connected to address bus 422. AND gate 202 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. Similarly, AND gate 205 has a first input connected to the output of a decode circuit 204, the input of which being connected to address bus 422. AND gate 205 has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. The output of MCS registers 203 and 206, both being a 8-bit bus, is connected to an input of a comparator circuit 207, the latter comparator circuit 207 having a third input connected to the least significant bits of address bus 422. The output 210 of comparator circuit 207 carries the MCS2 control signal that will control the chip select of the storage element included into adapter 2. Control logic 420 eventually includes a latch 223 having its input connected to one lead of data bus 423 and being controlled by 3-inputs AND gate 222. AND gate 222 has a first input connected to the output of a decode circuit 221, the input of which being connected to address bus 422. AND gate 222 also has a second input connected to the WRITE control lead of control bus 413 and a third input connected to PCS0 lead 415 controlled by processor 410. The output of both comparator 117 and latch 223 is connected to an AND gate 230 which eventually provides, on a lead 240, the peripheral chip select signal PCS2 allowing the control of the I/O circuits of adapter 2, and particularly DTE interface and control logic 281 with respect to figure 5. Now, with respect to figure 6 (resp. 5) adapter 1 further includes a PROM 150 (resp. 250) addressable by means of address and data busses 421 and Read/Write control leads 411. As will be described below with detail, control logic 420 performs the chip select generation for the memory and I/O elements of adapter 1 and particularly provides the MCS1 and PCS1 memory and peripheral chip select signals respectively on leads 110 and 140. Similarly, Control logic 420 provides MCS2 and PCS2 memory and peripheral chip select signals on leads 210 and 240 in adapter 2. DTE interface 181 of adapter 1 and DTE interface 281 of adapter 2 respectively provides interrupt signals Int1 and Int2 to processor 410 through leads 411 and 412. Fig. 8, fig. 9 and fig. 10 are flow charts detailing the different operations involved by the operating of the differents elements included into the base and the adapters in order to control the different chip select signals and to achieve the memory and peripheral chip selection in both the adapters and the base card. With respect to fig. 8 and 9, the preferred embodiment of the invention starts operating by a initialization phase. This initialization phase may follow a hardware reset e.g. a power on reset, step 510 in fig. 8. The initialization phase may also follow a step of customization (520) in which the telecommunication network transmits to the Terminal Adapter a sequence of data, hereincalled a patch. This patch may include two distinctive types of information. A first type of information includes data relative to the customer environment and particularly data indicating the types of adapters plugged into the corresponding base machine. A second type of information includes sequences of data that will be loaded into the machine in order to supersede corresponding data already existing into the machine, and particularly the PROM elements included therein, but considered at the given time as being too ancient. If one hardware reset or a customization patch occurs, the whole system will enter into a Initial Program Loading (I.P.L) entailing a reinitialization phase (530) and beginning with the loading of the NVRAM element 440 included into base 4. The organization of NVRAM element 440 is particularly illustrated with respect to fig. 7 NVRAM element 440 includes four main fields. The first field includes a sequence of call instructions, each call instruction being associated to a specific routine involved by the operating of the system. More precisely, this first field includes call instructions corresponding to most of the routines existing into the machine. However, routines corresponding to the processing of interrupt signals existing on leads 411 or 412, or more generally interrupt busses if so, are associated to data located into the fourth field of NVRAM element 440 as well be indicated hereinafter. The second field appearing in the data organization of NVRAM element 440 consists in a table which gives the correspondance between the 8-MSB of the address of any interrupt routine existing, whatever used on into PROM 150 or 250 and the 8-MSB of the address of the corresponding patch, if one patch corresponding to the latter interrupt routine already existing into the PROM included into one adapter, which patch being located into the third field of NVRAM element 440. Fig. 7 particularly indicates that a interrupt routine existing into PROM element 150 for instance at the Hex. address "C0000" (the 8-MSB being "C0" in Hex.) is superseded by a patch routine existing into the third field of NVRAM element 440 at the address "E8000" (the 8-MSB being "E8"). The third field appearing in the organization of NVRAM content includes the series of patches that have been loaded when received through the telecommunication network. It should be noted that if the second field is only dedicated to the interrupt routines involving the PROM elements of the adapters, the third field of NVRAM is, contrary to the second, affected to both interrupt and non interrupt routines. The fourth field of NVRAM 440 includes the interrupt pointers of the different interrupt routines of the different adapters. In particular, referring back to the above example, the value of the interrupt pointer of adapter 1 is equal to "E8000" (in Hex.) since a patch code stored into NVRAM 440 supersedes the corresponding interrupt routine existing at the address "C0000" into PROM 150. On the contrary, the value of the interrupt pointer of adapter 1 would be "C0000" if no patch were present. Now, referring back to fig. 8 and having described the detail of the organization of NVRAM 440, the Initial Program Loading (I.P.L) of step 530 is followed by the loading of the first, second and third field of NVRAM 440, step 540. Then, step 550, processor 410 starts the initialization of the adapters and particularly performs the initialization of all registers included into the terminal adapter. To achieve this, a test is performed step 560 in order to determine the presence of one adapter into slot 1, hereinafter called adapter 1. If one adapter has been plugged into slot 1, the plugging being detected by the the voltage level existing on a lead not shown in the figures, processor 410 performs a default initialization of registers 103 and 106, step 570. Processor 410 initialize both MCS registers 103 and 106 by loading two different values, for instance respectively 10100000 ("A0" in hexadecimal) and 10110000 ("B0" in hexadecimal) in MCS register 103 and MCS register 106. To achieve this and with respect to figure 4, processor 410 validates PCS0 lead in order to select control logic 420 and generates the address of register 103 simultaneously with the byte "A0" on data bus 423. At the instant when processor 410 generates a WRITE control signal on control bus 413, AND gate 102 makes value "A0" be loaded into MCS register 103. Then, processor 410, while continuing the activation of PCS0 lead, generates the address of register 103 which is decoded by decode circuit 104 while also generating value "B0" on data bus 423. When a WRITE control signal appears on control bus 413, AND gate 105 controls the loading of the latter value "B0" in register 103. The set of two bytes "A0" and "B0" loaded into MCS registers 103 and 106 define a range of addresses, the address of the range starting from the value "A0000" (in hexadecimal) and the last address of the range preceeding the value "B0000" (in hexadecimal). This set of two values that are loaded in MCS registers 103 and 106 therefore determines the range of address that will be affected to the memory elements included into adapter 1. Then and with respect to fig. 8 again, processor 410 performs a READ operation of PROM 150 of adapter 1 in order to determine all the features and parameters and particularly the type of the adapter (V24, V35...), the level of the release ..., step 580. To achieve this, processor 410 generates a sequence of addresses beginning with the address "A0000" and validates PCS lead 415. Since the most significant bits of the addresses of the sequence are comprised between the values "A0" (Hex.) and "B0" (Hex.), or in other words since the addresses of the sequence are comprised between the values "A0000" (Hex.) and "B0000" (Hex.), comparator 107 sets MCS1 lead 110 at a high level. This involves the selection of PROM 150 which generates a sequence of data on bus 421, the sequence of data being characteristic of the adapter 1. For instance this sequence of data includes a first field characteristic of the type of the adapter (V24, V35...), a second field characteristic of the level of the release, a third field characteristic of the address of the beginning of the link editor (for instance "C0000" (in Hex.)), a fourth field characteristic of the size of the code included into PROM 150. From this information, processor 410 first checks the validity of the sequence of data in order to make sure that PROM 150 actually generates data. Moreover, in the preferred embodiment of the invention, processor 410 performs in the initialization period a test to determine whether the adapters, and particularly adapter 1, actually correspond to those specified by the customer. This customization can be performed locally or remotely, while customization patch apply step 520 for instance, the machine being connected and receiving information directly through the telecommunication network. From the above information, processor 410 also performs a reinitialization of both registers 103 and 106, step 590, by loading a new set of two addresses. The first address of this new set of address is directly read from the third field and will correspond to the first address of the range of address dedicated to adapter 1. The second address of this new set is evaluated from the first address read from the third field and the size of the code loaded into PROM 150. Among the features and parameters stored into the above sequence of data stored into PROM 150, processor 410 also reads the values of the addresses of the interrupt routines corresponding to adapter 1. Processor 410 determines whether the latter values, or more precisely the 8-MSB of the values, correspond to interrupt routines having been subject to a patch loaded in the above step 520. From this determination, processor 410 stores the value of the address of the interrupt routine existing into PROM 150, or the value of the address of the corresponding patch if so. With respect to the example of fig. 7, since the second field of NVRAM shows the existence of a patch corresponding to the interrupt routine existing at the Hex. address "C0000" in PROM 150, the patch being at the Hex. address "E8000", processor 410 will load into NVRAM 440 the Hex. value "E8000". The latter value, called interrupt 1 routine pointer with respect to fig. 7, corresponds to the address to be be generated as soon as DTE interface and control logic 181 sends an interrupt signal on interrupt lead 411. It should be noticed that the above description refers to a one-bit interrupt lead 411, but the same scheme applies in case of multiple interrupt leads. Therefore, the value of the addresses of the interrupt routines existing either in PROM 150 or in an associated patch loaded into NVRAM 440 is stored into the above mentioned fourth field of NVRAM 440, step 600. These interrupt routines will be called when adapter 1, and particularly DTE interface 181 included therein, generates an interrupt on lead 411 to processor 410. This may occur for instance when DTE interface and control logic 181 detects the reception of a SDLC frame... When the interrupt routine address pointer of adapter 1 has been recorded into NVRAM 440, or if the base has not detected an adapter plugged into the first slot, processor 410 performs a test to determine the presence of a second adapter plugged into base 4, step 610 with respect to fig. 9, in order to initialize MCS registers 203 and 206. If a second adapter has been plugged into the second slot available into the machine, processor 410 performs a default initialization of both MCS registers 203 and 206 by loading, similarly than before, a set of two values defining a second range of addresses which will be temporally affected to the memory elements included into adapter 2, step 620. Then, step 630, processor 410 determines the type of the adapter 2 by reading the corresponding sequence of data and comparing its type with that of adapter 1, step 640. If the two adapters are of a different type, processor 410 stores into MCS registers 203 and 206 the set of two addresses extracted from the sequence of data read from the PROM included into adapter 2 in a similar way than below, step 650. Then, step 660, processor 410 updates the fourth field of NVRAM element 440 by storing the interrupt routine address pointer of adapter 2. However, if the two adapters are of the same type, e.g. two V24 adapters, processor 410 proceeds to step 670 to determine the more recent adapter between both by comparing the level of the release of the code included into the PROM elements of both adapters. If adapter 2 is not the more recent adapter, processor 410 stores value "00" in MCS registers 203 and 206, or any address value that will prevent MCS2 lead 210 to be activated and the PROM element 250 included into adapter 2 to be addressed. Therefore, the code stored into the latter PROM element included into adapter 2 will never be used. On the contrary, if adapter 2 is more recent than adapter 1, processor 410 proceeds to step 700 in which processor 410 stores value "00" in MCS registers 103 and 106, or any address value that will prevent MCS2 lead 110 to be activated and the PROM element 150. The preferred embodiment of the invention also includes means to detect a failure in one adapter, for instance adapter 1, in order to re-initialize MCS registers 203 and 206, in addition to MCS registers 103 and 106, so that to address the more ancient but still operating PROM element included into adapter 2. When the couples of MCS registers (103/106) or 203/206) have been re-initialized with the right value, processor 410 proceeds to step 690 which performs a last update of the interrupt routine address pointers stored into the fourth field into NVRAM 440. This last update allows to take into account the result of test performed in 670 in order to store the address of the more recent interrupt routines included into one of the two PROM. Step 720 completes the process of initialization of base machine 4 and the adapters. The period of initialization having been completed, the system according to the invention is now to able to address, when the main program stored into PROM 450 requests the running of a determined routine into one adapter, the corresponding routine existing either as a patch code into NVRAM 440 or into the PROM included into an other adapter. Indeed, let us assume that the communication between one DTE connected to a V24 adapter requests the use of some routines included the latter V24 adapter. Then processor 410 accesses to the first field of NVRAM 440 in order find the address of the routine requested. Three distinctive situations may then occur: a first situation characterized in the fact that the the desired routine is only available into PROM 150 may occur. In this case, the address found from the first field of NVRAM 440 is comprised within the first range of addresses, the latter range being defined with respect to the content of MCS register 103/106. This entails the output of comparator circuit 107 be validated and address directly PROM 150. a second situation characterized in the fact that the desired routine is available into PROM 1 but also, with a higher level of release, into the PROM element of the second adapter, the latter adapter being of the same type of the first one. In this case, the address found from the first field of NVRAM containing the list of call instructions of most routines used into the machine is comprised within the second range of addresses defined with respect to the content of the second set of MCS registers 203/208. Consequently, the output of comparator circuit 207 is set to a high level, what entails the selection of PROM 250. a third situation characterized in the fact that the requested routine is part of the patch code stored into NVRAM 440 and transmitted directly through the telecommunication network. In this case, the call instruction included into the first field of NVRAM 440 refers to an address, the value of which being out of the first and second ranges above defined but referring directly to the patch routine located into the third field of NVRAM 440. Consequently, the system according to the invention allows the management of routines and codes in general in order to select the one having the higher level of release or the one not stored into a PROM element likely to be old-fashioned but directly loaded through the telecommunication network. Thus, each adapter generally operating with its associated code included therein, becomes capable of using for its own purpose the higher release level code included into an other adapter or a patch code directly loaded through the network. Fig. 10 illustrates the management and the calling of the different interrupt routines when one adapter generates an interruption to processor 410. Assuming that adapter 1 be a V24 type adapter and that the communication between the terminal adapter and the DTE be in a data receiving phase. Let us also assume that during a communication session between a DTE and the telecommunication network, adapter 1 and particularly DTE interface and control logic 181 generates an interrupt to processor 410 via interrupt lead 411. This may occur for instance at the reception by adapter 1 of a Serial Data Link Control (SDLC) frame, or when any event which requires immediate processing, occurs. It should be noticed that interrupt lead 411 could be implemented as an interrupt bus included several prioritized or not, maskable or not interrupt leads. As soon as the interrupt is detected, processor 410 performs the processing of this interrupt coming from a determined slot existing in base machine 4, step 800. This is followed by an interrupt disabling step 810 in order to prevent any other interruption. Processor 410 saves into an internal register the value existing into PCS latch 123 and then particularly addresses PROM 450 included into base machine 4 in order to determine the new value to store into PCS latch 123. Processor 410 saves into a internal register the content of latches 123 and 223 step 820. Then processor reads PROM 450 in order to determine the new set of values to stores into latches 123 and 223. Since the interrupt has come from adapter 1, processor 410 stores the bit "1" into latch 123 and the bit "0" into latch 223. When the initialization of latches 123 and 223 completes, processor 410 enables again the possibility of interruptions coming from leads or busses 411 and 412, step 835. Then, step 840, processor 410 performs a indirect call operation through NVRAM 440, i.e. reads the content of the said fourth field of the NVRAM, this content characterizing the address of the CALL operation, the latter content corresponding to the beginning address of the interrupt routine stored either into PROM 150 if no patch code has been loaded and NVRAM 440 if one patch code has been loaded with respect to step 520. Referring back to the above example, processor 410 calls the interrupt routine located at the address "E8000", i.e. into NVRAM 440, since a patch code has been loaded directly through the telecommunication network. In the reverse case, i.e. no patch code existing into NVRAM 440 and the value of the interrupt pointer of adapter 1 being equal to "C0000", processor 410 Would perform a call operation to a interrupt routine located at the address address "C0000", i.e. located into PROM 150. The interrupt routine may then begin step 850, be it associated either with code included into PROM 150, PROM 250 or with patch code stored into NVRAM 440 according to the preceeding mechanism. It may include different steps allowing the management of the considered interrupt and particularly the reception of the Serial Data Link Control (SDLC) frame. For instance, one of these steps will consist in the reading by Processor 410 of the state of DTE interface 181 and particularly the value of the Frame Checking Sequence (FCS) located at the end of the frame, the reading of which allowing the checking of the integrity of the sequence of data. If the FCS appears to be incorrect, DTE interface 181 will request the re-transmission of the unvalid SDLC frame. It should be noted that during the processing of the interrupt routine with respect to step 850, processor 410 will address automatically the DTE interface and control logic 181 which has generated the interruption and not the other. This is achieved by means of the operating of compare circuit 117, latches 123 and 223 and their respectively associated AND gates, i.e. AND gates 130 and 230. Indeed, when processor 410 generates addresses comprising within the range of values as defined by the content of registers 113 and 116 in order to address the peripheral interface, the content of compare circuit 117 is set to a high level. Since latches 123 and 223 have respectively been set to a high and low level, PCS1 signal on lead 140 is set to a high level while on the contrary, PCS2 signal on lead 240 is set to a low signal. Consequently, processor 410 addresses automatically the right adapter that has requested some interruption process. The benefit of this is major since it should be noted that the same program managing the interrupts coming from the adapter 1 can directly be used to manage the interrupts coming from adapter 2. This eventually allows the save of a great deal of software and program code since the program can be designed as if only one adapter were connected to base machine 4. The final advantage is considerable in terms of code development and storage cost reductions. When the interrupt routine 850 completes, processor 410 restores the values that was loaded into latches 123 and 223 before the interruption occured, step 1030. The process of the interruption then completes, step 1040. Fig. 10 particularly illustrates a case in which the interrupt routine performed with respect to step 850 is interrupted by an interruption generated by DTE interface and control logic 281 on lead 412. This interruption generated by adapter 2 will then entails a second phase of interruption process. Indeed, assuming that DTE interface and control logic 281 generates an interrupt signal INT2 to processor 410 by means of lead 412, processor 410 proceeds to step 860 in order to start the process of the second interruption. Step 860 is then followed by a disable interrupt step 870 which prevents other interrupt disturbing the system at the moment when processor saves the content of latches 123 and 223 into internal registers, step 880. Then, similarly than above, processor 410 addresses PROM 450 in order to fetch the new set of values to be stored into PCS latch 123 and 223. Since an interrupt routine of the second adapter needs to be performed, processor 410 respectively loads a a ONE into latch 223 and a ZERO into latch 123, step 890. As soon as these operations are performed, the interruptions are again authorized, step 895. Then, processor performs a indirect CALL operation in NVRAM 440, step 1000. Similarly than above, processor 410 reads the content of the said fourth field of the NVRAM, this content characterizing the address of the CALL operation, be it located into PROM 150, PROM 250 or NVRAM 440 in case of the existence of patch code. At the completion of routine 1010 which has been requested by adapter 2 processor 410 restores the values that was loaded into latches 123 and 223 before the interruption occured in step 1020. Then, processor 410 proceeds to the processing of interrupt routine 850 of adapter 1. The sequence of the operations performed then is similar to the case when no interrupt coming from the second adapter occurs, i.e. includes both step 1030 and 1040. It should be noticed that the invention allows easy succession of different interruption without necessitating that the corresponding interruption routines take into account the number of adapters plugged into the machine or the possibility of a succession of interrupts. In other words, each interrupt routine may be designed, written and stored into the storage elements as if it were only designed for one adapter and one interruption at a time. As mentioned above, the advantage in terms of memory storage and development cost reduction is considerable. It should be also noticed that the apparatus according to the invention may be used when a defined machine has to operate with different pluggable adapters, the adapter being characterized by different level of releases.

Claims: Memory and peripheral chip select apparatus allowing the addressing of different memory and peripheral elements by a processor (410), said processor (410) addressing first memory elements (150) and first peripheral elements (181) located into a first adapter (1) pluggable into a base machine (4), said processor (410) addressing second memory elements (250) and second peripheral elements (281) located into a second adapter (2) pluggable into said base machine (4), said processor (410) further addressing third memory elements and third peripheral elements (420, 430, 440, 450) located into said base machine (4), said first and second memory elements including code having a determined type and a determined level of release, said apparatus comprising: first storage means (103, 106) for storing a first set of address values defining a first range of addresses which validates the selection of said first memory elements (150) included into said first adapter (1), said first storage means being initialized with values to permit reading of the type and level of release of said first memory elements (150) of said first adapter (1); second storage means (203, 206) for storing a second set of address values defining a second range of addresses which validates the selection of a second memory element (250) included into said second adapter (2), said second storage means being initialized with values to permit reading of the type and level of release of said second memory elements (250) of said second adapter (2); means (410) for reading the type and the level of the release of said code included into said first and second memory elements (150, 250) and for reinitializing said first and second storage means (103, 106, 203, 206) to new sets of address ranges in accordance with said readings; said apparatus being characterized in the fact that it further includes means (410) responsive to said reading to compare said types of both of said first and second adapters and when said first and said second adapters are of the same type for determining which of said first and second memory elements included into said adapters has the higher level of release; means responsive to said determination for performing said reinitialization of said first and said second address storage means in order to enable the selection of the memory element included into one of said adapter having the higher level of release when a defined routine is requested and to disable the selection of the memory element having the lower level of release. Apparatus according to claim 1 characterized in that said base machine (4) is an equipment allowing the connection of a Data Terminating Equipment (DTE) to a telecommunication network. Apparatus according to claim 2 characterized in that said base machine (4) further includes: means (440) for storing sequences of data representing patch routines transmitted through said telecommunication network and updating parts or routine stored into said storage elements (450) or said first and second memory elements (150, 250); means (410, 440) for calling a defined patch routine in place of a corresponding routine located into said storage element (459) or said first and second memory elements (150, 250). Apparatus according to claim 2 characterized in that it further includes: a third storage means (113, 116) for storing a third set of address values for defining a third range of addresses affected to the selection of one among the peripheral elements included into said adapters; a fourth storage means (123, 223) for storing data representative of the affectation at a given instant of said third range of addresses to one among said peripheral elements (181, 281); means (130, 230) for generating a first PCS1 (140) peripheral chip select control signal and a second PCS2 peripheral chip select control signal allowing the selection of one among said peripheral elements included into said adapters when said processor (410) generates an address comprised within said third range of addresses; means (410, 450) responsive to an interruption generated by one among said peripheral elements for saving the content of said fourth storage means; means (410, 450) for loading a new set of values into said fourth storage means (123, 223), said new set of values corresponding to the peripheral element (181, 281) which has generated said interruption and which requires an interrupt management routine; means for calling said interrupt routine corresponding to said interruption; means for restoring said saved data into said fourth storage means (123, 223) when said interruption routine completes whereby said processor manages said peripheral elements as if only one were connected and involved in the operating.

Inventors: CLARA JEAN-LOUIS, JACHIMCZYK PHILIPPE, LE PENNEC JEAN-FRANCOIS, MASSIERA LOUIS, THERIAS PHILIPPE, CLARA, JEAN-LOUIS, JACHIMCZYK, PHILIPPE, LE PENNEC, JEAN-FRANCOIS, MASSIERA, LOUIS, THERIAS, PHILIPPE, Le Pennec, Jean-François
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1989
Main classification: G06F13
IPC codes: G06F12, G06F13