Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!cornell!rochester!bbn!spdcc!merk!alliant!steckel From: steckel@Alliant.COM (Geoff Steckel) Newsgroups: comp.arch Subject: Re: More On Write-Only Control Registers Summary: Overlapping different functions causes failures Keywords: read-only write-only Message-ID: <2007@alliant.Alliant.COM> Date: 20 Jun 88 16:51:12 GMT References: <439@cf-cm.UUCP> <22150@amdcad.AMD.COM> Reply-To: steckel@alliant.UUCP (Geoff Steckel) Organization: Omnivore Technology, Newton, MA Lines: 20 An anecdote might make it clearer why write-only registers are a real problem, if they share addresses with any other function. This happened with an old DEC serial interface (DZ-11 I think), and the PDP11/04. The DZ-11 had a read-only input FIFO and a write-only output register at the same address. With most machines, this would cause no problems. It required very careful coding to be sure that only READ accesses were used to get data from the input register, and WRITE accesses to send to the output. Unfortunately, in order to save some complexity in the 11/04 CPU, DEC had made the MOV instruction ALWAYS READ ITS MEMORY DESTINATION. This meant that MOV Rn, OUTPUT_REGISTER would first read (and discard!) the top of the input FIFO. There was absolutely nothing that could be done to make this combination of CPU and peripheral work. We wound up junking 5 11/04s, which at the time cost us some $50K in all, not to mention the time spent debugging mysterious lost input characters. Geoff Steckel (steckel@alliant.COM)