From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aeba3d258ec8d495 X-Google-Attributes: gid103376,public From: mfb@mbunix.mitre.org (Michael F Brenner) Subject: Re: Selecting Ada95 compiler for MSDOS realtime application Date: 1996/11/06 Message-ID: <55q23n$bje@top.mitre.org>#1/1 X-Deja-AN: 194864722 references: <327FCD98.40AD@cedar-rapids.net> organization: The MITRE Corporation, Bedford Mass. newsgroups: comp.lang.ada Date: 1996-11-06T00:00:00+00:00 List-Id: Richard Maffei posted a requirement for a non-GNAT Ada-95 compiler that handles the following: > concurrent processing of serial I/O with up to 6 devices using > complex protocol incorporating handshaking with precise time-out > requirements. Supports interrupt handlers for I/O > 1 (one) ms timer resolution as opposed to standard PC timer of 55 ms. The reason for using a non-GNAT Ada-95 compiler is for fear of commercial use of GNAT's libraries. If commercial use of the GNAT compiler and the libraries needed to produce this application is forbidden, then there is a serious problem, and it needs to be solved. However, in addition to GNAT meeting these requirements for multiple serial interrupt handlers (you have to write a few lines of code, which you can actually lift from the Meridian, Janus developers, Alsys, DDC-I, or djgpp manuals, and you have to understand the 80x86 interrupt structure), and fast resolution timer, there are other Ada-83 compilers that can meet these requirements, such as the ones named in the preceeding sentence. Some of these are in the process of coming out with full Ada-95 compilers, but this is not important because of the upwards compatibility of Ada-83 to Ada-95. For example, the EMCC multiple serial interrupt handlers, with the exception of a tiny bit of machine dependent code, are line-for-line identical on Alsys Ada-83 and GNAT Ada-95. So you can implement code like this (or identical to this, since it is free software) in a way that works on a couple of Ada-83 compilers and GNAT now, and later move to other Ada-95 compilers as Tompson and others finishes implementing the Ada-95 features in their compilers. However, however, there is a much more important observation that might be of help to you, and choice of compiler (or even language) will not help: you would probably get a lot more performance out of your system (two orders of magnitude more), if you used a serial port concentrator, a piece of hardware available from several famous hardware vendors which can be found by searching the net. The concentrator does the byte-level interrupts and places the results of the twelve serial ports into a RAM buffer (in the concentrator, not in the 80x86). The 80x86 just has a single serial (or parallel) port that accesses the concentrator, and can get one or more bytes from the buffers for the twleve ports, with a greatly reduced overhead for interrupt handling. Such concentrators in speeds up to 56K for ISDN, RS485, RS422, or RS232 interfaces cost about $800 to $2000 dollars for a dozen ports, with the cheapest being those made for RS232. To get RS422 balanced signals you will pay closer to the $2000 because you will need the equivalent of an RS232 to RS422 converter circuitry. This is a case where a portion of the problem should really be solved in hardware, to increase the throughput of the software. Nevertheless the Ada compilers that exist now (83 or 95) can meet your real requirements, even if some of them happen to be 83 this year. Mike Brenner